/// <summary> /// Loads the styles and scripts. /// </summary> private void LoadStylesAndScripts() { //LOAD STYLES AND SCRIPTS if (CMSContext.Current.IsDesignMode) { //REGISTER SCRIPT this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type='text/javascript' language='javascript' src='" + Mediachase.Commerce.Shared.CommerceHelper.GetAbsolutePath("/Scripts/jQuery.js") + "'></script>"); /*done in CMS_Scripts.js * this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type='text/javascript' language='javascript' src='" + Mediachase.Commerce.Shared.CommerceHelper.GetAbsolutePath("/Scripts/ActionSet.js") + "'></script>"); */ //APPLY STYLE CommonHelper.AddLinkedStyleSheet(this, "~/Styles/snapStyle.css"); CommonHelper.AddLinkedStyleSheet(this, "~/Styles/ActionSet.css"); CommonHelper.AddLinkedStyleSheet(this, "~/styles/drop_variation.css"); } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (!this.Visible) { return; } CommonHelper.AddLinkedStyleSheet(this.Page, "~/Structure/Base/Controls/Toolbar/styles/LoginMenuStyle.css"); CommonHelper.AddLinkedStyleSheet(this.Page, "~/Structure/Base/Controls/Toolbar/styles/Toolbars.css"); CommonHelper.AddLinkedStyleSheet(this.Page, "~/Structure/Base/Controls/Toolbar/styles/ToolbarMenuStyle.css"); CommonHelper.AddLinkedStyleSheet(this.Page, "~/Structure/Base/Controls/Toolbar/styles/ToolbarStyle.css"); CommonHelper.AddLinkedStyleSheet(this.Page, "~/Structure/Base/Controls/Toolbar/styles/ToolbarDrag.css"); // Register Javascripts Page.ClientScript.RegisterClientScriptInclude(typeof(ToolbarControl), "ToolbarClient", Page.ResolveClientUrl("~/Structure/Base/Controls/Toolbar/Scripts/ToolbarClient.js")); //Page.ClientScript.RegisterClientScriptInclude(typeof(ToolbarControl), "TbSettings", Page.ResolveClientUrl("~/Structure/Base/Controls/Toolbar/Scripts/TbSettings.js")); //Page.ClientScript.RegisterClientScriptInclude(typeof(ToolbarControl), "ToolBar", Page.ResolveClientUrl("~/Structure/Base/Controls/Toolbar/Scripts/ToolBar.js")); //Page.ClientScript.RegisterClientScriptInclude(typeof(ToolbarControl), "ToolBox", Page.ResolveClientUrl("~/Structure/Base/Controls/Toolbar/Scripts/CMS_ToolBox.js")); Page.ClientScript.RegisterClientScriptInclude(typeof(ToolbarControl), "DragToolBox", Page.ResolveClientUrl("~/Structure/Base/Controls/Toolbar/Scripts/Drag.js")); if (CMSContext.Current.IsDesignMode) { TopToolBar.SelectedIndex = 1; } else { TopToolBar.SelectedIndex = 0; } BindToolBar(); if (!this.IsPostBack) { BindSites(); LoginMenu.Items[0].Items[0].NavigateUrl = ResolveUrl("~/login.aspx"); LoginMenu.Items[0].Items[1].NavigateUrl = ResolveUrl("~/logout.aspx"); LoginMenu.DataBind(); } }