public GridToolBarCommandFactoryTests() { toolBarSettings = new GridToolBarSettings<object>(GridTestHelper.CreateGrid<object>()); factory = new GridToolBarCommandFactory<object>(toolBarSettings); }
public GridToolBarCommandFactoryTests() { toolBarSettings = new GridToolBarSettings <object>(GridTestHelper.CreateGrid <object>()); factory = new GridToolBarCommandFactory <object>(toolBarSettings); }
private static GridToolBarCustomCommandBuilder <TModel> GridToolbarButton <TModel>([PathReference] string icon, string lable, string javascriptMethod, GridToolBarCommandFactory <TModel> commands) where TModel : class { return(commands.Custom() //.ButtonType(GridButtonType.ImageAndText) .Text(lable) .HtmlAttributes( new { title = lable, style = string.Format("background: url('{0}'); height: 18px; width: 18px; margin-top: 0px", new UrlHelper(HttpContext.Current.Request.RequestContext).Content(icon)) }) .Url(string.Format("javascript:{0}", javascriptMethod))); }
public static GridToolBarCustomCommandBuilder <TModel> ImportInspektionsrouteButton <TModel>(this GridToolBarCommandFactory <TModel> commands, string javascriptMethod) where TModel : class { return(GridToolbarButton("~/Content/images/import.png", ButtonLocalization.ImportInspektionsroute, javascriptMethod, commands)); }
public static GridToolBarCustomCommandBuilder <TModel> AddButton <TModel>(this GridToolBarCommandFactory <TModel> commands, string javascriptMethod, string buttonLabel) where TModel : class { return(GridToolbarButton("~/Content/images/neuanlegen.png", buttonLabel, javascriptMethod, commands)); }
/// <summary> /// Enables the Refresh-Button in the Command-Toolbar of the table /// </summary> /// <typeparam name="TModel">the model of the table</typeparam> /// <param name="target">the command-factory for the given table</param> /// <returns></returns> public static GridToolBarCustomCommandBuilder RefreshTable<TModel>(this GridToolBarCommandFactory<TModel> target) where TModel : class { return target.Custom().Name(CustomActionHelper.RandomName("refresh")).Text("\u200B").HtmlAttributes(new Dictionary<string, object> {{"onclick", "ITVenture.Tools.TableHelper.refreshTable(event)"}, {"class", "itv-tool-button itv-fa-tbx"}, {"title", TextsAndMessagesHelper.IWCN_KX_RTB_Caption}}).IconClass("fas fa-sync"); }
public static void AddCreateLocalize <T>(this GridToolBarCommandFactory <T> c) where T : class { c.Create().Text("جدید".Localize()); }