Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a design that requires rounded edges on the first and last pager items.
I was a little surprised that the classes for pager items were hard-coded into the Javascript. I was even more surprised to find out that, although the classes for 'odd' and 'even' were there, the classes for 'first' and 'last' were not.
I have attached a simple patch that adds these classes.
Comment | File | Size | Author |
---|---|---|---|
#16 | 20130626143234.jpg | 190.47 KB | wangqizhong |
#10 | views_slideshow-pager_first_last-782166-10.patch | 2.25 KB | igor.ro |
#8 | views_slideshow-pager_first_last-782166-8.patch | 2.26 KB | jeffschuler |
#5 | views_slideshow-pager_first_last-782166-5.patch | 2.24 KB | jeffschuler |
#1 | views_slideshow.patch | 38.21 KB | RoloDMonkey |
Comments
Comment #1
RoloDMonkey CreditAttribution: RoloDMonkey commentedComment #2
redndahead CreditAttribution: redndahead commentedgood idea on the first and last classes. The reason they are hard coded into SingleFrame was pagers were an after thought and I was using the pager support in jQuery cycle. If you want stronger control of your pagers I would look at thumbnailhover.
Comment #3
redndahead CreditAttribution: redndahead commentedThis has been committed.
Comment #5
jeffschulerI'm not seeing 'first' and 'last' classes on pager items in 7.x-3.x. This patch adds them.
It also breaks up a couple long lines of code (into <80 char lines.)
Comment #6
robertom CreditAttribution: robertom commentedthe patch #5 works well,
but I'd prefer to insert "views-row-first" and "views-row-last" classes instead of "first" and "last"
(for odd and even is used "views-row-odd" and "views-row-even")
Comment #7
robertom CreditAttribution: robertom commentedComment #8
jeffschulerPoint taken. Looks like that's how Views usually does it anyway.
Thanks for reviewing!
Comment #9
robertom CreditAttribution: robertom commentedThanks for the new patch!
Comment #10
igor.ro CreditAttribution: igor.ro commentedNew patch for 7.x-dev version
Comment #11
wangqizhong CreditAttribution: wangqizhong commentedThanks a lot to RoloDMonkey, redndahead, jeffschuler, robertom, igor.ro and everyone else for the great work on the patches, testing, reviews and reporting.
It's more time this got committed and I went ahead and had this rolled at:
6.x-2.x: 5bf14e2.
6.x-3.x: fe544f9.
7.x-3.x: bda8444.
Marking this as fixed.
Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyne for the help and great work on this issue.
Cheers!
Comment #13
matthieu_collet CreditAttribution: matthieu_collet commentedhello
I've just installed the 7.x-3.x-dev and the problem is still there, no first and last classes
is there any patch for this version ?
thank you
Comment #14
wangqizhong CreditAttribution: wangqizhong commentedSorry, I can't reproduce this issues. Could you try to use the latest 7.x-3.x-dev and double-check the HTML class?
Comment #15
matthieu_collet CreditAttribution: matthieu_collet commentedit's the last version : 7.x-3.0+24-dev
you can see my test here :
http://www.dethier.be/en/projets/welkenraedt-funeral-centre
no first & last for the rows/slides
Comment #16
wangqizhong CreditAttribution: wangqizhong commentedYou can use Firebug or Chrome Developer Tools, it is easy to search called "views-row-first" and "views-row-last" of classes (attached).
Comment #17
matthieu_collet CreditAttribution: matthieu_collet commentedyes, it has just changed with last updates, all seems ok now
thank you