Bug 29845 - Styling OverDrive buttons is difficult
Summary: Styling OverDrive buttons is difficult
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-10 22:38 UTC by Lucas Gass
Modified: 2022-02-25 14:36 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Adds ID's to the action buttons on the OverDrive results page in order to make them easier to individually style.
Version(s) released in:
22.05.00


Attachments
Bug 29845: add IDs to overdrive results action buttons (3.46 KB, patch)
2022-01-10 22:52 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29845: add IDs to overdrive results action buttons (3.45 KB, patch)
2022-01-11 20:31 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29845: add IDs to overdrive results action buttons (3.52 KB, patch)
2022-01-12 11:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29845: add classes to overdrive results action buttonswq (3.00 KB, patch)
2022-02-15 18:01 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29845: add classes to overdrive results action buttons (3.00 KB, patch)
2022-02-15 18:03 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29845: add classes to overdrive results action buttons (3.05 KB, patch)
2022-02-16 12:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29845: add classes to overdrive results action buttons (3.11 KB, patch)
2022-02-18 17: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 Lucas Gass 2022-01-10 22:38:44 UTC
Some librarians would like style the buttons on the Dverdrive results page differently from one another. I realized this is somewhat difficult to do at the moment because each of those buttons are built by JavaScript and don't include a unique class name or ID. 

Those buttons are the check-in, check-out, place hold, cancel hold, and download as buttons. 

If they had an ID it would make it easy to style them.
Comment 1 Lucas Gass 2022-01-10 22:52:05 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2022-01-11 18:09:52 UTC
Using the id attribute will create situations where there are multiple identical ids on the page, which isn't allowed. Can you use a class instead?
Comment 3 Lucas Gass 2022-01-11 20:31:01 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2022-01-12 11:42:42 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2022-02-13 13:35:25 UTC
As I can't test Overdrive I am a bit hesitant to try my hands on the rebase:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 29845: add IDs to overdrive results action buttons
Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js
error: Failed to merge in the changes.
Patch failed at 0001 Bug 29845: add IDs to overdrive results action buttons
Comment 6 Lucas Gass 2022-02-15 18:01:17 UTC Comment hidden (obsolete)
Comment 7 Lucas Gass 2022-02-15 18:03:54 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2022-02-16 12:24:03 UTC
Created attachment 130662 [details] [review]
Bug 29845: add classes to overdrive results action buttons

To test:
1. You must have OverDrive credentials populated in the OverDrive
   system preferences
2. Go to the Overdrive results page and make sure you are logged in.
3. Use your browsers dev tools to look at the check-in, check-out,
   place hold, cancel hold buttons, none of them contain classes.
4. Apply patch
5. Repeat 3 again but this time they should all contain a class which
   makes them much easier to style.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 9 Nick Clemens 2022-02-18 17:00:30 UTC
Created attachment 130878 [details] [review]
Bug 29845: add classes to overdrive results action buttons

To test:
1. You must have OverDrive credentials populated in the OverDrive
   system preferences
2. Go to the Overdrive results page and make sure you are logged in.
3. Use your browsers dev tools to look at the check-in, check-out,
   place hold, cancel hold buttons, none of them contain classes.
4. Apply patch
5. Repeat 3 again but this time they should all contain a class which
   makes them much easier to style.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Fridolin Somers 2022-02-24 08:05:44 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄