[SPIP] +spip v3.0.17
[lhc/web/clavette_www.git] / www / plugins-dist / mediabox / javascript / README
1 DEMONSTRATION AND INSTRUCTIONS/API:
2 ----------------------------------------------------------------------------------------------------------
3 http://colorpowered.com/colorbox/
4
5
6 HELP:
7 ----------------------------------------------------------------------------------------------------------
8 Visit the ColorBox mailing list if you have any questions or problems.
9 http://groups.google.com/group/colorbox/topics
10
11
12 RELEASE NOTES:
13 ----------------------------------------------------------------------------------------------------------
14 Version 1.3.6 - Jan 13 2010
15 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
16 * Small change to make Colorbox compatible with jQuery 1.4
17
18
19 Version 1.3.5 - December 15 2009
20 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
21 * Fixed a bug introduced in 1.3.4 with IE7's display of example 2 and example 3, and auto-width in Opera.
22 * Fixed a bug introduced in 1.3.4 where colorbox could not be launched by triggering an element's click
23 event through JavaScript.
24 * Minor refinements.
25
26
27 Version 1.3.4 - December 5 2009
28 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
29 * Event delegation is now used for elements that ColorBox is assigned to, rather than individual click events.
30 * Additional callbacks have been added to represent other stages of ColorBox's lifecycle.
31 Available callbacks, in order of their execution: onOpen, onLoad, onComplete, onCleanup, onClosed
32 These take place at the same time as the event hooks, but will be better suited than the hooks for
33 targeting specific instances of ColorBox.
34 * Ajax content is now immediately added to the DOM to be more compatible if that content contains script tags.
35 * Focus is now returned to the calling element on closing.
36 * Fixed a bug where maxHeight and maxWidth did not work for non-photo content.
37 * Direct calls no longer need 'open:true', it is assumed. Example: $.fn.colorbox({html:"<p>Hi</p>"});
38
39
40 Version 1.3.3 - November 7 2009
41 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
42 * Changed $.fn.colorbox.element() to return a jQuery object rather the DOM element.
43 * jQuery.colorbox-min.js is compressed with Google's Closure Compiler rather than YUI Compressor.
44
45
46 Version 1.3.2 - October 27 2009
47 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
48 * Added 'innerWidth' and 'innerHeight' options to allow people to easily set the size dimensions for
49 ColorBox, without having to anticipate the size of the borders and buttons.
50 * Renamed 'scrollbars' option to 'scrolling' to be in keeping with the existing HTML attribute. The option
51 now also applies to iframes.
52 * Bug fix: In Safari, positioning occassionally incorrect when using '100%' dimensions.
53 * Bug fix: In IE6, the background overlay is briefly not full size when first viewing.
54 * Bug fix: In Firefox, opening ColorBox causes a split second shift with a small minority of webpage layouts.
55 * Simplified code in a few areas.
56
57
58 Version 1.3.1 - September 16 2009
59 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css/colorbox-ie.css(removed)
60 * Removed the IE-only stylesheets and conditional comments for example styles 1 & 4. All CSS is handled by
61 a single CSS file for all examples.
62 * Removed user-agent sniffing from the js and replaced it with feature detection. This will allow correct
63 rendering for visitors masking their agent type.
64
65
66 Version 1.3.0 - September 15 2009
67 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css
68 * Added $.fn.colorbox.resize() method to allow ColorBox to resize it's height if it's contents change.
69 * Added 'scrollbars' option to allow users to turn off scrollbars when using the resize() method.
70 * Renamed the 'resize' option to be less ambiguous. It's now 'scalePhotos'.
71 * Renamed the 'cbox_close' event to be less ambiguous. It's now 'cbox_cleanup'. It is the first thing to
72 happen in the close method while the 'cbox_closed' event is the last to happen.
73 * Fixed a bug with the slideshow mouseover graphics that appeared after ColorBox is opened a 2nd time.
74 * Fixed a bug where ClearType may not work in IE6&7 if using the fade transition.
75 * Minor code optimizations to increase compression.
76
77
78 Version 1.2.9 - August 7 2009
79 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
80 * Minor change to enable use with $.getScript();
81 * Minor change to the timing of the 'cbox_load' event so that it is more useful.
82 * Added a direct link to a YouTube video to the examples.
83
84
85 Version 1.2.8 - August 5 2009
86 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
87 * Fixed a bug with the overlay in IE6
88 * Fixed a bug where left & right keypress events might be prematurely unbound.
89
90
91 Version 1.2.7 - July 31 2009
92 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js, example stylesheets and background images
93 (core styles have not changed and the updates will not affect existing user themes / old example themes)
94 * Code cleanup and reduction, better organization and documentation in the full source.
95 * Added ability to use functions in place of static values for ColorBox's options (thanks Ken!).
96 * Added an option for straight HTML. Example: $.fn.colorbox({html:'<p>Howdy</p>', open:true})
97 * Added an event for the beginning of the closing process. This is in addition to the event that already
98 existed for when ColorBox had completely closed. 'cbox_close' and 'cbox_closed' respectively.
99 * Fixed a minor bug in IE6 that would cause a brief content shift in the parent document when opening ColorBox.
100 * Fixed a minor bug in IE6 that would reveal select elements that had a hidden visibility after closing ColorBox.
101 * The 'esc' key is unbound now when ColorBox is not open, to avoid any potential conflicts.
102 * Used background sprites for examples 1 & 4. Put IE-only (non-sprite) background images in a separate folder.
103 * Example themes 1, 3, & 4 received slight visual tweaks.
104 * Optimized pngs for smaller file size.
105 * Added slices, grid, and correct sizing to the Adobe Illustrator file, all theme files are now export ready!
106
107
108 Version 1.2.6 - July 15 2009
109 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
110 * Fixed a bug with fixed width/height images in Opera 9.64.
111 * Fixed a bug with trying to set a value for rel during a direct call to ColorBox.
112 Example: $.fn.colorbox({rel:'foo', open:true});
113 * Changed how href/rel/title settings are determined to avoid users having to manually update ColorBox
114 settings if they use JavaScript to update any of those attributes, after ColorBox has been defined.
115 * Fixed a FF3 bug where the back button was disabled after closing an iframe.
116
117
118 Version 1.2.5 - June 23 2009
119 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
120 * Changed the point at which iframe srcs are set (to eliminate the need to refresh the iframe once it has
121 been added to the DOM).
122 * Removed unnecessary return values for a very slight code reduction.
123
124
125 Version 1.2.4 - June 9 2009
126 Files Changed: jquery.colorbox.js, jquery.colorbox-min.js
127 * Fixed an issue where ColorBox may not close completely if it is closed during a transition animation.
128 * Minor code reduction.
129
130
131 Version 1.2.3 - June 4 2009
132 * Fixed a png transparency stacking issue in IE.
133 * More accurate Ajax auto-sizing if the user was depending on the #cboxLoadedContent ID for CSS styling.
134 * Added a public function for returning the current html element that ColorBox is associated with.
135 Example use: var that = $.fn.colorbox.element();
136 * Added bicubic scaling for resized images in the original IE7.
137 * Removed the IE6 stylesheet and png files from Example 3. It now uses the same png file for the controls
138 that the rest of the browsers use (an alpha transparency PNG8). This example now only has 2 graphics
139 files and 1 stylesheet.
140
141
142 Version 1.2.2 - May 28 2009
143 * Fixed an issue with the 'resize' option.
144
145
146 Version 1.2.1 - May 28 2009
147 * Note: If you are upgrading, update your jquery.colorbox.js and colorbox.css files.
148 * Added photo resizing.
149 * Added a maximum width and maximum height. Example: {height:800, maxHeight:'100%'}, would allow the box
150 to be a maximum potential height of 800px, instead of a fixed height of 800px. With maxHeight of 100%
151 the height of ColorBox cannot exceed the height of the browser window.
152 * Added 'rel' setting to add the ability to set an alternative rel for any ColorBox call. This allows the
153 user to group any combination of elements together for a gallery, or to override an existing rel.
154 attribute so those element are not grouped together, without having to alter their rel in the HTML.
155 * Added a 'photo' setting to force ColorBox to display a link as a photo. Use this when automatic photo detection
156 fails (such as using a url like 'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1')
157 * Removed the need to ever create disposable elements to call colorbox on. ColorBox can now be called
158 directly, without being associated with any existing element, by using the following format:
159 $.fn.colorbox({open:true, href:'yourLink.xxx'});
160 * ColorBox settings are now persistent and unique for each element. This allows for extremely flexible
161 options for individual elements. You could use this to create a gallery in which each page in the gallery
162 has different settings. One could be a photo with a fade transition, next could be an inline element
163 with an elastic transition with a set width and height, etc.
164 * For user callbacks, 'this' now refers to the element colorbox was opened from.
165 * Fixed a minor grouping issue with IE6, when transition type is set to 'none'.
166 * Added an Adobe Illustrator file that contains the borders and buttons used in the various examples.
167
168
169 Version 1.2 - May 13 2009
170 * Note: If you are upgrading from a previous version of ColorBox, see the UPGRADE file.
171
172 * Added a slideshow feature.
173 * Added re-positioning on browser resize. If the browser is resized, ColorBox will recenter itself onscreen.
174 * Added hooks for key events: cbox_open, cbox_load, cbox_complete, cbox_closed.
175 Example of using the hooks to build a primitive sideshow:
176 $().bind('cbox_complete', function(){
177 setTimeout($.fn.colorbox.next, 1500);
178 });
179 * Fixed an IE transparency-stacking problem, where transparent PNGs would show through to the background
180 overlay.
181 * Fixed an IE iframe issue where the ifame might shift up and to the left under certain circumstances.
182 * Fixed an IE6 bug where the loading overlay was not at full height.
183 * Removed the delay in switching between same-sized gallery content when using transitions.
184 * Changed how iframes are loaded to make it more compatible with iframed pages that use DOM dependent
185 JavaScript.
186 * Changed how the JS is structured to be better organized and increase compression. Increased documentation.
187 * Changed CSS :hover states to a .hover class. This sidesteps a minor IE8 bug with css hover states and
188 allows easier access to hover state user styles from the JavaScript.
189 * Changed: elements added to the DOM have new ID's. The naming is more consistent and less likely to cause
190 conflicts with existing website stylesheets. All stylesheets have been updated.
191 * Changed the behavior for prev/next links so that ColorBox does not get hung up on broken links. A visitor
192 can now skip through broken or long-loading links by clicking prev/next buttons.
193 * Changed the naming of variables in the parameter map to be more concise and intuitive.
194 * Removed colorbox.css. Combined the colorbox.css styles with jquery.colorbox.js:
195 the css file was not large enough to warrant being a separate file.
196
197
198 Version 1.1.6 - April 28 2009
199 * Prevented the default action of the next & previous anchors and the left and right keys for gallery mode.
200 * Fixed a bug where the title element was being added back to the DOM when closing ColorBox while using
201 inline content.
202 * Fixed a bug where IE7 would crash for example 2.
203 * Smaller filesize: removed a small amount of unused code and rewrote the HTML injection with less syntax.
204 * Added a public method for closing ColorBox: $.fn.colorbox.close(). This will allow iframe users to
205 add an event to close ColorBox without having to create an additional function.
206
207
208 Version 1.1.5 - April 11 2009
209 * Fixed minor issues with exiting ColorBox.
210
211
212 Version 1.1.4 - April 08 2009
213 * Fixed a bug in the fade transition where ColorBox not close completely if instructed to close during the
214 fade-in portion of the transition.
215
216
217 Version 1.1.3 - April 06 2009
218 * Fixed an IE6&7 issue with using ColorBox to display animated GIFs.
219
220
221 Version 1.1.2 - April 05 2009
222 * Added ability to change content when ColorBox is already open.
223 * Added vertical photo centering now works for all browsers (this feature previously excluded IE6&7).
224 * Added namespacing to the esc-key keydown event for people who want to disable it: "keydown.colorClose"
225 * Added 'title' setting to add the ability to set an alternative title for any ColorBox call.
226 * Fixed rollover navigation issue with IE8. (Added JS-based rollover state due to a browser-bug.)
227 * Fixed an overflow issue for when the fixed width/height is smaller than the size of a photo.
228 * Fixed a bug in the fade transition where the border would still come up if ColorBox was
229 closed mid-transition.
230 * Switch from JSMin to Yui Compressor for minification. Minified code now under 7KB.
231
232
233 Version 1.1.1 - March 31 2009
234 * More robust image detection regex. Now detects image file types with url fragments and/or query strings.
235 * Added 'nofollow' exception to rel grouping.
236 * Changed how images are loaded into the DOM to prevent premature size calculation by ColorBox.
237 * Added timestamp to iframe name to prevent caching - this was a problem in some browsers if the user had
238 multiple iframes and the visitor left the page and came back, or if they refreshed the page.
239
240
241 Version 1.1.0 - March 21 2009
242 Major Changes:
243 * Animation is now much smoother and less resource intensive.
244 * Added support for % sizing.
245 * Callback option added.
246 * Inline content now preserves JavaScript events, and changes made while ColorBox is open are also preserved.
247 * Added 'href' setting to add the ability to set an alternative href for any anchor, or to assign the
248 ColorBox event to non-anchors.
249 Example: $('button').colorbox({'href':'process.php'})
250 Example: $('a[href='http://msn.com']).colorbox({'href':'http://google.com', iframe:true});
251
252 Minor Changes:
253 * Photos are now horizontally centered if they are smaller than the lightbox size. Also vertically centered
254 for browsers newer than IE7.
255 * Buttons in the examples are now included in the 'protected zone'. The lightbox will never expand it's
256 borders or buttons beyond an accessible area of the screen.
257 * Keypress events don't queue up by holding down the arrow keys.
258 * Added option to close ColorBox by clicking on the background overlay.
259 * Added 'none' transition setting.
260 * Changed 'contentIframe' and 'contentInline' to 'inline' and 'iframe'. Removed 'contentAjax' because it
261 is automatically assumed for non-image file types.
262 * Changed 'contentWidth' and 'contentHeight' to 'fixedWidth' and 'fixedHeight'. These sizes now reflect
263 the total size of the lightbox, not just the inner content. This is so users can accurately anticipate
264 % sizes without fear of creating scrollbars.
265 * Clicking on a photo will now switch to the next photo in a set.
266 * Loading.gif is more stable in it's position.
267 * Added a minified version.
268 * Code passes JSLint.
269
270
271 Version 1.0.5 - March 11 2009
272 * Redo: Fixed a bug where IE would cut off the bottom portion of a photo, if the photo was larger than
273 the document dimensions.
274
275
276 Version 1.0.4 - March 10 2009
277 * Added an option to allow users to automatically open the lightbox.
278 Example usage: $(".colorbox").colorbox({open:true});
279 * Fixed a bug where IE would cut off the bottom portion of a photo,
280 if the photo was larger than the document dimensions.
281
282
283 Version 1.0.3 - March 09 2009
284 * Fixed vertical centering for Safari 3.0.x.
285
286
287 Version 1.0.2 - March 06 2009
288 * Corrected a typo.
289 * Changed the content-type check so that it does not assume all links to photos should actually
290 display photos. This allows for Ajax/inline/and iframe calls on anchors linking to picture file types.
291
292
293 Version 1.0.1 - March 05 2009
294 * Fixed keydown events (esc, left arrow, right arrow) for Webkit browsers.
295
296
297 Version 1.0 - March 03 2009
298 * First release