Exemple #1
0
        protected override void OnDataBinding(EventArgs e)
        {
            string x = FieldValueEditString.ToString();

            foreach (ListItem item in DropDownList1.Items)
            {
                if (item.Value == x)
                {
                    //DropDownList1.SelectedValue = x;
                    DropDownList1.SelectedValue = item.Value;
                    break;
                }
            }

            base.OnDataBinding(e);
        }
        private void InitDialogOpener()
        {
            InitEditorProvider();

            #region Get View, Update, DeletePaths
            var      homeDirectory = PortalSettings.Current.HomeDirectory;
            string[] paths;
            var      metaDataPaths = GetMetaDataValue <string>("Paths");
            if (!String.IsNullOrEmpty(metaDataPaths))
            {
                paths = metaDataPaths.Split(',').Select(p => homeDirectory + p).ToArray();
            }
            else
            {
                paths = _imageManagerConfiguration.ViewPaths;
            }

            #endregion


            if (ShowImageManager)
            {
                DialogOpener1.DialogDefinitions.Add("ImageManager", GetImageManagerDefinition(paths));
                DialogOpener1.DialogDefinitions.Add("ImageEditor", GetImageEditorDefinition(paths));
            }
            if (ShowFileManager)
            {
                DialogOpener1.DialogDefinitions.Add("DocumentManager", GetDocumentManagerDefinition(paths));
            }

            DialogOpener1.HandlerUrl = "~/DesktopModules/Admin/RadEditorProvider/DialogHandler.aspx?portalid=" + PortalSettings.Current.PortalId + "&tabid=" + PortalSettings.Current.ActiveTab.TabID;
            if (!String.IsNullOrWhiteSpace(FieldValueEditString) && FieldValueEditString.StartsWith("File:"))
            {
                DialogOpener1.AdditionalQueryString = "&PreselectedItemUrl=" + HttpUtility.UrlEncode(SexyContent.SexyContent.ResolveHyperlinkValues(FieldValueEditString, PortalSettings.Current));
            }
            DialogOpener1.EnableEmbeddedSkins = _editorProvider._editor.EnableEmbeddedSkins;
            DialogOpener1.Skin = _editorProvider._editor.Skin;

            InitPickerMenu();
        }