Bugzilla – Attachment 112220 Details for
Bug 26782
Circulation conditions: first 2 columns show as sortable, but cannot be sorted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26782: Add new class for indicating default sort without sortability
Bug-26782-Add-new-class-for-indicating-default-sor.patch (text/plain), 4.26 KB, created by
Owen Leonard
on 2020-10-22 18:24:02 UTC
(
hide
)
Description:
Bug 26782: Add new class for indicating default sort without sortability
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-10-22 18:24:02 UTC
Size:
4.26 KB
patch
obsolete
>From 78f4b35e890aac8621b6352f291825d226b39e72 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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. >--- > 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 @@ > <thead> > <tr> > <th> </th> >- <th>Patron category</th> >+ <th class="fixed_sort">Patron category</th> > <th> </th> >- <th>Item type</th> >+ <th class="fixed_sort">Item type</th> > <th>Actions</th> > <th>Note</th> > <th>Current checkouts allowed</th> >@@ -969,7 +969,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] > <script> >- $(document).ready(function() { >+ $(document).ready(function() { > $("#default-circulation-rules").dataTable($.extend(true,{},dataTablesDefaults, { > "aoColumnDefs": [ > { "bVisible": false, "aTargets": [ 0,2 ] }, >-- >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 26782
:
112220
|
112466
|
112476