예제 #1
0
 /// <summary>
 /// Adds toolbar to table
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="conf">Table configurator</param>
 /// <param name="where">Toolbar position</param>
 /// <param name="toolbar">Toolbar confguration action</param>
 /// <param name="templateId">Overrides standard toolbar template ID</param>
 /// <param name="order">Plugin order among specified placement</param>
 /// <returns>Fluent</returns>
 public static T Toolbar <T>(this T conf, string where, Action <ToolbarBuilder> toolbar, string templateId = "toolbar", int order = 0) where T : IConfigurator
 {
     conf.TableConfiguration.UpdatePluginConfig <ToolbarButtonsClientConfiguration>(PluginId, c =>
     {
         ToolbarBuilder tb = new ToolbarBuilder(c.Configuration.Buttons);
         toolbar(tb);
         tb.AssignIds();
         c.TemplateId(templateId);
         c.Order = order;
     }, where);
     return(conf);
 }
예제 #2
0
 public ToolbarSubmenuBuilder(List <ToolbarButtonClientConfiguration> buttons)
 {
     _innerBuilder = new ToolbarBuilder(buttons);
     _buttons      = buttons;
 }