Esempio n. 1
0
        public MvcHtmlString JQMultiSelect(JQMultiSelect multiSelect, string id)
        {
            JQMultiSelectRenderer jQMultiSelectRenderer = new JQMultiSelectRenderer(multiSelect);

            multiSelect.ID = id;
            return(MvcHtmlString.Create(jQMultiSelectRenderer.RenderHtml()));
        }
Esempio n. 2
0
		public JQMultiSelectRenderer(JQMultiSelect model)
		{
			this._model = model;
		}
Esempio n. 3
0
 public JQMultiSelectRenderer(JQMultiSelect model)
 {
     this._model = model;
 }
Esempio n. 4
0
		public MvcHtmlString JQMultiSelect(JQMultiSelect multiSelect, string id)
		{
			JQMultiSelectRenderer jQMultiSelectRenderer = new JQMultiSelectRenderer(multiSelect);
			multiSelect.ID = id;
			return MvcHtmlString.Create(jQMultiSelectRenderer.RenderHtml());
		}
Esempio n. 5
0
        private string GetStartupOptions()
        {
            StringBuilder stringBuilder = new StringBuilder();
            JQMultiSelect model         = this._model;
            MultiSelectClientSideEvents clientSideEvents = this._model.ClientSideEvents;

            stringBuilder.AppendFormat("id:'{0}'", model.ID);
            stringBuilder.AppendFormat(",width:{0}", model.Width.ToString());
            stringBuilder.AppendFormat(",height:{0}", model.Height.ToString());
            if (model.DropDownWidth.HasValue)
            {
                stringBuilder.AppendFormat(",dropDownWidth:{0}", model.DropDownWidth.ToString());
            }
            if (model.TabIndex != 0)
            {
                stringBuilder.AppendFormat(",tabIndex:{0}", model.TabIndex.ToString());
            }
            if (model.Items.Count > 0)
            {
                stringBuilder.AppendFormat(",items:{0}", JsonConvert.SerializeObject(model.SerializeItems(model.Items)));
            }
            if (!string.IsNullOrEmpty(model.ItemTemplateID))
            {
                stringBuilder.AppendFormat(",itemTemplateID:'{0}'", model.ItemTemplateID);
            }
            if (!string.IsNullOrEmpty(model.HeaderTemplateID))
            {
                stringBuilder.AppendFormat(",headerTemplateID:'{0}'", model.HeaderTemplateID);
            }
            if (!string.IsNullOrEmpty(model.FooterTemplateID))
            {
                stringBuilder.AppendFormat(",footerTemplateID:'{0}'", model.FooterTemplateID);
            }
            if (!string.IsNullOrEmpty(model.ToggleImageCssClass))
            {
                stringBuilder.AppendFormat(",toggleImageCssClass:'{0}'", model.ToggleImageCssClass);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Show))
            {
                stringBuilder.AppendFormat(",onShow:{0}", clientSideEvents.Show);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Hide))
            {
                stringBuilder.AppendFormat(",onHide:{0}", clientSideEvents.Hide);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.MouseOut))
            {
                stringBuilder.AppendFormat(",onMouseOut:{0}", clientSideEvents.MouseOut);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.MouseOver))
            {
                stringBuilder.AppendFormat(",onMouseOver:{0}", clientSideEvents.MouseOver);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Select))
            {
                stringBuilder.AppendFormat(",onSelect:{0}", clientSideEvents.Select);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Select))
            {
                stringBuilder.AppendFormat(",onInitialized:{0}", clientSideEvents.Initialized);
            }
            if (!string.IsNullOrEmpty(clientSideEvents.Select))
            {
                stringBuilder.AppendFormat(",onKeyDown:{0}", clientSideEvents.KeyDown);
            }
            return(stringBuilder.ToString());
        }