public static MvcHtmlString DataView_ControlPanel(this HtmlHelper helper, DataViewOptions options) { return(MvcHtmlString.Create( "<div class=\"zpm-dv-control-panel\">" + helper.DataView_Message(options).ToString() + helper.DataView_SaveButton(options).ToString() + helper.DataView_DeleteButton(options).ToString() + helper.DataView_CancelButton(options).ToString() + "</div>")); }
public static MvcHtmlString DataView_NewDataView(this HtmlHelper helper, DataViewOptions options) { return(MvcHtmlString.Create( "new ZpmDataView(" + "\"" + options.ModelName + "View\"," + "\"" + options.ModelTextName + "\"," + "\"" + options.GetModel + "\"," + "\"" + options.FocusOnChange + "\"," + "\"" + options.FocusOnAdd + "\"" + ")")); }
public static MvcHtmlString DataView_Filter(this HtmlHelper helper, DataViewOptions options, int height = 22, string prefixHtml = "") { options.FilterHeight = height; return(MvcHtmlString.Create( "<div class=\"zpm-dv-filter-div\" style=\"height:" + (options.FilterHeight).ToString() + "px\">" + prefixHtml + "Filter" + " <input class=\"zpm-dv-filter\" type=\"text\" maxlength=\"30\" onkeyup =\"document.zpmDataView.FilterKeyUp(this)\"" + " style=\"width:" + (options.ListWidth - 105).ToString() + "px\" />" + " <input type=\"button\" value=\"Clear\" onclick=\"document.zpmDataView.FilterClear();\" />" + "</div>")); }
public static IHtmlString DataView_AddButton(this HtmlHelper helper, DataViewOptions options) { TagBuilder tb = new TagBuilder("img"); tb.Attributes.Add("src", System.Web.VirtualPathUtility.ToAbsolute("~/content/images/AddIcon.png")); tb.Attributes.Add("alt", "Add " + options.ModelTextName); tb.Attributes.Add("title", "Add new " + options.ModelTextName); tb.Attributes.Add("class", "zpm-dv-add-button"); tb.Attributes.Add("style", "z-index:90; margin-left:" + (options.ListWidth - 21).ToString() + "px;"); tb.Attributes.Add("onclick", "document.zpmDataView.Add('" + options.AddModel + "')"); return(new MvcHtmlString(tb.ToString())); }
public static MvcHtmlString DataView_CancelButton(this HtmlHelper helper, DataViewOptions options) { return(MvcHtmlString.Create("<input type=\"button\" class=\"zpm-dv-control-panel-cancel\" value=\"Cancel\" onclick=\"document.zpmDataView.Cancel()\" />")); }
public static MvcHtmlString DataView_DeleteButton(this HtmlHelper helper, DataViewOptions options) { return(MvcHtmlString.Create("<input type=\"button\" class=\"zpm-dv-control-panel-delete\" value=\"Delete\" onclick=\"document.zpmDataView.Delete('" + options.DeleteModel + "')\" />")); }
public static MvcHtmlString DataView_Message(this HtmlHelper helper, DataViewOptions options) { return(MvcHtmlString.Create("<div id=\"message\" class=\"zpm-dv-control-panel-message\"></div>")); }