Added support to call a customer callback after object edit is done.
This commit is contained in:
parent
a122a674e6
commit
386c8ddc49
1 changed files with 6 additions and 0 deletions
|
@ -183,6 +183,11 @@ class App.ControllerGenericIndex extends App.Controller
|
|||
edit: (e) =>
|
||||
e.preventDefault()
|
||||
item = $(e.target).item( App[ @genericObject ] )
|
||||
|
||||
if @editCallback
|
||||
@editCallback(item)
|
||||
return
|
||||
|
||||
new App.ControllerGenericEdit(
|
||||
id: item.id
|
||||
pageData: @pageData
|
||||
|
@ -190,6 +195,7 @@ class App.ControllerGenericIndex extends App.Controller
|
|||
)
|
||||
|
||||
destroy: (e) ->
|
||||
e.preventDefault()
|
||||
item = $(e.target).item( App[ @genericObject ] )
|
||||
new DestroyConfirm(
|
||||
item: item
|
||||
|
|
Loading…
Reference in a new issue