From 0e58dc036e317b1e8483e1a5ba81f26538ff2bee Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Jun 2013 12:11:27 +0200 Subject: [PATCH] Bug 9044: QA followup 1/ Remove filter and sort for the checkboxes column. 2/ Enable the pref by default. Signed-off-by: Jonathan Druart --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 3615df2..7d5b4e6 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -429,4 +429,4 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo'); -INSERT INTO systempreferences (variable, value, explanation, options, type) VALUES ('StaffDetailItemSelection', '0', 'Enable item selection in record detail page', NULL, 'YesNo'); +INSERT INTO systempreferences (variable, value, explanation, options, type) VALUES ('StaffDetailItemSelection', '1', 'Enable item selection in record detail page', NULL, 'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 33a0033..7739dc2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7062,7 +7062,7 @@ $DBversion = "XXX"; if (C4::Context->preference('Version') < TransformToNum($DBversion)) { $dbh->do(qq{ INSERT INTO systempreferences (variable, value, explanation, options, type) - VALUES ('StaffDetailItemSelection', '0', 'Enable item selection in record detail page', NULL, 'YesNo') + VALUES ('StaffDetailItemSelection', '1', 'Enable item selection in record detail page', NULL, 'YesNo') }); print "Upgrade to $DBversion done (Add system preference StaffDetailItemSelection)\n"; SetVersion($DBversion); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 200b7b6..c5fed17 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -114,6 +114,9 @@ function verify_images() { if (table.find('thead tr.columnFilter').length == 0) { table.dataTable().columnFilter({ 'sPlaceHolder': 'head:after' + [% IF StaffDetailItemSelection %] + , aoColumns: [ null, 'text', 'text', 'text', 'text', 'text', 'text', 'text' ] + [% END %] }); filters_row.addClass('columnFilter'); } @@ -163,6 +166,11 @@ function verify_images() { 'sDom': 't', 'bPaginate': false, 'bAutoWidth': false + [% IF StaffDetailItemSelection %] + , "aoColumnDefs": [ + { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false } + ] + [% END %] })); // Show a link to activate filtering -- 1.7.10.4