Bugzilla – Attachment 115426 Details for
Bug 22773
Bulk close invoices and filter invoice view (open/closed)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22773: (follow-up) Ensure buttons only affect their related table
Bug-22773-follow-up-Ensure-buttons-only-affect-the.patch (text/plain), 6.32 KB, created by
Nick Clemens (kidclamp)
on 2021-01-20 12:18:44 UTC
(
hide
)
Description:
Bug 22773: (follow-up) Ensure buttons only affect their related table
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-01-20 12:18:44 UTC
Size:
6.32 KB
patch
obsolete
>From 7ca669e56c3704a2489d6f73d0d83c39a6da90b2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 20 Jan 2021 12:15:49 +0000 >Subject: [PATCH] Bug 22773: (follow-up) Ensure buttons only affect their > related table > >Also cleans up a few rebase issues >--- > .../intranet-tmpl/prog/en/modules/acqui/invoices.tt | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 16fbab2db8..ba7ea1b125 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -114,14 +114,15 @@ > </tbody> > </table> > [% IF CAN_user_acquisition_merge_invoices %] >- <a class="btn btn-default submit merge" id="merge" href="#merge_invoices"><i class="fa fa-compress"></i> Merge selected invoices</a> > [% IF tab == 'closed' %] >- <a class="btn btn-default" id="open_sel" href="#reopen_selected" data-op="reopen" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-refresh"></i> Reopen selected invoices</a> >+ <a class="btn btn-default merge" id="merge" href="#merge_invoices" data-table="closedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a> >+ <a class="btn btn-default" id="open_sel" href="#reopen_selected" data-table="closedresultst" data-op="reopen" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-refresh"></i> Reopen selected invoices</a> > [% ELSE %] >- <a class="btn btn-default" id="close_sel" href="#close_selected" data-op="close" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-times-circle"></i> Close selected invoices</a> >+ <a class="btn btn-default merge" id="merge" href="#merge_invoices" data-status="openedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a> >+ <a class="btn btn-default" id="close_sel" href="#close_selected" data-table="openedresultst" data-op="close" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-times-circle"></i> Close selected invoices</a> > [% END %] >- > [% END %] <!-- invoices_table --> >+ [% END %] > <div id="invoicestabs" class="toptabs" style="clear:both;"> > <ul class="ui-tabs-nav"> > <li><a href="#opened">Open invoices ([% openedinvoices.size || 0 | html %])</a></li> >@@ -187,7 +188,6 @@ > </fieldset> > </form> > </div> >- [% END %] > [% ELSE %] > <p>Sorry, but there are no results for your search.</p> > <p>Search was: >@@ -384,9 +384,10 @@ > $('#open_sel,#close_sel').click(function () { > var referer = $(this).attr("data-referer"); > var op = $(this).attr("data-op"); >+ var table = $(this).data('table'); > var invoice_link = "invoice.pl?op="+op; >- if ($('.select-invoice:checked').length) { >- $('.select-invoice:checked').each(function () { >+ if ($('#' + table + ' .select-invoice:checked').length) { >+ $('#' + table + ' .select-invoice:checked').each(function () { > var row = $(this).parents('tr'); > invoice_link = invoice_link + "&invoiceid="+$(row).attr('data-invoiceid'); > }); >@@ -400,11 +401,12 @@ > var booksellerid; > var mismatch; > var invoices = [ ]; >- if ($('.select-invoice:checked').size() < 2) { >+ var table = $(this).data('table'); >+ if ($('#' + table + ' .select-invoice:checked').size() < 2) { > alert(_("You must select at least two invoices to merge.")); > return false; > } >- $('.select-invoice:checked').each(function () { >+ $('#' + table + ' .select-invoice:checked').each(function () { > var row = $(this).parents('tr'); > booksellerid = booksellerid || $(row).attr('data-booksellerid'); > if (booksellerid !== $(row).attr('data-booksellerid')) { >-- >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 22773
:
93357
|
93375
|
93448
|
93660
|
94411
|
95290
|
96906
|
96907
|
96908
|
96909
|
96910
|
98729
|
98730
|
98731
|
98732
|
98733
|
106538
|
106539
|
106540
|
106541
|
106542
|
106543
|
106544
|
115420
|
115421
|
115422
|
115423
|
115424
|
115425
|
115426
|
116010
|
119282
|
119283
|
119284
|
119285
|
119286
|
119287
|
119288
|
119289
|
119290