/// <summary> /// Initializes all nested controls. /// </summary> private void SetupControls() { InitializeControlScripts(); // Initialize inner view control innermedia.FileSystemPath = StartingPath; // Set grid definition innermedia.ListViewControl.GridName = Config.ShowFolders ? "~/CMSModules/Content/Controls/Dialogs/FileSystemSelector/FolderView.xml" : "~/CMSModules/Content/Controls/Dialogs/FileSystemSelector/FileSystemView.xml"; // Set inner control binding columns innermedia.FileIdColumn = "path"; innermedia.FileNameColumn = "name"; innermedia.FileExtensionColumn = "type"; innermedia.FileSizeColumn = "size"; innermedia.SearchText = SearchText; // Register for inner media events innermedia.GetArgumentSet += innermedia_GetArgumentSet; // Parent directory button if ((ShowParentButton) && (!string.IsNullOrEmpty(NodeParentID))) { plcParentButton.Visible = true; imgParent.ImageUrl = "~/App_Themes/Default/Images/CMSModules/CMS_Content/Dialogs/parent.gif"; mSaveText = GetString("dialogs.mediaview.parentfolder"); btnParent.OnClientClick = String.Format("SelectNode('{0}');SetParentAction('{0}'); return false;", NodeParentID.Replace("\\", "\\\\").Replace("'", "\\'")); } innermedia.Configuration = Config; }
/// <summary> /// Initializes all the nested controls. /// </summary> private void SetupControls() { if (AllowNew) { NewFile.AllowedExtensions = AllowedExtensions; NewFile.TargetFolderPath = TargetFolderPath; NewFile.NewTextFileExtension = NewTextFileExtension; NewFile.SourceType = MediaSourceEnum.PhysicalFile; NewFile.IsLiveSite = IsLiveSite; } // Parent directory button if (ShowParentButton && (!String.IsNullOrEmpty(NodeParentID))) { plcParentButton.Visible = true; btnParent.OnClientClick = String.Format("SelectNode('{0}');SetParentAction('{0}'); return false;", NodeParentID.Replace("\\", "\\\\").Replace("'", "\\'")); } }