Bug 34356: Make sort order always default to correct column
To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to
Signed-off-by: Jason <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edad82662c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
2fb195eedf
commit
80cc0c03aa
|
|
@ -174,10 +174,15 @@
|
|||
[% Asset.js("js/checkout_renewals_modal.js") | $raw %]
|
||||
<script id="js">
|
||||
$(document).ready(function() {
|
||||
[% IF Koha.Preference('RecordStaffUserOnCheckout') %]
|
||||
var column_sort = 11;
|
||||
[% ELSE %]
|
||||
var column_sort = 10;
|
||||
[% END %]
|
||||
var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
|
||||
var table = KohaTable("table_readingrec", {
|
||||
"sPaginationType": "full",
|
||||
"aaSorting": [[10, 'desc']]
|
||||
"aaSorting": [[column_sort, 'desc']]
|
||||
}, table_settings);
|
||||
|
||||
$("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue