Hi, I generally have success themeing slideshow controls with CSS. However, I recently realized there is no class to indicate state of the pause/resume control. So the attached patch adds a "paused" class when the slideshow is paused via the controls.
The purpose of this class is to enable themers to create pause/play buttons with css. See a simple example here: http://dev.oppl.org/
Forgive me if this seems like a duplicate of some other issues (e.g. http://drupal.org/node/1270172), but for me, CSS is often a simpler approach over preconfigured "skins" in the view's config. At any rate, this is my first patch and I am not really a programmer :) If there is a better way to go about this, I would value the advice.
Thanks!
Sean
| Comment | File | Size | Author |
|---|---|---|---|
| views_slideshow-paused-class.patch | 911 bytes | seanfitzpatrick |
Comments
Comment #1
knalstaaf commentedConfirming that this patch works like a charm.
Roll it out in the js-folder of the Views Slideshow module, and add the class "paused" to the pause-selector in your theme's stylesheet.
Example:
Thanks, Sean!
It's a good solution, but I think it would be easier for themers if the module would just switch the current class (I'm directing this to the maintainers now), e.g.:
The text in the controls is already switching from Pause to Resume by default currently, so couldn't it be done with the same word in the selector?
Comment #2
pomliane commentedThis patch also works with views_slideshow-6.x-3.0!
Thanks Sean!
EDIT : it seems this issue is a duplicate of #1322780: Provide CSS classes to indicate the status of the pause button
Comment #3
pomliane commentedComment #4
Anonymous (not verified) commentedThanks Sean, this did the trick.
Cheers