Esempio n. 1
0
    protected void btnDecline_Click(object sender, System.EventArgs e)
    {
        string comment = "";
        Ektron.Cms.UI.CommonUI.ApplicationAPI appUI = new Ektron.Cms.UI.CommonUI.ApplicationAPI();
        m_refMsg = appUI.EkMsgRef;

        RegExpValidator.ErrorMessage = m_refMsg.GetMessage("content size exceeded");
        //RegExpValidator.ValidationExpression = Utilities.BuildRegexToCheckMaxLength(65000)
        RegExpValidator.Validate();
        if (RegExpValidator.IsValid)
        {
            if (DeclineText.Content.Trim().Length > 0)
            {
                comment = (string)("&comment=" + EkFunctions.UrlEncode((string)(DeclineText.Content.Trim().Replace("<p>", "").Replace("</p>", ""))));
            }
            if(comment.Length>255)
            {
                RegExpValidator.IsValid=false;
         	            ViewToolBar();
            }
            else
            {
                Response.Redirect(content_api.ApplicationPath + "content.aspx?id=" + hdnContentId.Value + "&fldid=" + hdnFolderId.Value + "&action=declinecontent&LangType=" + hdnLangType.Value + comment);
            }
        }
        else
        {
            ViewToolBar();
        }
    }
    private void SetContentBlock()
    {
        long ifolderid = 0;
        //cb.EnableMembershipEditing = True
        if (this.bWithLang == true)
        {
            cb.LanguageID = this.iOrigLang;
        }
        cb.DefaultContentID = ModeID;
        cb.LanguageID = m_refContentApi.ContentLanguage;
        cb.Page = this;
        cb.Fill();
        ifolderid = cb.EkItem.FolderId;
        if (m_SelectedEditControl == "jseditor")
        {
            InnerEditor.Text = cb.EkItem.Html;
        }
        else
        {
            cdContent_teaser.Content = cb.EkItem.Html;
            cdContent_teaser.FolderId = ifolderid;

        }

        if (this.bWithLang == true)
        {
            m_refContentApi.ContentLanguage = this.iOrigLang;
        }
        security_data = m_refContentApi.LoadPermissions(cb.EkItem.FolderId, "folder", 0);

        if (m_SelectedEditControl.ToLower() == "jseditor")
        {
            InnerEditor.ToolbarLayout = SetToolbar();
            ftb_control.Text = InnerEditor.ToString();
        }
        title_value.Text = Server.HtmlDecode(cb.EkItem.Title);
        // content_data = m_refContentApi.GetContentById(ModeID)

        if (IsForum)
        {
            ifolderid = m_refContentApi.GetParentIdByFolderId(cb.EkItem.FolderId);
        }
        if (m_refContentApi.UserId > 0)
        {
            folder_data = m_refContentApi.GetFolderById(ifolderid);
        }
        else
        {
            folder_data = new FolderData();
        }
        if (cb.EkItem.Teaser.Trim() == "")
        {
            auto_generate_summary.Visible = false;
        }
        if (cb.EkItem.AssetInfo != null && cb.EkItem.AssetInfo.Id.Length > 0)
        {
            Ektron.Cms.UI.CommonUI.ApplicationAPI AppUI = new Ektron.Cms.UI.CommonUI.ApplicationAPI();
            ltr_js.Visible = false;
            title_label.Visible = false;
            title_value.Visible = false;
            change_notification.Visible = false;
            ftb_control.Visible = false;
            dialog_publish.Visible = false;
            dialog_publish_top.Visible = false;
            content_block_view.Visible = true;
            content_block_overwrite.Visible = true;
            ContentBase _ekItem = cb.EkItem;
            content_block_view.Text = AppUI.ecmNextGenContentBlock(ref _ekItem, "", 0);
            content_block_overwrite.DefaultAssetID = ModeID;
            cdContent_teaser.Visible = false;
        }

        SetTaxonomy(ModeID, ifolderid);
    }
Esempio n. 3
0
 public bool ViewCollectionContentByCategory()
 {
     Ektron.Cms.UI.CommonUI.ApplicationAPI api = new Ektron.Cms.UI.CommonUI.ApplicationAPI();
     long id = Convert.ToInt64(Request.QueryString["id"]);
     return true;
 }