Bug 16477 - Improve staff client cart JavaScript and template
Summary: Improve staff client cart JavaScript and template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-09 15:55 UTC by Owen Leonard
Modified: 2017-12-07 22:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16477 - Improve staff client cart JavaScript and template (17.57 KB, patch)
2016-05-09 18:56 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16477 - Improve staff client cart JavaScript and template (17.70 KB, patch)
2016-05-10 09:13 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16477 - Improve staff client cart JavaScript and template (17.80 KB, patch)
2016-06-23 22:00 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-05-09 15:55:33 UTC
I'm working on a patch which will make several updates to the staff client cart template and JavaScript, including removal of "onclick," moving JS out of the template, and other template improvements.
Comment 1 Owen Leonard 2016-05-09 18:56:36 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-05-10 09:13:53 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2016-06-23 22:00:12 UTC
Created attachment 52772 [details] [review]
Bug 16477 - Improve staff client cart JavaScript and template

This patch makes several changes to the cart JavaScript and template. In
the template:

- Remove "onclick" attributes in favor of defining events in the
  JavaScript.
- Add a [% BLOCK %] section for some repeated markup.
- Add some Font Awesome icons (I didn't add icons to all controls
  because I thought it looked cluttered).
- Move the batch modification control out of the toolbar and into the
  group of controls which affects selected records. I think this is a
  logical grouping, and makes more sense than having a drop-down menu in
  the toolbar with a single menu item.

JavaScript:

- Created separate "cart.js" file so that JS could be moved out of the
  template without loading up basket.js with event functions which are
  not needed on every page in the staff client.
- Fix JSHint errors.

To test, apply the patch and clear your browser cache if necessary.

- Add multiple items to the cart in the staff client and open the cart.
- Confirm correct functionality of these toolbar buttons:
  - "More details" (and the corresponding "Show less")
  - "Send"
  - "Print"
  - "Empty and close"
- Confirm the correct functionality of all the selection controls:
  Select all, clear all, Remove, Add to a list, Place hold, Batch
  modify, and Batch delete.
- Confirm that clicking any title in the cart opens the correct detail
  page in the parent window.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=1647
Comment 4 Kyle M Hall 2016-06-24 13:42:29 UTC
Pushed to master for 16.11, thanks Owen!
Comment 5 Frédéric Demians 2016-08-01 13:16:47 UTC
Pushed in 16.05. Will be in 16.05.02.