@@ -, +, @@
OPAC datatables JS
- In the OPAC, view the "Most popular" page.
- Change the filter settings, if necessary, to get multiple results.
- In the results table, confirm that sorting by number of checkouts
still works correctly.
---
koha-tmpl/intranet-tmpl/prog/js/datatables.js | 27 -------------------
.../bootstrap/en/modules/opac-topissues.tt | 9 +++----
.../opac-tmpl/bootstrap/js/datatables.js | 27 -------------------
3 files changed, 4 insertions(+), 59 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
@@ -314,33 +314,6 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, {
}
} );
-/* Plugin to allow sorting on numeric data stored in a span's title attribute
- *
- * Ex:
- * [% formatted currency %]
- * |
- *
- * In DataTables config:
- * "aoColumns": [
- * { "sType": "title-numeric" },
- * ]
- * http://datatables.net/plug-ins/sorting#hidden_title
- */
-jQuery.extend( jQuery.fn.dataTableExt.oSort, {
- "title-numeric-pre": function ( a ) {
- var x = a.match(/title="*(-?[0-9\.]+)/)[1];
- return parseFloat( x );
- },
-
- "title-numeric-asc": function ( a, b ) {
- return ((a < b) ? -1 : ((a > b) ? 1 : 0));
- },
-
- "title-numeric-desc": function ( a, b ) {
- return ((a < b) ? 1 : ((a > b) ? -1 : 0));
- }
-} );
-
(function() {
/* Plugin to allow text sorting to ignore articles
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt
@@ -88,7 +88,7 @@
Title |
[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %] |
- Checkouts |
+ Checkouts |
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
|
[% END %]
@@ -118,9 +118,9 @@
[% ItemTypes.GetDescription(result.itemtype) | html %]
[% END %]
-
+ |
Checkouts:
- [% result.count | html %]
+ [% result.count | html %]
|
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
@@ -153,8 +153,7 @@
"sorting": [[2, "desc"]],
"columnDefs": [
{ "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "type": "anti-the", "targets" : [ "anti-the" ] },
- { "type": "title-numeric", "targets" : [ "title-num"] },
+ { "type": "anti-the", "targets" : [ "anti-the" ] }
]
}));
});
--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js
+++ a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js
@@ -70,33 +70,6 @@ $.fn.dataTable.ext.buttons.clearFilter = {
}
};
-/* Plugin to allow sorting on numeric data stored in a span's title attribute
- *
- * Ex: |
- * [% formatted currency %]
- * |
- *
- * In DataTables config:
- * "aoColumns": [
- * { "sType": "title-numeric" },
- * ]
- * http://datatables.net/plug-ins/sorting#hidden_title
- */
-jQuery.extend( jQuery.fn.dataTableExt.oSort, {
- "title-numeric-pre": function ( a ) {
- var x = a.match(/title="*(-?[0-9\.]+)/)[1];
- return parseFloat( x );
- },
-
- "title-numeric-asc": function ( a, b ) {
- return ((a < b) ? -1 : ((a > b) ? 1 : 0));
- },
-
- "title-numeric-desc": function ( a, b ) {
- return ((a < b) ? 1 : ((a > b) ? -1 : 0));
- }
-} );
-
(function() {
/* Plugin to allow text sorting to ignore articles
--