コード例 #1
0
 private void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (this.Page is PageEngine)
         {
             this._page = (PageEngine)this.Page;
             // Bind home hyperlink
             if (this._page.RootNode.ShowInNavigation && this._page.RootNode.ViewAllowed(this._page.CuyahogaUser))
             {
                 this.hplHome.NavigateUrl = UrlHelper.GetUrlFromNode(this._page.RootNode);
                 this.hplHome.Text = this._page.RootNode.Title;
             }
             else
             {
                 this.hplHome.Visible = false;
             }
             // Bind level 1 nodes
             this.rptNav1.ItemDataBound += new RepeaterItemEventHandler(rptNav1_ItemDataBound);
             this.rptNav1.DataSource = this._page.RootNode.ChildNodes;
             this.rptNav1.DataBind();
         }
     }
     catch (InvalidCastException ex)
     {
         throw new Exception("This control requires a Page of the type Cuyahoga.Web.UI.Page.", ex);
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this._module = this.Module as MenuModule;
            if (this.Page is PageEngine)
            {
                this._page = (PageEngine)this.Page;
            }

            //Requires jQuery
            //jQuery script for pop-up admin panel
            if (this._module.RequiresjQuery())
            {
                string jquery = String.Format("{0}js/jquery-1.4.2.min.js", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._page.RegisterJavascript("jquery", jquery);
                string droppy = String.Format("{0}js/jquery.droppy.js", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._page.RegisterJavascript("droppypath", droppy);
                string droppymenu = String.Format("{0}js/droppymenu.js", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._page.RegisterJavascript("droppymenu", droppymenu);
            }

            if (this._module._typerender == TypeRender.NavigationTree)
            {
                BuildNavigationTree();
            }
            else
            {
                BuildNavigationBreadcrumb();
            }
        }
コード例 #3
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     if (this.Page is PageEngine)
     {
         this._page = (PageEngine)this.Page;
         BuildNavigationTree();
     }
 }
        protected void Page_Load(object sender, EventArgs e) {

            PageEngine engine = Page as PageEngine;

            if (engine != null) {
                this._page = engine;
                RenderMenu();
            }
        }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!(this.Page is PageEngine))
     {
         throw new Exception("The Manager toolbar control needs to be on a Page of type PageEngine to work properly.");
     }
     this._pageEngine = (PageEngine)this.Page;
     this._pageEngine.RegisterStylesheet("managertoolbar", UrlUtil.GetApplicationPath() + "Manager/Content/Css/ManagerToolbar.css");
     if (!IsPostBack)
     {
         EnableLinks();
     }
 }
コード例 #6
0
 protected override void OnInit(EventArgs e)
 {
     if (this.Module.Section.CacheDuration > 0 &&
         this.Module.CacheKey != null &&
         !this.Page.User.Identity.IsAuthenticated &&
         !this.Page.IsPostBack)
     {
         // Get the cached content. Don't use cached output after a postback.
         if (HttpContext.Current.Cache[this.Module.CacheKey] != null && !this.IsPostBack)
         {
             // Found cached content.
             this._cachedOutput = HttpContext.Current.Cache[this.Module.CacheKey].ToString();
         }
     }
     if (this.Page is PageEngine)
     {
         this._pageEngine = (PageEngine)this.Page;
     }
     base.OnInit(e);
 }
コード例 #7
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     try
     {
         if (this.Page is PageEngine)
         {
             this._page = (PageEngine)this.Page;
             // Bind level 2 nodes
             if (this._page.ActiveNode.Level > 0)
             {
                 this.rptNav2.ItemDataBound += new RepeaterItemEventHandler(rptNav2_ItemDataBound);
                 this.rptNav2.DataSource     = this._page.ActiveNode.NodePath[1].ChildNodes;
                 this.rptNav2.DataBind();
             }
         }
     }
     catch (InvalidCastException ex)
     {
         throw new Exception("This control requires a Page of the type Cuyahoga.Web.UI.Page.", ex);
     }
 }
コード例 #8
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     try
     {
         if (this.Page is PageEngine)
         {
             this._page = (PageEngine)this.Page;
             // Bind level 2 nodes
             if (this._page.ActiveNode.Level > 0)
             {
                 this.rptNav2.ItemDataBound += new RepeaterItemEventHandler(rptNav2_ItemDataBound);
                 this.rptNav2.DataSource = this._page.ActiveNode.NodePath[1].ChildNodes;
                 this.rptNav2.DataBind();
             }
         }
     }
     catch (InvalidCastException ex)
     {
         throw new Exception("This control requires a Page of the type Cuyahoga.Web.UI.Page.", ex);
     }
 }
コード例 #9
0
 protected override void OnInit(EventArgs e)
 {
     if (this.Module.Section.CacheDuration > 0
         && this.Module.CacheKey != null
         && !this.Page.User.Identity.IsAuthenticated
         && !this.Page.IsPostBack)
     {
         // Get the cached content. Don't use cached output after a postback.
         if (HttpContext.Current.Cache[this.Module.CacheKey] != null && !this.IsPostBack)
         {
             // Found cached content.
             this._cachedOutput = HttpContext.Current.Cache[this.Module.CacheKey].ToString();
         }
     }
     if (this.Page is PageEngine)
     {
         this._pageEngine = (PageEngine)this.Page;
     }
     base.OnInit(e);
 }
コード例 #10
0
        protected override void OnInit(EventArgs e)
        {
            if (this.Module.Section.CacheDuration > 0
                && this.Module.CacheKey != null
                && !this.Page.User.Identity.IsAuthenticated
                && !this.Page.IsPostBack)
            {
                // Get the cached content. Don't use cached output after a postback.
                if (HttpContext.Current.Cache[this.Module.CacheKey] != null && !this.IsPostBack)
                {
                    // Found cached content.
                    this._cachedOutput = HttpContext.Current.Cache[this.Module.CacheKey].ToString();
                }
            }
            if (this.Page is PageEngine)
            {
                this._pageEngine = (PageEngine)this.Page;
            }

            //custom for admin panel popup on site pages
            _cuyahogaUser = this.Page.User.Identity as User;
            if (this._cuyahogaUser != null && (this._cuyahogaUser.CanEdit(this._module.Section) || this._cuyahogaUser.IsInRole("Administrator")))//.HasPermission(AccessLevel.Administrator)))
            {
                //jQuery script for pop-up admin panel
                string adminjqpath = String.Format("{0}js/jquery-1.4.1.min.js", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._pageEngine.RegisterJavascript("jquery", adminjqpath);

                string adminjspath = String.Format("{0}Admin/js/adminpanel.js", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._pageEngine.RegisterJavascript("popadminjs", adminjspath);

                //CSS for popup panel
                string admincsspath = String.Format("{0}Admin/Css/adminpanel.css", Cuyahoga.Web.Util.UrlHelper.GetApplicationPath().ToString());
                this._pageEngine.RegisterStylesheet("popadmincss", admincsspath);
            }

            base.OnInit(e);
        }
コード例 #11
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     if (this.Page is PageEngine)
     {
         this._page = (PageEngine)this.Page;
         BuildNavigationTree();
     }
 }