I am using Bottom Widget Text Controls. I am trying to replace the text with my own custom images using CSS.
Inside views-slideshow-controls-text-next.tpl.php I adjust it so it reads:
![]()
Then through css I set a background image for the next button. It works!
Problem is with the PAUSE button. When it is clicked there is javascript replacement code inside views_slideshow.js to replace the contents of the hyper-link with the text 'RESUME'. If clicked again, there is JS code to replace the text with 'PAUSE'.
// Theme the resume control.
Drupal.theme.prototype.viewsSlideshowControlsPause = function () {
return Drupal.t('Resume');
};
// Theme the pause control.
Drupal.theme.prototype.viewsSlideshowControlsPlay = function () {
return Drupal.t('Pause');
};
This obviously breaks my image replacement method because the spacer image gets replaced by the above text.
Obviously I can adjust the above to just return; to have no text replacement but how can this be adjusted so that instead of replacing the text inside the hyperlink when PAUSE is clicked - it adds a new class to the hyper link?
E.g when clicked .... becomes ... ?
This would allow me to throw an overlay image background when the pause is active? Any suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | add_css_classes-1280596-5.patch | 1007 bytes | jenlampton |
Comments
Comment #1
redndahead commentedUse a background image and set your css for the controls to text-indent: -9999px;
Comment #3
jenlamptonThe classes on slideshow controls do not change when the links are clicked. It's easy to replace the text with a background image when the link says "Pause" but there's no way to replace the "resume" text with a different background image, since there are no identifiers that differ.
Comment #4
jenlamptonOn closer examination, it looks like this has been fixed in the dev version. Changing version number, and marking as fixed.
For those of you who would like access to the css classes from the the dev version of the module, here's what I changed in js/views_slideshow.js:
Comment #5
jenlamptonor, a patch.
Comment #5.0
jenlamptonSlight adjustment to explanation