Bugzilla – Attachment 178314 Details for
Bug 35604
ILL - Allow for automatic backend selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35604: (QA follow-up): Cosmetic improvements
Bug-35604-QA-follow-up-Cosmetic-improvements.patch (text/plain), 6.51 KB, created by
Pedro Amorim
on 2025-02-19 09:25:54 UTC
(
hide
)
Description:
Bug 35604: (QA follow-up): Cosmetic improvements
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-02-19 09:25:54 UTC
Size:
6.51 KB
patch
obsolete
>From bbe0e9d9c61fc3a69755d7e76111abbd991ca936 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 31 Dec 2024 15:27:18 +0000 >Subject: [PATCH] Bug 35604: (QA follow-up): Cosmetic improvements > >These are improvements to the confirm auto backend stage screen on the Staff UI. >Result of a chat with Tomas about this development. > >Sponsored-by: NHS England >Sponsored-by: PTFS Europe Ltd >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/ill/ill-requests.tt | 3 +- > .../intranet-tmpl/prog/js/ill-autobackend.js | 80 +++++++++++++------ > 2 files changed, 56 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index c5aef808296..5205d2fe775 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -855,8 +855,7 @@ > <div id="results" class="page-section"> > <form method="post" id="confirmautoill-form"> > <fieldset class="rows"> >- <h3>Confirm backend:</h3> >- <p id="autoillbackends"></p> >+ <ul class="list-group" id="autoillbackends"> </ul> > <p id="autoillbackend-message" class="text-info"></p> > </fieldset> > <fieldset class="action"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >index cfbfa1762a2..04461b15806 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >@@ -86,23 +86,29 @@ $(document).ready(function () { > > function _addSuccessMessage(auto_backend_name, data) { > _removeVerifyingMessage(auto_backend_name); >- $(auto_ill_el + " > #backend-" + auto_backend_name).append( >- '<span class="text-success"><i class="fa-solid fa-check"></i> ' + >- __("Available.").format(auto_backend_name) + >- " " + >+ $( >+ auto_ill_el + " > #backend-" + auto_backend_name + " #backendcol" >+ ).append( >+ '<div class="text-success mb-2"><i class="fa-solid fa-check"></i> ' + >+ "<strong>" + >+ __("Available.") + >+ "</strong><br>" + > data.success + >- "</span>" >+ "</div>" > ); > } > > function _addErrorMessage(auto_backend_name, message) { > _removeVerifyingMessage(auto_backend_name); >- $(auto_ill_el + " > #backend-" + auto_backend_name).append( >- '<span class="text-danger"> <i class="fa-solid fa-xmark"></i> ' + >- __("Not readily available:").format(auto_backend_name) + >- " " + >+ $( >+ auto_ill_el + " > #backend-" + auto_backend_name + " #backendcol" >+ ).append( >+ '<div class="text-danger mb-2"> <i class="fa-solid fa-xmark"></i> ' + >+ "<strong>" + >+ __("Not readily available:") + >+ "</strong><br>" + > message + >- "</span>" >+ "</div>" > ); > $( > auto_ill_el + >@@ -114,24 +120,28 @@ $(document).ready(function () { > > function _addBackendOption(auto_backend_name) { > $(auto_ill_el + " > #backend-" + auto_backend_name).append( >- ' <input type="radio" id="' + >- auto_backend_name + >- '" name="backend" value="' + >- auto_backend_name + >- '">' + >- ' <label for="' + >- auto_backend_name + >- '" class="radio">' + >- auto_backend_name + >- "</label> " >+ `<label style="text-align:left; width:100%;font-weight:normal;" for="${auto_backend_name}"> >+ <li class="list-group-item"> >+ <div class="row"> >+ <div class="col-sm-auto"> >+ <input id="${auto_backend_name}" type="radio" name="backend" value="${auto_backend_name}" aria-label="${auto_backend_name}"> >+ </div> >+ <div id="backendcol" class="col"> >+ <div class="mb-2 fs-3"><strong>${auto_backend_name}</strong></div> >+ </div> >+ </div> >+ </li> >+ </label>` > ); > } > > function _addVerifyingMessage(auto_backend_name) { >- $(auto_ill_el + " > #backend-" + auto_backend_name).append( >- '<span id="verifying-availabilty" class="text-info"><i id="issues-table-load-delay-spinner" class="fa fa-spinner fa-pulse fa-fw"></i> ' + >- __("Verifying availability...").format(auto_backend_name) + >- "</span>" >+ $( >+ auto_ill_el + " > #backend-" + auto_backend_name + " #backendcol" >+ ).append( >+ '<div id="verifying-availabilty" class="text-info mb-2"><i id="issues-table-load-delay-spinner" class="fa fa-spinner fa-pulse fa-fw"></i> ' + >+ __("Verifying availability...") + >+ "</div>" > ); > } > function _removeVerifyingMessage(auto_backend_name) { >@@ -148,7 +158,9 @@ $(document).ready(function () { > '#confirmautoill-form #autoillbackends input[id="' + > auto_backend_name + > '"]' >- ).prop("checked", true); >+ ) >+ .prop("checked", true) >+ .trigger("change"); > $(auto_ill_message_el).html( > __( > "The recommended backend for your request is <strong>%s</strong>." >@@ -168,4 +180,22 @@ $(document).ready(function () { > ); > $(auto_ill_message_el).html(__("Fetching backends availability...")); > } >+ >+ $("#confirmautoill-form").on( >+ "change", >+ 'input[name="backend"]', >+ function () { >+ $('input[name="backend"]') >+ .closest(".list-group-item") >+ .removeClass("bg-success") >+ .css({ >+ "background-color": "", >+ border: "", >+ }); >+ $(this).closest(".list-group-item").css({ >+ "background-color": "rgba(0, 128, 0, 0.1)", >+ border: "1px solid rgba(0, 128, 0, 0.7)", >+ }); >+ } >+ ); > }); >-- >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 35604
:
160035
|
164883
|
164884
|
164885
|
164886
|
164887
|
164888
|
165135
|
165164
|
165165
|
165294
|
165295
|
165296
|
165297
|
165298
|
165299
|
165300
|
166897
|
166898
|
166899
|
166900
|
166901
|
166902
|
166903
|
166995
|
166996
|
166997
|
166998
|
166999
|
167000
|
167001
|
171326
|
171327
|
171328
|
171329
|
171330
|
171331
|
171332
|
174515
|
174516
|
174517
|
174518
|
174519
|
174520
|
174521
|
174522
|
174524
|
174792
|
175828
|
175829
|
175830
|
175831
|
175832
|
175833
|
175834
|
175835
|
175836
|
176036
|
176261
|
176262
|
176263
|
176264
|
176265
|
176266
|
176267
|
176268
|
176269
|
176270
|
176572
|
176662
|
176681
|
176682
|
176683
|
176684
|
176685
|
176686
|
176687
|
176688
|
176689
|
176690
|
176691
|
176692
|
178305
|
178306
|
178307
|
178308
|
178309
|
178310
|
178311
|
178312
|
178313
|
178314
|
178315
|
178316
|
178707
|
178708
|
178709
|
178710
|
178711
|
178712
|
178713
|
178714
|
178715
|
178716
|
178717
|
178718
|
179698
|
179699
|
179720
|
179721
|
180335
|
180451
|
180452
|
180453
|
180454
|
180455
|
180456
|
180457
|
180458
|
180459
|
180460
|
180461
|
180462
|
180463
|
180464
|
180465
|
180956