public HtmlTag ResetFilters()
        {
            var reset = ViewConventionExtensions.Button(DefaultResetText)
                        .Attr("onclick", "reset();$.pageActions.ResetFilters();$.pageActions.RefreshData();");

            return(Tags.Div.AddClass("resetButton").Nest(reset));
        }
        public HtmlTag SubmitOrCancel(string submitText)
        {
            var submit = ViewConventionExtensions.SubmitButton(submitText)
                         .AddClass("positive");
            var cancel = ViewConventionExtensions.Button(SaveOrCancelConvention.DefaultCancelText)
                         .Attr("onclick", "$.ajaxFormsExtensions.AjaxForm.Cancel();");

            return(Tags.Div.AddClass("saveOrCancel").Nest(submit, cancel));
        }
        private static IEnumerable <HtmlTag> CreateButtonAndJavascript(MethodInfo action, UrlHelper urlHelper)
        {
            var name       = action.Name;
            var controller = action.DeclaringType.Name.Replace("Controller", string.Empty);
            var actionUrl  = urlHelper.Action(name, controller);

            var button = ViewConventionExtensions.Button(name).AddClass(PageActionsButtonClass);

            ApplyOpenWindowSettings(action, button);
            ApplyCloseWindowSettings(action, button);

            var javascript = GetJavascriptForButton(action, name, actionUrl);

            return(new[] { button, javascript });
        }