Bug 7719 - Change state of controls based on whether boxes are checked
Summary: Change state of controls based on whether boxes are checked
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks: 6264
  Show dependency treegraph
 
Reported: 2012-03-14 18:34 UTC by Owen Leonard
Modified: 2013-12-05 20:01 UTC (History)
3 users (show)

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


Attachments
Bug 7719 - Change state of controls based on whether boxes are checked (30.53 KB, patch)
2012-03-14 19:32 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 7719 - Change state of controls based on whether boxes are checked (30.43 KB, patch)
2012-03-14 19:58 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-03-14 18:34:13 UTC
Some interfaces in the OPAC have controls which only work if a checkbox has been checked. Examples:

- Placing a hold on multiple items in the cart window or on a list view page
- Adding tags to multiple items in the cart window or on a list view page
- Removing one or more items from the cart window
- Adding one or more items to a list from the cart window

I propose that such controls be disabled by default, and enabled only after a checkbox has been checked.
Comment 1 Owen Leonard 2012-03-14 19:32:22 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2012-03-14 19:58:58 UTC
Created attachment 8208 [details] [review]
Bug 7719 - Change state of controls based on whether boxes are checked

Some OPAC interface controls cannot function unless a checkbox is
checked. Examples:

- Placing a hold on multiple items in the cart window or on a list view page
- Adding tags to multiple items in the cart window or on a list view page
- Removing one or more items from the cart window
- Removing one or more items from a list on the list view page
- Adding one or more items to a list from the cart window

This patch moves these controls into a separate div in which links
are enabled or disabled based on whether checkboxes are checked. It
does so on two pages: The lists view page (when viewing the contents
of a list) and in the cart window.

Links which are in their disabled state should not perform any action.
After checking one or more checkboxes the links should become active
and behave normally.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Works in chrome and firefox (latest). Passes tests.
Comment 3 Jared Camins-Esakov 2012-03-14 20:25:41 UTC
I have one qualm about this- will it degrade gracefully for browsers without javascript enabled?
Comment 4 Owen Leonard 2012-03-15 13:30:47 UTC
> I have one qualm about this- will it degrade gracefully for browsers without
> javascript enabled?

Because the controls perform functions which are only available if JavaScript is enabled this patch causes no additional loss of functionality to users with JS turned off. As with current master, the controls do not appear if JS is turned off. 

I do see a problem where one of my labels still shows up with JS turned off. I'll submit a follow-up.
Comment 5 Ian Walls 2012-03-19 13:17:17 UTC
Template only change, easy to read, fails equally gracefully with JS turned off.
Marking Passed QA
Comment 6 Paul Poulain 2012-03-20 11:05:29 UTC
patch pushed, a nice enhancement that 3.6 users will also enjoy !