using System; using System.Web.UI.WebControls; using CMS.ExtendedControls; using CMS.GlobalHelper; using CMS.UIControls; public partial class CMSMasterPages_UI_TabsHeader : CMSMasterPage { #region "Properties" /// /// Tabs control. /// public override UITabs Tabs { get { return tabControlElem; } } /// /// PageTitle control. /// public override PageTitle Title { get { return titleElem; } } /// /// Body panel. /// public override Panel PanelBody { get { return pnlBody; } } /// /// HeaderActions control. /// public override HeaderActions HeaderActions { get { if (base.HeaderActions != null) { return base.HeaderActions; } return actionsElem; } } /// /// Prepared for specifying the additional HEAD elements. /// public override Literal HeadElements { get { return ltlHeadElements; } set { ltlHeadElements = value; } } /// /// Left tabs panel. /// public override Panel PanelLeft { get { return pnlLeft; } } /// /// Right tabs panel. /// public override Panel PanelRight { get { return pnlRight; } } /// /// Separator panel. /// public override Panel PanelSeparator { get { return pnlSeparator; } } /// /// Panel containig title. /// public override Panel PanelTitle { get { return pnlTitle; } } /// /// Panel containing tab menu control. /// public override Panel PanelTabs { get { return pnlWhite; } } /// /// Frame resizer. /// public override CMSUserControl FrameResizer { get { return frmResizer; } } /// /// Tab master page doesn't hide page title. /// public override bool TabMode { get { return false; } } /// /// Gets placeholder located after form element. /// public override PlaceHolder AfterFormPlaceholder { get { return plcAfterForm; } } #endregion #region "Page events" protected override void OnInit(EventArgs e) { base.OnInit(e); if (Page is CMSPage) { } PageStatusContainer = plcStatus; } protected void Page_Load(object sender, EventArgs e) { // Hide actions panel if no actions are present and DisplayActionsPanel is false if (!DisplayActionsPanel) { if ((actionsElem.Actions == null) || (actionsElem.Actions.Length == 0)) { pnlActions.Visible = false; } } if (tabControlElem != null) { string script = "function ReloadAndSetTab(parameter){" + ControlsHelper.GetPostBackEventReference(tabControlElem, "#value#").Replace("'#value#'", "unescape(parameter)") + ";}"; ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "ReloadAndSetTab", ScriptHelper.GetScript(script)); } // If breadcrumbs are visible, special tabs class will be added if ((titleElem.Breadcrumbs != null) || DisplaySiteSelectorPanel) { pnlTabsContainer.CssClass += " BreadTabs"; } // Display panel with site selector if (DisplaySiteSelectorPanel) { pnlSiteSelector.Visible = true; } } #endregion }