Added support to call a customer callback after object edit is done.

This commit is contained in:
Martin Edenhofer 2014-01-21 22:22:48 +01:00
parent a122a674e6
commit 386c8ddc49

View file

@ -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