Do not apply column width changes on not table_id tables.
This commit is contained in:
parent
8a045651ce
commit
cd92cdbca7
2 changed files with 7 additions and 7 deletions
|
@ -281,7 +281,8 @@ class App.ControllerTable extends App.Controller
|
||||||
@objects = @objects.concat groupObjects[group]
|
@objects = @objects.concat groupObjects[group]
|
||||||
groupObjects[group] = [] # release old array
|
groupObjects[group] = [] # release old array
|
||||||
|
|
||||||
@calculateHeaderWidths()
|
if @table_id
|
||||||
|
@calculateHeaderWidths()
|
||||||
|
|
||||||
# get content
|
# get content
|
||||||
table = App.view('generic/table')(
|
table = App.view('generic/table')(
|
||||||
|
@ -406,8 +407,7 @@ class App.ControllerTable extends App.Controller
|
||||||
container: @container
|
container: @container
|
||||||
|
|
||||||
calculateHeaderWidths: ->
|
calculateHeaderWidths: ->
|
||||||
if !@headers
|
return if !@headers
|
||||||
return
|
|
||||||
|
|
||||||
if @availableWidth is 0
|
if @availableWidth is 0
|
||||||
@availableWidth = @minTableWidth
|
@availableWidth = @minTableWidth
|
||||||
|
@ -448,7 +448,7 @@ class App.ControllerTable extends App.Controller
|
||||||
if @dndCallback
|
if @dndCallback
|
||||||
widths += @sortableColWidth
|
widths += @sortableColWidth
|
||||||
|
|
||||||
return widths
|
widths
|
||||||
|
|
||||||
setHeaderWidths: =>
|
setHeaderWidths: =>
|
||||||
@calculateHeaderWidths()
|
@calculateHeaderWidths()
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<% groupLast = '' %>
|
<% groupLast = '' %>
|
||||||
<% for object in @objects: %>
|
<% for object in @objects: %>
|
||||||
<% if @groupBy: %>
|
<% if @groupBy: %>
|
||||||
<% groupByName = @P( object, @groupBy, @attributes ) %>
|
<% groupByName = @P(object, @groupBy, @attributes) %>
|
||||||
<% if groupLast isnt groupByName: %>
|
<% if groupLast isnt groupByName: %>
|
||||||
<tr class=""><td colspan="<%= length %>"><b><%= groupByName %></b></td></tr>
|
<tr class=""><td colspan="<%= length %>"><b><%= groupByName %></b></td></tr>
|
||||||
<% groupLast = groupByName %>
|
<% groupLast = groupByName %>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% for item in @header: %>
|
<% for item in @header: %>
|
||||||
<% value = @P( object, item.name, @attributes ) %>
|
<% value = @P(object, item.name, @attributes) %>
|
||||||
<% if @callbacks: %>
|
<% if @callbacks: %>
|
||||||
<% if item.name.substr(item.name.length-3, item.name.length) is '_id' && object[ item.name.substr(0, item.name.length-3) ]: %>
|
<% if item.name.substr(item.name.length-3, item.name.length) is '_id' && object[ item.name.substr(0, item.name.length-3) ]: %>
|
||||||
<% refObject = object[ item.name.substr(0, item.name.length-3) ] %>
|
<% refObject = object[ item.name.substr(0, item.name.length-3) ] %>
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
<% for attribute, callbacksAll of @callbacks: %>
|
<% for attribute, callbacksAll of @callbacks: %>
|
||||||
<% if attribute is item.name: %>
|
<% if attribute is item.name: %>
|
||||||
<% for callback in callbacksAll: %>
|
<% for callback in callbacksAll: %>
|
||||||
<% value = callback( value, object, item, @header, refObject ) %>
|
<% value = callback(value, object, item, @header, refObject) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue