My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 300: Fix for issue 241 causes problems with similarly named galleries
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Aug 2009


 
Reported by nick.pan...@gmail.com, Aug 3, 2009
What steps will reproduce the problem?
1. Create a page which has three galleries on it, each with three items,
using rel="myGallery", rel="myGallery2" and rel="myGallery3" respectively
2. Click on an image in the first gallery


What is the expected output? What do you see instead?
The count says 1 of 9. It should say 1 of 3. You can also keep pressing
next, and it jumps you to gallery2.

This is because the selector used is:

$('[rel*="'+currentSettings.gallery+'"]'); //(line 978)

which means myGallery also matches myGallery2 and myGallery3.

A better solution would be to use a reg exp which also matches word boundaries.


What version of the product are you using? On what operating system?
1.5.1


Please provide any additional information below.


Aug 9, 2009
Project Member #1 nyro...@gmail.com
In the next release, the line 978 will read:
gallery.links = $('[rel="'+currentSettings.gallery+'"],
[rel^="'+currentSettings.gallery+' "]');

which means
every elements with the exact same rel attribute would be selected
OR
every elements with the rel attribute starting with the gallery name directly
following by a space.

With that, it should solve your problems.

Status: Accepted
Labels: Type-Defect
Aug 14, 2009
Project Member #2 nyro...@gmail.com
The version 1.5.2 just released should fix this issue.

Status: Fixed

Powered by Google Project Hosting