[Bug 9130] New: Remove old javascript from Parcel
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Bug ID: 9130 Summary: Remove old javascript from Parcel Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au When receiving orders, the old javascript would show the following above the tables for pending orders and received orders: "Only the first 5 items are displayed. Click here to show all 'X' items." With the implementation of the Jquery Datatables plugin, this text and the 4 JS functions associated with it are now pointless (since users should be using the datatable toolbar) and problematic. The problem is that the Jquery toolbar says "Showing 1 to 10 of X", while in fact it is actually only showing 5 items, because that other JS takes place after the Jquery. While not a crippling bug, it's certainly irritating and misleading. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 13617 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13617&action=edit Bug 9130 - Remove old javascript from Parcel To test: 1) Go to Acquisitions 2) Find a vendor with more than 5 pending orders (or create enough new orders to put you over 5) 3) Click "Receive shipment" next to the name of that vendor 4) Type in an invoice number and go to the next page 5) Under "Pending Orders", you'll see a toolbar saying "Showing 1 to X of X". Beneath this toolbar, there will also be a line of text saying "Only the first 5 items are displayed. Click here to show all 'X' items." 6) Note that only 5 items are displayed in the table (as the text says) even though the toolbar says 1 to 10 of 11 or 1 to 6 of 6 or some such. 7) Apply the patch 8) Refresh your page 9) The line of text will be gone, and now the items displayed in the table will match the number mentioned in the toolbar. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13617|0 |1 is obsolete| | --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 13640 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13640&action=edit [SIGNED-OFF] Bug 9130 - Remove old javascript from Parcel When receiving orders, the old javascript would show the following above the tables for pending orders and received orders: "Only the first 5 items are displayed. Click here to show all 'X' items." With the implementation of the Jquery Datatables plugin, this text and the 4 JS functions associated with it are now pointless (since users should be using the datatable toolbar) and problematic. The problem is that the Jquery toolbar says "Showing 1 to 10 of X", while in fact it is actually only showing 5 items, because that other JS takes place after the Jquery. While not a crippling bug, it's certainly irritating and misleading. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |julian.maurice@biblibre.com --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to comment #2)
While not a crippling bug, it's certainly irritating and misleading.
Yes it is! Thank you for the patch ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m, kyle.m.hall@gmail.com See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8028 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- I add Kyle to the CC list of this bug. Do you agree with the current behaviour ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Patch complexity|--- |Small patch --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to comment #4)
I add Kyle to the CC list of this bug.
Do you agree with the current behaviour ?
I would tend to agree with you here. I do have one question. Does the table have a pulldown to choose the number of results displayed? If so, can we make that 'sticky' via a cookie instead. That way, the functionality isn't totally lost. I don't have a Koha installation set up for me to look at right now, or I could probably answer the question myself. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Created attachment 13866 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13866&action=edit Bug 9130 follow up: add statesave cookie and "all" option for parcel drop-down menu This patch sets the bStateSave parameter for the "Pending orders" and "Already received" Datatables in Acquisitions, which uses a cookie to save the "pagination information, display length, filtering and sorting". It also sets the iCookieDuration parameter to 1000 days (the default value is 2 hours otherwise). It also adds an "all" option to the dro-down menu using the aLengthMenu parameter. -- Kyle, this should preserve that "sticky" functionality of which you spoke :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Fantastic! Good work! Kyle (In reply to comment #6)
Created attachment 13866 [details] Bug 9130 follow up: add statesave cookie and "all" option for parcel drop-down menu
This patch sets the bStateSave parameter for the "Pending orders" and "Already received" Datatables in Acquisitions, which uses a cookie to save the "pagination information, display length, filtering and sorting".
It also sets the iCookieDuration parameter to 1000 days (the default value is 2 hours otherwise).
It also adds an "all" option to the dro-down menu using the aLengthMenu parameter.
--
Kyle, this should preserve that "sticky" functionality of which you spoke :)
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13866|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13870 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13870&action=edit [SIGNED-OFF] Bug 9130 follow up: add statesave cookie and "all" option for parcel drop-down menu This patch sets the bStateSave parameter for the "Pending orders" and "Already received" Datatables in Acquisitions, which uses a cookie to save the "pagination information, display length, filtering and sorting". It also sets the iCookieDuration parameter to 1000 days (the default value is 2 hours otherwise). It also adds an "all" option to the dro-down menu using the aLengthMenu parameter. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13640|0 |1 is obsolete| | Attachment #13870|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13873 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13873&action=edit Bug 9130 - Remove old javascript from Parcel When receiving orders, the old javascript would show the following above the tables for pending orders and received orders: "Only the first 5 items are displayed. Click here to show all 'X' items." With the implementation of the Jquery Datatables plugin, this text and the 4 JS functions associated with it are now pointless (since users should be using the datatable toolbar) and problematic. The problem is that the Jquery toolbar says "Showing 1 to 10 of X", while in fact it is actually only showing 5 items, because that other JS takes place after the Jquery. While not a crippling bug, it's certainly irritating and misleading. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13874 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13874&action=edit Bug 9130 follow up: add statesave cookie and "all" option for parcel drop-down menu This patch sets the bStateSave parameter for the "Pending orders" and "Already received" Datatables in Acquisitions, which uses a cookie to save the "pagination information, display length, filtering and sorting". It also sets the iCookieDuration parameter to 1000 days (the default value is 2 hours otherwise). It also adds an "all" option to the dro-down menu using the aLengthMenu parameter. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Thanks David for your followup. 1 little remark: when you add a value (60*60*24*1000), could you add directly the result (86400000)? Because like this the calculation is not performed each time. It is JS code so it is not crucial and not blocker. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13873|0 |1 is obsolete| | Attachment #13874|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13875 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13875&action=edit Bug 9130 - Remove old javascript from Parcel When receiving orders, the old javascript would show the following above the tables for pending orders and received orders: "Only the first 5 items are displayed. Click here to show all 'X' items." With the implementation of the Jquery Datatables plugin, this text and the 4 JS functions associated with it are now pointless (since users should be using the datatable toolbar) and problematic. The problem is that the Jquery toolbar says "Showing 1 to 10 of X", while in fact it is actually only showing 5 items, because that other JS takes place after the Jquery. While not a crippling bug, it's certainly irritating and misleading. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13876 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13876&action=edit Bug 9130 follow up: add statesave cookie and "all" option for parcel drop-down menu This patch sets the bStateSave parameter for the "Pending orders" and "Already received" Datatables in Acquisitions, which uses a cookie to save the "pagination information, display length, filtering and sorting". It also sets the iCookieDuration parameter to 1000 days (the default value is 2 hours otherwise). It also adds an "all" option to the dro-down menu using the aLengthMenu parameter. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #14 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9130 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- (In reply to comment #11)
Thanks David for your followup.
1 little remark: when you add a value (60*60*24*1000), could you add directly the result (86400000)? Because like this the calculation is not performed each time. It is JS code so it is not crucial and not blocker.
Marked as Passed QA.
Good point, Jonathan. In retrospect, I could've just added the result. When looking through other examples (like in jquery.cookie.min.js), I noticed them writing out the whole calculation, so I just copied that at the time. I don't know if it's worth a follow-up, but certainly something to keep in mind for future Datatable mods. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org