diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index 64433f28e..27395ec26 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -195,8 +195,8 @@ class App.ControllerTable extends App.Controller el.filter('.js-pager').html('') return pager = App.view('generic/table_pager')( - page: @shownPage - pages: pages + page: @shownPage + pages: pages ) if find el.find('.js-pager').html(pager) @@ -851,13 +851,21 @@ class App.ControllerTable extends App.Controller # update store and runtime @headerWidth @preferencesStore('headerWidth', leftColumnKey, leftWidth) @headerWidth[leftColumnKey] = leftWidth - _.find(@headers, (column) -> column.name is leftColumnKey).displayWidth = leftWidth + + # set header at runtime + for header in @headers + if header.name is leftColumnKey + header.displayWidth = @resizeTargetLeft.outerWidth() # update store and runtime @headerWidth if rightColumnKey @preferencesStore('headerWidth', rightColumnKey, rightWidth) @headerWidth[rightColumnKey] = rightWidth - _.find(@headers, (column) -> column.name is rightColumnKey).displayWidth = rightWidth + + # set header at runtime + for header in @headers + if header.name is rightColumnKey + header.displayWidth = @resizeTargetRight.outerWidth() sortByColumn: (event) => column = $(event.currentTarget).closest('[data-column-key]').attr('data-column-key')