コード例 #1
0
ファイル: Default.ascx.cs プロジェクト: liqueflies/pigeoncms
    protected new void Page_Init(object sender, EventArgs e)
    {
        base.Page_Init(sender, e);

        ContentEditorProvider.Configuration contentEditorConfig = null;
        contentEditorConfig = new ContentEditorProvider.Configuration();
        contentEditorConfig.FilesUploadUrl = "";
        contentEditorConfig.EditorType = ContentEditorProvider.Configuration.EditorTypeEnum.BasicHtml;
        ContentEditorProvider.InitEditor(this, Upd1, contentEditorConfig);
        BtnRefresh.Text = base.GetLabel("Refresh");
    }
コード例 #2
0
ファイル: Default.ascx.cs プロジェクト: liqueflies/pigeoncms
    protected new void Page_Init(object sender, EventArgs e)
    {
        base.Page_Init(sender, e);

        var config = new ContentEditorProvider.Configuration();
        config.FilesUploadUrl = this.DocsUploadUrl;
        config.PageBreakButton = false;
        config.ReadMoreButton = false;
        ContentEditorProvider.InitEditor(this, Upd1, config);

        foreach (KeyValuePair<string, string> item in Config.CultureList)
        {
            //title
            Panel pan1 = new Panel();
            pan1.CssClass = "form-group input-group";
            PanelPageTitle.Controls.Add(pan1);

            TextBox txt1 = new TextBox();
            txt1.ID = "TxtPageTitle" + item.Value;
            txt1.MaxLength = 200;
            txt1.CssClass = "form-control";
            txt1.ToolTip = item.Key;
            LabelsProvider.SetLocalizedControlVisibility(false, item.Key, txt1);
            pan1.Controls.Add(txt1);
            Literal lit1 = new Literal();
            lit1.Text = "<span class='input-group-addon'>" + item.Value + "</span>";
            pan1.Controls.Add(lit1);

            //description
            var txt2 = (Controls_ContentEditorControl)LoadControl("~/Controls/ContentEditorControl.ascx");
            txt2.ID = "HtmlText" + item.Value;
            txt2.Configuration = config;
            LabelsProvider.SetLocalizedControlVisibility(false, item.Key, txt2);
            PanelPageContent.Controls.Add(txt2);

            Literal lit2 = new Literal();
            lit2.Text = "&nbsp;[<i>" + item.Value + "</i>]<br /><br />";
            PanelPageContent.Controls.Add(lit2);

        }
        if (this.BaseModule.DirectEditMode)
        {
            BtnNew.Visible = false;
            BtnSave.Visible = false;
            BtnCancel.OnClientClick = "closePopup();";
            editPage(this.PageName);
        }
    }
コード例 #3
0
    protected new void Page_Init(object sender, EventArgs e)
    {
        base.Page_Init(sender, e);

        loadLabelsText();

        ContentEditorProvider.Configuration contentEditorConfig = null;
        contentEditorConfig = new ContentEditorProvider.Configuration();
        contentEditorConfig.FilesUploadUrl = "";
        contentEditorConfig.EditorType = ContentEditorProvider.Configuration.EditorTypeEnum.BasicHtml;
        ContentEditorProvider.InitEditor(this, Upd1, contentEditorConfig);

        ChkSendEmailToUserInserted.Visible = this.ShowCheckSendEmailToUserInserted;

        DropCustomers.Visible = this.ShowCustomer;
        DropTemplates.Visible = this.ShowTemplate;

        //specific fields
        Grid1.Columns[COL_CUSTOMER_INDEX].HeaderText = base.GetLabel("Customer", "Customer");
        Grid1.Columns[COL_CUSTOMER_INDEX].Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));
        Grid1.Columns[COL_DELETE_INDEX].Visible = (Roles.IsUserInRole("admin") || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE));
        Grid1.Columns[COL_ID_INDEX].Visible = (Roles.IsUserInRole("admin") || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE));

        DropChangeCustomer.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));

        DropAssignedUser.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));

        DropCustomersFilter.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));

        DropAssignedUserFilter.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));

        DropUserInsertedFilter.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));

        ChkMyTickets.Visible = (Roles.IsUserInRole("admin")
            || Roles.IsUserInRole(SUPPORT_MANAGER_ROLE)
            || Roles.IsUserInRole(SUPPORT_OPERATOR_ROLE));
    }