From ccf1f5164b8648d8a65f9f3cd2eab27dead3dcf4 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 381db4e..4a8cd2b 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -427,4 +427,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo'); 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 ('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 bf96dd4..fbca819 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7014,7 +7014,7 @@ $DBversion = "3.13.00.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 (Bug 9044: 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 a3e4aae..8277f48 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