diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index b7b78d994..9d0d04feb 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -281,7 +281,8 @@ class App.ControllerTable extends App.Controller @objects = @objects.concat groupObjects[group] groupObjects[group] = [] # release old array - @calculateHeaderWidths() + if @table_id + @calculateHeaderWidths() # get content table = App.view('generic/table')( @@ -406,8 +407,7 @@ class App.ControllerTable extends App.Controller container: @container calculateHeaderWidths: -> - if !@headers - return + return if !@headers if @availableWidth is 0 @availableWidth = @minTableWidth @@ -448,7 +448,7 @@ class App.ControllerTable extends App.Controller if @dndCallback widths += @sortableColWidth - return widths + widths setHeaderWidths: => @calculateHeaderWidths() diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index 9c24b3058..68bd27239 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -44,7 +44,7 @@ <% groupLast = '' %> <% for object in @objects: %> <% if @groupBy: %> - <% groupByName = @P( object, @groupBy, @attributes ) %> + <% groupByName = @P(object, @groupBy, @attributes) %> <% if groupLast isnt groupByName: %>