Improved error handling.
This commit is contained in:
parent
2023ce00b5
commit
94b7d1dff5
2 changed files with 6 additions and 3 deletions
|
@ -49,7 +49,7 @@ class App.ControllerGenericNew extends App.ControllerModal
|
|||
if ui.callback
|
||||
ui.callback( user )
|
||||
ui.modalHide()
|
||||
App.Collection.find( ui.pageData.object, @id, callbackReload , true )
|
||||
App.Collection.find( ui['genericObject'], @id, callbackReload , true )
|
||||
|
||||
error: ->
|
||||
ui.log 'errors'
|
||||
|
@ -110,7 +110,7 @@ class App.ControllerGenericEdit extends App.ControllerModal
|
|||
if ui.callback
|
||||
ui.callback( user )
|
||||
ui.modalHide()
|
||||
App.Collection.find( ui.pageData.object, @id, callbackReload , true )
|
||||
App.Collection.find( ui['genericObject'], @id, callbackReload , true )
|
||||
|
||||
error: =>
|
||||
ui.log 'errors'
|
||||
|
|
|
@ -235,7 +235,10 @@ class _Singleton
|
|||
App[type].fetch()
|
||||
|
||||
_sortBy: ( collection, attribute ) ->
|
||||
_.sortBy( collection, (item) -> return item[ attribute ].toLowerCase() )
|
||||
_.sortBy( collection, (item) ->
|
||||
return '' if item[ attribute ] is undefined || item[ attribute ] is null
|
||||
return item[ attribute ].toLowerCase()
|
||||
)
|
||||
|
||||
_filter: ( collection, filter ) ->
|
||||
for key, value of filter
|
||||
|
|
Loading…
Reference in a new issue