Removed not needed force of reload.

This commit is contained in:
Martin Edenhofer 2013-06-29 00:28:03 +02:00
parent 92fa09d5f2
commit dcd01d5862

View file

@ -41,13 +41,9 @@ class App.ControllerGenericNew extends App.ControllerModal
ui = @ ui = @
object.save( object.save(
success: -> success: ->
# force to reload object
callbackReload = (user) ->
if ui.callback if ui.callback
ui.callback( user ) ui.callback( @ )
ui.modalHide() ui.modalHide()
App.Collection.find( ui['genericObject'], @id, callbackReload , true )
error: -> error: ->
ui.log 'errors' ui.log 'errors'
@ -91,13 +87,9 @@ class App.ControllerGenericEdit extends App.ControllerModal
ui = @ ui = @
@item.save( @item.save(
success: -> success: ->
# force to reload object
callbackReload = (user) ->
if ui.callback if ui.callback
ui.callback( user ) ui.callback( @ )
ui.modalHide() ui.modalHide()
App.Collection.find( ui['genericObject'], @id, callbackReload , true )
error: => error: =>
ui.log 'errors' ui.log 'errors'