Bug 3134: (follow-up) improve ID and peport name sorting on saved reports page
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 21 Aug 2013 08:27:08 +0000 (10:27 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 21 Aug 2013 14:26:36 +0000 (14:26 +0000)
The sort for ID is alpha instead of numerical, same for the report
names.

To test:
create id=1, name=Report 1
create id=2, name=Report 2
create id=10, name=Report 10
create id=11, name=Report 11

Sorting by id:
without this patch 1, 10, 11, 2
with this patch: 1, 2, 10, 11

Sorting by name:
without this patch: Report 1, Report 10, Report 11, Report 2
with this patch: Report 1, Report 2, Report 10, Report 11

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index c16013e..2ac91d6 100644 (file)
@@ -73,7 +73,8 @@ $(document).ready(function(){
         'aaSorting': [[ 1, "asc" ]],
         'aoColumnDefs': [
             { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1, -2, -3, -4] },
-            { 'bSearchable': false, 'aTargets': [3, 4] }
+            { 'bSearchable': false, 'aTargets': [3, 4] },
+            { "aTargets": [ 1, 2 ], "sType": "natural"  }
         ],
         'oLanguage': {
             'sZeroRecords': _("No matching reports found")