/// <summary> /// The Page_Load server event handler on this page is used /// to populate a tab's layout settings on the page /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); //Confirm delete if (!(ClientScript.IsClientScriptBlockRegistered("confirmDelete"))) { string[] s = { "CONFIRM_DELETE" }; ClientScript.RegisterClientScriptBlock(this.GetType(), "confirmDelete", PortalSettings.GetStringResource( "CONFIRM_DELETE_SCRIPT", s)); } LeftDeleteBtn.Attributes.Add("OnClick", "return confirmDelete()"); RightDeleteBtn.Attributes.Add("OnClick", "return confirmDelete()"); ContentDeleteBtn.Attributes.Add("OnClick", "return confirmDelete()"); // If first visit to the page, update all entries if (!Page.IsPostBack) { msgError.Visible = false; // Set images for buttons from current theme LeftUpBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Up", "Up.gif").ImageUrl; LeftRightBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Right", "Right.gif").ImageUrl; LeftDownBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Down", "Down.gif").ImageUrl; LeftEditBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Edit", "Edit.gif").ImageUrl; LeftDeleteBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Delete", "Delete.gif").ImageUrl; ContentUpBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Up", "Up.gif").ImageUrl; ContentLeftBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Left", "Left.gif").ImageUrl; ContentRightBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Right", "Right.gif").ImageUrl; ContentDownBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Down", "Down.gif").ImageUrl; ContentEditBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Edit", "Edit.gif").ImageUrl; ContentDeleteBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Delete", "Delete.gif").ImageUrl; RightUpBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Up", "Up.gif").ImageUrl; RightLeftBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Left", "Left.gif").ImageUrl; RightDownBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Down", "Down.gif").ImageUrl; RightEditBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Edit", "Edit.gif").ImageUrl; RightDeleteBtn.ImageUrl = CurrentTheme.GetImage("Buttons_Delete", "Delete.gif").ImageUrl; BindData(); SetSecurityAccess(); // 2/27/2003 Start - Ender Malkoc // After up or down button when the page is refreshed, select the previously selected // tab from the list. if (Request.Params["selectedmodid"] != null) { try { int modIndex = Int32.Parse(Request.Params["selectedmodid"]); SelectModule(leftPane, GetModules("LeftPane"), modIndex); SelectModule(contentPane, GetModules("ContentPane"), modIndex); SelectModule(rightPane, GetModules("RightPane"), modIndex); } catch (Exception ex) { ErrorHandler.Publish(LogLevel.Error, "After up or down button when the page is refreshed, select the previously selected tab from the list.", ex); } } // 2/27/2003 end - Ender Malkoc } // Binds custom settings to table EditTable.DataSource = new SortedList(pageSettings); EditTable.DataBind(); }