Bugzilla – Attachment 118780 Details for
Bug 28018
Replace obsolete title-string sorting: OPAC templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28018: Replace obsolete title-string sorting: OPAC templates
Bug-28018-Replace-obsolete-title-string-sorting-OP.patch (text/plain), 46.73 KB, created by
Owen Leonard
on 2021-03-25 11:21:04 UTC
(
hide
)
Description:
Bug 28018: Replace obsolete title-string sorting: OPAC templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-03-25 11:21:04 UTC
Size:
46.73 KB
patch
obsolete
>From bc629f9f7637ce000aa376d326b295095a5554ba Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Mar 2021 18:08:49 +0000 >Subject: [PATCH] Bug 28018: Replace obsolete title-string sorting: OPAC > templates > >This patch modifies OPAC templates to replace the use of the >"title-string" DataTables sorting method with the newer "data-order" >attribute. > >To test, apply the patch and view the following pages to confirm that >columns containing dates sort correctly when using any setting of the >"dateformat" system preference: > >- As a logged-in user, (proper testing will depend on having the > relevant data associated with your user, e.g. holds, searches, ill > requests, etc.): > - Your summary > - Checkouts > - Overdues > - Holds > - Your charges > - Your search history > - Your checkout history > - Your holds history > - Your interlibrary loan requests > - Your tags >- Bibliographic detail page > - With a non-serial record: Holdings > - With a serial record: Latest issues > - More details -> Full history: Test multiple years if possible >- Course reserves -> Course details >- Self checkout -> Check out to a patron with checkouts >--- > .../bootstrap/en/includes/account-table.inc | 8 ++-- > .../bootstrap/en/includes/columns_settings.inc | 3 +- > .../bootstrap/en/includes/holds-table.inc | 34 ++++++-------- > .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 3 -- > .../bootstrap/en/modules/opac-course-details.tt | 4 +- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 10 ++-- > .../en/modules/opac-full-serial-issues.tt | 38 ++++++--------- > .../bootstrap/en/modules/opac-holdshistory.tt | 54 +++++++++++----------- > .../bootstrap/en/modules/opac-illrequests.tt | 11 ++--- > .../bootstrap/en/modules/opac-readingrecord.tt | 15 +++--- > .../bootstrap/en/modules/opac-search-history.tt | 19 ++++---- > .../opac-tmpl/bootstrap/en/modules/opac-tags.tt | 26 +++++------ > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 31 +++++-------- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 14 ++++-- > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 28 ----------- > 15 files changed, 124 insertions(+), 174 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >index a3b6b935d5..6c3b5b9c5c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >@@ -6,7 +6,7 @@ > <thead> > <tr> > [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %] >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Type</th> > <th>Description</th> > <th>Amount</th> >@@ -26,7 +26,7 @@ > [% END %] > </td> > [% END %] >- <td><span title="[% ACCOUNT_LINE.date | html %]">[% ACCOUNT_LINE.date | $KohaDates %]</span></td> >+ <td data-order="[% ACCOUNT_LINE.date | html %]">[% ACCOUNT_LINE.date | $KohaDates %]</td> > <td> > [% PROCESS account_type_description account=ACCOUNT_LINE %] > </td> >@@ -89,7 +89,7 @@ > <thead> > <tr> > [% IF ENABLE_OPAC_PAYMENTS %]<th> </th>[% END %] >- <th class="title-string">Date</th> >+ <th>Date</th> > <th>Description</th> > <th>Fine amount</th> > <th>Amount outstanding</th> >@@ -110,7 +110,7 @@ > [% END %] > </td> > [% END %] >- <td><span title="[% a.date | html %]">[% a.date | $KohaDates %]</span></td> >+ <td data-order="[% a.date | html %]">[% a.date | $KohaDates %]</td> > <td> > [% PROCESS account_type_description account=a %] > [%- IF a.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', a.payment_type, 1) | html %][% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >index 6b7971ff53..78935a9d5c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >@@ -99,10 +99,9 @@ function KohaTable(selector, dt_parameters, columns_settings) { > var new_parameters = {} > $.extend(true, new_parameters, dataTablesDefaults, dt_parameters); > var default_column_defs = [ >- { "aTargets": ["title-string"], "sType": "title-string" }, > { "aTargets": ["string-sort"], "sType": "string" }, > { "aTargets": ["anti-the"], "sType": "anti-the" }, >- { "aTargets": ["NoSort"], "bSortable": false, "bSearchable": false }, >+ { "aTargets": ["NoSort"], "bSortable": false, "bSearchable": false } > ]; > if (new_parameters["aoColumnDefs"] === undefined) { > new_parameters["aoColumnDefs"] = default_column_defs; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >index 78735ba4a0..c50958346d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >@@ -12,11 +12,11 @@ > <tr> > <th class="anti-the">Title</th> > [% IF ( showpriority ) %] >- <th class="title-string">Placed on</th> >+ <th>Placed on</th> > [% ELSE %] >- <th class="psort title-string">Placed on</th> >+ <th class="psort">Placed on</th> > [% END %] >- <th class="title-string">Expires on</th> >+ <th>Expires on</th> > [% UNLESS( singleBranchMode) %] > <th>Pick up location</th> > [% END %] >@@ -62,28 +62,24 @@ > <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p> > [% END %] > </td> >- <td class="reservedate"> >- <span title="[% HOLD.reservedate | html %]"> >- <span class="tdlabel">Hold date:</span> >+ <td class="reservedate" data-order="[% HOLD.reservedate | html %]"> >+ <span class="tdlabel">Hold date:</span> > [% HOLD.reservedate | $KohaDates %] > </span> > </td> >- <td class="expirationdate"> >- [% IF ! HOLD.found %] >+ [% IF ! HOLD.found %] >+ <td class="expirationdate" data-order="[% HOLD.expirationdate | html %]"> > [% IF ( HOLD.expirationdate ) %] >- <span title="[% HOLD.expirationdate | html %]"> >- <span class="tdlabel">Expiration:</span> >- [% HOLD.expirationdate | $KohaDates %] >- </span> >+ <span class="tdlabel">Expiration:</span> >+ [% HOLD.expirationdate | $KohaDates %] > [% ELSE %] >- <span title="0000-00-00"> >- <span class="tdlabel">Expiration:</span> >- Never expires >- </span> >+ <span class="tdlabel">Expiration:</span> >+ Never expires > [% END %] >- [% ELSE %] >- <span title="0000-00-00">-</span> >- [% END %] >+ [% ELSE %] >+ <td class="expirationdate" data-order="0000-00-00"> >+ - >+ [% END %] > </td> > [% UNLESS( singleBranchMode) %] > <td class="branch"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index 97c6281a6f..d70bf5ae6e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -93,9 +93,6 @@ $( document ).ready(function() { > var txtInactivefilter = _("Show all transactions"); > > var fines_table = $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, { >- "columnDefs": [ >- { "type": "title-string", "targets" : [ "title-string" ] } >- ], > [% IF ENABLE_OPAC_PAYMENTS %] > "order": [[ 1, "desc" ]], > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >index d90c1fa2e8..12d9ebf344 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >@@ -69,7 +69,7 @@ > <th>Call number</th> > <th>Copy number</th> > <th>Status</th> >- <th class="title-string">Date due</th> >+ <th>Date due</th> > <th>Notes</th> > <th>Link</th> > </tr> >@@ -86,7 +86,7 @@ > <td>[% cr.item.itemcallnumber | html %]</td> > <td>[% cr.item.copynumber | html %]</td> > <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td> >- <td><span title="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</span></td> >+ <td data-order="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</td> > <td>[% IF ( cr.public_note ) %] > [% cr.public_note | $raw %] > [% ELSIF ( cr.item.itemnotes ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index a14c1e3607..812d8d649c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -823,8 +823,8 @@ > <thead> > <tr> > <th id="serial_serialseq" data-colname="serial_serialseq">Issue #</th> >- <th id="serial_publisheddate" data-colname="serial_publisheddate" class="title-string">Publication date</th> >- <th id="serial_planneddate" data-colname="serial_planneddate" class="title-string">Received date</th> >+ <th id="serial_publisheddate" data-colname="serial_publisheddate">Publication date</th> >+ <th id="serial_planneddate" data-colname="serial_planneddate">Received date</th> > <th id="serial_status" data-colname="serial_status">Status</th> > <th id="serial_notes" data-colname="serial_notes">Note</th> > </tr> >@@ -833,8 +833,8 @@ > [% FOREACH latestserial IN subscription.latestserials %] > <tr> > <td class="serialseq">[% latestserial.serialseq | html %]</td> >- <td class="publisheddate"><span title="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</span></td> >- <td class="planneddate"><span title="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</span></td> >+ <td class="publisheddate" data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td> >+ <td class="planneddate" data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td> > <td class="serial_status"> > [% IF (latestserial.status1 ) %]<span>Expected</span>[% END %] > [% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %] >@@ -1398,7 +1398,7 @@ > [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %] > <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %] >- <td class="date_due"><span title="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</span></td> >+ <td class="date_due" data-order="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</td> > <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td> > [% IF holds_count.defined || show_priority %] > <td class="holds_count"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >index 6ad30b0f39..2972d53697 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt >@@ -135,27 +135,26 @@ > <tbody> > [% FOREACH serial IN year.serials %] > <tr> >- <td> >+ <td data-order="[% serial.publisheddate | html %]"> > [% IF ( serial.publisheddate ) %] >- <span title="[% serial.publisheddate | html %]"> >- [% IF serial.publisheddatetext %] >- [% serial.publisheddatetext | html %] >- [% ELSE %] >- [% serial.publisheddate | $KohaDates %] >- [% END %] >- </span> >+ [% IF serial.publisheddatetext %] >+ [% serial.publisheddatetext | html %] >+ [% ELSE %] >+ [% serial.publisheddate | $KohaDates %] >+ [% END %] > [% ELSE %] > > [% END %] > </td> > <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) | html %]</td> > <td>[% serial.notes | html %]</td> >- <td> >- [% IF ( serial.status2 && serial.planneddate ) %] >- <span title="[% serial.planneddate | html %]">[% serial.planneddate | $KohaDates %]</span> >- [% ELSE %] >- <span title="9999-12-31"> </span> >- [% END %] >+ [% IF ( serial.status2 && serial.planneddate ) %] >+ <td data-order="[% serial.planneddate | html %]"> >+ [% serial.planneddate | $KohaDates %] >+ [% ELSE %] >+ <td data-order="9999-12-31"> >+ >+ [% END %] > </td> > <td>[% serial.serialseq | html %]</td> > <td> >@@ -210,16 +209,7 @@ > $(this).addClass("currentsubtab"); > }); > $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, { >- "order": [[ 0, "desc" ]], >- "columns": [ >- { "type": "title-string" }, >- null, >- null, >- { "type": "title-string" }, >- null, >- null, >- null >- ] >+ "order": [[ 0, "desc" ]] > })); > }); > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >index a684a304e7..cabd3edc72 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt >@@ -2,6 +2,7 @@ > [% USE Koha %] > [% USE Branches %] > [% USE KohaDates %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your holds history</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -58,7 +59,7 @@ > You have never placed a hold from this library. > [% ELSE %] > <div id="opac-user-holdsrec"> >- <div id="tabs-container" style="overflow:auto"> >+ <div id="tabs-container"> > <div class="controls"> > <div class="resultscontrol resort"> > <form id="sortform" action="/cgi-bin/koha/opac-holdshistory.pl" method="get"> >@@ -89,10 +90,10 @@ > <th>Author</th> > <th>Barcode</th> > <th>Library</th> >- <th class="title-string">Hold date</th> >- <th class="title-string">Expiration date</th> >- <th class="title-string">Waiting date</th> >- <th class="title-string">Cancellation date</th> >+ <th>Hold date</th> >+ <th>Expiration date</th> >+ <th>Waiting date</th> >+ <th>Cancellation date</th> > [% IF show_itemtype_column %] > <th>Requested item type</th> > [% END %] >@@ -106,26 +107,20 @@ > <td>[% hold.biblio.author | html %]</td> > <td>[% hold.item.barcode | html %]</td> > <td>[% Branches.GetName( hold.branchcode ) | html %]</td> >- <td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td> >- <td> >+ <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td> >+ <td data-order="[% hold.expirationdate | html %]"> > [% IF hold.expirationdate %] >- <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >+ [% hold.expirationdate | $KohaDates %] > [% END %] > </td> >- <td> >+ <td data-order="[% hold.waitingdate | html %]"> > [% IF hold.waitingdate %] >- <span title="[% hold.waitingdate | html %]">[% hold.waitingdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >+ [% hold.waitingdate | $KohaDates %] > [% END %] > </td> >- <td> >+ <td data-order="[% hold.cancellationdate | html %]"> > [% IF hold.cancellationdate %] >- <span title="[% hold.cancellationdate | html %]">[% hold.cancellationdate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >+ [% hold.cancellationdate | $KohaDates %] > [% END %] > </td> > [% IF show_itemtype_column %] >@@ -166,20 +161,25 @@ > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] > [% INCLUDE 'datatables.inc' %] >+[% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > $('#sort').change(function() { > $('#sortform').submit(); > }); >- var table = $("table_holdshistory").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button", >- "aaSorting": [[4, 'desc']], >- "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >- "aoColumnDefs": [ >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ] >- })); >+ var columns_settings = []; // Empty because there are no columns we want to be configurable >+ var table = KohaTable("#table_holdshistory", { >+ "dom": '<"top"<"table_entries"i><"table_controls"fB>>t', >+ "autoWidth": false, >+ "sorting": [[4, 'desc']], >+ "columnDefs": [ >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } >+ ], >+ "language": { >+ "search": "_INPUT_", >+ "searchPlaceholder": _("Search") >+ } >+ }, columns_settings); > }); > </script> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index ab03b84d96..45e6741bad 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -133,8 +133,8 @@ > <th>Requested from</th> > <th>Request type</th> > <th>Status</th> >- <th class="title-string">Request placed</th> >- <th class="title-string">Last updated</th> >+ <th>Request placed</th> >+ <th>Last updated</th> > <th></th> > </tr> > </thead> >@@ -155,8 +155,8 @@ > [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %] > </td> > <td>[% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %]</td> >- <td><span title="[% request.placed | html %]">[% request.placed | $KohaDates %]</span></td> >- <td><span title="[% request.updated | html %]">[% request.updated | $KohaDates %]</span></td> >+ <td data-order="[% request.placed | html %]">[% request.placed | $KohaDates %]</td> >+ <td data-order="[% request.updated | html %]">[% request.updated | $KohaDates %]</td> > <td> > <a href="/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=[% request.id | uri %]" class="btn btn-primary btn-sm pull-right">View</a> > </td> >@@ -284,8 +284,7 @@ > <script> > $("#illrequestlist").dataTable($.extend(true, {}, dataTablesDefaults, { > "columnDefs": [ >- { "targets": [ -1 ], "sortable": false, "searchable": false }, >- { "type": "title-string", "targets" : [ "title-string" ] } >+ { "targets": [ -1 ], "sortable": false, "searchable": false } > ], > "order": [[ 3, "desc" ]], > "deferRender": true >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 4da626c48d..620ef88da0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -91,7 +91,7 @@ > <th class="anti-the">Title</th> > <th>Item type</th> > <th>Call no.</th> >- <th class="title-string">Date</th> >+ <th>Date</th> > [% IF ( OPACMySummaryHTML ) %] > <th class="NoSort noExport">Links</th> > [% END %] >@@ -173,13 +173,14 @@ > <span class="tdlabel">Call number:</span> > [% issue.itemcallnumber | html %] > </td> >- <td> >- [% IF issue.returndate %] >+ [% IF issue.returndate %] >+ <td data-order="[% issue.returndate | html %]"> > <span class="tdlabel">Check-in date:</span> >- <span title="[% issue.returndate | html %]">[% issue.returndate | $KohaDates %]</span> >- [% ELSE %] >- <span title="Checked out"><em>(Checked out)</em></span> >- [% END %] >+ [% issue.returndate | $KohaDates %] >+ [% ELSE %] >+ <td data-order="Checked out"> >+ <em>(Checked out)</em> >+ [% END %] > </td> > [% IF OPACMySummaryHTML %] > <td>[% issue.MySummaryHTML | $raw %]</td> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >index d16109819b..234e3a512b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >@@ -76,9 +76,9 @@ > <td class="selectcol"> > <input type="checkbox" name="id" value="[% s.id | html %]" id="result[% s.id | html %]" /> > </td> >- <td> >+ <td data-order="[% s.time | html %]"> > <label for="result[% s.id | html %]"> >- <span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span> >+ [% s.time |$KohaDates with_hours => 1 %] > </label> > </td> > <td> >@@ -119,9 +119,9 @@ > <td class="selectcol"> > <input type="checkbox" name="id" value="[% s.id | html %]" id="result[% s.id | html %]" /> > </td> >- <td> >+ <td data-order="[% s.time | html %]"> > <label for="result[% s.id | html %]"> >- <span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span> >+ [% s.time |$KohaDates with_hours => 1 %] > </label> > </td> > <td> >@@ -169,9 +169,9 @@ > <td class="selectcol"> > <input type="checkbox" name="id" value="[% s.id | html %]" id="result[% s.id | html %]" /> > </td> >- <td> >+ <td data-order="[% s.time | html %]"> > <label for="result[% s.id | html %]"> >- <span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span> >+ [% s.time |$KohaDates with_hours => 1 %] > </label> > </td> > <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >@@ -204,9 +204,9 @@ > <td class="selectcol"> > <input type="checkbox" name="id" value="[% s.id | html %]" id="result[% s.id | html %]" /> > </td> >- <td> >+ <td data-order="[% s.time | html %]"> > <label for="result[% s.id | html %]"> >- <span title="[% s.time | html %]">[% s.time |$KohaDates with_hours => 1 %]</span> >+ [% s.time |$KohaDates with_hours => 1 %] > </label> > </td> > <td><a href="/cgi-bin/koha/opac-authorities-home.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td> >@@ -259,8 +259,7 @@ > "order": [[ 1, "desc" ]], > "dom": '<"top"<"table_entries"><"table_controls"fB>>t', > "columnDefs": [ >- { "targets": [ 0 ], "sortable": false, "searchable": false }, >- { "targets": [ 1 ], "type": "title-string" }, >+ { "targets": [ 0 ], "sortable": false, "searchable": false } > ], > "language": { > "search": "_INPUT_", >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index 5e926ce77c..a3c49cd627 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -133,7 +133,14 @@ > <form id="deletetags" method="post" action="opac-tags.pl"> > <h2>Your tags</h2> > <table id="mytagst" class="table table-bordered table-striped"> >- <thead><tr><th> </th><th>Term</th><th>Title</th><th>Date added</th></tr></thead> >+ <thead> >+ <tr> >+ <th> </th> >+ <th>Term</th> >+ <th class="anti-the">Title</th> >+ <th>Date added</th> >+ </tr> >+ </thead> > <tbody> > [% FOREACH MY_TAG IN MY_TAGS %] > [% IF MY_TAG.visible %] >@@ -164,11 +171,9 @@ > > [% INCLUDE 'title-actions-menu.inc' items=MY_TAG %] > </td> >- <td> >- <span title="[% MY_TAG.date_created | html %]"> >- <span class="tdlabel">Date added:</span> >- [% MY_TAG.date_created | $KohaDates %] >- </span> >+ <td data-order="[% MY_TAG.date_created | html %]"> >+ <span class="tdlabel">Date added:</span> >+ [% MY_TAG.date_created | $KohaDates %] > </td> > </tr> > [% END %] >@@ -211,13 +216,8 @@ > $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sorting": [[ 2, "asc" ]], > "columnDefs": [ >- { "targets": [ 0 ], "sortable": false, "searchable": false } >- ], >- "columns": [ >- null, >- { "type": "anti-the" }, >- { "type": "title-string" }, >- null >+ { "targets": [ 0 ], "sortable": false, "searchable": false }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } > ] > })); > }); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 5d4206a0c6..0db0ecbefc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -239,7 +239,7 @@ > [% IF ( JacketImages || AdlibrisEnabled ) %]<th class="nosort"> </th>[% END %] > <th class="anti-the">Title</th> > <th>Author</th> >- <th class="title-string psort">Due</th> >+ <th class="psort">Due</th> > [% UNLESS ( item_level_itypes ) %] > <th>Item type</th> > [% END %] >@@ -319,18 +319,14 @@ > > <td class="author">[% ISSUE.author | html %]</td> > [% IF ( ISSUE.overdue ) %] >- <td class="date_due overdue"> >- <span title="[% ISSUE.date_due | html %]"> >- <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >- </span> >+ <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]"> >+ <span class="tdlabel">Date due:</span> >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] > </td> > [% ELSE %] >- <td class="date_due"> >- <span title="[% ISSUE.date_due | html %]"> >- <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >- </span> >+ <td class="date_due" data-order="[% ISSUE.date_due | html %]"> >+ <span class="tdlabel">Date due:</span> >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] > </td> > [% END %] > [% UNLESS ( item_level_itypes ) %] >@@ -589,7 +585,7 @@ > [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %] > [% IF ( show_barcode ) %]<th>Barcode</th>[% END %] > <th>Call no.</th> >- <th class="title-string psort">Due</th> >+ <th class="psort">Due</th> > [% IF ( OpacRenewalAllowed ) %] > <th class="nosort">Renew</th> > [% END %] >@@ -659,11 +655,9 @@ > <span class="tdlabel">Call no.:</span> > [% OVERDUE.itemcallnumber | html %] > </td> >- <td> >- <span title="[% OVERDUE.date_due | html %]"> >- <span class="tdlabel">Date due:</span> >- [% OVERDUE.date_due | $KohaDates as_due_date => 1 %] >- </span> >+ <td data-order="[% OVERDUE.date_due | html %]"> >+ <span class="tdlabel">Date due:</span> >+ [% OVERDUE.date_due | $KohaDates as_due_date => 1 %] > </td> > [% IF ( OpacRenewalAllowed ) %] > <td> >@@ -906,8 +900,7 @@ > "dom": '<"top"<"table_entries"><"table_controls"fB>>t', > "columnDefs": [ > { "targets": [ "nosort" ],"sortable": false,"searchable": false }, >- { "type": "anti-the", "targets" : [ "anti-the" ] }, >- { "type": "title-string", "targets" : [ "title-string" ] } >+ { "type": "anti-the", "targets" : [ "anti-the" ] } > ], > "language": { > "search": "_INPUT_", >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 907f4bdf81..39be7e9edc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -294,7 +294,7 @@ > <th class="noshow">Checked out on</th> > <th class="anti-the">Title</th> > <th>Call no.</th> >- <th class="title-string">Due</th> >+ <th>Due</th> > <th class="nosort">Renew</th> > [% UNLESS ( nofines ) %] > <th>Fines</th> >@@ -319,9 +319,13 @@ > </td> > <td>[% ISSUE.itemcallnumber | html %]</td> > [% IF ( ISSUE.overdue ) %] >- <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td> >+ <td class="overdue" data-order="[% ISSUE.date_due | html %]"> >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >+ </td> > [% ELSE %] >- <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td> >+ <td data-order="[% ISSUE.date_due | html %]"> >+ [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >+ </td> > [% END %] > <td> > <form action="/cgi-bin/koha/sco/sco-main.pl" method="post"> >@@ -483,12 +487,12 @@ > dofocus(); > [% IF ( patronid ) %]sco_init();[% END %] > $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "dom": "t", > "order": [ 0 ], > "columnDefs": [ > { "targets": [ "nosort" ], "sortable": false, "searchable": false }, > { "targets": [ "noshow" ], "visible": false, "searchable": false }, >- { "type": "anti-the", "targets" : [ "anti-the" ] }, >- { "type": "title-string", "targets" : [ "title-string" ] } >+ { "type": "anti-the", "targets" : [ "anti-the" ] } > ] > })); > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index 47f24e2829..5d3a543942 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -70,34 +70,6 @@ $.fn.dataTable.ext.buttons.clearFilter = { > } > }; > >-/* Plugin to allow sorting on data stored in a span's title attribute >- * >- * Ex: <td><span title="[% ISO_date %]">[% formatted_date %]</span></td> >- * >- * In DataTables config: >- * "aoColumns": [ >- * { "sType": "title-string" }, >- * ] >- * http://datatables.net/plug-ins/sorting#hidden_title_string >- */ >-jQuery.extend( jQuery.fn.dataTableExt.oSort, { >- "title-string-pre": function ( a ) { >- var m = a.match(/title="(.*?)"/); >- if ( null !== m && m.length ) { >- return m[1].toLowerCase(); >- } >- return ""; >- }, >- >- "title-string-asc": function ( a, b ) { >- return ((a < b) ? -1 : ((a > b) ? 1 : 0)); >- }, >- >- "title-string-desc": function ( a, b ) { >- return ((a < b) ? 1 : ((a > b) ? -1 : 0)); >- } >-} ); >- > /* Plugin to allow sorting on numeric data stored in a span's title attribute > * > * Ex: <td><span title="[% decimal_number_that_JS_parseFloat_accepts %]"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28018
:
118780
|
118887
|
118888