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