fix: refactor grid usage per wuttaweb
This commit is contained in:
parent
38af9dd434
commit
5016ed9e64
|
@ -97,7 +97,7 @@
|
||||||
this.toggleRows(uuids, checked)
|
this.toggleRows(uuids, checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
TailboneGrid.methods.allChecked = function(checkedList) {
|
${grid.vue_component}.methods.allChecked = function(checkedList) {
|
||||||
// (de-)select all visible invoices when header checkbox is clicked
|
// (de-)select all visible invoices when header checkbox is clicked
|
||||||
let checked = !!checkedList.length
|
let checked = !!checkedList.length
|
||||||
this.toggleRows(this.allRowUUIDs(), checked)
|
this.toggleRows(this.allRowUUIDs(), checked)
|
||||||
|
|
|
@ -138,8 +138,8 @@ class VendorViewSupplement(ViewSupplement):
|
||||||
|
|
||||||
|
|
||||||
def make_accounts_grid(request):
|
def make_accounts_grid(request):
|
||||||
g = grids.Grid('quickbooks_bank_accounts',
|
g = grids.Grid(request,
|
||||||
request=request,
|
key='quickbooks_bank_accounts',
|
||||||
data=[], # empty data
|
data=[], # empty data
|
||||||
columns=[
|
columns=[
|
||||||
'store',
|
'store',
|
||||||
|
@ -165,12 +165,12 @@ class BankAccountsWidget(dfwidget.Widget):
|
||||||
def serialize(self, field, cstruct, **kw):
|
def serialize(self, field, cstruct, **kw):
|
||||||
g = make_accounts_grid(self.request)
|
g = make_accounts_grid(self.request)
|
||||||
|
|
||||||
g.main_actions.append(
|
g.actions.append(
|
||||||
grids.GridAction('edit', icon='edit',
|
grids.GridAction(self.request, 'edit', icon='edit',
|
||||||
click_handler='quickbooksBankAccountEdit(props.row)'))
|
click_handler='quickbooksBankAccountEdit(props.row)'))
|
||||||
|
|
||||||
g.main_actions.append(
|
g.actions.append(
|
||||||
grids.GridAction('delete', icon='trash',
|
grids.GridAction(self.request, 'delete', icon='trash',
|
||||||
click_handler='quickbooksBankAccountDelete(props.row)'))
|
click_handler='quickbooksBankAccountDelete(props.row)'))
|
||||||
|
|
||||||
widget = render('/vendors/quickbooks_bank_accounts_widget.mako', {
|
widget = render('/vendors/quickbooks_bank_accounts_widget.mako', {
|
||||||
|
|
Loading…
Reference in a new issue