Bugzilla – Attachment 52083 Details for
Bug 14752
Add multiple copies to a basket at once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead
Bug-14752---QA-followup-Remove-annoying-modal-use-.patch (text/plain), 6.90 KB, created by
Nick Clemens (kidclamp)
on 2016-06-06 14:15:49 UTC
(
hide
)
Description:
Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-06-06 14:15:49 UTC
Size:
6.90 KB
patch
obsolete
>From 7a0ea17d61b2dad968ac1a2aa9dc1a46ae2b472e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 6 Jun 2016 10:11:36 -0400 >Subject: [PATCH] Bug 14752 - (QA followup) Remove annoying modal, use dialog > box instead > >- Uses a dialog box to warn of unique fields not copying, dialog was in >place for barcode generation so removed the extar modal completey >- Fixes a problem when barcode was undefined and autobarcode on >- deleted an extra space in Barcodes/hbymmincr.pm >--- > C4/Barcodes/hbyymmincr.pm | 2 +- > acqui/addorder.pl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc | 1 + > .../intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 16 ---------------- > koha-tmpl/intranet-tmpl/prog/js/additem.js | 8 ++++++-- > 5 files changed, 9 insertions(+), 20 deletions(-) > >diff --git a/C4/Barcodes/hbyymmincr.pm b/C4/Barcodes/hbyymmincr.pm >index f963e9a..5fba859 100644 >--- a/C4/Barcodes/hbyymmincr.pm >+++ b/C4/Barcodes/hbyymmincr.pm >@@ -44,7 +44,7 @@ INIT { > > sub db_max { > my $self = shift; >- my $query = "SELECT SUBSTRING(barcode,-$width) AS chunk, barcode FROM items WHERE barcode REGEXP ? ORDER BY chunk DESC LIMIT 1"; >+ my $query = "SELECT SUBSTRING(barcode,-$width) AS chunk, barcode FROM items WHERE barcode REGEXP ? ORDER BY chunk DESC LIMIT 1"; > $debug and print STDERR "(hbyymmincr) db_max query: $query\n"; > my $sth = C4::Context->dbh->prepare($query); > my ($iso); >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 80f01c6..5223b7f 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -316,7 +316,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > 'ITEM'); > my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); > my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode'); >- my $barcode = $record->subfield($barcodefield,$barcodesubfield); >+ my $barcode = $record->subfield($barcodefield,$barcodesubfield) || ''; > my $aBpref = C4::Context->preference('autoBarcode'); > if( $barcode eq '' && $aBpref ne 'OFF'){ > my $barcodeobj; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >index 1ecee30..d7cd4d7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc >@@ -3,6 +3,7 @@ > var MSG_ADDITEM_JS_ADDITEM = _("Add item"); > var MSG_ADDITEM_JS_ADDMULTI = _("Add multiple items"); > var MSG_ADDITEM_JS_MULTIVAL = _("Number of items to add"); >+var MSG_ADDITEM_JS_MULTI_UNIQUE_NOTE = _("NOTE: Fields listed in the \'UniqueItemsFields\' system preference will not be copied"); > var MSG_ADDITEM_JS_SUBMITMULTI = _("Add"); > var MSG_ADDITEM_JS_UPDATEITEM = _("Update item"); > var MSG_ADDITEM_JS_EDIT = _("Edit"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index fe659a6..6497721 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -658,22 +658,6 @@ $(document).ready(function() > </div> > </div> > >-[% IF UniqueItemFields %] >-<div id="uniqueFieldsModal" class="modal hide fade" aria-labelledby="uniqueFieldsModal" aria-hidden="true"> >- <div class="modal-body"> >- <h3>The following fields are listed in the UniqueItemFields system preference and will not be copied</h3> >- <ul id="uniqueItemFields"> >- [% FOREACH uniqueField IN UniqueItemFields.split(" ") %] >- <li>[% uniqueField %]</li> >- [% END %] >- </ul> >- [% UNLESS Koha.Preference('autoBarcode') == 'OFF' %] >- <h3>If barcode is blank and/or listed in UniqueItemFields barcodes will be generate using the autoBarcode preference setting ([% Koha.Preference('autoBarcode') %]) when saved</h3> >- [% END %] >- </div> >-</div> >-[% END %] >- > <div id="multiCountModal" class="modal hide fade" aria-labelledby="multiCountModal" aria-hidden="true"> > <h3>Invalid number of copies</h3> > <p>Please enter a <b>number</b>, greater than or equal to 1</p> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/additem.js b/koha-tmpl/intranet-tmpl/prog/js/additem.js >index 3cbd66d..0f93310 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/additem.js >@@ -180,8 +180,12 @@ function cloneItemBlock(index, unique_item_fields, callback) { > var buttonPlus = "<fieldset class=\"action\">"; > buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_ADDITEM || 'Add item')+ '" />'; > buttonPlus += '<input type="button" class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)" value="' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear')+ '" />'; >- buttonPlus += '<input type="button" class="addItemControl" name="buttonPlusMulti" data-toggle="modal" data-target="#uniqueFieldsModal" onclick="javascript:this.nextSibling.style.visibility=\'visible\'; return false;" style="cursor:pointer; margin:0 1em;" value="' + (window.MSG_ADDITEM_JS_ADDMULTI || 'Add multiple items')+ '" />'; >- buttonPlus +='<span id="add_multiple_copies" style="visibility:hidden"><input type="number" class="addItemControl" id="multiValue" name="multiValue" placeholder="'+window.MSG_ADDITEM_JS_MULTIVAL+'" /><input type="button" class="addItemControl" name=buttonAddMulti" style="cursor:pointer; margin:0 1em;" onclick="checkCount( this ,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_SUBMITMULTI || 'Add') + '" /></span>'; >+ buttonPlus += '<input type="button" class="addItemControl" name="buttonPlusMulti" onclick="javascript:this.nextSibling.style.display=\'inline\'; return false;" style="cursor:pointer; margin:0 1em;" value="' + (window.MSG_ADDITEM_JS_ADDMULTI || 'Add multiple items')+ '" />'; >+ buttonPlus += '<span id="add_multiple_copies" style="display:none">' >+ + '<input type="number" class="addItemControl" id="multiValue" name="multiValue" placeholder="'+window.MSG_ADDITEM_JS_MULTIVAL+'" />' >+ + '<input type="button" class="addItemControl" name=buttonAddMulti" style="cursor:pointer; margin:0 1em;" onclick="checkCount( this ,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_SUBMITMULTI || 'Add') + '" />' >+ + '<div class="dialog message">' + window.MSG_ADDITEM_JS_MULTI_UNIQUE_NOTE + '</div>' >+ + '</span>'; > buttonPlus += "</fieldset>"; > $(clone).append(buttonPlus); > /* Copy values from the original block (input) */ >-- >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 14752
:
46093
|
46439
|
46832
|
46833
|
47223
|
47252
|
47477
|
48254
|
51481
|
52083
|
52587
|
52588
|
52605
|
52606
|
55527
|
55528
|
56649
|
56684