| author | Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com> |
| Thu, 08 Sep 2011 21:24:21 +0200 | |
| changeset 271 | 4e4e2fda4e66 |
| parent 133 | 9578d3ddce17 |
| permissions | -rwxr-xr-x |
|
133
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
1 |
/** |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
2 |
* Interface Elements for jQuery |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
3 |
* Slideshow |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
4 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
5 |
* http://interface.eyecon.ro |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
6 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
7 |
* Copyright (c) 2006 Stefan Petre |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
8 |
* Dual licensed under the MIT (MIT-LICENSE.txt) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
9 |
* and GPL (GPL-LICENSE.txt) licenses. |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
10 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
11 |
*/ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
12 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
13 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
14 |
/** |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
15 |
* Creates an image slideshow. The slideshow can autoplay slides, each image can have caption, navigation links: next, prev, each slide. A page may have more then one slideshow, eachone working independently. Each slide can be bookmarked. The source images can be defined by JavaScript in slideshow options or by HTML placing images inside container. |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
16 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
17 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
18 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
19 |
* @name Slideshow |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
20 |
* @description Creates an image slideshow. The slideshow can autoplay slides, each image can have caption, navigation links: next, prev, each slide. A page may have more then one slideshow, eachone working independently. Each slide can be bookmarked. The source images can be defined by JavaScript in slideshow options or by HTML placing images inside container. |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
21 |
* @param Hash hash A hash of parameters |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
22 |
* @option String container container ID |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
23 |
* @option String loader path to loading indicator image |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
24 |
* @option String linksPosition (optional) images links position ['top'|'bottom'|null] |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
25 |
* @option String linksClass (optional) images links cssClass |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
26 |
* @option String linksSeparator (optional) images links separator |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
27 |
* @option Integer fadeDuration fade animation duration in miliseconds |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
28 |
* @option String activeLinkClass (optional) active image link CSS class |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
29 |
* @option String nextslideClass (optional) next image CSS class |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
30 |
* @option String prevslideClass (optional) previous image CSS class |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
31 |
* @option String captionPosition (optional) image caption position ['top'|'bottom'|null] |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
32 |
* @option String captionClass (optional) image caption CSS class |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
33 |
* @option String autoplay (optional) seconds to wait untill next images is displayed. This option will make the slideshow to autoplay. |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
34 |
* @option String random (optional) if slideshow autoplayes the images can be randomized |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
35 |
* @option Array images (optional) array of hash with keys 'src' (path to image) and 'cation' (image caption) for images |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
36 |
* |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
37 |
* @type jQuery |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
38 |
* @cat Plugins/Interface |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
39 |
* @author Stefan Petre |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
40 |
*/ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
41 |
jQuery.islideshow = { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
42 |
slideshows: [], |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
43 |
gonext : function() |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
44 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
45 |
this.blur(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
46 |
slideshow = this.parentNode; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
47 |
id = jQuery.attr(slideshow, 'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
48 |
if (jQuery.islideshow.slideshows[id] != null) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
49 |
window.clearInterval(jQuery.islideshow.slideshows[id]); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
50 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
51 |
slide = slideshow.ss.currentslide + 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
52 |
if (slideshow.ss.images.length < slide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
53 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
54 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
55 |
images = jQuery('img', slideshow.ss.holder); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
56 |
slideshow.ss.currentslide = slide; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
57 |
if (images.size() > 0) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
58 |
images.fadeOut( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
59 |
slideshow.ss.fadeDuration, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
60 |
jQuery.islideshow.showImage |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
61 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
62 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
63 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
64 |
goprev : function() |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
65 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
66 |
this.blur(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
67 |
slideshow = this.parentNode; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
68 |
id = jQuery.attr(slideshow, 'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
69 |
if (jQuery.islideshow.slideshows[id] != null) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
70 |
window.clearInterval(jQuery.islideshow.slideshows[id]); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
71 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
72 |
slide = slideshow.ss.currentslide - 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
73 |
images = jQuery('img', slideshow.ss.holder); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
74 |
if (slide < 1) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
75 |
slide = slideshow.ss.images.length ; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
76 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
77 |
slideshow.ss.currentslide = slide; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
78 |
if (images.size() > 0) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
79 |
images.fadeOut( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
80 |
slideshow.ss.fadeDuration, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
81 |
jQuery.islideshow.showImage |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
82 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
83 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
84 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
85 |
timer : function (c) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
86 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
87 |
slideshow = document.getElementById(c); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
88 |
if (slideshow.ss.random) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
89 |
slide = slideshow.ss.currentslide; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
90 |
while(slide == slideshow.ss.currentslide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
91 |
slide = 1 + parseInt(Math.random() * slideshow.ss.images.length); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
92 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
93 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
94 |
slide = slideshow.ss.currentslide + 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
95 |
if (slideshow.ss.images.length < slide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
96 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
97 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
98 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
99 |
images = jQuery('img', slideshow.ss.holder); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
100 |
slideshow.ss.currentslide = slide; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
101 |
if (images.size() > 0) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
102 |
images.fadeOut( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
103 |
slideshow.ss.fadeDuration, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
104 |
jQuery.islideshow.showImage |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
105 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
106 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
107 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
108 |
go : function(o) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
109 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
110 |
var slideshow; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
111 |
if (o && o.constructor == Object) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
112 |
if (o.loader) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
113 |
slideshow = document.getElementById(o.loader.slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
114 |
url = window.location.href.split("#"); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
115 |
o.loader.onload = null; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
116 |
if (url.length == 2) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
117 |
slide = parseInt(url[1]); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
118 |
show = url[1].replace(slide,''); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
119 |
if (jQuery.attr(slideshow,'id') != show) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
120 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
121 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
122 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
123 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
124 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
125 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
126 |
if(o.link) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
127 |
o.link.blur(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
128 |
slideshow = o.link.parentNode.parentNode; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
129 |
id = jQuery.attr(slideshow, 'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
130 |
if (jQuery.islideshow.slideshows[id] != null) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
131 |
window.clearInterval(jQuery.islideshow.slideshows[id]); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
132 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
133 |
url = o.link.href.split("#"); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
134 |
slide = parseInt(url[1]); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
135 |
show = url[1].replace(slide,''); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
136 |
if (jQuery.attr(slideshow,'id') != show) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
137 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
138 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
139 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
140 |
if (slideshow.ss.images.length < slide || slide < 1) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
141 |
slide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
142 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
143 |
slideshow.ss.currentslide = slide; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
144 |
slidePos = jQuery.iUtil.getSize(slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
145 |
slidePad = jQuery.iUtil.getPadding(slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
146 |
slideBor = jQuery.iUtil.getBorder(slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
147 |
if (slideshow.ss.prevslide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
148 |
slideshow.ss.prevslide.o.css('display', 'none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
149 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
150 |
if (slideshow.ss.nextslide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
151 |
slideshow.ss.nextslide.o.css('display', 'none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
152 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
153 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
154 |
//center loader |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
155 |
if (slideshow.ss.loader) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
156 |
y = parseInt(slidePad.t) + parseInt(slideBor.t); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
157 |
if (slideshow.ss.slideslinks) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
158 |
if (slideshow.ss.slideslinks.linksPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
159 |
y += slideshow.ss.slideslinks.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
160 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
161 |
slidePos.h -= slideshow.ss.slideslinks.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
162 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
163 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
164 |
if (slideshow.ss.slideCaption) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
165 |
if (slideshow.ss.slideCaption && slideshow.ss.slideCaption.captionPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
166 |
y += slideshow.ss.slideCaption.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
167 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
168 |
slidePos.h -= slideshow.ss.slideCaption.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
169 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
170 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
171 |
if (!slideshow.ss.loaderWidth) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
172 |
slideshow.ss.loaderHeight = o.loader ? o.loader.height : (parseInt(slideshow.ss.loader.css('height'))||0); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
173 |
slideshow.ss.loaderWidth = o.loader ? o.loader.width : (parseInt(slideshow.ss.loader.css('width'))||0); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
174 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
175 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
176 |
slideshow.ss.loader.css('top', y + (slidePos.h - slideshow.ss.loaderHeight)/2 + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
177 |
slideshow.ss.loader.css('left', (slidePos.wb - slideshow.ss.loaderWidth)/2 + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
178 |
slideshow.ss.loader.css('display', 'block'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
179 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
180 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
181 |
//getimage |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
182 |
images = jQuery('img', slideshow.ss.holder); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
183 |
if (images.size() > 0) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
184 |
images.fadeOut( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
185 |
slideshow.ss.fadeDuration, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
186 |
jQuery.islideshow.showImage |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
187 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
188 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
189 |
lnk = jQuery('a', slideshow.ss.slideslinks.o).get(slide-1); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
190 |
jQuery(lnk).addClass(slideshow.ss.slideslinks.activeLinkClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
191 |
var img = new Image(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
192 |
img.slideshow = jQuery.attr(slideshow,'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
193 |
img.slide = slide-1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
194 |
img.src = slideshow.ss.images[slideshow.ss.currentslide-1].src ; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
195 |
if (img.complete) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
196 |
img.onload = null; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
197 |
jQuery.islideshow.display.apply(img); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
198 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
199 |
img.onload = jQuery.islideshow.display; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
200 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
201 |
//slideshow.ss.holder.html('<img src="' + slideshow.ss.images[slide-1].src + '" />'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
202 |
if (slideshow.ss.slideCaption) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
203 |
slideshow.ss.slideCaption.o.html(slideshow.ss.images[slide-1].caption); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
204 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
205 |
//jQuery('img', slideshow.ss.holder).bind('load',jQuery.slideshowDisplay); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
206 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
207 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
208 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
209 |
showImage : function() |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
210 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
211 |
slideshow = this.parentNode.parentNode; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
212 |
slideshow.ss.holder.css('display','none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
213 |
if (slideshow.ss.slideslinks.activeLinkClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
214 |
lnk = jQuery('a', slideshow.ss.slideslinks.o).removeClass(slideshow.ss.slideslinks.activeLinkClass).get(slideshow.ss.currentslide - 1); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
215 |
jQuery(lnk).addClass(slideshow.ss.slideslinks.activeLinkClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
216 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
217 |
//slideshow.ss.holder.html('<img src="' + slideshow.ss.images[slideshow.ss.currentslide - 1].src + '" />'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
218 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
219 |
var img = new Image(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
220 |
img.slideshow = jQuery.attr(slideshow,'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
221 |
img.slide = slideshow.ss.currentslide - 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
222 |
img.src = slideshow.ss.images[slideshow.ss.currentslide - 1].src ; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
223 |
if (img.complete) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
224 |
img.onload = null; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
225 |
jQuery.islideshow.display.apply(img); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
226 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
227 |
img.onload = jQuery.islideshow.display; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
228 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
229 |
if (slideshow.ss.slideCaption) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
230 |
slideshow.ss.slideCaption.o.html(slideshow.ss.images[slideshow.ss.currentslide-1].caption); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
231 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
232 |
//jQuery('img', slideshow.ss.holder).bind('load',jQuery.slideshowDisplay); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
233 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
234 |
display : function () |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
235 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
236 |
slideshow = document.getElementById(this.slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
237 |
if (slideshow.ss.prevslide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
238 |
slideshow.ss.prevslide.o.css('display', 'none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
239 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
240 |
if (slideshow.ss.nextslide) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
241 |
slideshow.ss.nextslide.o.css('display', 'none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
242 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
243 |
slidePos = jQuery.iUtil.getSize(slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
244 |
y = 0; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
245 |
if (slideshow.ss.slideslinks) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
246 |
if (slideshow.ss.slideslinks.linksPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
247 |
y += slideshow.ss.slideslinks.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
248 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
249 |
slidePos.h -= slideshow.ss.slideslinks.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
250 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
251 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
252 |
if (slideshow.ss.slideCaption) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
253 |
if (slideshow.ss.slideCaption && slideshow.ss.slideCaption.captionPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
254 |
y += slideshow.ss.slideCaption.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
255 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
256 |
slidePos.h -= slideshow.ss.slideCaption.dimm.hb; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
257 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
258 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
259 |
par = jQuery('.slideshowHolder', slideshow); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
260 |
y = y + (slidePos.h - this.height)/2 ; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
261 |
x = (slidePos.wb - this.width)/2; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
262 |
slideshow.ss.holder.css('top', y + 'px').css('left', x + 'px').html('<img src="' + this.src + '" />'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
263 |
slideshow.ss.holder.fadeIn(slideshow.ss.fadeDuration); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
264 |
nextslide = slideshow.ss.currentslide + 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
265 |
if (nextslide > slideshow.ss.images.length) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
266 |
nextslide = 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
267 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
268 |
prevslide = slideshow.ss.currentslide - 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
269 |
if (prevslide < 1) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
270 |
prevslide = slideshow.ss.images.length; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
271 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
272 |
slideshow.ss.nextslide.o |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
273 |
.css('display','block') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
274 |
.css('top', y + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
275 |
.css('left', x + 2 * this.width/3 + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
276 |
.css('width', this.width/3 + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
277 |
.css('height', this.height + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
278 |
.attr('title', slideshow.ss.images[nextslide-1].caption); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
279 |
slideshow.ss.nextslide.o.get(0).href = '#' + nextslide + jQuery.attr(slideshow, 'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
280 |
slideshow.ss.prevslide.o |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
281 |
.css('display','block') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
282 |
.css('top', y + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
283 |
.css('left', x + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
284 |
.css('width', this.width/3 + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
285 |
.css('height', this.height + 'px') |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
286 |
.attr('title', slideshow.ss.images[prevslide-1].caption); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
287 |
slideshow.ss.prevslide.o.get(0).href = '#' + prevslide + jQuery.attr(slideshow, 'id'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
288 |
}, |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
289 |
build : function(o) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
290 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
291 |
if (!o || !o.container || jQuery.islideshow.slideshows[o.container]) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
292 |
return; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
293 |
var container = jQuery('#' + o.container); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
294 |
var el = container.get(0); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
295 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
296 |
if (el.style.position != 'absolute' && el.style.position != 'relative') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
297 |
el.style.position = 'relative'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
298 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
299 |
el.style.overflow = 'hidden'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
300 |
if (container.size() == 0) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
301 |
return; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
302 |
el.ss = {}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
303 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
304 |
el.ss.images = o.images ? o.images : []; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
305 |
el.ss.random = o.random && o.random == true || false; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
306 |
imgs = el.getElementsByTagName('IMG'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
307 |
for(i = 0; i< imgs.length; i++) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
308 |
indic = el.ss.images.length; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
309 |
el.ss.images[indic] = {src:imgs[i].src, caption:imgs[i].title||imgs[i].alt||''}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
310 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
311 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
312 |
if (el.ss.images.length == 0) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
313 |
return; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
314 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
315 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
316 |
el.ss.oP = jQuery.extend( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
317 |
jQuery.iUtil.getPosition(el), |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
318 |
jQuery.iUtil.getSize(el) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
319 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
320 |
el.ss.oPad = jQuery.iUtil.getPadding(el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
321 |
el.ss.oBor = jQuery.iUtil.getBorder(el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
322 |
t = parseInt(el.ss.oPad.t) + parseInt(el.ss.oBor.t); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
323 |
b = parseInt(el.ss.oPad.b) + parseInt(el.ss.oBor.b); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
324 |
jQuery('img', el).remove(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
325 |
el.ss.fadeDuration = o.fadeDuration ? o.fadeDuration : 500; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
326 |
if (o.linksPosition || o.linksClass || o.activeLinkClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
327 |
el.ss.slideslinks = {}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
328 |
container.append('<div class="slideshowLinks"></div>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
329 |
el.ss.slideslinks.o = jQuery('.slideshowLinks', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
330 |
if (o.linksClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
331 |
el.ss.slideslinks.linksClass = o.linksClass; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
332 |
el.ss.slideslinks.o.addClass(o.linksClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
333 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
334 |
if (o.activeLinkClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
335 |
el.ss.slideslinks.activeLinkClass = o.activeLinkClass; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
336 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
337 |
el.ss.slideslinks.o.css('position','absolute').css('width', el.ss.oP.w + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
338 |
if (o.linksPosition && o.linksPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
339 |
el.ss.slideslinks.linksPosition = 'top'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
340 |
el.ss.slideslinks.o.css('top',t + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
341 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
342 |
el.ss.slideslinks.linksPosition = 'bottom'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
343 |
el.ss.slideslinks.o.css('bottom',b + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
344 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
345 |
el.ss.slideslinks.linksSeparator = o.linksSeparator ? o.linksSeparator : ' '; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
346 |
for (var i=0; i<el.ss.images.length; i++) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
347 |
indic = parseInt(i) + 1; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
348 |
el.ss.slideslinks.o.append('<a href="#' + indic + o.container + '" class="slideshowLink" title="' + el.ss.images[i].caption + '">' + indic + '</a>' + (indic != el.ss.images.length ? el.ss.slideslinks.linksSeparator : '')); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
349 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
350 |
jQuery('a', el.ss.slideslinks.o).bind( |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
351 |
'click', |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
352 |
function() |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
353 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
354 |
jQuery.islideshow.go({link:this}) |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
355 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
356 |
); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
357 |
el.ss.slideslinks.dimm = jQuery.iUtil.getSize(el.ss.slideslinks.o.get(0)); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
358 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
359 |
if (o.captionPosition || o.captionClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
360 |
el.ss.slideCaption = {}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
361 |
container.append('<div class="slideshowCaption"> </div>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
362 |
el.ss.slideCaption.o = jQuery('.slideshowCaption', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
363 |
if (o.captionClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
364 |
el.ss.slideCaption.captionClass = o.captionClass; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
365 |
el.ss.slideCaption.o.addClass(o.captionClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
366 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
367 |
el.ss.slideCaption.o.css('position','absolute').css('width', el.ss.oP.w + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
368 |
if (o.captionPosition&& o.captionPosition == 'top') { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
369 |
el.ss.slideCaption.captionPosition = 'top'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
370 |
el.ss.slideCaption.o.css('top', (el.ss.slideslinks && el.ss.slideslinks.linksPosition == 'top' ? el.ss.slideslinks.dimm.hb + t : t) + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
371 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
372 |
el.ss.slideCaption.captionPosition = 'bottom'; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
373 |
el.ss.slideCaption.o.css('bottom', (el.ss.slideslinks && el.ss.slideslinks.linksPosition == 'bottom' ? el.ss.slideslinks.dimm.hb + b : b) + 'px'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
374 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
375 |
el.ss.slideCaption.dimm = jQuery.iUtil.getSize(el.ss.slideCaption.o.get(0)); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
376 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
377 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
378 |
if (o.nextslideClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
379 |
el.ss.nextslide = {nextslideClass:o.nextslideClass}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
380 |
container.append('<a href="#2' + o.container + '" class="slideshowNextSlide"> </a>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
381 |
el.ss.nextslide.o = jQuery('.slideshowNextSlide', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
382 |
el.ss.nextslide.o.css('position', 'absolute').css('display', 'none').css('overflow','hidden').css('fontSize', '30px').addClass(el.ss.nextslide.nextslideClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
383 |
el.ss.nextslide.o.bind('click', jQuery.islideshow.gonext); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
384 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
385 |
if (o.prevslideClass) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
386 |
el.ss.prevslide= {prevslideClass:o.prevslideClass}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
387 |
container.append('<a href="#0' + o.container + '" class="slideshowPrevslide"> </a>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
388 |
el.ss.prevslide.o = jQuery('.slideshowPrevslide', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
389 |
el.ss.prevslide.o.css('position', 'absolute').css('display', 'none').css('overflow','hidden').css('fontSize', '30px').addClass(el.ss.prevslide.prevslideClass); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
390 |
el.ss.prevslide.o.bind('click', jQuery.islideshow.goprev); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
391 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
392 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
393 |
container.prepend('<div class="slideshowHolder"></div>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
394 |
el.ss.holder = jQuery('.slideshowHolder', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
395 |
el.ss.holder.css('position','absolute').css('top','0px').css('left','0px').css('display', 'none'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
396 |
if (o.loader) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
397 |
container.prepend('<div class="slideshowLoader" style="display: none;"><img src="' + o.loader + '" /></div>'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
398 |
el.ss.loader = jQuery('.slideshowLoader', el); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
399 |
el.ss.loader.css('position', 'absolute'); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
400 |
var img = new Image(); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
401 |
img.slideshow = o.container; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
402 |
img.src = o.loader; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
403 |
if (img.complete) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
404 |
img.onload = null; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
405 |
jQuery.islideshow.go({loader:img}); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
406 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
407 |
img.onload = function() |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
408 |
{ |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
409 |
jQuery.islideshow.go({loader:this}); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
410 |
}; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
411 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
412 |
} else { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
413 |
jQuery.islideshow.go({container:el}); |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
414 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
415 |
|
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
416 |
if(o.autoplay) { |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
417 |
time = parseInt(o.autoplay) * 1000; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
418 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
419 |
jQuery.islideshow.slideshows[o.container] = o.autoplay ? window.setInterval('jQuery.islideshow.timer(\'' + o.container + '\')', time) : null; |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
420 |
} |
|
9578d3ddce17
correct line endings + other small errors
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
99
diff
changeset
|
421 |
}; |
|
99
6cb4d10f0b8b
NEW WEBSITE WITH : HOME / ABOUT / CLIENT.PHP
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
diff
changeset
|
422 |
jQuery.slideshow = jQuery.islideshow.build; |