Bugzilla – Attachment 186166 Details for
Bug 40757
Highlight circulation rules on click
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40757: Highlight circulation rules on click
Bug-40757-Highlight-circulation-rules-on-click.patch (text/plain), 3.76 KB, created by
Nick Clemens (kidclamp)
on 2025-09-04 15:41:02 UTC
(
hide
)
Description:
Bug 40757: Highlight circulation rules on click
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-09-04 15:41:02 UTC
Size:
3.76 KB
patch
obsolete
>From 9aff5c62bd9ff0c7693f2e082016b01baf282dee Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 4 Sep 2025 15:39:06 +0000 >Subject: [PATCH] Bug 40757: Highlight circulation rules on click > >To test: >1 - Apply patch, yarn build, restart all >2 - Browse to Admin->Circulation rules >3 - Click on some rows >4 - They highlight! >5 - Click to edit a row, highlight removed >6 - Cancel editing, editing color is removed >7 - Sign off! >--- > .../intranet-tmpl/prog/css/src/_tables.scss | 7 ++++++- > .../prog/en/modules/admin/smart-rules.tt | 17 ++++++++++++++--- > 2 files changed, 20 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss >index b190dc2a315..60cedf8e83c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss >@@ -398,6 +398,11 @@ caption { > background-color: #FFD000; > } > >+.selected-row, >+.selected-row td { >+ background-color: #D0FF00; >+} >+ > .warned-row, > .warned-row td { > background-color: #FF9000; >@@ -410,7 +415,7 @@ caption { > > tbody { > tr { >- &:nth-child( odd ):not( .dtrg-group, .active, .ok, .highlighted-row ) { >+ &:nth-child( odd ):not( .dtrg-group, .active, .ok, .highlighted-row, .selected-row ) { > td { > &:not( .bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary, .highlighted-row ) { > background-color: $table-odd-row; >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 49301081770..a1b9d79a41e 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 >@@ -1462,7 +1462,7 @@ > function clear_edit() { > var cancel = confirm(_("Are you sure you want to cancel your changes?")); > if (!cancel) return; >- $("#default-circulation-rules td").removeClass("highlighted-row"); >+ $("#default-circulation-rules tr").removeClass("highlighted-row"); > var edit_row = $("#edit_row"); > $(edit_row) > .find("input") >@@ -1506,6 +1506,17 @@ > $("#branch").change(function () { > $("#selectlibrary").submit(); > }); >+ $("#default-circulation-rules tbody tr") >+ .not("#edit_row") >+ .click(function () { >+ if ($(this).hasClass("highlighted-row")) { >+ return; >+ } else if ($(this).hasClass("selected-row")) { >+ $(this).removeClass("selected-row"); >+ } else { >+ $(this).addClass("selected-row"); >+ } >+ }); > $(".editrule").click(function () { > if ( > $("#edit_row") >@@ -1517,13 +1528,13 @@ > var edit = confirm(_("Are you sure you want to edit another rule?")); > if (!edit) return false; > } >- $("#default-circulation-rules td").removeClass("highlighted-row"); >+ $("#default-circulation-rules tr").removeClass("highlighted-row"); >+ $(this).closest("tr").addClass("highlighted-row").removeClass("selected-row"); > $(this) > .parent() > .parent() > .find("td") > .each(function (i) { >- $(this).addClass("highlighted-row"); > itm_code = $(this).data("code"); > itm_text = $(this).text(); > itm_text = itm_text.replace(/^\s*|\s*$/g, ""); >-- >2.39.5
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 40757
:
186166
|
186172
|
186173
|
187189
|
187190