[Bug 29397] New: Add a select2 wrapper for the API
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Bug ID: 29397 Summary: Add a select2 wrapper for the API Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It should handle the 'data' and 'processResults' data transformations, and allow being passed a function for converting the result data into something suitable for using on each use case. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29355 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127265&action=edit Bug 29397: Add .kohaSelect select2 wrapper function This patch adds a kohaSelect wrapper function to simplify paging/infinite scrolling with select2 using the Koha RESTful api's. Invoke select2 select boxes as you normally would from JS, but instead of calling .select2(config) use .kohaSelect(config). If an 'ajax' property is defined in your config object, we wrap the transport such that responses include a pagination key as expected by select2. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29408 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29404 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29404 [Bug 29404] Add infinite scrolling to pickup location dropdowns -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29404 |29407 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29404 [Bug 29404] Add infinite scrolling to pickup location dropdowns https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29407 [Bug 29407] Make the pickup locations dropdown JS reusable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127265|0 |1 is obsolete| | --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127279&action=edit Bug 29397: Add .kohaSelect select2 wrapper function This patch adds a kohaSelect wrapper function to simplify paging/infinite scrolling with select2 using the Koha RESTful api's. Invoke select2 select boxes as you normally would from JS, but instead of calling .select2(config) use .kohaSelect(config). If an 'ajax' property is defined in your config object, we wrap the transport such that responses include a pagination key as expected by select2. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127280&action=edit Bug 29397: Add function documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127281&action=edit Bug 29397: Use kohaSelect for pickup locations This patch makes the pickup location dropdowns that rely on Select2 and the API use the new wrapper. The original transport function is removed as it is now embedded in the wrapper. To test: 1. Follow bug 29404 test plan => SUCCESS: All works 2. Apply this patches 3. Repeat 1 => SUCCESS: All works! 4. sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the documentation follow-up Tomas :).. nice to see the pickup_locations code show this in use too :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127279|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127320 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127320&action=edit Bug 29397: Add .kohaSelect select2 wrapper function This patch adds a kohaSelect wrapper function to simplify paging/infinite scrolling with select2 using the Koha RESTful api's. Invoke select2 select boxes as you normally would from JS, but instead of calling .select2(config) use .kohaSelect(config). If an 'ajax' property is defined in your config object, we wrap the transport such that responses include a pagination key as expected by select2. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127280|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127321&action=edit Bug 29397: Add function documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127281|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127322 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127322&action=edit Bug 29397: Use kohaSelect for pickup locations This patch makes the pickup location dropdowns that rely on Select2 and the API use the new wrapper. The original transport function is removed as it is now embedded in the wrapper. To test: 1. Follow bug 29404 test plan => SUCCESS: All works 2. Apply this patches 3. Repeat 1 => SUCCESS: All works! 4. sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tested and signed off on the follow-up :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 [Bug 29002] Add ability to book items ahead of time -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Bug 29397 depends on bug 29407, which changed state. Bug 29407 Summary: Make the pickup locations dropdown JS reusable https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29407 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127320|0 |1 is obsolete| | Attachment #127321|0 |1 is obsolete| | Attachment #127322|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 129117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129117&action=edit Bug 29397: Add .kohaSelect select2 wrapper function This patch adds a kohaSelect wrapper function to simplify paging/infinite scrolling with select2 using the Koha RESTful api's. Invoke select2 select boxes as you normally would from JS, but instead of calling .select2(config) use .kohaSelect(config). If an 'ajax' property is defined in your config object, we wrap the transport such that responses include a pagination key as expected by select2. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- There were two follow-up patches that are missing here! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- ooh, yeah.. where did those go :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127321|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127322|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I've un-obsoleted the two patches.. did you test these too Kyle.. looks like a simple git-bz mishap to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #14)
I've un-obsoleted the two patches.. did you test these too Kyle.. looks like a simple git-bz mishap to me.
I believe you are correct sir! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127321|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127322|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130221&action=edit Bug 29397: Add function documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130222&action=edit Bug 29397: Use kohaSelect for pickup locations This patch makes the pickup location dropdowns that rely on Select2 and the API use the new wrapper. The original transport function is removed as it is now embedded in the wrapper. To test: 1. Follow bug 29404 test plan => SUCCESS: All works 2. Apply this patches 3. Repeat 1 => SUCCESS: All works! 4. sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |ASSIGNED Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Passed QA --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Back to the RM queue. Fridolin: the last two patches are missing in master. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Passed QA |Pushed to master --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #18)
Back to the RM queue.
Fridolin: the last two patches are missing in master. Thanks!
Done -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29397 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org