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) =>
|
edit: (e) =>
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
item = $(e.target).item( App[ @genericObject ] )
|
item = $(e.target).item( App[ @genericObject ] )
|
||||||
|
|
||||||
|
if @editCallback
|
||||||
|
@editCallback(item)
|
||||||
|
return
|
||||||
|
|
||||||
new App.ControllerGenericEdit(
|
new App.ControllerGenericEdit(
|
||||||
id: item.id
|
id: item.id
|
||||||
pageData: @pageData
|
pageData: @pageData
|
||||||
|
@ -190,6 +195,7 @@ class App.ControllerGenericIndex extends App.Controller
|
||||||
)
|
)
|
||||||
|
|
||||||
destroy: (e) ->
|
destroy: (e) ->
|
||||||
|
e.preventDefault()
|
||||||
item = $(e.target).item( App[ @genericObject ] )
|
item = $(e.target).item( App[ @genericObject ] )
|
||||||
new DestroyConfirm(
|
new DestroyConfirm(
|
||||||
item: item
|
item: item
|
||||||
|
|
Loading…
Reference in a new issue