protected override void OnInit(EventArgs e) { base.OnInit(e); if (Request.QueryString["dnnprintmode"] != "true" && Request.QueryString["popUp"] != "true") { var objControlPanel = ControlUtilities.LoadControl <ControlPanelBase>(this, Host.ControlPanel); var objForm = (HtmlForm)Page.FindControl("Form"); if (objControlPanel.IncludeInControlHierarchy) { objControlPanel.IsDockable = IsDockable; if (!Host.ControlPanel.ToLowerInvariant().EndsWith("controlbar.ascx")) { Controls.Add(objControlPanel); } else { if (objForm != null) { objForm.Controls.AddAt(0, objControlPanel); } else { Page.Controls.AddAt(0, objControlPanel); } } //register admin.css ClientResourceManager.RegisterAdminStylesheet(Page, Globals.HostPath + "admin.css"); } } }
/// <inheritdoc/> protected override void OnInit(EventArgs e) { base.OnInit(e); if (this.Request.QueryString["dnnprintmode"] != "true" && !UrlUtils.InPopUp()) { var objControlPanel = ControlUtilities.LoadControl <ControlPanelBase>(this, Host.ControlPanel); var objForm = (HtmlForm)this.Page.FindControl("Form"); if (objControlPanel.IncludeInControlHierarchy) { objControlPanel.IsDockable = this.IsDockable; if (!Host.ControlPanel.EndsWith("controlbar.ascx", StringComparison.InvariantCultureIgnoreCase)) { this.Controls.Add(objControlPanel); } else { if (objForm != null) { objForm.Controls.AddAt(0, objControlPanel); } else { this.Page.Controls.AddAt(0, objControlPanel); } } // register admin.css ClientResourceManager.RegisterAdminStylesheet(this.Page, Globals.HostPath + "admin.css"); } } }
private void InjectControlPanel() { //if querystring dnnprintmode=true, controlpanel will not be shown if (Request.QueryString["dnnprintmode"] != "true" && Request.QueryString["popUp"] != "true" && Request.QueryString["hidecommandbar"] != "true") { if ((ControlPanelBase.IsPageAdminInternal() || ControlPanelBase.IsModuleAdminInternal())) { //ControlPanel processing var controlPanel = ControlUtilities.LoadControl <ControlPanelBase>(this, Host.ControlPanel); var form = (HtmlForm)Parent.FindControl("Form"); if (controlPanel.IncludeInControlHierarchy) { //inject ControlPanel control into skin if (ControlPanel == null) { if (form != null) { form.Controls.AddAt(0, controlPanel); } else { Page.Controls.AddAt(0, controlPanel); } } else { if (form != null) { if (Host.ControlPanel.ToLowerInvariant().EndsWith("controlbar.ascx")) { form.Controls.AddAt(0, controlPanel); } else { ControlPanel.Controls.Add(controlPanel); } } else { if (Host.ControlPanel.ToLowerInvariant().EndsWith("controlbar.ascx")) { Page.Controls.AddAt(0, controlPanel); } else { ControlPanel.Controls.Add(controlPanel); } } } //register admin.css ClientResourceManager.RegisterAdminStylesheet(Page, Globals.HostPath + "admin.css"); } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// ProcessModule processes the module which is attached to this container. /// </summary> private void ProcessModule() { if (this._tracelLogger.IsDebugEnabled) { this._tracelLogger.Debug($"Container.ProcessModule Start (TabId:{this.PortalSettings.ActiveTab.TabID},ModuleID: {this.ModuleConfiguration.ModuleDefinition.DesktopModuleID}): Module FriendlyName: '{this.ModuleConfiguration.ModuleDefinition.FriendlyName}')"); } if (this.ContentPane != null) { // Process Content Pane Attributes this.ProcessContentPane(); // always add the actions menu as the first item in the content pane. if (this.InjectActionMenu && !ModuleHost.IsViewMode(this.ModuleConfiguration, this.PortalSettings) && this.Request.QueryString["dnnprintmode"] != "true") { JavaScript.RequestRegistration(CommonJs.DnnPlugins); this.ContentPane.Controls.Add(this.LoadControl(this.PortalSettings.DefaultModuleActionMenu)); // register admin.css ClientResourceManager.RegisterAdminStylesheet(this.Page, Globals.HostPath + "admin.css"); } // Process Module Header this.ProcessHeader(); // Try to load the module control this._moduleHost = new ModuleHost(this.ModuleConfiguration, this.ParentSkin, this); if (this._tracelLogger.IsDebugEnabled) { this._tracelLogger.Debug($"Container.ProcessModule Info (TabId:{this.PortalSettings.ActiveTab.TabID},ModuleID: {this.ModuleConfiguration.ModuleDefinition.DesktopModuleID}): ControlPane.Controls.Add(ModuleHost:{this._moduleHost.ID})"); } this.ContentPane.Controls.Add(this.ModuleHost); // Process Module Footer this.ProcessFooter(); // Process the Action Controls if (this.ModuleHost != null && this.ModuleControl != null) { this.ProcessChildControls(this); } // Add Module Stylesheets this.ProcessStylesheets(this.ModuleHost != null); } if (this._tracelLogger.IsDebugEnabled) { this._tracelLogger.Debug($"Container.ProcessModule End (TabId:{this.PortalSettings.ActiveTab.TabID},ModuleID: {this.ModuleConfiguration.ModuleDefinition.DesktopModuleID}): Module FriendlyName: '{this.ModuleConfiguration.ModuleDefinition.FriendlyName}')"); } }
private void InjectControlPanel() { // if querystring dnnprintmode=true, controlpanel will not be shown if (this.Request.QueryString["dnnprintmode"] != "true" && !UrlUtils.InPopUp() && this.Request.QueryString["hidecommandbar"] != "true") { if (Host.AllowControlPanelToDetermineVisibility || (ControlPanelBase.IsPageAdminInternal() || ControlPanelBase.IsModuleAdminInternal())) { // ControlPanel processing var controlPanel = ControlUtilities.LoadControl <ControlPanelBase>(this, Host.ControlPanel); var form = (HtmlForm)this.Parent.FindControl("Form"); if (controlPanel.IncludeInControlHierarchy) { // inject ControlPanel control into skin if (this.ControlPanel == null || HostController.Instance.GetBoolean("IgnoreControlPanelWrapper", false)) { if (form != null) { form.Controls.AddAt(0, controlPanel); } else { this.Page.Controls.AddAt(0, controlPanel); } } else { this.ControlPanel.Controls.Add(controlPanel); } // register admin.css ClientResourceManager.RegisterAdminStylesheet(this.Page, Globals.HostPath + "admin.css"); } } } }
/// ----------------------------------------------------------------------------- /// <summary> /// ProcessModule processes the module which is attached to this container /// </summary> /// <history> /// [cnurse] 12/05/2007 Created /// </history> /// ----------------------------------------------------------------------------- private void ProcessModule() { if (ContentPane != null) { //Process Content Pane Attributes ProcessContentPane(); // always add the actions menu as the first item in the content pane. if (InjectActionMenu && !ModuleHost.IsViewMode(ModuleConfiguration, PortalSettings) && Request.QueryString["dnnprintmode"] != "true") { ContentPane.Controls.Add(LoadControl("~/admin/Menus/ModuleActions/ModuleActions.ascx")); //register admin.css ClientResourceManager.RegisterAdminStylesheet(Page, Globals.HostPath + "admin.css"); } //Process Module Header ProcessHeader(); //Try to load the module control _moduleHost = new ModuleHost(ModuleConfiguration, ParentSkin, this); ContentPane.Controls.Add(ModuleHost); //Process Module Footer ProcessFooter(); //Process the Action Controls if (ModuleHost != null && ModuleControl != null) { ProcessChildControls(this); } //Add Module Stylesheets ProcessStylesheets(ModuleHost != null); } }