Ejemplo n.º 1
0
        public RouteValueDictionary OpenFormDialog(string url, JqueryBind typeEvent = JqueryBind.Click, string DialogId = GlobalSelector.DefaultDialogId, object attributes = null)
        {
            var htmlAttributes = this.htmlHelper
                                 .When(typeEvent)
                                 .DoWithPreventDefault()
                                 .AjaxGet(url)
                                 .OnSuccess(dsl =>
            {
                dsl.With(selector => selector.Id(DialogId)).Behaviors(dslin =>
                {
                    dslin.Core().Insert.Html();
                    dslin.JqueryUI().Dialog.Open(builder =>
                    {
                        builder.Modal     = true;
                        builder.Width     = "auto";
                        builder.Resizable = false;
                        builder.Draggable = false;
                    });
                });
                dsl.With(Selector.Jquery.Class("ui-widget-overlay")).Core().JQuery.Css.Set("z-index", "1800");
                dsl.With(Selector.Jquery.Class("ui-dialog")).Core().JQuery.Css.Set("z-index", "2000");
            })
                                 .AsHtmlAttributes(attributes);

            return(htmlAttributes);
        }
Ejemplo n.º 2
0
        public RouteValueDictionary DialogClose(JqueryBind typeEvent, string DialogId, object attributes = null)
        {
            var htmlAttributes = this.htmlHelper
                                 .When(typeEvent)
                                 .DoWithPreventDefault()
                                 .Direct()
                                 .OnSuccess(dsl => dsl.With(selector => selector.Id(DialogId)).JqueryUI().Dialog.Close())
                                 .AsHtmlAttributes(attributes);

            return(htmlAttributes);
        }
Ejemplo n.º 3
0
 public static IIncodingMetaLanguageBindingDsl When(this HtmlHelper htmlHelper, JqueryBind bind)
 {
     return(new IncodingMetaLanguageDsl(bind));
 }
Ejemplo n.º 4
0
 public static IIncodingMetaLanguageBindingDsl When(this IHtmlHelper htmlHelper, JqueryBind bind)
 {
     return(htmlHelper.When(bind.ToJqueryString()));
 }
Ejemplo n.º 5
0
 protected static string FixBindsAsString(JqueryBind bind)
 {
     return(bind
            .ToString().Replace(",", string.Empty)
            .ToLowerInvariant());
 }
Ejemplo n.º 6
0
 public IExecutableSetting Invoke(JqueryBind trigger)
 {
     return(Invoke(FixBindsAsString(trigger)));
 }
 public IExecutableSetting Detach(JqueryBind bind)
 {
     return(Detach(bind.ToStringLower()));
 }
Ejemplo n.º 8
0
 public IncodingMetaLanguageDsl(JqueryBind currentBind)
     : this(currentBind.ToJqueryString())
 {
 }
Ejemplo n.º 9
0
 public IIncodingMetaLanguageBindingDsl When(JqueryBind nextBind)
 {
     return(When(nextBind.ToJqueryString()));
 }
Ejemplo n.º 10
0
 public IncodingMetaLanguageDsl(IHtmlHelper htmlHelper, JqueryBind currentBind)
     : this(htmlHelper, currentBind.ToJqueryString())
 {
 }
 public IGridBuilderOptions <T> BindEvent(JqueryBind bindEvent)
 {
     this._bindEvent = bindEvent;
     return(this);
 }