From 36e212ff1a0ced97cc08237ec4c5678b6ea8d41a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 22 Oct 2020 18:08:08 +0000 Subject: [PATCH] Bug 26782: Add new class for indicating default sort without sortability This patch adds to the globally-included CSS a class which can be added to tables when they are configured using DataTables options that set a default sort but don't allow the user to reorder columns. The new class shows a grey rather than blue sorting indicator and sets the cursort to the default pointer rather than the link "hand." To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). Go to Administration -> Circulation and fine rules In the table of circulation rules, confirm that the first two columns, "Patron category" and "Item type" have a grey sorting icon in the header cell indicating ascencing sort. Hovering the cursor over these cells should show a default arrow cursor rather than the link cursor. Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss | 10 ++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss index 83fcd10401..d0fd65f481 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -71,11 +71,21 @@ table { .sorting_asc { background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L2c+PC9zdmc+") no-repeat scroll right center $table-header-background; padding-right: 19px; + + &.fixed_sort { + background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L3N2Zz4=") no-repeat scroll right center $table-header-background; + cursor: default; + } } .sorting_desc { background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvZz48L3N2Zz4=") no-repeat scroll right center $table-header-background; padding-right: 19px; + + &.fixed_sort { + background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iOS4wMSIgdmlld0JveD0iMCAwIDYgMi4zODQiPjxwYXRoIGZpbGw9IiM5NDk0OTQiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvc3ZnPg==") no-repeat scroll right center $table-header-background; + cursor: default; + } } .sorting { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index b34d02e2fa..3d97fbf23b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -91,9 +91,9 @@   - Patron category + Patron category   - Item type + Item type Actions Note Current checkouts allowed @@ -969,7 +969,7 @@ [% INCLUDE 'datatables.inc' %] [% INCLUDE 'calendar.inc' %]