Bugzilla – Attachment 75864 Details for
Bug 20468
Multiselect on staff article requests form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20468: (follow-up) Cancel multiple items for same reason
Bug-20468-follow-up-Cancel-multiple-items-for-same.patch (text/plain), 2.58 KB, created by
Marcel de Rooy
on 2018-06-07 06:49:25 UTC
(
hide
)
Description:
Bug 20468: (follow-up) Cancel multiple items for same reason
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-06-07 06:49:25 UTC
Size:
2.58 KB
patch
obsolete
>From 9fe73271e73530447ff07108c75b342d038259e1 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 6 Jun 2018 13:38:36 +0200 >Subject: [PATCH] Bug 20468: (follow-up) Cancel multiple items for same reason >Content-Type: text/plain; charset=utf-8 > >The repeated prompts for cancelling multiple selected items are >confusing. >The wording is slightly adjusted. The reason is asked only once per >group of selected items. > >Test plan: >Create three requests. >Select two requests and cancel (from top menu) for reason A. >Cancel third request (from item menu) for reason B. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../intranet-tmpl/prog/en/modules/circ/article-requests.tt | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >index fddd9fe..c43cc75 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >@@ -317,6 +317,7 @@ > [% MACRO jsinclude BLOCK %] > <script> > var active_table = "#article-requests-pending"; >+ var last_cancel_reason; > $(document).ready(function() { > $('#article-request-tabs').tabs({ > activate: function( activate_event, activate_ui ) { >@@ -376,6 +377,7 @@ > } > > function HandleMulti( fnHandler, id, a ) { >+ last_cancel_reason = undefined; > if( id !== 0 ) { fnHandler( id, a ); return; } > $( active_table + " input[type='checkbox']:checked").each(function() { > fnHandler( $(this).attr('reqid'), $(this).closest('tr').find('td.ar-actions div a') ); >@@ -388,8 +390,10 @@ > } > > function Cancel( id, a ) { >- notes = prompt(_("Reason for cancellation:")); >- if ( notes == null ) { >+ // last_cancel_reason: undefined means 'prompt for new reason' >+ // a null value indicates that prompt was cancelled >+ if( last_cancel_reason === undefined ) last_cancel_reason = prompt(_("Please specify the reason for cancelling selected item(s):")); >+ if ( last_cancel_reason === null ) { > return; > } > >@@ -400,7 +404,7 @@ > data: { > action: 'cancel', > id: id, >- notes: notes >+ notes: last_cancel_reason > }, > success: function( data ) { > a.closest('tr').remove(); >-- >2.1.4
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 20468
:
73280
|
74711
|
75720
|
75741
|
75749
|
75846
|
75864
|
76626
|
77168
|
77169
|
77170
|
77171