protected void Page_Load(object sender, System.EventArgs e)
        {
            this._articleModule = base.Module as ArticleModule;
            this.RegisterAdminJavascript("ckeditor","/Support/ckeditor/ckeditor.js");
            this.btnCancel.Attributes.Add("onclick", String.Format("document.location.href='AdminArticles.aspx{0}'", base.GetBaseQueryString()));

            if (! this.IsPostBack)
            {
                BindCategories();
            }

            if (Request.QueryString["ArticleId"] != null)
            {
                int articleId = Int32.Parse(Request.QueryString["ArticleId"]);
                if (articleId > 0)
                {
                    this._article = this._articleModule.GetArticleById(articleId);
                    if (! this.IsPostBack)
                    {
                        BindArticle();
                    }
                    this.btnDelete.Visible = true;
                    this.btnDelete.Attributes.Add("onclick", "return confirm('Are you sure?');");
                }
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // The base page has already created the module, we only have to cast it here to the right type.
            this._articleModule = base.Module as ArticleModule;
            this.btnNew.Attributes.Add("onclick", String.Format("document.location.href='EditArticle.aspx{0}&ArticleId=-1'", base.GetBaseQueryString()));

            if (! this.IsPostBack)
            {
                this.rptArticles.DataSource = this._articleModule.GetAllArticles();
                this.rptArticles.DataBind();
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this._articleModule = base.Module as ArticleModule;

            if (Request.QueryString["ArticleId"] != null)
            {
                int articleId = Int32.Parse(Request.QueryString["ArticleId"]);
                if (articleId > 0)
                {
                    this._article = this._articleModule.GetArticleById(articleId);
                    BindComments();
                }
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            //The base page has already created the module, we only have to cast it here to the right type.
            this._articleModule = base.Module as ArticleModule;
            this.btnNew.Attributes.Add("onclick", String.Format("document.location.href='EditArticle.aspx{0}&ArticleId=-1'", base.GetBaseQueryString()));

            if (!this.IsPostBack)
            {
                //this.rptArticles.DataSource = this._articleModule.GetArticleList();
                //this.rptArticles.DataSource = this._articleModule._GetFullArticleList();
                this.rptArticles.DataSource = this._articleModule._contentItemService.FindContentItemsBySite(this._articleModule.Section.Site);
                this.rptArticles.DataBind();

                this.ddlArticleFilter.DataSource = this._articleModule._categoryService.GetAllCategories(this._articleModule.Section.Site);
                this.ddlArticleFilter.DataBind();
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this._module = this.Module as ArticleModule;
            this.pgrArticles.PageSize = this._module.NumberOfArticlesInList;
            // We need to set the url where the pager needs to send the user to because otherwise
            // The pager would add pathinfo parameters to the node url, which are not parsed
            // (instead of the section url).
            this.pgrArticles.PageUrl = UrlHelper.GetUrlFromSection(this._module.Section);

            // Don't display the syndication icon on the article view
            base.DisplaySyndicationIcon = this._module.AllowSyndication && this._module.CurrentArticleId == -1;

            if (! IsPostBack && ((! base.HasCachedOutput) || this.Page.User.Identity.IsAuthenticated))
            {
                BindArticles();
            }

            SetDisplayTitle();

            BindArchiveLink();
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this.fckContent.BasePath = this.Page.ResolveUrl("~/Support/FCKeditor/");

            //Add FCK Specific CSS and template references to the editor
            //RegisterStylesheet("CatModCSS", UrlHelper.GetApplicationPath() + "Modules/Articles/EditorCSS/style.css");

            //To DISPLAY template styles in editor
            fckContent.EditorAreaCSS = UrlHelper.GetApplicationPath() + this.Node.Template.BasePath + "/css/editor_" + this.Node.Template.Css;
            //To ADD template styles in editor DropDown List
            fckContent.StylesXmlPath = UrlHelper.GetApplicationPath() + this.Node.Template.BasePath + "/css/fckstyles.xml";

            this._articleModule = base.Module as ArticleModule;
            this.btnCancel.Attributes.Add("onclick", String.Format("document.location.href='AdminArticles.aspx{0}'", base.GetBaseQueryString()));

            if (! this.IsPostBack)
            {
                BindCategories();
            }

            if (Request.QueryString["ArticleId"] != null)
            {
                int articleId = Int32.Parse(Request.QueryString["ArticleId"]);
                if (articleId > 0)
                {
                    this._article = this._articleModule.GetArticleById(articleId);
                    if (! this.IsPostBack)
                    {
                        BindArticle();
                    }
                    this.btnDelete.Visible = true;
                    this.btnDelete.Attributes.Add("onclick", "return confirm('Are you sure?');");
                }
            }
        }