Ejemplo n.º 1
0
        public static string AddLookupTextBox(StringBuilder sb, string key, string id, long?value, string textValue, string tableName, string projectName, string mode,
                                              ExtenderAjaxControl extenderAjaxControl, int minimumPrefixLength, string width, BrowseFilterParameters browseFilterParameters)
        {
            var idValue = key + "_" + id;

            HtmlGenerator.AddLookupTextBox(sb, idValue, value, textValue, tableName, projectName, mode, browseFilterParameters,
                                           extenderAjaxControl, minimumPrefixLength, string.IsNullOrEmpty(width) ? "180px" : width);
            return(idValue);
        }
Ejemplo n.º 2
0
        public void WriteText(StringBuilder sb, bool isAddingNewRow, ExtenderAjaxControl extenderAjaxControl)
        {
            if (Groups.Count(p => p.Visible) == 0)
            {
                return;
            }
            sb.Append("<div class='childlinks_cssform'>");
            foreach (Group group in Groups.Where(p => p.Visible))
            {
                if (!string.IsNullOrEmpty(group.Text))
                {
                    if (extenderAjaxControl == null)
                    {
                        sb.AppendFormat("<FIELDSET style=\"min-width: 800px;\"><LEGEND>{0}</LEGEND>", group.Text);
                    }
                    else
                    {
                        var cliendID = "childRefsGroup" + id++;
                        sb.AppendFormat("<FIELDSET style=\"min-width: 800px;\"><LEGEND id=\"l_{0}\" style=\"cursor: pointer;\" title=\"{2}\">{1}</LEGEND><div id=\"{0}\">", cliendID, group.Text, Resources.PressToOpenCloseGroup);
                        HtmlGenerator.AddCollapsiblePanel(extenderAjaxControl, cliendID, "l_" + cliendID, "l_" + cliendID);
                    }
                }

                foreach (Row row in group.Rows.Where(p => p.Visible))
                {
                    sb.Append(@"<p><span>");
                    var items = row.Items.Where(p => p.Visible);
                    if (isAddingNewRow)
                    {
                        items = items.Where(p => p.Name != "new");
                    }
                    foreach (Item item in items)
                    {
                        sb.Append(item.Text);
                    }
                    sb.Append(@"</span>");
                    sb.Append(row.Text);
                    sb.Append(@"</p>");
                }
                if (!string.IsNullOrEmpty(group.Text))
                {
                    if (extenderAjaxControl == null)
                    {
                        sb.Append("</FIELDSET>");
                    }
                    else
                    {
                        sb.Append("</div></FIELDSET>");
                    }
                }
            }
            sb.Append("</div>");
        }
Ejemplo n.º 3
0
 public override void InitAjax(Control control, ExtenderAjaxControl extenderAjaxControl)
 {
 }
Ejemplo n.º 4
0
 public override void Render(HtmlTextWriter writer, ExtenderAjaxControl extenderAjaxControl)
 {
     HtmlGenerator.RenderHyperLink(writer, this);
 }
Ejemplo n.º 5
0
 public AdditionalButtons(Page page, Control control, ExtenderAjaxControl extenderAjaxControl)
 {
     this.page                = page;
     this.control             = control;
     this.extenderAjaxControl = extenderAjaxControl;
 }
Ejemplo n.º 6
0
 public override void Render(HtmlTextWriter writer, ExtenderAjaxControl extenderAjaxControl)
 {
     HtmlGenerator.RenderDropDownList(writer, this, extenderAjaxControl);
 }
Ejemplo n.º 7
0
//        public bool IsButton { get; set; }
        //public string OnClick { get; set; }

        public void GenerateHtml(StringBuilder sb, string clientID, ExtenderAjaxControl extenderAjaxControl, bool isButton)
        {
            if (Items.Count <= 0)
            {
                RenderLink(sb);
                return;
            }

            if (isButton)
            {
                sb.Append("<span id=\"");
                sb.Append(clientID);
                sb.Append("\" class=\"menuMoreAsButton\"");
                sb.Append(" title=\"");
                sb.Append(ToolTip);
                sb.Append("\"><u>");
                if (!string.IsNullOrEmpty(Url))
                {
                    RenderLink(sb);
                }
                else
                {
                    sb.Append(TextAsHtml ? Text : HttpUtility.HtmlAttributeEncode(Text));
                }
                sb.Append("</u>&nbsp;<small>&#9660;</small></span>");
                sb.Append("<table id=\"mp_");
                sb.Append(clientID);
                sb.Append("\" class=\"menuPanel\">");
            }
            else
            {
                sb.Append("<tr id=\"");
                sb.Append(clientID);
                sb.Append("\" class=\"menuMore\"");
                sb.Append(" title=\"");
                sb.Append(ToolTip);
                sb.Append("\"><td><u>");
                if (!string.IsNullOrEmpty(Url))
                {
                    RenderLink(sb);
                }
                else
                {
                    sb.Append(TextAsHtml ? Text : HttpUtility.HtmlAttributeEncode(Text));
                }
                sb.Append("</u>&nbsp;</td><td width=\"10px\"><small>&#9660;</small>");
                sb.Append("<table id=\"mp_");
                sb.Append(clientID);
                sb.Append("\" class=\"menuPanel\">");
            }

            int i = 0;

            foreach (var item in Items)
            {
                if (item.Items.Count == 0)
                {
                    sb.Append("<tr class=\"menuItem\"><td>");
                }
                item.GenerateHtml(sb, clientID + i, extenderAjaxControl, false);
                sb.Append("</td></tr>");
                i++;
            }

            sb.Append("</table>");
            var extender = new HoverMenuExtender
            {
                ID             = "hme_" + clientID,
                PopupControlID = "mp_" + clientID,
                PopupPosition  = PopupPosition,
                PopDelay       = 200,
                OffsetX        = 0,
                OffsetY        = 0,
            };

            extenderAjaxControl.AddExtender(extender, clientID);
        }
Ejemplo n.º 8
0
 public override void Render(HtmlTextWriter writer, ExtenderAjaxControl extenderAjaxControl)
 {
     RenderContents(writer);
 }
Ejemplo n.º 9
0
 public void WriteText(StringBuilder sb, ExtenderAjaxControl extenderAjaxControl)
 {
     WriteText(sb, false, extenderAjaxControl);
 }
Ejemplo n.º 10
0
 public override void Render(HtmlTextWriter writer, ExtenderAjaxControl extenderAjaxControl)
 {
     HtmlGenerator.RenderLookup(writer, this, extenderAjaxControl);
 }