Bloom.Edit.PageEditingModel.UpdateMetadataAttributesOnImage C# (CSharp) Method

UpdateMetadataAttributesOnImage() public static method

public static UpdateMetadataAttributesOnImage ( ElementProxy imgOrDivWithBackgroundImage, SIL.Windows.Forms.ImageToolbox.PalasoImage imageInfo ) : void
imgOrDivWithBackgroundImage ElementProxy
imageInfo SIL.Windows.Forms.ImageToolbox.PalasoImage
return void
        public static void UpdateMetadataAttributesOnImage(ElementProxy imgOrDivWithBackgroundImage, PalasoImage imageInfo)
        {
            //see also Book.UpdateMetadataAttributesOnImage(), which does the same thing but on the document itself, not the browser dom
            imgOrDivWithBackgroundImage.SetAttribute("data-copyright",
                             String.IsNullOrEmpty(imageInfo.Metadata.CopyrightNotice) ? "" : imageInfo.Metadata.CopyrightNotice);

            imgOrDivWithBackgroundImage.SetAttribute("data-creator", String.IsNullOrEmpty(imageInfo.Metadata.Creator) ? "" : imageInfo.Metadata.Creator);

            imgOrDivWithBackgroundImage.SetAttribute("data-license", imageInfo.Metadata.License == null ? "" : imageInfo.Metadata.License.ToString());
        }