standard sort is the first row (date) when no group_by is selected -fixes #3512

git-svn-id: https://dev.finn.de/svn/cockpit/branches/deployment_merge@1965 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
j.wollert 14 years ago
parent 23d0ace691
commit 2eb851653e
  1. 6
      app/views/cost_reports/_cost_entry_table.rhtml
  2. 6
      app/views/cost_reports/_simple_cost_report_table.rhtml
  3. 13
      app/views/cost_reports/_sortable_init.rhtml

@ -49,8 +49,4 @@
</tbody> </tbody>
</table> </table>
<script type="text/javascript"> <%= render :partial => 'sortable_init', :locals => {:sort_first_row => true } %>
//<![CDATA[
sortables_init();
//]]>
</script>

@ -43,8 +43,4 @@ show_units = list.include? "cost_type_id"
</tbody> </tbody>
</table> </table>
<script type="text/javascript"> <%= render :partial => 'sortable_init' %>
//<![CDATA[
sortables_init();
//]]>
</script>

@ -0,0 +1,13 @@
<% sort_first_row = sort_first_row || false %>
<script type="text/javascript">
//<![CDATA[
var table_date_header = $$('#sortable-table th').first();
sortables_init();
<% if sort_first_row %>
if (table_date_header.childElements().size() > 0) {
ts_resortTable(table_date_header.childElements().first(), table_date_header.cellIndex);
}
<% end %>
//]]>
</script>
Loading…
Cancel
Save