From 41a4766fdab6a02471d292ca7a75f97ccabe9333 Mon Sep 17 00:00:00 2001 From: "t.felgentreff" Date: Wed, 13 Oct 2010 17:45:44 +0000 Subject: [PATCH] remove the date-sorting in JS, use a raw-data attribute if available for sorting and sort numbers and issues numerically git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1917 7926756e-e54e-46e6-9721-ed318f58905e --- .../cost_reports/_cost_entry_table.rhtml | 4 +- .../_simple_cost_report_table.rhtml | 4 +- assets/javascripts/sortable.js | 133 ++++++------------ 3 files changed, 44 insertions(+), 97 deletions(-) diff --git a/app/views/cost_reports/_cost_entry_table.rhtml b/app/views/cost_reports/_cost_entry_table.rhtml index 1e0c9e4e4e..d8f164918b 100644 --- a/app/views/cost_reports/_cost_entry_table.rhtml +++ b/app/views/cost_reports/_cost_entry_table.rhtml @@ -24,8 +24,8 @@ <% @query.each_direct_result do |result| %> <% list.each do |field| %><%= show_field field, result.fields[field.to_s] %><% end %> - <%= show_result(result, result.fields['cost_type_id'].to_i) %> - <%= show_result(result, 0) %> + ><%= show_result(result, result.fields['cost_type_id'].to_i) %> + ><%= show_result(result, 0) %> <%= link_to_if_authorized image_tag('edit.png'), action_for(result, :action => 'edit'), :title => l(:button_edit) %> diff --git a/app/views/cost_reports/_simple_cost_report_table.rhtml b/app/views/cost_reports/_simple_cost_report_table.rhtml index 52effd03cf..7c91e7db68 100644 --- a/app/views/cost_reports/_simple_cost_report_table.rhtml +++ b/app/views/cost_reports/_simple_cost_report_table.rhtml @@ -31,9 +31,9 @@ show_units = list.include? "cost_type_id" <%= show_row result %> <%= result.count %> <% if show_units %> - <%= show_result result, result.fields[:cost_type_id].to_i %> + ><%= show_result result, result.fields[:cost_type_id].to_i %> <% end %> - <%= show_result result %> + ><%= show_result result %> <% if params[:debug] %> diff --git a/assets/javascripts/sortable.js b/assets/javascripts/sortable.js index f7f570e67a..9ad2e6bd24 100644 --- a/assets/javascripts/sortable.js +++ b/assets/javascripts/sortable.js @@ -97,15 +97,18 @@ function ts_resortTable(lnk, clid) { for (var ci=0;ci