Exemplo n.º 1
0
        public override bool UpdateItem(ContentItem item, System.Web.UI.Control editor)
        {
            var cbManual = editor.FindControl(Name + "_ManualSummary") as CheckBox;
            if (cbManual != null)
            {
                item[Name + "_ManualSummary"] = cbManual.Checked ? (object)true : null;
            }

            return base.UpdateItem(item, editor);
        }
 private void PopulateMenuControl()
 {
     System.Web.UI.Control nav = Page.Master.FindControl("NavContent");
     if (nav != null)
     {
         System.Web.UI.Control c = nav.FindControl("ProductNavigator");
         if (c != null)
         {
             this._ProductNavigator = (NotifyClickControl)c;
         }
     }
 }
Exemplo n.º 3
0
        public override void UpdateEditor(ContentItem item, System.Web.UI.Control editor)
        {
            base.UpdateEditor(item, editor);
            
            var cbManual = editor.FindControl(Name + "_ManualSummary") as CheckBox;
            if (cbManual != null)
            {
                cbManual.Checked = IsManualSummary(item);
                if (!cbManual.Checked)
                {
                    var tb = (TextBox)editor;
                    tb.CssClass += " autogenerated";

					editor.Page.ClientScript.RegisterStartupScript(typeof(EditableSummaryAttribute), Name + "Readonly", "$('#" + editor.ClientID + "').attr('readonly', true).attr('disabled', true);", addScriptTags: true);
                }
            }
        }
Exemplo n.º 4
0
        public override void UpdateEditor(ContentItem item, System.Web.UI.Control editor)
        {
            base.UpdateEditor(item, editor);

            var cbManual = editor.FindControl(Name + "_ManualSummary") as CheckBox;

            if (cbManual != null)
            {
                cbManual.Checked = IsManualSummary(item);
                if (!cbManual.Checked)
                {
                    var tb = (TextBox)editor;
                    tb.ReadOnly = true;
                    tb.Enabled  = false;
                    tb.CssClass = "autogenerated";
                }
            }
        }
Exemplo n.º 5
0
        public static System.Web.UI.Control AcharControle(string idControle, System.Web.UI.Control Container)
        {
            System.Web.UI.Control c = Container.FindControl(idControle);
            if (c != null)
            {
                return(c);
            }

            foreach (System.Web.UI.Control item in Container.Controls)
            {
                c = AcharControle(idControle, item);
                if (c != null)
                {
                    return(c);
                }
            }
            return(null);
        }
Exemplo n.º 6
0
        public override void UpdateEditor(ContentItem item, System.Web.UI.Control editor)
        {
            base.UpdateEditor(item, editor);

            if (editor.FindControl(editor.ID + "_preview") != null)
            {
                return;
            }

            var preview = new HyperLink()
            {
                ID          = editor.ID + "_preview",
                Text        = "Preview",
                NavigateUrl = "#"
            };

            preview.Attributes["onclick"] = "window.open('" + N2.Web.Url.Parse(item.Url).AppendQuery("theme", "") + "' + document.getElementById('" + editor.ClientID + "').value, 'previewTheme', 'width=900,height=500'); return false;";
            editor.Parent.Controls.AddAt(editor.Parent.Controls.IndexOf(editor) + 1, preview);
        }
Exemplo n.º 7
0
 private void SetMessage(System.String msg, int count)
 {
     System.String message = this.SharpUI.LocalizedRS.GetString(msg);
     if (message != null && message.Length > 0)
     {
         if (message.IndexOf("##") > 0)
         {
             message = message.Replace("##", count.ToString());
         }
         System.Web.UI.Control holder = this.SharpUI.FindControl("ConfirmationPH");
         holder.Visible = true;
         System.Web.UI.WebControls.Label label = (System.Web.UI.WebControls.Label)holder.FindControl("ConfirmationMessage");
         label.Text = message;
     }
 }
Exemplo n.º 8
0
 private void SetMessage(System.String msg)
 {
     System.String message = this.SharpUI.LocalizedRS.GetString(msg);
     if (message != null && message.Length > 0)
     {
         System.Web.UI.Control holder = this.SharpUI.FindControl("ConfirmationPH");
         holder.Visible = true;
         System.Web.UI.WebControls.Label label = (System.Web.UI.WebControls.Label)holder.FindControl("ConfirmationMessage");
         label.Text = message;
     }
 }