diff --git a/app/assets/javascripts/app/controllers/_channel/email.coffee b/app/assets/javascripts/app/controllers/_channel/email.coffee index 7f31cc3fc..01b475d75 100644 --- a/app/assets/javascripts/app/controllers/_channel/email.coffee +++ b/app/assets/javascripts/app/controllers/_channel/email.coffee @@ -34,15 +34,14 @@ class App.ChannelEmail extends App.ControllerTabs class App.ChannelEmailFilter extends App.Controller events: - 'click [data-type=new]': 'new' + 'click [data-type=new]': 'new' constructor: -> super - - App.PostmasterFilter.subscribe( @render, initFetch: true ) + App.PostmasterFilter.subscribe(@render, initFetch: true) render: => - data = App.PostmasterFilter.search( sortBy: 'name' ) + data = App.PostmasterFilter.search(sortBy: 'name') template = $( '
' ) @@ -131,11 +130,10 @@ class App.ChannelEmailSignature extends App.Controller constructor: -> super - - App.Signature.subscribe( @render, initFetch: true ) + App.Signature.subscribe(@render, initFetch: true) render: => - data = App.Signature.search( sortBy: 'name' ) + data = App.Signature.search(sortBy: 'name') template = $( '' ) diff --git a/app/assets/javascripts/app/models/_application_model.coffee b/app/assets/javascripts/app/models/_application_model.coffee index 7f420daef..3651c6381 100644 --- a/app/assets/javascripts/app/models/_application_model.coffee +++ b/app/assets/javascripts/app/models/_application_model.coffee @@ -544,6 +544,10 @@ class App.Model extends Spine.Model if data.assets App.Collection.loadAssets(data.assets) + # in case of no record_ids are there, no inital render is fired + if _.isEmpty(data.record_ids) + App[@className].trigger('refresh') + # find / load object else App[@className].refresh(data) diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index 68bd27239..c7d611a9b 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -17,10 +17,10 @@