1
Vote

ImageField - missed default selection for picture library

description

In ImageField settings, Extended properties we are able to select Picture library to store images.
 
Once library has been selected, there is no indication in UI - drop down control doesn't show the existing selected picture library.
 
As a temporary solution, it might be fixed here:
ImageFieldControl.ascx -> LoadPictureLibraries() function:
 
foreach (SPList pl in pictureLibraries)
            {
                var newItem = new ListItem(pl.Title, pl.ID.ToString());
 
                if (fieldProperties != null && !string.IsNullOrEmpty(fieldProperties.PictureLibraryId))
                {
                    var tmpGuid = new Guid(fieldProperties.PictureLibraryId);
                    newItem.Selected = pl.ID == tmpGuid;
                }
 
                ddlPictureLibrary.Items.Add(newItem);
            }

comments