Using new syntax for save-bar on customers page

This commit is contained in:
Rob Harrington
2016-05-13 16:30:39 +10:00
parent 162b11dcc5
commit ecb9646ccb
2 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ angular.module("admin.indexUtils").factory "pendingChanges", ($q, resources, Sta
delete @pendingChanges["#{id}"]["#{attr}"]
delete @pendingChanges["#{id}"] if @changeCount( @pendingChanges["#{id}"] ) < 1
submitAll: (form=null) =>
submitAll: (event=null, form=null) =>
all = []
@errors = []
StatusMessage.display('progress', "Saving...")

View File

@@ -38,7 +38,8 @@
.row.margin-bottom-50{ ng: { show: "!RequestMonitor.loading && filteredCustomers.length > 0" } }
%form{ name: "customers_form" }
%save-bar{ save: "submitAll(customers_form)", form: "customers_form" }
%save-bar{ buttons: "[{ text: 'Save Changes', action: submitAll, param: customers_form, class: 'red' }]", form: "customers_form" }
%table.index#customers
%col.email{ width: "20%"}
%col.code{ width: "20%"}