jsymonkj / pwi

Automatically exported from code.google.com/p/pwi
0 stars 0 forks source link

multiple colobox albums displayed all in once #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Nice job folks with this plugin but I have a small problem to include in
blogger. I have tried fancybox, but slideshow does not work and stop working 
after one image :-(, so I have tried colorbox and I have another problem

What steps will reproduce the problem?
You can try to access my web site http://test-pwicolorbox.blogspot.fr/ 
Note number of photos in first post (44) click the image and look at
bottom the number of photos in colobax layer, it is not 44 because second album 
and third one are added...
I think the problem is because each album have the same class for each photos 
(pwi_album_description or pwi_photo) and when colorbox is started all images in 
the same page, what ever is the album are grabbed and included in slideshow.

The logic I have used in my blog, if just to declare the div in post with 
specific data to the album
<div class=mypwi_photo id=ALBUM_NAME authkey=MY_KEY username=MY_USER_NAME />

and when document is ready (from template) 
for each mypwi_photo extract album data and apply pwi

What is the expected output? What do you see instead?
Since album declaration are different, only photos from one album should be 
displayed and not other ones from other post.

What version of the product are you using? On what browser and version and
operating system?
pwi latest and can be reproduced on any browser

Link to site showing the described behaviour:
http://test-pwicolorbox.blogspot.fr/ 

Please provide any additional information below.
Let me know if you need more input to understand the problem or what to
do to fix this problem

Thanks

Original issue reported on code.google.com by lescheminsdeleau on 6 May 2013 at 7:14

GoogleCodeExporter commented 9 years ago
I have been able to reproduce the problem, using a modified version of Demo 4. 
I have attached this to the issue. This is a very small demo, but it reproduces 
the problem exactly.
I will have to look into this problem further before I can say what the 
solution would be.

Original comment by borkh...@gmail.com on 6 May 2013 at 9:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for taking care.
I have looked at the generated html, and if all pictures are grabbed and put in 
the same slideshow, it is because plugin is expected to find a unique album per 
page. All images are certainly found by a global selector. Something like 
$(".pwi_photo") but in the code each album have a unique container id. ie in my 
example 
<div id="pwi_1367911453950" class="pwi_container">
<div class="pwi_photo" style="cursor: pointer; margin: 5px; height: 
536px;">...</div>
<div class="pwi_photo" style="display: none; margin: 5px; height: 
536px;">...</div>
<div class="pwi_photo" style="display: none; margin: 5px; height: 536px;">
...
<div id="pwi_1367911453957" class="pwi_container">
<div class="pwi_photo" style="cursor: pointer; margin: 5px; height: 
536px;">...</div>
<div class="pwi_photo" style="display: none; margin: 5px; height: 
536px;">...</div>
...

So may be we should use a different selector such as 
$("#PWI_CONTAINER_ID").children(".pwi_photo")

Regards

Original comment by lescheminsdeleau on 7 May 2013 at 7:44

GoogleCodeExporter commented 9 years ago
Issue is fixed in SVN version 323. Pleas add the following to your settings 
when using this version:

ownRelTag: $(this).attr("id")

This makes sure that the rel-tags used by the viewer are unique between 
instances.

Original comment by borkh...@gmail.com on 7 May 2013 at 6:50

GoogleCodeExporter commented 9 years ago
This fix is working like a charm. Thanks for the quick resolution
Norbert

Original comment by lescheminsdeleau on 8 May 2013 at 8:13