Bug 22156: Subscription result list sorts on "checkbox" by default
authorOwen Leonard <oleonard@myacpl.org>
Thu, 17 Jan 2019 16:39:52 +0000 (16:39 +0000)
committerroot <root@f1ebe1bec408>
Tue, 19 Feb 2019 13:52:14 +0000 (13:52 +0000)
This patch adds default sorting by title to the subscription search
results list. Previously no default sort was defined, so it defaulted to
sorting by the first column in the table.

To test, apply the patch and go to Serials.

- Perform a search of subscriptions which will return multiple results.
- Confirm that the table of open subscriptions is sorted by default by
  title ascending.
- Confirm the same for the table of closed subscriptions.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt

index bbca46c..4c9e69f 100644 (file)
         $(document).ready(function() {
             var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
                 "sPaginationType": "four_button",
+                "order": [[ 2, "asc" ]],
                 "aoColumnDefs": [
                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
                     { "sType": "title-string", "aTargets" : [ "title-string" ] },
 
             var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, {
                 // FIXME sort function of additional_fields!
+                "order": [[ 2, "asc" ]],
                 "sPaginationType": "four_button",
                 "aoColumnDefs": [
                     { 'bSortable': false, 'aTargets': [ 'NoSort' ] },