Пример #1
0
 private void RegisterAsyncPostBackControls()
 {
     if (ScriptController != null)
     {
         ScriptController.RegisterAsyncPostBackControl(btnShowResults);
         ScriptController.RegisterAsyncPostBackControl(rblOptions);
         ScriptController.RegisterAsyncPostBackControl(btnBackToVote);
     }
     else
     {
         log.Error("ScriptController was null");
     }
 }
Пример #2
0
        private void LoadSettings()
        {
            pageID             = WebUtils.ParseInt32FromQueryString("pageid", -1);
            isSiteEditor       = SiteUtils.UserIsSiteEditor();
            pageHasAltContent1 = this.ContainsPlaceHolder("altContent1");
            pageHasAltContent2 = this.ContainsPlaceHolder("altContent2");

            try
            {
                // this keeps the action from changing during ajax postback in folder based sites
                SiteUtils.SetFormAction(Page, Request.RawUrl);
            }
            catch (MissingMethodException)
            {
                //this method was introduced in .NET 3.5 SP1
            }

            if (ScriptController != null)
            {
                ScriptController.RegisterAsyncPostBackControl(btnCreateNewContent);

                ScriptController.RegisterAsyncPostBackControl(LeftUpBtn);
                ScriptController.RegisterAsyncPostBackControl(LeftDownBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentUpBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentDownBtn);
                ScriptController.RegisterAsyncPostBackControl(RightUpBtn);
                ScriptController.RegisterAsyncPostBackControl(RightDownBtn);
                ScriptController.RegisterAsyncPostBackControl(btnAlt1MoveUp);
                ScriptController.RegisterAsyncPostBackControl(btnAlt1MoveDown);
                ScriptController.RegisterAsyncPostBackControl(btnAlt2MoveUp);
                ScriptController.RegisterAsyncPostBackControl(btnAlt2MoveDown);
                ScriptController.RegisterAsyncPostBackControl(LeftEditBtn);


                ScriptController.RegisterAsyncPostBackControl(LeftDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(RightDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(btnDeleteAlt1);
                ScriptController.RegisterAsyncPostBackControl(btnDeleteAlt2);
                ScriptController.RegisterAsyncPostBackControl(LeftRightBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentLeftBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentRightBtn);
                ScriptController.RegisterAsyncPostBackControl(RightLeftBtn);
                ScriptController.RegisterAsyncPostBackControl(btnMoveAlt1ToCenter);
                ScriptController.RegisterAsyncPostBackControl(btnMoveAlt1ToAlt2);
                ScriptController.RegisterAsyncPostBackControl(btnMoveAlt2ToAlt1);
            }
        }
Пример #3
0
        private void LoadSettings()
        {
            pageID             = WebUtils.ParseInt32FromQueryString("pageid", -1);
            isSiteEditor       = SiteUtils.UserIsSiteEditor();
            pageHasAltContent1 = this.ContainsPlaceHolder("altContent1");
            pageHasAltContent2 = this.ContainsPlaceHolder("altContent2");



            if (pageID > -1)
            {
                pnlContent.Visible = true;

                lnkEditSettings.NavigateUrl = SiteRoot + "/Admin/PageSettings.aspx?pageid=" + pageID.ToString();

                if (CurrentPage != null)
                {
                    lnkViewPage.NavigateUrl = SiteUtils.GetCurrentPageUrl();
                    if (CurrentPage.BodyCssClass.Length > 0)
                    {
                        AddClassToBody(CurrentPage.BodyCssClass);
                    }
                }
                else
                {
                    lnkViewPage.Visible = false;
                }
            }

            AddClassToBody("administration");
            AddClassToBody("pagelayout");

            divAdminLinks.Attributes.Add("class", displaySettings.AdminLinksContainerDivCssClass);
            lnkEditSettings.CssClass = displaySettings.AdminLinkCssClass;
            lnkViewPage.CssClass     = displaySettings.AdminLinkCssClass;
            lnkPageTree.CssClass     = displaySettings.AdminLinkCssClass;
            litLinkSpacer1.Text      = displaySettings.AdminLinkSeparator;
            litLinkSpacer2.Text      = displaySettings.AdminLinkSeparator;

            globalContentCount = Module.GetGlobalCount(siteSettings.SiteId, -1, pageID);

            try
            {
                // this keeps the action from changing during ajax postback in folder based sites
                SiteUtils.SetFormAction(Page, Request.RawUrl);
            }
            catch (MissingMethodException)
            {
                //this method was introduced in .NET 3.5 SP1
            }

            if (ScriptController != null)
            {
                ScriptController.RegisterAsyncPostBackControl(btnCreateNewContent);

                ScriptController.RegisterAsyncPostBackControl(LeftUpBtn);
                ScriptController.RegisterAsyncPostBackControl(LeftDownBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentUpBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentDownBtn);
                ScriptController.RegisterAsyncPostBackControl(RightUpBtn);
                ScriptController.RegisterAsyncPostBackControl(RightDownBtn);
                ScriptController.RegisterAsyncPostBackControl(btnAlt1MoveUp);
                ScriptController.RegisterAsyncPostBackControl(btnAlt1MoveDown);
                ScriptController.RegisterAsyncPostBackControl(btnAlt2MoveUp);
                ScriptController.RegisterAsyncPostBackControl(btnAlt2MoveDown);
                ScriptController.RegisterAsyncPostBackControl(LeftEditBtn);


                ScriptController.RegisterAsyncPostBackControl(LeftDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(RightDeleteBtn);
                ScriptController.RegisterAsyncPostBackControl(btnDeleteAlt1);
                ScriptController.RegisterAsyncPostBackControl(btnDeleteAlt2);
                ScriptController.RegisterAsyncPostBackControl(LeftRightBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentLeftBtn);
                ScriptController.RegisterAsyncPostBackControl(ContentRightBtn);
                ScriptController.RegisterAsyncPostBackControl(RightLeftBtn);
                ScriptController.RegisterAsyncPostBackControl(btnMoveAlt1ToCenter);
                ScriptController.RegisterAsyncPostBackControl(btnMoveAlt2ToCenter);
                //ScriptController.RegisterAsyncPostBackControl(btnMoveAlt2ToAlt1);
            }
        }