[Bug 10541] New: Enable cross-browser AJAX in additem.js
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Bug ID: 10541 Summary: Enable cross-browser AJAX in additem.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au Currently, the additem.js is using "indexOf" to search for a value in an array. While this works in Chrome, Firefox, and IE > 9, it fails miserably in IE 8 and 7 (which don't have the indexOf method). This means that users aren't able to add items using the acquisitions module! Instead of using "indexOf", we should be using the jQuery function $.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even our oldest supported release can use this method). It's perfectly cross-browser compatible...works in Chrome, Firefox, and every version of IE that I've tried (i.e. 7, 8, 9). Patch and test plan to follow... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |dcook@prosentient.com.au Assignee|oleonard@myacpl.org |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 19399 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19399&action=edit Bug 10541 - Enable cross-browser AJAX in additem.js Test Plan: Before applying patch: 0) Switch to Internet Explorer 7, or 8, or 9. If you're using IE 9, you'll need to change the Document Mode to IE7 standards or IE8 standards. You can do this by opening Internet Explorer 9, pressing F12 (or clicking on the gear in the top right corner and choosing F12 Developer Tools), and then clicking on "Document Mode" on the top toolbar. There, you can change to IE7 or IE8 standards. N.B. This is not always a perfect emulation in every case, but this time it does show you the bug. 1) Set the system preference AcqCreateItem to "receiving an order" 2) Go to Acquisitions 3) Either: a) Receive a shipment for a basket with items b) Create a new basket, create an order, close the basket, and then do 3a) 4) In the "Item" fieldset, fill out some fields such as barcode, Date acquiried, Public note, etc. 5) Click "Add" at the bottom of the fieldset 6) Note that while the item may have been added, the "Item" fieldset is not being shown again. You may also notice a Javascript error appearing in a pop-up window or you might see a yellow warning flag on the bottom status bar. APPLY THE PATCH 7) Do a full refresh of the page (hold down shift and press the refresh button on the browser next to the address bar), and try adding items again. 8) Note that you receive no warnings and that items are added correctly as they would be in Firefox or Chrome. OPTIONALLY 9) To be sure that I haven't broken anything, go through the same steps in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be working. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19399|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 19593 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19593&action=edit [SIGNED-OFF] Bug 10541 - Enable cross-browser AJAX in additem.js Currently, the additem.js is using "indexOf" to search for a value in an array. While this works in Chrome, Firefox, and IE > 9, it fails miserably in IE 8 and 7 (which don't have the indexOf method). This means that users aren't able to add items using the acquisitions module! Instead of using "indexOf", we should be using the jQuery function $.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even our oldest supported release can use this method). It's perfectly cross-browser compatible...works in Chrome, Firefox, and every version of IE that I've tried (i.e. 7, 8, 9). Test Plan: Before applying patch: 0) Switch to Internet Explorer 7, or 8, or 9. If you're using IE 9, you'll need to change the Document Mode to IE7 standards or IE8 standards. You can do this by opening Internet Explorer 9, pressing F12 (or clicking on the gear in the top right corner and choosing F12 Developer Tools), and then clicking on "Document Mode" on the top toolbar. There, you can change to IE7 or IE8 standards. N.B. This is not always a perfect emulation in every case, but this time it does show you the bug. 1) Set the system preference AcqCreateItem to "receiving an order" 2) Go to Acquisitions 3) Either: a) Receive a shipment for a basket with items b) Create a new basket, create an order, close the basket, and then do 3a) 4) In the "Item" fieldset, fill out some fields such as barcode, Date acquiried, Public note, etc. 5) Click "Add" at the bottom of the fieldset 6) Note that while the item may have been added, the "Item" fieldset is not being shown again. You may also notice a Javascript error appearing in a pop-up window or you might see a yellow warning flag on the bottom status bar. APPLY THE PATCH 7) Do a full refresh of the page (hold down shift and press the refresh button on the browser next to the address bar), and try adding items again. 8) Note that you receive no warnings and that items are added correctly as they would be in Firefox or Chrome. OPTIONALLY 9) To be sure that I haven't broken anything, go through the same steps in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be working. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested in IE10 in IE7 mode and IE9 mode. Also tested in Firefox. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19593|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19594 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19594&action=edit Bug 10541 - Enable cross-browser AJAX in additem.js Currently, the additem.js is using "indexOf" to search for a value in an array. While this works in Chrome, Firefox, and IE > 9, it fails miserably in IE 8 and 7 (which don't have the indexOf method). This means that users aren't able to add items using the acquisitions module! Instead of using "indexOf", we should be using the jQuery function $.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even our oldest supported release can use this method). It's perfectly cross-browser compatible...works in Chrome, Firefox, and every version of IE that I've tried (i.e. 7, 8, 9). Test Plan: Before applying patch: 0) Switch to Internet Explorer 7, or 8, or 9. If you're using IE 9, you'll need to change the Document Mode to IE7 standards or IE8 standards. You can do this by opening Internet Explorer 9, pressing F12 (or clicking on the gear in the top right corner and choosing F12 Developer Tools), and then clicking on "Document Mode" on the top toolbar. There, you can change to IE7 or IE8 standards. N.B. This is not always a perfect emulation in every case, but this time it does show you the bug. 1) Set the system preference AcqCreateItem to "receiving an order" 2) Go to Acquisitions 3) Either: a) Receive a shipment for a basket with items b) Create a new basket, create an order, close the basket, and then do 3a) 4) In the "Item" fieldset, fill out some fields such as barcode, Date acquiried, Public note, etc. 5) Click "Add" at the bottom of the fieldset 6) Note that while the item may have been added, the "Item" fieldset is not being shown again. You may also notice a Javascript error appearing in a pop-up window or you might see a yellow warning flag on the bottom status bar. APPLY THE PATCH 7) Do a full refresh of the page (hold down shift and press the refresh button on the browser next to the address bar), and try adding items again. 8) Note that you receive no warnings and that items are added correctly as they would be in Firefox or Chrome. OPTIONALLY 9) To be sure that I haven't broken anything, go through the same steps in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be working. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested in IE10 in IE7 mode and IE9 mode. Also tested in Firefox. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Passes koha-qa.pl, works as advertised. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have run into this in training as well and glad to see a patch for it as this has been quite a blocker bug for the library. There are also IE problems in serials and other modules - maybe we shold fix all IndexOf appearances? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10607 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Katrin Fischer from comment #4)
I have run into this in training as well and glad to see a patch for it as this has been quite a blocker bug for the library. There are also IE problems in serials and other modules - maybe we shold fix all IndexOf appearances?
Indeed. I have opened bug 10607 for tracking this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.11 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10541 Chris Hall <chrish@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chrish@catalyst.net.nz --- Comment #9 from Chris Hall <chrish@catalyst.net.nz> --- Pushed to 3.8.x, will be in 3.8.18 Awesome commit message :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org