diff options
Diffstat (limited to 'library')
97 files changed, 1513 insertions, 706 deletions
diff --git a/library/colorbox/README.md b/library/colorbox/README.md index bc002381e..5e7c1a379 100644 --- a/library/colorbox/README.md +++ b/library/colorbox/README.md @@ -1,11 +1,231 @@ -## About ColorBox: +## About Colorbox: A customizable lightbox plugin for jQuery. See the [project page](http://jacklmoore.com/colorbox/) for documentation and a demonstration, and the [FAQ](http://jacklmoore.com/colorbox/faq/) for solutions and examples to common issues. Released under the [MIT license](http://www.opensource.org/licenses/mit-license.php). -## Translations Welcome -Send me your language configuration files. See /i18n/jquery.colorbox-de.js as an example. - ## Changelog: +### Version 1.5.14 - 2014/9/9 + +* When opening, append Colorbox to the DOM if it was detached for whatever reason. Fixes #645. + +### Version 1.5.13 - 2014/8/4 + +* Fixed regression introduced with v1.5.12 with legacy versions of jQuery (1.3x-1.6x). References #628. + +### Version 1.5.12 - 2014/7/31 + +* Allowed setting the overlay opacity via CSS, by setting Colorbox's opacity property to false. References #628. + +### Version 1.5.11 - 2014/7/31 + +* Fixed bug where setting opacity to 0 was ignored. Fixes #628. + +### Version 1.5.10 - 2014/6/26 + +* Minor misc. tweaks (merging pull requests #611, #612, #615, #619, #620). + +### Version 1.5.9 - 2014/4/25 + +* Fixed inline content bug when using child selectors. Fixes #599 + +### Version 1.5.8 - 2014/4/15 + +* Fixed accidental leak of global variable. References #591 +* Enabled strict mode. Fixes #597 + +### Version 1.5.7 - 2014/4/15 + +* Fix potential error when calling Colorbox directly. References #591 +* Potentially worked around browser limitation of reporting that an image height and width is 0 immediately after onload. Fixes #535 + +### Version 1.5.6 - 2014/4/4 + +* Applied maxWidth and maxHeight to the initialWidth and initialHeight. Fixes #391 + +### Version 1.5.5 - 2014/3/13 + +* Allow setting the overlay opacity through CSS, rather than having to use Colorbox's opacity property. Fixes #580 + +### Version 1.5.4 - 2014/3/7 + +* Fixed potential issue where IE9+ wouldn't close the modal when clicking on the overlay. Fixes #576 + +### Version 1.5.3 - 2014/3/4 + +* Added access to settings object in callbacks. + +### Version 1.5.2 - 2014/2/28 + +* Added svg to image types regex. + +### Version 1.5.1 - 2014/2/27 + +* Fixed regression that broke direct calls to Colorbox, ie. $.colorbox(…) + +### Version 1.5.0 - 2014/2/27 + +* Changed when the className is applied: immediately on open, but only updated immediately prior to transition. Fixes #565 +* Fixed potential style flash if #cboxLoadedContent is given a background. Fixes #567 +* Misc. code cleanup + +### Version 1.4.37 - 2014/2/11 + +* Fixed potential error when resizing. Fixes #254 +* Added Microsoft's JPEG XR to photo detection regex. + +### Version 1.4.33 - 2013/10/31 + +* Fixed an issue where private events propagated to the document in versions of jQuery prior to 1.7. Fixes #525, Fixes #526 + +### Version 1.4.32 - 2013/10/16 + +* Updated stylesheets to avoid issue with using `div {max-width:100%}` (Fixes #520) + +### Version 1.4.31 - 2013/9/25 + +* Used setAttribute to set londesc, so that the value is accessible via DOM Node longDesc property #508 + +### Version 1.4.30 - 2013/9/24 + +* Added longdesc and aria-describedby attributes to photos. Fixes #508 + +### Version 1.4.29 - 2013/9/10 + +* Fixed a slideshow regression from 1.4.27 +* Fixed a potential issue with the starting size of #cboxLoadedContent + +### Version 1.4.28 - 2013/9/4 + +* Fixed a potential issue with using the open property with mixed slideshow and non-slideshow groups + +### Version 1.4.27 - 2013/7/16 + +* Fixed a width calculation issue relating to using margin:auto on #cboxLoadedContent. + +### Version 1.4.26 - 2013/6/30 + +* Fixed a regression in IE7 and IE8 that was causing an error. + +### Version 1.4.25 - 2013/6/28 + +* Use an animation speed of zero between same-sized content (fixed). +* Removed temporary fix for jQuery UI 1.8 + +### Version 1.4.24 - 2013/6/24 + +* Added closeButton option. Set to false to remove the close button. + +### Version 1.4.23 - 2013/6/23 + +* Bugfix loading overlay/graphic append order + +### Version 1.4.22 - 2013/6/19 + +* Updated manifest files for the jQuery plugin repository and Bower (no changes to plugin) + +### Version 1.4.21 - 2013/6/6 + +* Replaced new Image() with document.createElement('img') to avoid a potential bug in Chrome 27. + +### Version 1.4.20 - 2013/6/5 + +* Fixing bug/typo from last update. + +### Version 1.4.19 - 2013/6/3 + +* Fixed bug where Colorbox was capturing ctrl+click on assigned links on windows browsers with jQuery 1.7+, rather than ignoring. + +### Version 1.4.18 - 2013/5/30 + +* Fixed a scroll position issue when using $.colorbox.resize() + +### Version 1.4.17 - 2013/5/23 + +* Possible fix for a Chrome 27 issue (https://github.com/jackmoore/colorbox/pull/438#issuecomment-18334804) + +### Version 1.4.16 - 2013/5/20 + +* Added trapFocus setting to allow disabling of focus trapping + +### Version 1.4.15 - 2013/4/22 + +* Added .webp to list of recognized image extensions + +### Version 1.4.14 - 2013/4/16 + +* Added fadeOut property to control the closing fadeOut speed. +* Removed longdesc attribute for now. + +### Version 1.4.13 - 2013/4/11 + +* Fixed an error involving IE7/IE8 and legacy versions of jQuery + +### Version 1.4.12 - 2013/4/9 + +* Fixed a potential conflict with Twitter Bootstrap default img styles. + +### Version 1.4.11 - 2013/4/9 + +* Added `type='button'` to buttons to prevent accidental form submission +* Added alt and longdesc attributes to photo content if they are present on the calling element. + +### Version 1.4.10 - 2013/4/2 + +* Better 'old IE' feature detection that fixes an error with jQuery 2.0.0pre. + +### Version 1.4.9 - 2013/4/2 + +* Fixes bug introduced in previous version. + +### Version 1.4.8 - 2013/4/2 + +* Dropped IE6 support. +* Fixed other issues with $.colorbox.remove. + +### Version 1.4.7 - 2013/4/1 + +* Prevented an error if $.colorbox.remove is called during the transition. + +### Version 1.4.6 - 2013/3/19 + +* Minor change to work around a jQuery 1.4.2 bug for legacy users. + +### Version 1.4.5 - 2013/3/10 + +* Minor change to apply the close and className properties sooner. + +### Version 1.4.4 - 2013/3/10 + +* Fixed an issue with percent-based heights in iOS +* Fixed an issue with ajax requests being applied at the wrong time. + +### Version 1.4.3 - 2013/2/18 + +* Made image preloading aware of retina settings. + +### Version 1.4.2 - 2013/2/18 + +* Removed $.contains for compatibility with jQuery 1.3.x + +### Version 1.4.1 - 2013/2/14 + +* Ignored left and right arrow keypresses if combined with the alt key. + +### Version 1.4.0 - 2013/2/12 + +* Better accessibility: + * Replaced div controls with buttons + * Tabbed navigation confined to modal window + * Added aria role + +### Version 1.3.34 - 2013/2/4 + +* Updated manifest for plugins.jquery.com + +### Version 1.3.33 - 2013/2/4 + +* Added retina display properties: retinaImage, retinaUrl, retinaSuffix +* Fixed iframe scrolling on iOS devices. + ### Version 1.3.32 - 2013/1/31 * Improved internal event subscribing & fixed event bug introduced in v1.3.21 @@ -16,7 +236,7 @@ Send me your language configuration files. See /i18n/jquery.colorbox-de.js as a ### Version 1.3.30 - 2013/1/25 -* Delayed border-width calculations until after opening, to avoid a bug in FF when using ColorBox in a hidden iframe. +* Delayed border-width calculations until after opening, to avoid a bug in FF when using Colorbox in a hidden iframe. ### Version 1.3.29 - 2013/1/24 @@ -44,7 +264,7 @@ Send me your language configuration files. See /i18n/jquery.colorbox-de.js as a ### Version 1.3.23 - 2013/1/18 -* Minor bugfix for calling ColorBox on empty jQuery collections without a selector. +* Minor bugfix for calling Colorbox on empty jQuery collections without a selector. ### Version 1.3.22 - 2013/1/17 @@ -53,7 +273,7 @@ Send me your language configuration files. See /i18n/jquery.colorbox-de.js as a ### Version 1.3.21 - 2013/1/15 Files Changed: *.js -* Fixed compatability issues with jQuery 1.9 +* Fixed compatibility issues with jQuery 1.9 ### Version 1.3.20 - August 15 2012 Files Changed:jquery.colorbox.js @@ -72,8 +292,8 @@ Files Changed:jquery.colorbox.js, colorbox.css (all) ### Version 1.3.18 - October 07 2011 Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and example 1's controls.png -* Fixed a regression where Flash content displayed in ColorBox would be reloaded if the browser window was resized. -* Added safety check to make sure that ColorBox's markup is only added to the DOM a single time, even if $.colorbox.init() is called multiple times. This will allow site owners to manually initialize ColorBox if they need it before the DOM has finished loading. +* Fixed a regression where Flash content displayed in Colorbox would be reloaded if the browser window was resized. +* Added safety check to make sure that Colorbox's markup is only added to the DOM a single time, even if $.colorbox.init() is called multiple times. This will allow site owners to manually initialize Colorbox if they need it before the DOM has finished loading. * Updated the example index.html files to be HTML5 compliant. * Changed the slideshow behavior so that it immediately moves to the next slide when the slideshow is started. * Minor regex bugfix to allow automatic detection of image URLs that include fragments. @@ -82,8 +302,8 @@ Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and Files Changed:jquery.colorbox.js/jquery.colorbox-min.js * Added properties "top", "bottom", "left" and "right" to specify a position relative to the viewport, rather than using the default centering. -* Added property "data" to specify GET or POST data when using Ajax. ColorBox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load(). -* Added property "fixed" which can provide fixed positioning for ColorBox, rather than absolute positioning. This will allow ColorBox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning. +* Added property "data" to specify GET or POST data when using Ajax. Colorbox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load(). +* Added property "fixed" which can provide fixed positioning for Colorbox, rather than absolute positioning. This will allow Colorbox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning. * Fixed ClearType problem with IE7. * Minor fixes. @@ -109,7 +329,7 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js Files Changed: jquery.colorbox.js/jquery.colorbox-min.js * Changed the index.html example files to use YouTube's new embedded link format. -* By default, ColorBox returns focus to the element it was launched from once it closes. This can now be disabled by setting the 'returnFocus' property to false. Focus was causing problems for some users who had their anchor elements inside animated containers. +* By default, Colorbox returns focus to the element it was launched from once it closes. This can now be disabled by setting the 'returnFocus' property to false. Focus was causing problems for some users who had their anchor elements inside animated containers. * Minor bug fix involved in using a combination of slideshow and non-slideshow content. ### Version 1.3.12 - October 20 2010 @@ -129,8 +349,8 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js * Fixed compatibility with jQuery 1.4.3 * The 'open' property now accepts a function as a value, like all of the other properties. * Preloading now loads the correct href for images when using a dynamic (function) value for the href property. -* Fixed bug in Safari 3 for Win where ColorBox centered on the document, rather than the visitor's viewport. -* May have fixed an issue in Opera 10.6+ where ColorBox would rarely/randomly freeze up while switching between photos in a group. +* Fixed bug in Safari 3 for Win where Colorbox centered on the document, rather than the visitor's viewport. +* May have fixed an issue in Opera 10.6+ where Colorbox would rarely/randomly freeze up while switching between photos in a group. * Some functionality better encapsulated & minor performance improvements. ### Version 1.3.9 - July 7 2010 @@ -145,7 +365,7 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js * Fixed a bug in Chrome where it would sometimes render photos at 0 by 0 width and height (behavior introduced in recent update to Chrome). * Fixed a bug where the onClosed callback would fire twice (only affected 1.3.7). -* Fixed a bug in IE7 that existed with some iframed websites that use JS to reposition the viewport caused ColorBox to move out of position. +* Fixed a bug in IE7 that existed with some iframed websites that use JS to reposition the viewport caused Colorbox to move out of position. * Abstracted the identifiers (HTML ids & classes, and JS plugin name, method, and events) so that the plugin can be easily rebranded. * Small changes to improve either code readability or compression. @@ -156,7 +376,7 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/index.html * Resize now accepts 'width', 'innerWidth', 'height' and 'innerHeight'. Example: $.colorbox.resize({width:"100%"}) * Added option (loop:false) to disable looping in a group. * Added options (escKey:false, arrowKey:false) to disable esc-key and arrow-key bindings. -* Added method for removing ColorBox from a document: $.colorbox.remove(); +* Added method for removing Colorbox from a document: $.colorbox.remove(); * Fixed a bug where iframed URLs would be truncated if they contained an unencoded apostrophe. * Now uses the exact href specified on an anchor, rather than the version returned by 'this.href'. This was causing "#example" to be normalized to "http://domain/#example" which interfered with how some users were setting up links to inline content. * Changed example documents over to HTML5. @@ -164,7 +384,7 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/index.html ### Version 1.3.6 - Jan 13 2010 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js -* Small change to make ColorBox compatible with jQuery 1.4 +* Small change to make Colorbox compatible with jQuery 1.4 ### Version 1.3.5 - December 15 2009 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js @@ -176,27 +396,27 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js ### Version 1.3.4 - December 5 2009 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js -* Event delegation is now used for elements that ColorBox is assigned to, rather than individual click events. -* Additional callbacks have been added to represent other stages of ColorBox's lifecycle. Available callbacks, in order of their execution: onOpen, onLoad, onComplete, onCleanup, onClosed These take place at the same time as the event hooks, but will be better suited than the hooks for targeting specific instances of ColorBox. +* Event delegation is now used for elements that Colorbox is assigned to, rather than individual click events. +* Additional callbacks have been added to represent other stages of Colorbox's lifecycle. Available callbacks, in order of their execution: onOpen, onLoad, onComplete, onCleanup, onClosed These take place at the same time as the event hooks, but will be better suited than the hooks for targeting specific instances of Colorbox. * Ajax content is now immediately added to the DOM to be more compatible if that content contains script tags. * Focus is now returned to the calling element on closing. * Fixed a bug where maxHeight and maxWidth did not work for non-photo content. -* Direct calls no longer need 'open:true', it is assumed. Example: `$.fn.colorbox({html:'<p>Hi</p>'});` +* Direct calls no longer need 'open:true', it is assumed. Example: `$.colorbox({html:'<p>Hi</p>'});` ### Version 1.3.3 - November 7 2009 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js -* Changed $.fn.colorbox.element() to return a jQuery object rather the DOM element. +* Changed $.colorbox.element() to return a jQuery object rather the DOM element. * jQuery.colorbox-min.js is compressed with Google's Closure Compiler rather than YUI Compressor. ### Version 1.3.2 - October 27 2009 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js -* Added 'innerWidth' and 'innerHeight' options to allow people to easily set the size dimensions for ColorBox, without having to anticipate the size of the borders and buttons. +* Added 'innerWidth' and 'innerHeight' options to allow people to easily set the size dimensions for Colorbox, without having to anticipate the size of the borders and buttons. * Renamed 'scrollbars' option to 'scrolling' to be in keeping with the existing HTML attribute. The option now also applies to iframes. * Bug fix: In Safari, positioning occassionally incorrect when using '100%' dimensions. * Bug fix: In IE6, the background overlay is briefly not full size when first viewing. -* Bug fix: In Firefox, opening ColorBox causes a split second shift with a small minority of webpage layouts. +* Bug fix: In Firefox, opening Colorbox causes a split second shift with a small minority of webpage layouts. * Simplified code in a few areas. ### Version 1.3.1 - September 16 2009 @@ -208,11 +428,11 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css/colorbox-i ### Version 1.3.0 - September 15 2009 Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css -* Added $.fn.colorbox.resize() method to allow ColorBox to resize it's height if it's contents change. +* Added $.colorbox.resize() method to allow Colorbox to resize it's height if it's contents change. * Added 'scrollbars' option to allow users to turn off scrollbars when using the resize() method. * Renamed the 'resize' option to be less ambiguous. It's now 'scalePhotos'. * Renamed the 'cbox_close' event to be less ambiguous. It's now 'cbox_cleanup'. It is the first thing to happen in the close method while the 'cbox_closed' event is the last to happen. -* Fixed a bug with the slideshow mouseover graphics that appeared after ColorBox is opened a 2nd time. +* Fixed a bug with the slideshow mouseover graphics that appeared after Colorbox is opened a 2nd time. * Fixed a bug where ClearType may not work in IE6&7 if using the fade transition. * Minor code optimizations to increase compression. @@ -233,12 +453,12 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js Files Changed: jquery.colorbox.js/jquery.colorbox-min.js, example stylesheets and background images (core styles have not changed and the updates will not affect existing user themes / old example themes) * Code cleanup and reduction, better organization and documentation in the full source. -* Added ability to use functions in place of static values for ColorBox's options (thanks Ken!). -* Added an option for straight HTML. Example: `$.fn.colorbox({html:'<p>Howdy</p>', open:true})` -* Added an event for the beginning of the closing process. This is in addition to the event that already existed for when ColorBox had completely closed. 'cbox_close' and 'cbox_closed' respectively. -* Fixed a minor bug in IE6 that would cause a brief content shift in the parent document when opening ColorBox. -* Fixed a minor bug in IE6 that would reveal select elements that had a hidden visibility after closing ColorBox. -* The 'esc' key is unbound now when ColorBox is not open, to avoid any potential conflicts. +* Added ability to use functions in place of static values for Colorbox's options (thanks Ken!). +* Added an option for straight HTML. Example: `$.colorbox({html:'<p>Howdy</p>', open:true})` +* Added an event for the beginning of the closing process. This is in addition to the event that already existed for when Colorbox had completely closed. 'cbox_close' and 'cbox_closed' respectively. +* Fixed a minor bug in IE6 that would cause a brief content shift in the parent document when opening Colorbox. +* Fixed a minor bug in IE6 that would reveal select elements that had a hidden visibility after closing Colorbox. +* The 'esc' key is unbound now when Colorbox is not open, to avoid any potential conflicts. * Used background sprites for examples 1 & 4. Put IE-only (non-sprite) background images in a separate folder. * Example themes 1, 3, & 4 received slight visual tweaks. * Optimized pngs for smaller file size. @@ -248,8 +468,8 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js, example stylesheets an Files Changed: jquery.colorbox.js/jquery.colorbox-min.js * Fixed a bug with fixed width/height images in Opera 9.64. -* Fixed a bug with trying to set a value for rel during a direct call to ColorBox. Example: `$.fn.colorbox({rel:'foo', open:true});` -* Changed how href/rel/title settings are determined to avoid users having to manually update ColorBox settings if they use JavaScript to update any of those attributes, after ColorBox has been defined. +* Fixed a bug with trying to set a value for rel during a direct call to Colorbox. Example: `$.colorbox({rel:'foo', open:true});` +* Changed how href/rel/title settings are determined to avoid users having to manually update Colorbox settings if they use JavaScript to update any of those attributes, after Colorbox has been defined. * Fixed a FF3 bug where the back button was disabled after closing an iframe. ### Version 1.2.5 - June 23 2009 @@ -261,13 +481,13 @@ Files Changed: jquery.colorbox.js/jquery.colorbox-min.js ### Version 1.2.4 - June 9 2009 Files Changed: jquery.colorbox.js, jquery.colorbox-min.js -* Fixed an issue where ColorBox may not close completely if it is closed during a transition animation. +* Fixed an issue where Colorbox may not close completely if it is closed during a transition animation. * Minor code reduction. ### Version 1.2.3 - June 4 2009 * Fixed a png transparency stacking issue in IE. * More accurate Ajax auto-sizing if the user was depending on the #cboxLoadedContent ID for CSS styling. -* Added a public function for returning the current html element that ColorBox is associated with. Example use: var that = $.fn.colorbox.element(); +* Added a public function for returning the current html element that Colorbox is associated with. Example use: var that = $.colorbox.element(); * Added bicubic scaling for resized images in the original IE7. * Removed the IE6 stylesheet and png files from Example 3. It now uses the same png file for the controls that the rest of the browsers use (an alpha transparency PNG8). This example now only has 2 graphics files and 1 stylesheet. @@ -277,19 +497,19 @@ Files Changed: jquery.colorbox.js, jquery.colorbox-min.js ### Version 1.2.1 - May 28 2009 * Note: If you are upgrading, update your jquery.colorbox.js and colorbox.css files. * Added photo resizing. -* Added a maximum width and maximum height. Example: {height:800, maxHeight:'100%'}, would allow the box to be a maximum potential height of 800px, instead of a fixed height of 800px. With maxHeight of 100% the height of ColorBox cannot exceed the height of the browser window. -* Added 'rel' setting to add the ability to set an alternative rel for any ColorBox call. This allows the user to group any combination of elements together for a gallery, or to override an existing rel. attribute so those element are not grouped together, without having to alter their rel in the HTML. -* Added a 'photo' setting to force ColorBox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like 'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1') -* Removed the need to ever create disposable elements to call colorbox on. ColorBox can now be called directly, without being associated with any existing element, by using the following format: - `$.fn.colorbox({open:true, href:'yourLink.xxx'});` -* ColorBox settings are now persistent and unique for each element. This allows for extremely flexible options for individual elements. You could use this to create a gallery in which each page in the gallery has different settings. One could be a photo with a fade transition, next could be an inline element with an elastic transition with a set width and height, etc. +* Added a maximum width and maximum height. Example: {height:800, maxHeight:'100%'}, would allow the box to be a maximum potential height of 800px, instead of a fixed height of 800px. With maxHeight of 100% the height of Colorbox cannot exceed the height of the browser window. +* Added 'rel' setting to add the ability to set an alternative rel for any Colorbox call. This allows the user to group any combination of elements together for a gallery, or to override an existing rel. attribute so those element are not grouped together, without having to alter their rel in the HTML. +* Added a 'photo' setting to force Colorbox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like 'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1') +* Removed the need to ever create disposable elements to call colorbox on. Colorbox can now be called directly, without being associated with any existing element, by using the following format: + `$.colorbox({open:true, href:'yourLink.xxx'});` +* Colorbox settings are now persistent and unique for each element. This allows for extremely flexible options for individual elements. You could use this to create a gallery in which each page in the gallery has different settings. One could be a photo with a fade transition, next could be an inline element with an elastic transition with a set width and height, etc. * For user callbacks, 'this' now refers to the element colorbox was opened from. * Fixed a minor grouping issue with IE6, when transition type is set to 'none'. * Added an Adobe Illustrator file that contains the borders and buttons used in the various examples. ### Version 1.2 - May 13 2009 * Added a slideshow feature. -* Added re-positioning on browser resize. If the browser is resized, ColorBox will recenter itself onscreen. +* Added re-positioning on browser resize. If the browser is resized, Colorbox will recenter itself onscreen. * Added hooks for key events: cbox_open, cbox_load, cbox_complete, cbox_closed. * Fixed an IE transparency-stacking problem, where transparent PNGs would show through to the background overlay. * Fixed an IE iframe issue where the ifame might shift up and to the left under certain circumstances. @@ -299,54 +519,54 @@ Files Changed: jquery.colorbox.js, jquery.colorbox-min.js * Changed how the JS is structured to be better organized and increase compression. Increased documentation. * Changed CSS :hover states to a .hover class. This sidesteps a minor IE8 bug with css hover states and allows easier access to hover state user styles from the JavaScript. * Changed: elements added to the DOM have new ID's. The naming is more consistent and less likely to cause conflicts with existing website stylesheets. All stylesheets have been updated. -* Changed the behavior for prev/next links so that ColorBox does not get hung up on broken links. A visitor can now skip through broken or long-loading links by clicking prev/next buttons. +* Changed the behavior for prev/next links so that Colorbox does not get hung up on broken links. A visitor can now skip through broken or long-loading links by clicking prev/next buttons. * Changed the naming of variables in the parameter map to be more concise and intuitive. * Removed colorbox.css. Combined the colorbox.css styles with jquery.colorbox.js: the css file was not large enough to warrant being a separate file. ### Version 1.1.6 - April 28 2009 * Prevented the default action of the next & previous anchors and the left and right keys for gallery mode. -* Fixed a bug where the title element was being added back to the DOM when closing ColorBox while using inline content. +* Fixed a bug where the title element was being added back to the DOM when closing Colorbox while using inline content. * Fixed a bug where IE7 would crash for example 2. * Smaller filesize: removed a small amount of unused code and rewrote the HTML injection with less syntax. -* Added a public method for closing ColorBox: $.fn.colorbox.close(). This will allow iframe users to add an event to close ColorBox without having to create an additional function. +* Added a public method for closing Colorbox: $.colorbox.close(). This will allow iframe users to add an event to close Colorbox without having to create an additional function. ### Version 1.1.5 - April 11 2009 -* Fixed minor issues with exiting ColorBox. +* Fixed minor issues with exiting Colorbox. ### Version 1.1.4 - April 08 2009 -* Fixed a bug in the fade transition where ColorBox not close completely if instructed to close during the fade-in portion of the transition. +* Fixed a bug in the fade transition where Colorbox not close completely if instructed to close during the fade-in portion of the transition. ### Version 1.1.3 - April 06 2009 -* Fixed an IE6&7 issue with using ColorBox to display animated GIFs. +* Fixed an IE6&7 issue with using Colorbox to display animated GIFs. ### Version 1.1.2 - April 05 2009 -* Added ability to change content when ColorBox is already open. +* Added ability to change content when Colorbox is already open. * Added vertical photo centering now works for all browsers (this feature previously excluded IE6&7). * Added namespacing to the esc-key keydown event for people who want to disable it: "keydown.colorClose" -* Added 'title' setting to add the ability to set an alternative title for any ColorBox call. +* Added 'title' setting to add the ability to set an alternative title for any Colorbox call. * Fixed rollover navigation issue with IE8. (Added JS-based rollover state due to a browser-bug.) * Fixed an overflow issue for when the fixed width/height is smaller than the size of a photo. -* Fixed a bug in the fade transition where the border would still come up if ColorBox was closed mid-transition. +* Fixed a bug in the fade transition where the border would still come up if Colorbox was closed mid-transition. * Switch from JSMin to Yui Compressor for minification. Minified code now under 7KB. ### Version 1.1.1 - March 31 2009 * More robust image detection regex. Now detects image file types with url fragments and/or query strings. * Added 'nofollow' exception to rel grouping. -* Changed how images are loaded into the DOM to prevent premature size calculation by ColorBox. +* Changed how images are loaded into the DOM to prevent premature size calculation by Colorbox. * Added timestamp to iframe name to prevent caching - this was a problem in some browsers if the user had multiple iframes and the visitor left the page and came back, or if they refreshed the page. ### Version 1.1.0 - March 21 2009 * Animation is now much smoother and less resource intensive. * Added support for % sizing. * Callback option added. -* Inline content now preserves JavaScript events, and changes made while ColorBox is open are also preserved. -* Added 'href' setting to add the ability to set an alternative href for any anchor, or to assign the ColorBox event to non-anchors. +* Inline content now preserves JavaScript events, and changes made while Colorbox is open are also preserved. +* Added 'href' setting to add the ability to set an alternative href for any anchor, or to assign the Colorbox event to non-anchors. Example: $('button').colorbox({'href':'process.php'}) Example: $('a[href='http://msn.com']).colorbox({'href':'http://google.com', iframe:true}); * Photos are now horizontally centered if they are smaller than the lightbox size. Also vertically centered for browsers newer than IE7. * Buttons in the examples are now included in the 'protected zone'. The lightbox will never expand it's borders or buttons beyond an accessible area of the screen. * Keypress events don't queue up by holding down the arrow keys. -* Added option to close ColorBox by clicking on the background overlay. +* Added option to close Colorbox by clicking on the background overlay. * Added 'none' transition setting. * Changed 'contentIframe' and 'contentInline' to 'inline' and 'iframe'. Removed 'contentAjax' because it is automatically assumed for non-image file types. * Changed 'contentWidth' and 'contentHeight' to 'fixedWidth' and 'fixedHeight'. These sizes now reflect the total size of the lightbox, not just the inner content. This is so users can accurately anticipate % sizes without fear of creating scrollbars. diff --git a/library/colorbox/bower.json b/library/colorbox/bower.json new file mode 100644 index 000000000..6cdfb9bab --- /dev/null +++ b/library/colorbox/bower.json @@ -0,0 +1,42 @@ +{ + "name": "jquery-colorbox", + "description": "jQuery lightbox and modal window plugin", + "version": "1.5.14", + "dependencies": { + "jquery": ">=1.3.2" + }, + "keywords": [ + "modal", + "lightbox", + "window", + "popup", + "ui", + "jQuery", + "jquery-plugin" + ], + "authors": [ + { + "name": "Jack Moore", + "url": "http://www.jacklmoore.com", + "email": "hello@jacklmoore.com" + } + ], + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ], + "homepage": "http://www.jacklmoore.com/colorbox", + "main": "jquery.colorbox.js", + "ignore": [ + "colorbox.jquery.json", + "colorbox.ai", + "content", + "example1/index.html", + "example2/index.html", + "example3/index.html", + "example4/index.html", + "example5/index.html" + ] +}
\ No newline at end of file diff --git a/library/colorbox/colorbox.css b/library/colorbox/colorbox.css deleted file mode 100644 index 544a76f3b..000000000 --- a/library/colorbox/colorbox.css +++ /dev/null @@ -1,52 +0,0 @@ -/* - ColorBox Core Style: - The following CSS is consistent between example themes and should not be altered. -*/ -#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} -#cboxOverlay{position:fixed; width:100%; height:100%;} -#cboxMiddleLeft, #cboxBottomLeft{clear:left;} -#cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} -#cboxTitle{margin:0;} -#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} -#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} -#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} - -/* - User Style: - Change the following styles to modify the appearance of ColorBox. They are - ordered & tabbed in a way that represents the nesting of the generated HTML. -*/ -#cboxOverlay{background:#000;} -#colorbox{} - #cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;} - #cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;} - #cboxTopRight{width:14px; height:14px; background:url(images/controls.png) no-repeat -36px 0;} - #cboxBottomLeft{width:14px; height:43px; background:url(images/controls.png) no-repeat 0 -32px;} - #cboxBottomCenter{height:43px; background:url(images/border.png) repeat-x bottom left;} - #cboxBottomRight{width:14px; height:43px; background:url(images/controls.png) no-repeat -36px -32px;} - #cboxMiddleLeft{width:14px; background:url(images/controls.png) repeat-y -175px 0;} - #cboxMiddleRight{width:14px; background:url(images/controls.png) repeat-y -211px 0;} - #cboxContent{background:#fff; overflow:visible;} - .cboxIframe{background:#fff;} - #cboxError{padding:50px; border:1px solid #ccc;} - #cboxLoadedContent{margin-bottom:5px;} - #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} - #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} - #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} - #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} - - #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} - #cboxPrevious{left:0px; background-position: -51px -25px;} - #cboxPrevious:hover{background-position:-51px 0px;} - #cboxNext{left:27px; background-position:-75px -25px;} - #cboxNext:hover{background-position:-75px 0px;} - #cboxClose{right:0; background-position:-100px -25px;} - #cboxClose:hover{background-position:-100px 0px;} - - .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;} - .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;} - .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;} - .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
\ No newline at end of file diff --git a/library/colorbox/colorbox.jquery.json b/library/colorbox/colorbox.jquery.json deleted file mode 100644 index dd517a5f4..000000000 --- a/library/colorbox/colorbox.jquery.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "colorbox", - "title": "ColorBox", - "description": "A lightweight customizable lightbox plugin", - "keywords": [ - "modal", - "lightbox", - "window", - "popup", - "ui" - ], - "version": "1.3.32", - "author": { - "name": "Jack Moore", - "url": "http://www.jacklmoore.com", - "email": "jack@colorpowered.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "homepage": "http://jacklmoore.com/colorbox", - "demo": "http://jacklmoore.com/colorbox", - "download": "http://jacklmoore.com/colorbox/colorbox.zip", - "dependencies": { - "jquery": ">=1.3.2" - } -}
\ No newline at end of file diff --git a/library/colorbox/component.json b/library/colorbox/component.json deleted file mode 100644 index 171764fbf..000000000 --- a/library/colorbox/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "jquery-autosize", - "version": "1.3.32", - "main": "./jquery.autosize.js", - "dependencies": { - "jquery": ">=1.3.2" - } -}
\ No newline at end of file diff --git a/library/colorbox/content/daisy.jpg b/library/colorbox/content/daisy.jpg Binary files differnew file mode 100644 index 000000000..16da6bdb0 --- /dev/null +++ b/library/colorbox/content/daisy.jpg diff --git a/library/colorbox/content/daisy@2x.jpg b/library/colorbox/content/daisy@2x.jpg Binary files differnew file mode 100644 index 000000000..f2e688dc2 --- /dev/null +++ b/library/colorbox/content/daisy@2x.jpg diff --git a/library/colorbox/content/homer.jpg b/library/colorbox/content/homer.jpg Binary files differindex 87ec76c99..864c17a9f 100644 --- a/library/colorbox/content/homer.jpg +++ b/library/colorbox/content/homer.jpg diff --git a/library/colorbox/content/marylou.jpg b/library/colorbox/content/marylou.jpg Binary files differindex 4c717d276..f113fbf6c 100644 --- a/library/colorbox/content/marylou.jpg +++ b/library/colorbox/content/marylou.jpg diff --git a/library/colorbox/content/ohoopee1.jpg b/library/colorbox/content/ohoopee1.jpg Binary files differindex aae19a3e6..007fa58a8 100644 --- a/library/colorbox/content/ohoopee1.jpg +++ b/library/colorbox/content/ohoopee1.jpg diff --git a/library/colorbox/content/ohoopee2.jpg b/library/colorbox/content/ohoopee2.jpg Binary files differindex 206894489..e56bb0f32 100644 --- a/library/colorbox/content/ohoopee2.jpg +++ b/library/colorbox/content/ohoopee2.jpg diff --git a/library/colorbox/content/ohoopee3.jpg b/library/colorbox/content/ohoopee3.jpg Binary files differindex 4d64d2400..7cc1c7f97 100644 --- a/library/colorbox/content/ohoopee3.jpg +++ b/library/colorbox/content/ohoopee3.jpg diff --git a/library/colorbox/example1/colorbox.css b/library/colorbox/example1/colorbox.css index 5ee3feba9..8a4ff998c 100644 --- a/library/colorbox/example1/colorbox.css +++ b/library/colorbox/example1/colorbox.css @@ -1,26 +1,27 @@ /* - ColorBox Core Style: + Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxWrapper {max-width:none;} #cboxOverlay{position:fixed; width:100%; height:100%;} #cboxMiddleLeft, #cboxBottomLeft{clear:left;} #cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} #cboxTitle{margin:0;} #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} /* User Style: - Change the following styles to modify the appearance of ColorBox. They are + Change the following styles to modify the appearance of Colorbox. They are ordered & tabbed in a way that represents the nesting of the generated HTML. */ -#cboxOverlay{background:url(images/overlay.png) repeat 0 0;} -#colorbox{} +#cboxOverlay{background:url(images/overlay.png) repeat 0 0; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;} #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;} #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;} @@ -35,13 +36,20 @@ #cboxLoadedContent{margin-bottom:28px;} #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;} #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;} + #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;} #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} #cboxPrevious:hover{background-position:-75px -25px;} #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} #cboxNext:hover{background-position:-50px -25px;} - #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} - #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} #cboxClose:hover{background-position:-25px -25px;} @@ -59,28 +67,4 @@ .cboxIE #cboxMiddleLeft, .cboxIE #cboxMiddleRight { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); -} - -/* - The following provides PNG transparency support for IE6 - Feel free to remove this and the /ie6/ directory if you have dropped IE6 support. -*/ -.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);} -.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);} -.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);} -.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);} -.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);} -.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);} -.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);} -.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);} - -.cboxIE6 #cboxTopLeft, -.cboxIE6 #cboxTopCenter, -.cboxIE6 #cboxTopRight, -.cboxIE6 #cboxBottomLeft, -.cboxIE6 #cboxBottomCenter, -.cboxIE6 #cboxBottomRight, -.cboxIE6 #cboxMiddleLeft, -.cboxIE6 #cboxMiddleRight { - _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')"); -} +}
\ No newline at end of file diff --git a/library/colorbox/example1/images/border.png b/library/colorbox/example1/images/border.png Binary files differindex f463a10d8..9386f3504 100644 --- a/library/colorbox/example1/images/border.png +++ b/library/colorbox/example1/images/border.png diff --git a/library/colorbox/example1/images/controls.png b/library/colorbox/example1/images/controls.png Binary files differindex dcfd6fb9f..1ec3cb1c8 100644 --- a/library/colorbox/example1/images/controls.png +++ b/library/colorbox/example1/images/controls.png diff --git a/library/colorbox/example1/images/ie6/borderBottomCenter.png b/library/colorbox/example1/images/ie6/borderBottomCenter.png Binary files differdeleted file mode 100644 index 0d4475edf..000000000 --- a/library/colorbox/example1/images/ie6/borderBottomCenter.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderBottomLeft.png b/library/colorbox/example1/images/ie6/borderBottomLeft.png Binary files differdeleted file mode 100644 index 2775eba89..000000000 --- a/library/colorbox/example1/images/ie6/borderBottomLeft.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderBottomRight.png b/library/colorbox/example1/images/ie6/borderBottomRight.png Binary files differdeleted file mode 100644 index f7f51379c..000000000 --- a/library/colorbox/example1/images/ie6/borderBottomRight.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderMiddleLeft.png b/library/colorbox/example1/images/ie6/borderMiddleLeft.png Binary files differdeleted file mode 100644 index a2d63d156..000000000 --- a/library/colorbox/example1/images/ie6/borderMiddleLeft.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderMiddleRight.png b/library/colorbox/example1/images/ie6/borderMiddleRight.png Binary files differdeleted file mode 100644 index fd7c3e849..000000000 --- a/library/colorbox/example1/images/ie6/borderMiddleRight.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderTopCenter.png b/library/colorbox/example1/images/ie6/borderTopCenter.png Binary files differdeleted file mode 100644 index 2937a9cf9..000000000 --- a/library/colorbox/example1/images/ie6/borderTopCenter.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderTopLeft.png b/library/colorbox/example1/images/ie6/borderTopLeft.png Binary files differdeleted file mode 100644 index f9d458b5b..000000000 --- a/library/colorbox/example1/images/ie6/borderTopLeft.png +++ /dev/null diff --git a/library/colorbox/example1/images/ie6/borderTopRight.png b/library/colorbox/example1/images/ie6/borderTopRight.png Binary files differdeleted file mode 100644 index 74b8583cf..000000000 --- a/library/colorbox/example1/images/ie6/borderTopRight.png +++ /dev/null diff --git a/library/colorbox/example1/images/loading.gif b/library/colorbox/example1/images/loading.gif Binary files differindex b4695d811..0325c8dbf 100644 --- a/library/colorbox/example1/images/loading.gif +++ b/library/colorbox/example1/images/loading.gif diff --git a/library/colorbox/example1/images/loading_background.png b/library/colorbox/example1/images/loading_background.png Binary files differindex 6ae83e697..23a336b39 100644 --- a/library/colorbox/example1/images/loading_background.png +++ b/library/colorbox/example1/images/loading_background.png diff --git a/library/colorbox/example1/images/overlay.png b/library/colorbox/example1/images/overlay.png Binary files differindex 53ea98f70..10362a423 100644 --- a/library/colorbox/example1/images/overlay.png +++ b/library/colorbox/example1/images/overlay.png diff --git a/library/colorbox/example1/index.html b/library/colorbox/example1/index.html index 727fe78d7..8f10b9306 100644 --- a/library/colorbox/example1/index.html +++ b/library/colorbox/example1/index.html @@ -2,24 +2,24 @@ <html> <head> <meta charset='utf-8'/> - <title>ColorBox Examples</title> + <title>Colorbox Examples</title> <style> body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;} a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;} h2{font-size:13px; margin:15px 0 0 0;} </style> <link rel="stylesheet" href="colorbox.css" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="../jquery.colorbox.js"></script> <script> $(document).ready(function(){ - //Examples of how to assign the ColorBox event to elements + //Examples of how to assign the Colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); - $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); + $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390}); $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); @@ -30,6 +30,9 @@ onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, onClosed:function(){ alert('onClosed: colorbox has completely closed'); } }); + + $('.non-retina').colorbox({rel:'group5', transition:'none'}) + $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); //Example of preserving a JavaScript event for inline calls. $("#click").click(function(){ @@ -40,7 +43,7 @@ </script> </head> <body> - <h1>ColorBox Demonstration</h1> + <h1>Colorbox Demonstration</h1> <h2>Elastic Transition</h2> <p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p> <p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p> @@ -63,7 +66,7 @@ <h2>Other Content Types</h2> <p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p> - <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p> + <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p> <p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p> <p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p> <p><a class='inline' href="#inline_content">Inline HTML</a></p> @@ -71,6 +74,11 @@ <h2>Demonstration of using callbacks</h2> <p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p> + + <h2>Retina Images</h2> + <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p> + <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p> + <!-- This contains the hidden content for inline calls --> <div style='display:none'> <div id='inline_content' style='padding:10px; background:#fff;'> @@ -78,7 +86,7 @@ <p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p> <p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p> - <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p> + <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p> <p>Updating Content Example:<br /> <a class="ajax" href="../content/ajax.html">Click here to load new content</a></p> </div> diff --git a/library/colorbox/example2/colorbox.css b/library/colorbox/example2/colorbox.css index 3bb3d8121..0a6710404 100644 --- a/library/colorbox/example2/colorbox.css +++ b/library/colorbox/example2/colorbox.css @@ -1,27 +1,28 @@ /* - ColorBox Core Style: + Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxWrapper {max-width:none;} #cboxOverlay{position:fixed; width:100%; height:100%;} #cboxMiddleLeft, #cboxBottomLeft{clear:left;} #cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} #cboxTitle{margin:0;} #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} /* User Style: - Change the following styles to modify the appearance of ColorBox. They are + Change the following styles to modify the appearance of Colorbox. They are ordered & tabbed in a way that represents the nesting of the generated HTML. */ -#cboxOverlay{background:#fff;} -#colorbox{} - #cboxContent{margin-top:32px; overflow:visible;} +#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} + #cboxContent{margin-top:32px; overflow:visible; background:#000;} .cboxIframe{background:#fff;} #cboxError{padding:50px; border:1px solid #ccc;} #cboxLoadedContent{background:#000; padding:1px;} @@ -29,7 +30,13 @@ #cboxLoadingOverlay{background:#000;} #cboxTitle{position:absolute; top:-22px; left:0; color:#000;} #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;} - #cboxSlideshow, #cboxPrevious, #cboxNext, #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;} + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + #cboxPrevious{background-position:0px 0px; right:44px;} #cboxPrevious:hover{background-position:0px -25px;} #cboxNext{background-position:-25px 0px; right:22px;} diff --git a/library/colorbox/example2/images/controls.png b/library/colorbox/example2/images/controls.png Binary files differindex 8569b57f1..36f526992 100644 --- a/library/colorbox/example2/images/controls.png +++ b/library/colorbox/example2/images/controls.png diff --git a/library/colorbox/example2/images/loading.gif b/library/colorbox/example2/images/loading.gif Binary files differindex 19c67bbd0..a32df5c08 100644 --- a/library/colorbox/example2/images/loading.gif +++ b/library/colorbox/example2/images/loading.gif diff --git a/library/colorbox/example2/index.html b/library/colorbox/example2/index.html index 727fe78d7..8f10b9306 100644 --- a/library/colorbox/example2/index.html +++ b/library/colorbox/example2/index.html @@ -2,24 +2,24 @@ <html> <head> <meta charset='utf-8'/> - <title>ColorBox Examples</title> + <title>Colorbox Examples</title> <style> body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;} a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;} h2{font-size:13px; margin:15px 0 0 0;} </style> <link rel="stylesheet" href="colorbox.css" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="../jquery.colorbox.js"></script> <script> $(document).ready(function(){ - //Examples of how to assign the ColorBox event to elements + //Examples of how to assign the Colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); - $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); + $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390}); $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); @@ -30,6 +30,9 @@ onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, onClosed:function(){ alert('onClosed: colorbox has completely closed'); } }); + + $('.non-retina').colorbox({rel:'group5', transition:'none'}) + $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); //Example of preserving a JavaScript event for inline calls. $("#click").click(function(){ @@ -40,7 +43,7 @@ </script> </head> <body> - <h1>ColorBox Demonstration</h1> + <h1>Colorbox Demonstration</h1> <h2>Elastic Transition</h2> <p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p> <p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p> @@ -63,7 +66,7 @@ <h2>Other Content Types</h2> <p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p> - <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p> + <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p> <p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p> <p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p> <p><a class='inline' href="#inline_content">Inline HTML</a></p> @@ -71,6 +74,11 @@ <h2>Demonstration of using callbacks</h2> <p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p> + + <h2>Retina Images</h2> + <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p> + <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p> + <!-- This contains the hidden content for inline calls --> <div style='display:none'> <div id='inline_content' style='padding:10px; background:#fff;'> @@ -78,7 +86,7 @@ <p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p> <p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p> - <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p> + <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p> <p>Updating Content Example:<br /> <a class="ajax" href="../content/ajax.html">Click here to load new content</a></p> </div> diff --git a/library/colorbox/example3/colorbox.css b/library/colorbox/example3/colorbox.css index 153e32e6f..1cebdffd6 100644 --- a/library/colorbox/example3/colorbox.css +++ b/library/colorbox/example3/colorbox.css @@ -1,38 +1,45 @@ /* - ColorBox Core Style: + Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxWrapper {max-width:none;} #cboxOverlay{position:fixed; width:100%; height:100%;} #cboxMiddleLeft, #cboxBottomLeft{clear:left;} #cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} #cboxTitle{margin:0;} #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} /* User Style: - Change the following styles to modify the appearance of ColorBox. They are + Change the following styles to modify the appearance of Colorbox. They are ordered & tabbed in a way that represents the nesting of the generated HTML. */ -#cboxOverlay{background:#000;} -#colorbox{} - #cboxContent{margin-top:20px;} +#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} + #cboxContent{margin-top:20px;background:#000;} .cboxIframe{background:#fff;} #cboxError{padding:50px; border:1px solid #ccc;} #cboxLoadedContent{border:5px solid #000; background:#fff;} #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;} #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;} + #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;} #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;} #cboxPrevious:hover{background-position:bottom left;} #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;} #cboxNext:hover{background-position:bottom right;} - #cboxLoadingOverlay{background:#000;} - #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;} - #cboxClose:hover{background-position:bottom center;}
\ No newline at end of file + #cboxClose:hover{background-position:bottom center;} diff --git a/library/colorbox/example3/images/loading.gif b/library/colorbox/example3/images/loading.gif Binary files differindex 19c67bbd0..a32df5c08 100644 --- a/library/colorbox/example3/images/loading.gif +++ b/library/colorbox/example3/images/loading.gif diff --git a/library/colorbox/example3/index.html b/library/colorbox/example3/index.html index 727fe78d7..8f10b9306 100644 --- a/library/colorbox/example3/index.html +++ b/library/colorbox/example3/index.html @@ -2,24 +2,24 @@ <html> <head> <meta charset='utf-8'/> - <title>ColorBox Examples</title> + <title>Colorbox Examples</title> <style> body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;} a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;} h2{font-size:13px; margin:15px 0 0 0;} </style> <link rel="stylesheet" href="colorbox.css" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="../jquery.colorbox.js"></script> <script> $(document).ready(function(){ - //Examples of how to assign the ColorBox event to elements + //Examples of how to assign the Colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); - $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); + $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390}); $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); @@ -30,6 +30,9 @@ onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, onClosed:function(){ alert('onClosed: colorbox has completely closed'); } }); + + $('.non-retina').colorbox({rel:'group5', transition:'none'}) + $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); //Example of preserving a JavaScript event for inline calls. $("#click").click(function(){ @@ -40,7 +43,7 @@ </script> </head> <body> - <h1>ColorBox Demonstration</h1> + <h1>Colorbox Demonstration</h1> <h2>Elastic Transition</h2> <p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p> <p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p> @@ -63,7 +66,7 @@ <h2>Other Content Types</h2> <p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p> - <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p> + <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p> <p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p> <p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p> <p><a class='inline' href="#inline_content">Inline HTML</a></p> @@ -71,6 +74,11 @@ <h2>Demonstration of using callbacks</h2> <p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p> + + <h2>Retina Images</h2> + <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p> + <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p> + <!-- This contains the hidden content for inline calls --> <div style='display:none'> <div id='inline_content' style='padding:10px; background:#fff;'> @@ -78,7 +86,7 @@ <p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p> <p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p> - <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p> + <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p> <p>Updating Content Example:<br /> <a class="ajax" href="../content/ajax.html">Click here to load new content</a></p> </div> diff --git a/library/colorbox/example4/colorbox.css b/library/colorbox/example4/colorbox.css index 54560688a..d475a343a 100644 --- a/library/colorbox/example4/colorbox.css +++ b/library/colorbox/example4/colorbox.css @@ -1,26 +1,27 @@ /* - ColorBox Core Style: + Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxWrapper {max-width:none;} #cboxOverlay{position:fixed; width:100%; height:100%;} #cboxMiddleLeft, #cboxBottomLeft{clear:left;} #cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} #cboxTitle{margin:0;} #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} /* User Style: - Change the following styles to modify the appearance of ColorBox. They are + Change the following styles to modify the appearance of Colorbox. They are ordered & tabbed in a way that represents the nesting of the generated HTML. */ -#cboxOverlay{background:#fff;} -#colorbox{} +#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} #cboxTopLeft{width:25px; height:25px; background:url(images/border1.png) no-repeat 0 0;} #cboxTopCenter{height:25px; background:url(images/border1.png) repeat-x 0 -50px;} #cboxTopRight{width:25px; height:25px; background:url(images/border1.png) no-repeat -25px 0;} @@ -35,10 +36,17 @@ #cboxLoadedContent{margin-bottom:20px;} #cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;} #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;} + #cboxLoadingOverlay{background:#fff url(images/loading.gif) no-repeat 5px 5px;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + #cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;} #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;} #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;} - #cboxLoadingOverlay{background:#fff url(images/loading.gif) no-repeat 5px 5px;} #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;} /* @@ -55,28 +63,4 @@ .cboxIE #cboxMiddleLeft, .cboxIE #cboxMiddleRight { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); -} - -/* - The following provides PNG transparency support for IE6 - Feel free to remove this and the /ie6/ directory if you have dropped IE6 support. -*/ -.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);} -.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);} -.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);} -.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);} -.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);} -.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);} -.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);} -.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);} - -.cboxIE6 #cboxTopLeft, -.cboxIE6 #cboxTopCenter, -.cboxIE6 #cboxTopRight, -.cboxIE6 #cboxBottomLeft, -.cboxIE6 #cboxBottomCenter, -.cboxIE6 #cboxBottomRight, -.cboxIE6 #cboxMiddleLeft, -.cboxIE6 #cboxMiddleRight { - _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')"); -} +}
\ No newline at end of file diff --git a/library/colorbox/example4/images/border1.png b/library/colorbox/example4/images/border1.png Binary files differindex 0ddc70405..ea73e1592 100644 --- a/library/colorbox/example4/images/border1.png +++ b/library/colorbox/example4/images/border1.png diff --git a/library/colorbox/example4/images/border2.png b/library/colorbox/example4/images/border2.png Binary files differindex aa62a0b72..72cad44ce 100644 --- a/library/colorbox/example4/images/border2.png +++ b/library/colorbox/example4/images/border2.png diff --git a/library/colorbox/example4/images/ie6/borderBottomCenter.png b/library/colorbox/example4/images/ie6/borderBottomCenter.png Binary files differdeleted file mode 100644 index 12e0e9ac0..000000000 --- a/library/colorbox/example4/images/ie6/borderBottomCenter.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderBottomLeft.png b/library/colorbox/example4/images/ie6/borderBottomLeft.png Binary files differdeleted file mode 100644 index b7a474ae0..000000000 --- a/library/colorbox/example4/images/ie6/borderBottomLeft.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderBottomRight.png b/library/colorbox/example4/images/ie6/borderBottomRight.png Binary files differdeleted file mode 100644 index 6b6cb159b..000000000 --- a/library/colorbox/example4/images/ie6/borderBottomRight.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderMiddleLeft.png b/library/colorbox/example4/images/ie6/borderMiddleLeft.png Binary files differdeleted file mode 100644 index 8d0eb739d..000000000 --- a/library/colorbox/example4/images/ie6/borderMiddleLeft.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderMiddleRight.png b/library/colorbox/example4/images/ie6/borderMiddleRight.png Binary files differdeleted file mode 100644 index d65509e30..000000000 --- a/library/colorbox/example4/images/ie6/borderMiddleRight.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderTopCenter.png b/library/colorbox/example4/images/ie6/borderTopCenter.png Binary files differdeleted file mode 100644 index 35d8da2d0..000000000 --- a/library/colorbox/example4/images/ie6/borderTopCenter.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderTopLeft.png b/library/colorbox/example4/images/ie6/borderTopLeft.png Binary files differdeleted file mode 100644 index ae9bda040..000000000 --- a/library/colorbox/example4/images/ie6/borderTopLeft.png +++ /dev/null diff --git a/library/colorbox/example4/images/ie6/borderTopRight.png b/library/colorbox/example4/images/ie6/borderTopRight.png Binary files differdeleted file mode 100644 index 0d8868399..000000000 --- a/library/colorbox/example4/images/ie6/borderTopRight.png +++ /dev/null diff --git a/library/colorbox/example4/images/loading.gif b/library/colorbox/example4/images/loading.gif Binary files differindex 602ce3c3a..1f3a2c0ab 100644 --- a/library/colorbox/example4/images/loading.gif +++ b/library/colorbox/example4/images/loading.gif diff --git a/library/colorbox/example4/index.html b/library/colorbox/example4/index.html index 727fe78d7..8f10b9306 100644 --- a/library/colorbox/example4/index.html +++ b/library/colorbox/example4/index.html @@ -2,24 +2,24 @@ <html> <head> <meta charset='utf-8'/> - <title>ColorBox Examples</title> + <title>Colorbox Examples</title> <style> body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;} a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;} h2{font-size:13px; margin:15px 0 0 0;} </style> <link rel="stylesheet" href="colorbox.css" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="../jquery.colorbox.js"></script> <script> $(document).ready(function(){ - //Examples of how to assign the ColorBox event to elements + //Examples of how to assign the Colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); - $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); + $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390}); $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); @@ -30,6 +30,9 @@ onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, onClosed:function(){ alert('onClosed: colorbox has completely closed'); } }); + + $('.non-retina').colorbox({rel:'group5', transition:'none'}) + $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); //Example of preserving a JavaScript event for inline calls. $("#click").click(function(){ @@ -40,7 +43,7 @@ </script> </head> <body> - <h1>ColorBox Demonstration</h1> + <h1>Colorbox Demonstration</h1> <h2>Elastic Transition</h2> <p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p> <p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p> @@ -63,7 +66,7 @@ <h2>Other Content Types</h2> <p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p> - <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p> + <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p> <p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p> <p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p> <p><a class='inline' href="#inline_content">Inline HTML</a></p> @@ -71,6 +74,11 @@ <h2>Demonstration of using callbacks</h2> <p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p> + + <h2>Retina Images</h2> + <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p> + <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p> + <!-- This contains the hidden content for inline calls --> <div style='display:none'> <div id='inline_content' style='padding:10px; background:#fff;'> @@ -78,7 +86,7 @@ <p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p> <p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p> - <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p> + <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p> <p>Updating Content Example:<br /> <a class="ajax" href="../content/ajax.html">Click here to load new content</a></p> </div> diff --git a/library/colorbox/example5/colorbox.css b/library/colorbox/example5/colorbox.css index 544a76f3b..889f20fea 100644 --- a/library/colorbox/example5/colorbox.css +++ b/library/colorbox/example5/colorbox.css @@ -1,26 +1,27 @@ /* - ColorBox Core Style: + Colorbox Core Style: The following CSS is consistent between example themes and should not be altered. */ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxWrapper {max-width:none;} #cboxOverlay{position:fixed; width:100%; height:100%;} #cboxMiddleLeft, #cboxBottomLeft{clear:left;} #cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} #cboxTitle{margin:0;} #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} +.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} /* User Style: - Change the following styles to modify the appearance of ColorBox. They are + Change the following styles to modify the appearance of Colorbox. They are ordered & tabbed in a way that represents the nesting of the generated HTML. */ -#cboxOverlay{background:#000;} -#colorbox{} +#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);} +#colorbox{outline:0;} #cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;} #cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;} #cboxTopRight{width:14px; height:14px; background:url(images/controls.png) no-repeat -36px 0;} @@ -38,7 +39,12 @@ #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} - #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + #cboxPrevious{left:0px; background-position: -51px -25px;} #cboxPrevious:hover{background-position:-51px 0px;} #cboxNext{left:27px; background-position:-75px -25px;} diff --git a/library/colorbox/example5/images/border.png b/library/colorbox/example5/images/border.png Binary files differindex df13bb6da..c1cd1a2a4 100644 --- a/library/colorbox/example5/images/border.png +++ b/library/colorbox/example5/images/border.png diff --git a/library/colorbox/example5/images/controls.png b/library/colorbox/example5/images/controls.png Binary files differindex 65cfd1dc9..259130cd5 100644 --- a/library/colorbox/example5/images/controls.png +++ b/library/colorbox/example5/images/controls.png diff --git a/library/colorbox/example5/images/loading.gif b/library/colorbox/example5/images/loading.gif Binary files differindex b4695d811..dba33c816 100644 --- a/library/colorbox/example5/images/loading.gif +++ b/library/colorbox/example5/images/loading.gif diff --git a/library/colorbox/example5/images/loading_background.png b/library/colorbox/example5/images/loading_background.png Binary files differindex 9de11f467..23a336b39 100644 --- a/library/colorbox/example5/images/loading_background.png +++ b/library/colorbox/example5/images/loading_background.png diff --git a/library/colorbox/example5/index.html b/library/colorbox/example5/index.html index 727fe78d7..8f10b9306 100644 --- a/library/colorbox/example5/index.html +++ b/library/colorbox/example5/index.html @@ -2,24 +2,24 @@ <html> <head> <meta charset='utf-8'/> - <title>ColorBox Examples</title> + <title>Colorbox Examples</title> <style> body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;} a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;} h2{font-size:13px; margin:15px 0 0 0;} </style> <link rel="stylesheet" href="colorbox.css" /> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="../jquery.colorbox.js"></script> <script> $(document).ready(function(){ - //Examples of how to assign the ColorBox event to elements + //Examples of how to assign the Colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); - $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); + $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390}); $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); @@ -30,6 +30,9 @@ onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, onClosed:function(){ alert('onClosed: colorbox has completely closed'); } }); + + $('.non-retina').colorbox({rel:'group5', transition:'none'}) + $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); //Example of preserving a JavaScript event for inline calls. $("#click").click(function(){ @@ -40,7 +43,7 @@ </script> </head> <body> - <h1>ColorBox Demonstration</h1> + <h1>Colorbox Demonstration</h1> <h2>Elastic Transition</h2> <p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p> <p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p> @@ -63,7 +66,7 @@ <h2>Other Content Types</h2> <p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p> - <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p> + <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p> <p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p> <p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p> <p><a class='inline' href="#inline_content">Inline HTML</a></p> @@ -71,6 +74,11 @@ <h2>Demonstration of using callbacks</h2> <p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p> + + <h2>Retina Images</h2> + <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p> + <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p> + <!-- This contains the hidden content for inline calls --> <div style='display:none'> <div id='inline_content' style='padding:10px; background:#fff;'> @@ -78,7 +86,7 @@ <p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p> <p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p> - <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p> + <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p> <p>Updating Content Example:<br /> <a class="ajax" href="../content/ajax.html">Click here to load new content</a></p> </div> diff --git a/library/colorbox/i18n/jquery.colorbox-ar.js b/library/colorbox/i18n/jquery.colorbox-ar.js new file mode 100644 index 000000000..6c4228cd1 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-ar.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Arabic (ar) + translated by: A.Rhman Sayes +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "الصورة {current} من {total}", + previous: "السابق", + next: "التالي", + close: "إغلاق", + xhrError: "حدث خطأ أثناء تحميل المحتوى.", + imgError: "حدث خطأ أثناء تحميل الصورة.", + slideshowStart: "تشغيل العرض", + slideshowStop: "إيقاف العرض" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-bg.js b/library/colorbox/i18n/jquery.colorbox-bg.js new file mode 100644 index 000000000..de7e4a1d0 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-bg.js @@ -0,0 +1,16 @@ +/* + jQuery Colorbox language configuration + language: Bulgarian (bg) + translated by: Marian M.Bida + site: webmax.bg +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "изображение {current} от {total}", + previous: "предишна", + next: "следваща", + close: "затвори", + xhrError: "Неуспешно зареждане на съдържанието.", + imgError: "Неуспешно зареждане на изображението.", + slideshowStart: "пусни слайд-шоу", + slideshowStop: "спри слайд-шоу" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-bn.js b/library/colorbox/i18n/jquery.colorbox-bn.js new file mode 100644 index 000000000..946229d4c --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-bn.js @@ -0,0 +1,16 @@ +/* +jQuery Colorbox language configuration +language: Bengali (bn) +translated by: Arkaprava Majumder +http://github.com/arkaindas +*/ +jQuery.extend(jQuery.colorbox.settings, { +current: "ছবি {current} এর {total}", +previous: "আগে", +next: "পরে", +close: "বন্ধ", +xhrError: "এই কন্টেন্ট লোড করা যায়নি.", +imgError: "এই ছবিটি লোড করা যায়নি.", +slideshowStart: "স্লাইডশো শুরু", +slideshowStop: "স্লাইডশো বন্ধ" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-ca.js b/library/colorbox/i18n/jquery.colorbox-ca.js new file mode 100644 index 000000000..173c05fdf --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-ca.js @@ -0,0 +1,13 @@ +/* + jQuery Colorbox language configuration + language: Catala (ca) + translated by: eduard salla +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Imatge {current} de {total}", + previous: "Anterior", + next: "Següent", + close: "Tancar", + xhrError: "Error en la càrrega del contingut.", + imgError: "Error en la càrrega de la imatge." +}); diff --git a/library/colorbox/i18n/jquery.colorbox-cs.js b/library/colorbox/i18n/jquery.colorbox-cs.js index 42114c0a7..9649fd455 100644 --- a/library/colorbox/i18n/jquery.colorbox-cs.js +++ b/library/colorbox/i18n/jquery.colorbox-cs.js @@ -1,5 +1,5 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: Czech (cs) translated by: Filip Novak site: mame.napilno.cz/filip-novak @@ -10,5 +10,7 @@ jQuery.extend(jQuery.colorbox.settings, { next: "Následující", close: "Zavřít", xhrError: "Obsah se nepodařilo načíst.", - imgError: "Obrázek se nepodařilo načíst." + imgError: "Obrázek se nepodařilo načíst.", + slideshowStart: "Spustit slideshow", + slideshowStop: "Zastavit slideshow" });
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-da.js b/library/colorbox/i18n/jquery.colorbox-da.js index 66bfb6cd0..676fffed2 100644 --- a/library/colorbox/i18n/jquery.colorbox-da.js +++ b/library/colorbox/i18n/jquery.colorbox-da.js @@ -1,5 +1,5 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: Danish (da) translated by: danieljuhl site: danieljuhl.dk @@ -10,5 +10,7 @@ jQuery.extend(jQuery.colorbox.settings, { next: "Næste", close: "Luk", xhrError: "Indholdet fejlede i indlæsningen.", - imgError: "Billedet fejlede i indlæsningen." + imgError: "Billedet fejlede i indlæsningen.", + slideshowStart: "Start slideshow", + slideshowStop: "Stop slideshow" }); diff --git a/library/colorbox/i18n/jquery.colorbox-de.js b/library/colorbox/i18n/jquery.colorbox-de.js index 3d6e2e147..d489379bc 100644 --- a/library/colorbox/i18n/jquery.colorbox-de.js +++ b/library/colorbox/i18n/jquery.colorbox-de.js @@ -1,5 +1,5 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: German (de) translated by: wallenium */ @@ -9,5 +9,7 @@ jQuery.extend(jQuery.colorbox.settings, { next: "Vor", close: "Schließen", xhrError: "Dieser Inhalt konnte nicht geladen werden.", - imgError: "Dieses Bild konnte nicht geladen werden." + imgError: "Dieses Bild konnte nicht geladen werden.", + slideshowStart: "Slideshow starten", + slideshowStop: "Slideshow anhalten" });
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-es.js b/library/colorbox/i18n/jquery.colorbox-es.js index 6449c66f8..11296fc94 100644 --- a/library/colorbox/i18n/jquery.colorbox-es.js +++ b/library/colorbox/i18n/jquery.colorbox-es.js @@ -1,5 +1,5 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: Spanish (es) translated by: migolo */ diff --git a/library/colorbox/i18n/jquery.colorbox-et.js b/library/colorbox/i18n/jquery.colorbox-et.js new file mode 100644 index 000000000..60a4e888e --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-et.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Estonian (et) + translated by: keevitaja +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "{current}/{total}", + previous: "eelmine", + next: "järgmine", + close: "sulge", + xhrError: "Sisu ei õnnestunud laadida.", + imgError: "Pilti ei õnnestunud laadida.", + slideshowStart: "Käivita slaidid", + slideshowStop: "Peata slaidid" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-fa.js b/library/colorbox/i18n/jquery.colorbox-fa.js new file mode 100644 index 000000000..32869a4c8 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-fa.js @@ -0,0 +1,18 @@ +/*
+ jQuery Colorbox language configuration
+ language: Persian (Farsi)
+ translated by: Mahdi Jaberzadeh Ansari (MJZSoft)
+ site: www.mjzsoft.ir
+ email: mahdijaberzadehansari (at) yahoo.co.uk
+ Please note : Persian language is right to left like arabic.
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "تصویر {current} از {total}",
+ previous: "قبلی",
+ next: "بعدی",
+ close: "بستن",
+ xhrError: "متاسفانه محتویات مورد نظر قابل نمایش نیست.",
+ imgError: "متاسفانه بارگذاری این عکس با مشکل مواجه شده است.",
+ slideshowStart: "آغاز نمایش خودکار",
+ slideshowStop: "توقف نمایش خودکار"
+});
diff --git a/library/colorbox/i18n/jquery.colorbox-fi.js b/library/colorbox/i18n/jquery.colorbox-fi.js new file mode 100644 index 000000000..ac03fe021 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-fi.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Finnish (fi) + translated by: Mikko +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Kuva {current} / {total}", + previous: "Edellinen", + next: "Seuraava", + close: "Sulje", + xhrError: "Sisällön lataaminen epäonnistui.", + imgError: "Kuvan lataaminen epäonnistui.", + slideshowStart: "Aloita kuvaesitys.", + slideshowStop: "Lopeta kuvaesitys." +}); diff --git a/library/colorbox/i18n/jquery.colorbox-fr.js b/library/colorbox/i18n/jquery.colorbox-fr.js index f6afe3fd4..f76352bd4 100644 --- a/library/colorbox/i18n/jquery.colorbox-fr.js +++ b/library/colorbox/i18n/jquery.colorbox-fr.js @@ -1,14 +1,15 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: French (fr) translated by: oaubert */ jQuery.extend(jQuery.colorbox.settings, { -current: "image {current} sur {total}", -previous: "précédente", -next: "suivante", -close: "fermer", -xhrError: "Impossible de charger ce contenu.", -imgError: "Impossible de charger cette image." + current: "image {current} sur {total}", + previous: "précédente", + next: "suivante", + close: "fermer", + xhrError: "Impossible de charger ce contenu.", + imgError: "Impossible de charger cette image.", + slideshowStart: "démarrer la présentation", + slideshowStop: "arrêter la présentation" }); - diff --git a/library/colorbox/i18n/jquery.colorbox-gl.js b/library/colorbox/i18n/jquery.colorbox-gl.js new file mode 100644 index 000000000..3641b51b1 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-gl.js @@ -0,0 +1,13 @@ +/* + jQuery Colorbox language configuration + language: Galician (gl) + translated by: donatorouco +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Imaxe {current} de {total}", + previous: "Anterior", + next: "Seguinte", + close: "Pechar", + xhrError: "Erro na carga do contido.", + imgError: "Erro na carga da imaxe." +}); diff --git a/library/colorbox/i18n/jquery.colorbox-gr.js b/library/colorbox/i18n/jquery.colorbox-gr.js new file mode 100644 index 000000000..0d2c1bb76 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-gr.js @@ -0,0 +1,16 @@ +/* + jQuery Colorbox language configuration + language: Greek (gr) + translated by: S.Demirtzoglou + site: webiq.gr +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Εικόνα {current} από {total}", + previous: "Προηγούμενη", + next: "Επόμενη", + close: "Απόκρυψη", + xhrError: "Το περιεχόμενο δεν μπόρεσε να φορτωθεί.", + imgError: "Απέτυχε η φόρτωση της εικόνας.", + slideshowStart: "Έναρξη παρουσίασης", + slideshowStop: "Παύση παρουσίασης" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-he.js b/library/colorbox/i18n/jquery.colorbox-he.js new file mode 100644 index 000000000..78908e39f --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-he.js @@ -0,0 +1,16 @@ +/* + jQuery Colorbox language configuration + language: Hebrew (he) + translated by: DavidCo + site: DavidCo.me +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "תמונה {current} מתוך {total}", + previous: "הקודם", + next: "הבא", + close: "סגור", + xhrError: "שגיאה בטעינת התוכן.", + imgError: "שגיאה בטעינת התמונה.", + slideshowStart: "התחל מצגת", + slideshowStop: "עצור מצגת" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-hr.js b/library/colorbox/i18n/jquery.colorbox-hr.js new file mode 100644 index 000000000..7eb62becd --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-hr.js @@ -0,0 +1,15 @@ +/*
+ jQuery Colorbox language configuration
+ language: Croatian (hr)
+ translated by: Mladen Bicanic (base.hr)
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Slika {current} od {total}",
+ previous: "Prethodna",
+ next: "Sljedeća",
+ close: "Zatvori",
+ xhrError: "Neuspješno učitavanje sadržaja.",
+ imgError: "Neuspješno učitavanje slike.",
+ slideshowStart: "Pokreni slideshow",
+ slideshowStop: "Zaustavi slideshow"
+});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-hu.js b/library/colorbox/i18n/jquery.colorbox-hu.js new file mode 100644 index 000000000..72e9d36b1 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-hu.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Hungarian (hu) + translated by: kovadani +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "{current}/{total} kép", + previous: "Előző", + next: "Következő", + close: "Bezár", + xhrError: "A tartalmat nem sikerült betölteni.", + imgError: "A képet nem sikerült betölteni.", + slideshowStart: "Diavetítés indítása", + slideshowStop: "Diavetítés leállítása" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-id.js b/library/colorbox/i18n/jquery.colorbox-id.js new file mode 100644 index 000000000..81a62df34 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-id.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Indonesian (id) + translated by: sarwasunda +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "ke {current} dari {total}", + previous: "Sebelumnya", + next: "Berikutnya", + close: "Tutup", + xhrError: "Konten ini tidak dapat dimuat.", + imgError: "Gambar ini tidak dapat dimuat.", + slideshowStart: "Putar", + slideshowStop: "Berhenti" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-it.js b/library/colorbox/i18n/jquery.colorbox-it.js index d67d76cf7..2a4af6453 100644 --- a/library/colorbox/i18n/jquery.colorbox-it.js +++ b/library/colorbox/i18n/jquery.colorbox-it.js @@ -1,5 +1,5 @@ /* - jQuery ColorBox language configuration + jQuery Colorbox language configuration language: Italian (it) translated by: maur8ino */ @@ -9,5 +9,7 @@ jQuery.extend(jQuery.colorbox.settings, { next: "Successiva", close: "Chiudi", xhrError: "Errore nel caricamento del contenuto.", - imgError: "Errore nel caricamento dell'immagine." + imgError: "Errore nel caricamento dell'immagine.", + slideshowStart: "Inizia la presentazione", + slideshowStop: "Termina la presentazione" }); diff --git a/library/colorbox/i18n/jquery.colorbox-ja.js b/library/colorbox/i18n/jquery.colorbox-ja.js new file mode 100644 index 000000000..5480de336 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-ja.js @@ -0,0 +1,15 @@ +/*
+ jQuery Colorbox language configuration
+ language: Japanaese (ja)
+ translated by: Hajime Fujimoto
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "{total}枚中{current}枚目",
+ previous: "前",
+ next: "次",
+ close: "閉じる",
+ xhrError: "コンテンツの読み込みに失敗しました",
+ imgError: "画像の読み込みに失敗しました",
+ slideshowStart: "スライドショー開始",
+ slideshowStop: "スライドショー終了"
+});
diff --git a/library/colorbox/i18n/jquery.colorbox-kr.js b/library/colorbox/i18n/jquery.colorbox-kr.js new file mode 100644 index 000000000..b95702bc0 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-kr.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Korean (kr) + translated by: lunareffect +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "총 {total} 중 {current}", + previous: "이전", + next: "다음", + close: "닫기", + xhrError: "컨텐츠를 불러오는 데 실패했습니다.", + imgError: "이미지를 불러오는 데 실패했습니다.", + slideshowStart: "슬라이드쇼 시작", + slideshowStop: "슬라이드쇼 중지" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-lt.js b/library/colorbox/i18n/jquery.colorbox-lt.js new file mode 100644 index 000000000..a513fcf62 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-lt.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Lithuanian (lt) + translated by: Tomas Norkūnas +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Nuotrauka {current} iš {total}", + previous: "Atgal", + next: "Pirmyn", + close: "Uždaryti", + xhrError: "Nepavyko užkrauti turinio.", + imgError: "Nepavyko užkrauti nuotraukos.", + slideshowStart: "Pradėti automatinę peržiūrą", + slideshowStop: "Sustabdyti automatinę peržiūrą" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-lv.js b/library/colorbox/i18n/jquery.colorbox-lv.js new file mode 100644 index 000000000..e376366b9 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-lv.js @@ -0,0 +1,16 @@ +/* + jQuery Colorbox language configuration + language: Latvian (lv) + translated by: Matiss Roberts Treinis + site: x0.lv +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "attēls {current} no {total}", + previous: "iepriekšējais", + next: "nākamais", + close: "aizvērt", + xhrError: "Neizdevās ielādēt saturu.", + imgError: "Neizdevās ielādēt attēlu.", + slideshowStart: "sākt slaidrādi", + slideshowStop: "apturēt slaidrādi" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-my.js b/library/colorbox/i18n/jquery.colorbox-my.js new file mode 100644 index 000000000..216e252cc --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-my.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Myanmar (my) + translated by: Yan Naing +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "ပုံ {total} မှာ {current} မြောက်ပုံ", + previous: "ရှေ့သို့", + next: "နောက်သို့", + close: "ပိတ်မည်", + xhrError: "ပါဝင်သော အကြောင်းအရာများ ဖော်ပြရာတွင် အနည်းငယ် ချို့ယွင်းမှုရှိနေပါသည်", + imgError: "ပုံပြသရာတွင် အနည်းငယ် ချို့ယွင်းချက် ရှိနေပါသည်", + slideshowStart: "ပုံများ စတင်ပြသမည်", + slideshowStop: "ပုံပြသခြင်း ရပ်ဆိုင်မည်" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-nl.js b/library/colorbox/i18n/jquery.colorbox-nl.js new file mode 100644 index 000000000..dfc658ec9 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-nl.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Dutch (nl) + translated by: barryvdh +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Afbeelding {current} van {total}", + previous: "Vorige", + next: "Volgende", + close: "Sluiten", + xhrError: "Deze inhoud kan niet geladen worden.", + imgError: "Deze afbeelding kan niet geladen worden.", + slideshowStart: "Diashow starten", + slideshowStop: "Diashow stoppen" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-no.js b/library/colorbox/i18n/jquery.colorbox-no.js new file mode 100644 index 000000000..277c5d3f9 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-no.js @@ -0,0 +1,16 @@ +/* + jQuery Colorbox language configuration + language: Norwegian (no) + translated by: lars-erik + site: markedspartner.no +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Bilde {current} av {total}", + previous: "Forrige", + next: "Neste", + close: "Lukk", + xhrError: "Feil ved lasting av innhold.", + imgError: "Feil ved lasting av bilde.", + slideshowStart: "Start lysbildefremvisning", + slideshowStop: "Stopp lysbildefremvisning" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-pl.js b/library/colorbox/i18n/jquery.colorbox-pl.js new file mode 100644 index 000000000..1c04dae18 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-pl.js @@ -0,0 +1,16 @@ +/*
+ jQuery Colorbox language configuration
+ language: Polski (pl)
+ translated by: Tomasz Wasiński
+ site: 2bevisible.pl
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "{current}. obrazek z {total}",
+ previous: "Poprzedni",
+ next: "Następny",
+ close: "Zamknij",
+ xhrError: "Nie udało się załadować treści.",
+ imgError: "Nie udało się załadować obrazka.",
+ slideshowStart: "rozpocznij pokaz slajdów",
+ slideshowStop: "zatrzymaj pokaz slajdów"
+});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-pt-BR.js b/library/colorbox/i18n/jquery.colorbox-pt-BR.js new file mode 100644 index 000000000..a405d93df --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-pt-BR.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Brazilian Portuguese (pt-BR) + translated by: ReinaldoMT +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Imagem {current} de {total}", + previous: "Anterior", + next: "Próxima", + close: "Fechar", + slideshowStart: "iniciar apresentação de slides", + slideshowStop: "parar apresentação de slides", + xhrError: "Erro ao carregar o conteúdo.", + imgError: "Erro ao carregar a imagem." +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-ro.js b/library/colorbox/i18n/jquery.colorbox-ro.js new file mode 100644 index 000000000..0a461e28a --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-ro.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Romanian (ro) + translated by: shurub3l +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "imagine {current} din {total}", + previous: "precedenta", + next: "următoarea", + close: "închideți", + xhrError: "Acest conținut nu poate fi încărcat.", + imgError: "Această imagine nu poate fi încărcată", + slideshowStart: "începeți prezentarea (slideshow)", + slideshowStop: "opriți prezentarea (slideshow)" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-ru.js b/library/colorbox/i18n/jquery.colorbox-ru.js index c9c220068..1d88b8cda 100644 --- a/library/colorbox/i18n/jquery.colorbox-ru.js +++ b/library/colorbox/i18n/jquery.colorbox-ru.js @@ -1,14 +1,16 @@ /*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: Russian (ru)
translated by: Marfa
- site: themarfa.name
+ site: themarfa.name
*/
jQuery.extend(jQuery.colorbox.settings, {
current: "изображение {current} из {total}",
- previous: "предыдущее",
- next: "следующее",
+ previous: "назад",
+ next: "вперёд",
close: "закрыть",
xhrError: "Не удалось загрузить содержимое.",
- imgError: "Не удалось загрузить изображение."
+ imgError: "Не удалось загрузить изображение.",
+ slideshowStart: "начать слайд-шоу",
+ slideshowStop: "остановить слайд-шоу"
});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-si.js b/library/colorbox/i18n/jquery.colorbox-si.js new file mode 100644 index 000000000..034b5b3c4 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-si.js @@ -0,0 +1,15 @@ +/*
+ jQuery Colorbox language configuration
+ language: Slovenian (si)
+ translated by: Boštjan Pišler (pisler.si)
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Slika {current} od {total}",
+ previous: "Prejšnja",
+ next: "Naslednja",
+ close: "Zapri",
+ xhrError: "Vsebine ni bilo mogoče naložiti.",
+ imgError: "Slike ni bilo mogoče naložiti.",
+ slideshowStart: "Zaženi prezentacijo",
+ slideshowStop: "Zaustavi prezentacijo"
+});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-sk.js b/library/colorbox/i18n/jquery.colorbox-sk.js new file mode 100644 index 000000000..faa9291cb --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-sk.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Slovak (sk) + translated by: Jaroslav Kostal +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "{current}. obrázok z {total}", + previous: "Predchádzajúci", + next: "Následujúci", + close: "Zatvoriť", + xhrError: "Obsah sa nepodarilo načítať.", + imgError: "Obrázok sa nepodarilo načítať.", + slideshowStart: "Spustiť slideshow", + slideshowStop: "zastaviť slideshow" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-sr.js b/library/colorbox/i18n/jquery.colorbox-sr.js new file mode 100644 index 000000000..618e73c4a --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-sr.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Serbian (sr) + translated by: Sasa Stefanovic (baguje.com) +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Slika {current} od {total}", + previous: "Prethodna", + next: "Sledeća", + close: "Zatvori", + xhrError: "Neuspešno učitavanje sadržaja.", + imgError: "Neuspešno učitavanje slike.", + slideshowStart: "Pokreni slideshow", + slideshowStop: "Zaustavi slideshow" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-sv.js b/library/colorbox/i18n/jquery.colorbox-sv.js new file mode 100644 index 000000000..01bb1d8c6 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-sv.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Swedish (sv) + translated by: Mattias Reichel +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Bild {current} av {total}", + previous: "Föregående", + next: "Nästa", + close: "Stäng", + xhrError: "Innehållet kunde inte laddas.", + imgError: "Den här bilden kunde inte laddas.", + slideshowStart: "Starta bildspel", + slideshowStop: "Stoppa bildspel" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-tr.js b/library/colorbox/i18n/jquery.colorbox-tr.js new file mode 100644 index 000000000..d467c2ef1 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-tr.js @@ -0,0 +1,19 @@ +/* + jQuery Colorbox language configuration + language: Turkish (tr) + translated by: Caner ÖNCEL + site: egonomik.com + + edited by: Sinan Eldem + www.sinaneldem.com.tr +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "Görsel {current} / {total}", + previous: "Önceki", + next: "Sonraki", + close: "Kapat", + xhrError: "İçerik yüklenirken hata meydana geldi.", + imgError: "Resim yüklenirken hata meydana geldi.", + slideshowStart: "Slaytı Başlat", + slideshowStop: "Slaytı Durdur" +}); diff --git a/library/colorbox/i18n/jquery.colorbox-uk.js b/library/colorbox/i18n/jquery.colorbox-uk.js new file mode 100644 index 000000000..3f786d3f4 --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-uk.js @@ -0,0 +1,16 @@ +/* + jQuery ColorBox language configuration + language: Ukrainian (uk) + translated by: Andrew + http://acisoftware.com.ua +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "зображення {current} з {total}", + previous: "попереднє", + next: "наступне", + close: "закрити", + xhrError: "Не вдалося завантажити вміст.", + imgError: "Не вдалося завантажити зображення.", + slideshowStart: "почати слайд-шоу", + slideshowStop: "зупинити слайд-шоу" +});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-zh-CN.js b/library/colorbox/i18n/jquery.colorbox-zh-CN.js new file mode 100644 index 000000000..770d8eacf --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-zh-CN.js @@ -0,0 +1,15 @@ +/*
+ jQuery Colorbox language configuration
+ language: Chinese Simplified (zh-CN)
+ translated by: zhao weiming
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "当前图像 {current} 总共 {total}",
+ previous: "前一页",
+ next: "后一页",
+ close: "关闭",
+ xhrError: "此内容无法加载",
+ imgError: "此图片无法加载",
+ slideshowStart: "开始播放幻灯片",
+ slideshowStop: "停止播放幻灯片"
+});
\ No newline at end of file diff --git a/library/colorbox/i18n/jquery.colorbox-zh-TW.js b/library/colorbox/i18n/jquery.colorbox-zh-TW.js new file mode 100644 index 000000000..b0c4f123d --- /dev/null +++ b/library/colorbox/i18n/jquery.colorbox-zh-TW.js @@ -0,0 +1,15 @@ +/* + jQuery Colorbox language configuration + language: Chinese Traditional (zh-TW) + translated by: Atans Chiu +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "圖片 {current} 總共 {total}", + previous: "上一頁", + next: "下一頁", + close: "關閉", + xhrError: "此內容加載失敗.", + imgError: "此圖片加載失敗.", + slideshowStart: "開始幻燈片", + slideshowStop: "結束幻燈片" +});
\ No newline at end of file diff --git a/library/colorbox/images/border.png b/library/colorbox/images/border.png Binary files differdeleted file mode 100644 index df13bb6da..000000000 --- a/library/colorbox/images/border.png +++ /dev/null diff --git a/library/colorbox/images/controls.png b/library/colorbox/images/controls.png Binary files differdeleted file mode 100644 index 65cfd1dc9..000000000 --- a/library/colorbox/images/controls.png +++ /dev/null diff --git a/library/colorbox/images/loading.gif b/library/colorbox/images/loading.gif Binary files differdeleted file mode 100644 index b4695d811..000000000 --- a/library/colorbox/images/loading.gif +++ /dev/null diff --git a/library/colorbox/images/loading_background.png b/library/colorbox/images/loading_background.png Binary files differdeleted file mode 100644 index 9de11f467..000000000 --- a/library/colorbox/images/loading_background.png +++ /dev/null diff --git a/library/colorbox/jquery.colorbox-min.js b/library/colorbox/jquery.colorbox-min.js index 969064042..c0cbe5cb7 100644 --- a/library/colorbox/jquery.colorbox-min.js +++ b/library/colorbox/jquery.colorbox-min.js @@ -1 +1,6 @@ -(function($,document,window){var defaults={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:.9,preloading:true,className:false,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:false,returnFocus:true,reposition:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:undefined},colorbox="colorbox",prefix="cbox",boxElement=prefix+"Element",event_open=prefix+"_open",event_load=prefix+"_load",event_complete=prefix+"_complete",event_cleanup=prefix+"_cleanup",event_closed=prefix+"_closed",event_purge=prefix+"_purge",isIE=!$.support.leadingWhitespace,isIE6=isIE&&!window.XMLHttpRequest,event_ie6=prefix+"_IE6",$overlay,$box,$wrap,$content,$topBorder,$leftBorder,$rightBorder,$bottomBorder,$related,$window,$loaded,$loadingBay,$loadingOverlay,$title,$current,$slideshow,$next,$prev,$close,$groupControls,$events=$({}),settings,interfaceHeight,interfaceWidth,loadedHeight,loadedWidth,element,index,photo,open,active,closing,loadingTimer,publicMethod,div="div",className,init;function $tag(tag,id,css){var element=document.createElement(tag);if(id){element.id=prefix+id}if(css){element.style.cssText=css}return $(element)}function getIndex(increment){var max=$related.length,newIndex=(index+increment)%max;return newIndex<0?max+newIndex:newIndex}function setSize(size,dimension){return Math.round((/%/.test(size)?(dimension==="x"?$window.width():$window.height())/100:1)*parseInt(size,10))}function isImage(url){return settings.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url)}function makeSettings(){var i,data=$.data(element,colorbox);if(data==null){settings=$.extend({},defaults);if(console&&console.log){console.log("Error: cboxElement missing settings object")}}else{settings=$.extend({},data)}for(i in settings){if($.isFunction(settings[i])&&i.slice(0,2)!=="on"){settings[i]=settings[i].call(element)}}settings.rel=settings.rel||element.rel||$(element).data("rel")||"nofollow";settings.href=settings.href||$(element).attr("href");settings.title=settings.title||element.title;if(typeof settings.href==="string"){settings.href=$.trim(settings.href)}}function trigger(event,callback){$(document).trigger(event);$events.trigger(event);if($.isFunction(callback)){callback.call(element)}}function slideshow(){var timeOut,className=prefix+"Slideshow_",click="click."+prefix,clear,set,start,stop;if(settings.slideshow&&$related[1]){clear=function(){clearTimeout(timeOut)};set=function(){if(settings.loop||$related[index+1]){timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed)}};start=function(){$slideshow.html(settings.slideshowStop).unbind(click).one(click,stop);$events.bind(event_complete,set).bind(event_load,clear).bind(event_cleanup,stop);$box.removeClass(className+"off").addClass(className+"on")};stop=function(){clear();$events.unbind(event_complete,set).unbind(event_load,clear).unbind(event_cleanup,stop);$slideshow.html(settings.slideshowStart).unbind(click).one(click,function(){publicMethod.next();start()});$box.removeClass(className+"on").addClass(className+"off")};if(settings.slideshowAuto){start()}else{stop()}}else{$box.removeClass(className+"off "+className+"on")}}function launch(target){if(!closing){element=target;makeSettings();$related=$(element);index=0;if(settings.rel!=="nofollow"){$related=$("."+boxElement).filter(function(){var data=$.data(this,colorbox),relRelated;if(data){relRelated=$(this).data("rel")||data.rel||this.rel}return relRelated===settings.rel});index=$related.index(element);if(index===-1){$related=$related.add(element);index=$related.length-1}}if(!open){open=active=true;$box.css({visibility:"hidden",display:"block"});$loaded=$tag(div,"LoadedContent","width:0; height:0; overflow:hidden").appendTo($content);interfaceHeight=$topBorder.height()+$bottomBorder.height()+$content.outerHeight(true)-$content.height();interfaceWidth=$leftBorder.width()+$rightBorder.width()+$content.outerWidth(true)-$content.width();loadedHeight=$loaded.outerHeight(true);loadedWidth=$loaded.outerWidth(true);if(settings.returnFocus){$(element).blur();$events.one(event_closed,function(){$(element).focus()})}$overlay.css({opacity:parseFloat(settings.opacity),cursor:settings.overlayClose?"pointer":"auto",visibility:"visible"}).show();settings.w=setSize(settings.initialWidth,"x");settings.h=setSize(settings.initialHeight,"y");publicMethod.position();if(isIE6){$window.bind("resize."+event_ie6+" scroll."+event_ie6,function(){$overlay.css({width:$window.width(),height:$window.height(),top:$window.scrollTop(),left:$window.scrollLeft()})}).trigger("resize."+event_ie6)}slideshow();trigger(event_open,settings.onOpen);$groupControls.add($title).hide();$close.html(settings.close).show()}publicMethod.load(true)}}function appendHTML(){if(!$box&&document.body){init=false;$window=$(window);$box=$tag(div).attr({id:colorbox,"class":isIE?prefix+(isIE6?"IE6":"IE"):""}).hide();$overlay=$tag(div,"Overlay",isIE6?"position:absolute":"").hide();$loadingOverlay=$tag(div,"LoadingOverlay").add($tag(div,"LoadingGraphic"));$wrap=$tag(div,"Wrapper");$content=$tag(div,"Content").append($title=$tag(div,"Title"),$current=$tag(div,"Current"),$next=$tag(div,"Next"),$prev=$tag(div,"Previous"),$slideshow=$tag(div,"Slideshow"),$close=$tag(div,"Close"));$wrap.append($tag(div).append($tag(div,"TopLeft"),$topBorder=$tag(div,"TopCenter"),$tag(div,"TopRight")),$tag(div,false,"clear:left").append($leftBorder=$tag(div,"MiddleLeft"),$content,$rightBorder=$tag(div,"MiddleRight")),$tag(div,false,"clear:left").append($tag(div,"BottomLeft"),$bottomBorder=$tag(div,"BottomCenter"),$tag(div,"BottomRight"))).find("div div").css({"float":"left"});$loadingBay=$tag(div,false,"position:absolute; width:9999px; visibility:hidden; display:none");$groupControls=$next.add($prev).add($current).add($slideshow);$(document.body).append($overlay,$box.append($wrap,$loadingBay))}}function addBindings(){function clickHandler(e){if(!(e.which>1||e.shiftKey||e.altKey||e.metaKey)){e.preventDefault();launch(this)}}if($box){if(!init){init=true;$next.click(function(){publicMethod.next()});$prev.click(function(){publicMethod.prev()});$close.click(function(){publicMethod.close()});$overlay.click(function(){if(settings.overlayClose){publicMethod.close()}});$(document).bind("keydown."+prefix,function(e){var key=e.keyCode;if(open&&settings.escKey&&key===27){e.preventDefault();publicMethod.close()}if(open&&settings.arrowKey&&$related[1]){if(key===37){e.preventDefault();$prev.click()}else if(key===39){e.preventDefault();$next.click()}}});if($.isFunction($.fn.on)){$(document).on("click."+prefix,"."+boxElement,clickHandler)}else{$("."+boxElement).live("click."+prefix,clickHandler)}}return true}return false}if($.colorbox){return}$(appendHTML);publicMethod=$.fn[colorbox]=$[colorbox]=function(options,callback){var $this=this;options=options||{};appendHTML();if(addBindings()){if($.isFunction($this)){$this=$("<a/>");options.open=true}else if(!$this[0]){return $this}if(callback){options.onComplete=callback}$this.each(function(){$.data(this,colorbox,$.extend({},$.data(this,colorbox)||defaults,options))}).addClass(boxElement);if($.isFunction(options.open)&&options.open.call($this)||options.open){launch($this[0])}}return $this};publicMethod.position=function(speed,loadedCallback){var css,top=0,left=0,offset=$box.offset(),scrollTop,scrollLeft;$window.unbind("resize."+prefix);$box.css({top:-9e4,left:-9e4});scrollTop=$window.scrollTop();scrollLeft=$window.scrollLeft();if(settings.fixed&&!isIE6){offset.top-=scrollTop;offset.left-=scrollLeft;$box.css({position:"fixed"})}else{top=scrollTop;left=scrollLeft;$box.css({position:"absolute"})}if(settings.right!==false){left+=Math.max($window.width()-settings.w-loadedWidth-interfaceWidth-setSize(settings.right,"x"),0)}else if(settings.left!==false){left+=setSize(settings.left,"x")}else{left+=Math.round(Math.max($window.width()-settings.w-loadedWidth-interfaceWidth,0)/2)}if(settings.bottom!==false){top+=Math.max($window.height()-settings.h-loadedHeight-interfaceHeight-setSize(settings.bottom,"y"),0)}else if(settings.top!==false){top+=setSize(settings.top,"y")}else{top+=Math.round(Math.max($window.height()-settings.h-loadedHeight-interfaceHeight,0)/2)}$box.css({top:offset.top,left:offset.left,visibility:"visible"});speed=$box.width()===settings.w+loadedWidth&&$box.height()===settings.h+loadedHeight?0:speed||0;$wrap[0].style.width=$wrap[0].style.height="9999px";function modalDimensions(that){$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=parseInt(that.style.width,10)-interfaceWidth+"px";$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=parseInt(that.style.height,10)-interfaceHeight+"px"}css={width:settings.w+loadedWidth+interfaceWidth,height:settings.h+loadedHeight+interfaceHeight,top:top,left:left};if(speed===0){$box.css(css)}$box.dequeue().animate(css,{duration:speed,complete:function(){modalDimensions(this);active=false;$wrap[0].style.width=settings.w+loadedWidth+interfaceWidth+"px";$wrap[0].style.height=settings.h+loadedHeight+interfaceHeight+"px";if(settings.reposition){setTimeout(function(){$window.bind("resize."+prefix,publicMethod.position)},1)}if(loadedCallback){loadedCallback()}},step:function(){modalDimensions(this)}})};publicMethod.resize=function(options){if(open){options=options||{};if(options.width){settings.w=setSize(options.width,"x")-loadedWidth-interfaceWidth}if(options.innerWidth){settings.w=setSize(options.innerWidth,"x")}$loaded.css({width:settings.w});if(options.height){settings.h=setSize(options.height,"y")-loadedHeight-interfaceHeight}if(options.innerHeight){settings.h=setSize(options.innerHeight,"y")}if(!options.innerHeight&&!options.height){$loaded.css({height:"auto"});settings.h=$loaded.height()}$loaded.css({height:settings.h});publicMethod.position(settings.transition==="none"?0:settings.speed)}};publicMethod.prep=function(object){if(!open){return}var callback,speed=settings.transition==="none"?0:settings.speed;$loaded.empty().remove();$loaded=$tag(div,"LoadedContent").append(object);function getWidth(){settings.w=settings.w||$loaded.width();settings.w=settings.mw&&settings.mw<settings.w?settings.mw:settings.w;return settings.w}function getHeight(){settings.h=settings.h||$loaded.height();settings.h=settings.mh&&settings.mh<settings.h?settings.mh:settings.h;return settings.h}$loaded.hide().appendTo($loadingBay.show()).css({width:getWidth(),overflow:settings.scrolling?"auto":"hidden"}).css({height:getHeight()}).prependTo($content);$loadingBay.hide();$(photo).css({"float":"none"});callback=function(){var total=$related.length,iframe,frameBorder="frameBorder",allowTransparency="allowTransparency",complete;if(!open){return}function removeFilter(){if(isIE){$box[0].style.removeAttribute("filter")}}complete=function(){clearTimeout(loadingTimer);$loadingOverlay.remove();trigger(event_complete,settings.onComplete)};if(isIE){if(photo){$loaded.fadeIn(100)}}$title.html(settings.title).add($loaded).show();if(total>1){if(typeof settings.current==="string"){$current.html(settings.current.replace("{current}",index+1).replace("{total}",total)).show()}$next[settings.loop||index<total-1?"show":"hide"]().html(settings.next);$prev[settings.loop||index?"show":"hide"]().html(settings.previous);if(settings.slideshow){$slideshow.show()}if(settings.preloading){$.each([getIndex(-1),getIndex(1)],function(){var src,img,i=$related[this],data=$.data(i,colorbox);if(data&&data.href){src=data.href;if($.isFunction(src)){src=src.call(i)}}else{src=$(i).attr("href")}if(src&&(isImage(src)||data.photo)){img=new Image;img.src=src}})}}else{$groupControls.hide()}if(settings.iframe){iframe=$tag("iframe")[0];if(frameBorder in iframe){iframe[frameBorder]=0}if(allowTransparency in iframe){iframe[allowTransparency]="true"}if(!settings.scrolling){iframe.scrolling="no"}$(iframe).attr({src:settings.href,name:(new Date).getTime(),"class":prefix+"Iframe",allowFullScreen:true,webkitAllowFullScreen:true,mozallowfullscreen:true}).one("load",complete).appendTo($loaded);$events.one(event_purge,function(){iframe.src="//about:blank"});if(settings.fastIframe){$(iframe).trigger("load")}}else{complete()}if(settings.transition==="fade"){$box.fadeTo(speed,1,removeFilter)}else{removeFilter()}};if(settings.transition==="fade"){$box.fadeTo(speed,0,function(){publicMethod.position(0,callback)})}else{publicMethod.position(speed,callback)}};publicMethod.load=function(launched){var href,setResize,prep=publicMethod.prep,$inline;active=true;photo=false;element=$related[index];if(!launched){makeSettings()}if(className){$box.add($overlay).removeClass(className)}if(settings.className){$box.add($overlay).addClass(settings.className)}className=settings.className;trigger(event_purge);trigger(event_load,settings.onLoad);settings.h=settings.height?setSize(settings.height,"y")-loadedHeight-interfaceHeight:settings.innerHeight&&setSize(settings.innerHeight,"y");settings.w=settings.width?setSize(settings.width,"x")-loadedWidth-interfaceWidth:settings.innerWidth&&setSize(settings.innerWidth,"x");settings.mw=settings.w;settings.mh=settings.h;if(settings.maxWidth){settings.mw=setSize(settings.maxWidth,"x")-loadedWidth-interfaceWidth;settings.mw=settings.w&&settings.w<settings.mw?settings.w:settings.mw}if(settings.maxHeight){settings.mh=setSize(settings.maxHeight,"y")-loadedHeight-interfaceHeight;settings.mh=settings.h&&settings.h<settings.mh?settings.h:settings.mh}href=settings.href;loadingTimer=setTimeout(function(){$loadingOverlay.appendTo($content)},100);if(settings.inline){$inline=$tag(div).hide().insertBefore($(href)[0]);$events.one(event_purge,function(){$inline.replaceWith($loaded.children())});prep($(href))}else if(settings.iframe){prep(" ")}else if(settings.html){prep(settings.html)}else if(isImage(href)){$(photo=new Image).addClass(prefix+"Photo").bind("error",function(){settings.title=false;prep($tag(div,"Error").html(settings.imgError))}).one("load",function(){var percent;if(settings.scalePhotos){setResize=function(){photo.height-=photo.height*percent;photo.width-=photo.width*percent};if(settings.mw&&photo.width>settings.mw){percent=(photo.width-settings.mw)/photo.width;setResize()}if(settings.mh&&photo.height>settings.mh){percent=(photo.height-settings.mh)/photo.height;setResize()}}if(settings.h){photo.style.marginTop=Math.max(settings.mh-photo.height,0)/2+"px"}if($related[1]&&(settings.loop||$related[index+1])){photo.style.cursor="pointer";photo.onclick=function(){publicMethod.next()}}if(isIE){photo.style.msInterpolationMode="bicubic"}setTimeout(function(){prep(photo)},1)});setTimeout(function(){photo.src=href},1)}else if(href){$loadingBay.load(href,settings.data,function(data,status){prep(status==="error"?$tag(div,"Error").html(settings.xhrError):$(this).contents())})}};publicMethod.next=function(){if(!active&&$related[1]&&(settings.loop||$related[index+1])){index=getIndex(1);publicMethod.load()}};publicMethod.prev=function(){if(!active&&$related[1]&&(settings.loop||index)){index=getIndex(-1);publicMethod.load()}};publicMethod.close=function(){if(open&&!closing){closing=true;open=false;trigger(event_cleanup,settings.onCleanup);$window.unbind("."+prefix+" ."+event_ie6);$overlay.fadeTo(200,0);$box.stop().fadeTo(300,0,function(){$box.add($overlay).css({opacity:1,cursor:"auto"}).hide();trigger(event_purge);$loaded.empty().remove();setTimeout(function(){closing=false;trigger(event_closed,settings.onClosed)},1)})}};publicMethod.remove=function(){$([]).add($box).add($overlay).remove();$box=null;$("."+boxElement).removeData(colorbox).removeClass(boxElement);$(document).unbind("click."+prefix)};publicMethod.element=function(){return $(element)};publicMethod.settings=defaults})(jQuery,document,window);
\ No newline at end of file +/*! + Colorbox 1.5.14 + license: MIT + http://www.jacklmoore.com/colorbox +*/ +(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(z+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in y[0]&&!y[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),y.focus())}function c(t){c.str!==t&&(y.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){z=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),z=W.index(_.el),-1===z&&(W=W.add(_.el),z=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),y.css({visibility:"hidden",display:"block",opacity:""}),L=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(L),D=T.height()+k.height()+b.outerHeight(!0)-b.height(),j=C.width()+H.width()+b.outerWidth(!0)-b.width(),A=L.outerHeight(!0),N=L.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=(l!==!1?Math.min(h,a(l,"x")):h)-N-j,_.h=(f!==!1?Math.min(s,a(f,"y")):s)-A-D,L.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),y.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){y||(V=!1,E=t(i),y=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),S=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),x=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),I=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),R=n("button","Slideshow"),S),B=t('<button type="button"/>').attr({id:Z+"Close"}),x.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(I).add(R)),e.body&&!y.parent().length&&t(e.body).append(v,y.append(x,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return y?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-A-D:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-N-j:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-N-j,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-A-D,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){S.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=new Image,t(U).addClass(Z+"Photo").bind("error",function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;t.each(["alt","longdesc","aria-describedby"],function(e,i){var n=t(_.el).attr(i)||t(_.el).attr("data-"+i);n&&U.setAttribute(i,n)}),_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[z+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,y,x,b,T,C,H,k,W,E,L,M,S,F,I,R,K,P,B,O,_,D,j,A,N,z,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[z+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){R.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),y.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),R.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),y.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,R.hide(),t(),ae.unbind(ne,e).unbind(ie,t),y.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),R.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;if(e=e||{},t.isFunction(o))o=t("<a/>"),e.open=!0;else if(!o[0])return o;return o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(y[0].style.width,10)-j+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(y[0].style.height,10)-D+"px"}var r,h,s,l=0,d=0,c=y.offset();if(E.unbind("resize."+Z),y.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,y.css({position:"fixed"})):(l=h,d=s,y.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-N-j-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-N-j,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-A-D-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-A-D,0)/2),y.css({top:c.top,left:c.left,visibility:"visible"}),x[0].style.width=x[0].style.height="9999px",r={width:_.w+N+j,height:_.h+A+D,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||y.css(r),y.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,x[0].style.width=_.w+N+j+"px",x[0].style.height=_.h+A+D+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-N-j),t.innerWidth&&(_.w=a(t.innerWidth,"x")),L.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-A-D),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=L.scrollTop(),L.css({height:"auto"}),_.h=L.height()),L.css({height:_.h}),e&&L.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||L.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||L.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");L.remove(),L=n(se,"LoadedContent").append(i),L.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&y[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),S.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),L.show(),a>1?("string"==typeof _.get("current")&&I.html(_.get("current").replace("{current}",z+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>z?"show":"hide"]().html(_.get("next")),P[_.get("loop")||z?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=e.createElement("iframe"),"frameBorder"in n&&(n.frameBorder=0),"allowTransparency"in n&&(n.allowTransparency="true"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),name:(new Date).getTime(),"class":Z+"Iframe",allowFullScreen:!0}).one("load",o).appendTo(L),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?y.fadeTo(g,1,i):i())},"fade"===_.get("transition")?y.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[z+1])&&(z=h(1),f(W[z]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||z)&&(z=h(-1),f(W[z]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),y.stop().fadeTo(_.get("fadeOut")||0,0,function(){y.hide(),v.hide(),u(he),L.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){y&&(y.stop(),t[Y].close(),y.stop(!1,!0).remove(),v.remove(),G=!1,y=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
\ No newline at end of file diff --git a/library/colorbox/jquery.colorbox.js b/library/colorbox/jquery.colorbox.js index 5b9aecdc2..c0348849e 100644 --- a/library/colorbox/jquery.colorbox.js +++ b/library/colorbox/jquery.colorbox.js @@ -1,15 +1,23 @@ -/* - jQuery ColorBox v1.3.32 - 2013-01-31 - (c) 2013 Jack Moore - jacklmoore.com/colorbox - license: http://www.opensource.org/licenses/mit-license.php +/*! + Colorbox 1.5.14 + license: MIT + http://www.jacklmoore.com/colorbox */ (function ($, document, window) { var // Default settings object. // See http://jacklmoore.com/colorbox for details. defaults = { + // data sources + html: false, + photo: false, + iframe: false, + inline: false, + + // behavior and appearance transition: "elastic", speed: 300, + fadeOut: 300, width: false, initialWidth: "600", innerWidth: false, @@ -20,18 +28,36 @@ maxHeight: false, scalePhotos: true, scrolling: true, - inline: false, - html: false, - iframe: false, - fastIframe: true, - photo: false, - href: false, - title: false, - rel: false, opacity: 0.9, preloading: true, className: false, + overlayClose: true, + escKey: true, + arrowKey: true, + top: false, + bottom: false, + left: false, + right: false, + fixed: false, + data: undefined, + closeButton: true, + fastIframe: true, + open: false, + reposition: true, + loop: true, + slideshow: false, + slideshowAuto: true, + slideshowSpeed: 2500, + slideshowStart: "start slideshow", + slideshowStop: "stop slideshow", + photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i, + + // alternate image paths for high-res displays + retinaImage: false, + retinaUrl: false, + retinaSuffix: '@2x.$1', + // internationalization current: "image {current} of {total}", previous: "previous", next: "next", @@ -39,31 +65,29 @@ xhrError: "This content failed to load.", imgError: "This image failed to load.", - open: false, + // accessbility returnFocus: true, - reposition: true, - loop: true, - slideshow: false, - slideshowAuto: true, - slideshowSpeed: 2500, - slideshowStart: "start slideshow", - slideshowStop: "stop slideshow", + trapFocus: true, + + // callbacks onOpen: false, onLoad: false, onComplete: false, onCleanup: false, onClosed: false, - overlayClose: true, - escKey: true, - arrowKey: true, - top: false, - bottom: false, - left: false, - right: false, - fixed: false, - data: undefined + + rel: function() { + return this.rel; + }, + href: function() { + // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container') + return $(this).attr('href'); + }, + title: function() { + return this.title; + } }, - + // Abstracting the HTML and event identifiers for easy rebranding colorbox = 'colorbox', prefix = 'cbox', @@ -76,11 +100,6 @@ event_cleanup = prefix + '_cleanup', event_closed = prefix + '_closed', event_purge = prefix + '_purge', - - // Special Handling for IE - isIE = !$.support.leadingWhitespace, // IE6 to IE8 - isIE6 = isIE && !window.XMLHttpRequest, // IE6 - event_ie6 = prefix + '_IE6', // Cached jQuery Object Variables $overlay, @@ -103,7 +122,7 @@ $prev, $close, $groupControls, - $events = $({}), + $events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2 // Variables for cached values or use across multiple functions settings, @@ -111,7 +130,6 @@ interfaceWidth, loadedHeight, loadedWidth, - element, index, photo, open, @@ -120,14 +138,15 @@ loadingTimer, publicMethod, div = "div", - className, + requests = 0, + previousCSS = {}, init; // **************** // HELPER FUNCTIONS // **************** - // Convience function for creating new jQuery objects + // Convenience function for creating new jQuery objects function $tag(tag, id, css) { var element = document.createElement(tag); @@ -141,6 +160,44 @@ return $(element); } + + // Get the window height using innerHeight when available to avoid an issue with iOS + // http://bugs.jquery.com/ticket/6724 + function winheight() { + return window.innerHeight ? window.innerHeight : $(window).height(); + } + + function Settings(element, options) { + if (options !== Object(options)) { + options = {}; + } + + this.cache = {}; + this.el = element; + + this.value = function(key) { + var dataAttr; + + if (this.cache[key] === undefined) { + dataAttr = $(this.el).attr('data-cbox-'+key); + + if (dataAttr !== undefined) { + this.cache[key] = dataAttr; + } else if (options[key] !== undefined) { + this.cache[key] = options[key]; + } else if (defaults[key] !== undefined) { + this.cache[key] = defaults[key]; + } + } + + return this.cache[key]; + }; + + this.get = function(key) { + var value = this.value(key); + return $.isFunction(value) ? value.call(this.el, this) : value; + }; + } // Determine the next and previous members in a group. function getIndex(increment) { @@ -153,224 +210,254 @@ // Convert '%' and 'px' values to integers function setSize(size, dimension) { - return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10)); + return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10)); } // Checks an href to see if it is a photo. - // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex. - function isImage(url) { - return settings.photo || /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url); + // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex. + function isImage(settings, url) { + return settings.get('photo') || settings.get('photoRegex').test(url); } - // Assigns function results to their respective properties - function makeSettings() { - var i, - data = $.data(element, colorbox); - - if (data == null) { - settings = $.extend({}, defaults); - if (console && console.log) { - console.log('Error: cboxElement missing settings object'); - } - } else { - settings = $.extend({}, data); + function retinaUrl(settings, url) { + return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url; + } + + function trapFocus(e) { + if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) { + e.stopPropagation(); + $box.focus(); } - - for (i in settings) { - if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. - settings[i] = settings[i].call(element); - } + } + + function setClass(str) { + if (setClass.str !== str) { + $box.add($overlay).removeClass(setClass.str).addClass(str); + setClass.str = str; } + } + + function getRelated(rel) { + index = 0; - settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow'; - settings.href = settings.href || $(element).attr('href'); - settings.title = settings.title || element.title; - - if (typeof settings.href === "string") { - settings.href = $.trim(settings.href); + if (rel && rel !== false && rel !== 'nofollow') { + $related = $('.' + boxElement).filter(function () { + var options = $.data(this, colorbox); + var settings = new Settings(this, options); + return (settings.get('rel') === rel); + }); + index = $related.index(settings.el); + + // Check direct calls to Colorbox. + if (index === -1) { + $related = $related.add(settings.el); + index = $related.length - 1; + } + } else { + $related = $(settings.el); } } - function trigger(event, callback) { + function trigger(event) { // for external use $(document).trigger(event); - // for internal use - $events.trigger(event); + $events.triggerHandler(event); + } + + var slideshow = (function(){ + var active, + className = prefix + "Slideshow_", + click = "click." + prefix, + timeOut; - if ($.isFunction(callback)) { - callback.call(element); + function clear () { + clearTimeout(timeOut); } - } - // Slideshow functionality - function slideshow() { - var - timeOut, - className = prefix + "Slideshow_", - click = "click." + prefix, - clear, - set, - start, - stop; - - if (settings.slideshow && $related[1]) { - clear = function () { - clearTimeout(timeOut); - }; + function set() { + if (settings.get('loop') || $related[index + 1]) { + clear(); + timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed')); + } + } - set = function () { - if (settings.loop || $related[index + 1]) { - timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); - } - }; + function start() { + $slideshow + .html(settings.get('slideshowStop')) + .unbind(click) + .one(click, stop); - start = function () { - $slideshow - .html(settings.slideshowStop) - .unbind(click) - .one(click, stop); + $events + .bind(event_complete, set) + .bind(event_load, clear); - $events - .bind(event_complete, set) - .bind(event_load, clear) - .bind(event_cleanup, stop); + $box.removeClass(className + "off").addClass(className + "on"); + } - $box.removeClass(className + "off").addClass(className + "on"); - }; + function stop() { + clear(); - stop = function () { - clear(); - - $events - .unbind(event_complete, set) - .unbind(event_load, clear) - .unbind(event_cleanup, stop); - - $slideshow - .html(settings.slideshowStart) - .unbind(click) - .one(click, function () { - publicMethod.next(); - start(); - }); + $events + .unbind(event_complete, set) + .unbind(event_load, clear); + + $slideshow + .html(settings.get('slideshowStart')) + .unbind(click) + .one(click, function () { + publicMethod.next(); + start(); + }); - $box.removeClass(className + "on").addClass(className + "off"); - }; - - if (settings.slideshowAuto) { - start(); - } else { - stop(); - } - } else { - $box.removeClass(className + "off " + className + "on"); + $box.removeClass(className + "on").addClass(className + "off"); } - } - function launch(target) { - if (!closing) { - - element = target; - - makeSettings(); - - $related = $(element); - - index = 0; - - if (settings.rel !== 'nofollow') { - $related = $('.' + boxElement).filter(function () { - var data = $.data(this, colorbox), - relRelated; + function reset() { + active = false; + $slideshow.hide(); + clear(); + $events + .unbind(event_complete, set) + .unbind(event_load, clear); + $box.removeClass(className + "off " + className + "on"); + } - if (data) { - relRelated = $(this).data('rel') || data.rel || this.rel; + return function(){ + if (active) { + if (!settings.get('slideshow')) { + $events.unbind(event_cleanup, reset); + reset(); + } + } else { + if (settings.get('slideshow') && $related[1]) { + active = true; + $events.one(event_cleanup, reset); + if (settings.get('slideshowAuto')) { + start(); + } else { + stop(); } - - return (relRelated === settings.rel); - }); - index = $related.index(element); - - // Check direct calls to ColorBox. - if (index === -1) { - $related = $related.add(element); - index = $related.length - 1; + $slideshow.show(); } } + }; + + }()); + + + function launch(element) { + var options; + + if (!closing) { + + options = $(element).data(colorbox); + + settings = new Settings(element, options); + getRelated(settings.get('rel')); + if (!open) { open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. + + setClass(settings.get('className')); // Show colorbox so the sizes can be calculated in older versions of jQuery - $box.css({visibility:'hidden', display:'block'}); + $box.css({visibility:'hidden', display:'block', opacity:''}); - $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden').appendTo($content); + $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden'); + $content.css({width:'', height:''}).append($loaded); // Cache values needed for size calculations - interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6 + interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height(); interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); loadedHeight = $loaded.outerHeight(true); loadedWidth = $loaded.outerWidth(true); - if (settings.returnFocus) { - $(element).blur(); - $events.one(event_closed, function () { - $(element).focus(); - }); - } - - $overlay.css({ - opacity: parseFloat(settings.opacity), - cursor: settings.overlayClose ? "pointer" : "auto", - visibility: 'visible' - }).show(); - - // Opens inital empty ColorBox prior to content being loaded. - settings.w = setSize(settings.initialWidth, 'x'); - settings.h = setSize(settings.initialHeight, 'y'); + // Opens inital empty Colorbox prior to content being loaded. + var initialWidth = setSize(settings.get('initialWidth'), 'x'); + var initialHeight = setSize(settings.get('initialHeight'), 'y'); + var maxWidth = settings.get('maxWidth'); + var maxHeight = settings.get('maxHeight'); + + settings.w = (maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth; + settings.h = (maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight; + + $loaded.css({width:'', height:settings.h}); publicMethod.position(); - if (isIE6) { - $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () { - $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()}); - }).trigger('resize.' + event_ie6); - } - - slideshow(); + trigger(event_open); + settings.get('onOpen'); - trigger(event_open, settings.onOpen); - $groupControls.add($title).hide(); + + $box.focus(); - $close.html(settings.close).show(); + if (settings.get('trapFocus')) { + // Confine focus to the modal + // Uses event capturing that is not supported in IE8- + if (document.addEventListener) { + + document.addEventListener('focus', trapFocus, true); + + $events.one(event_closed, function () { + document.removeEventListener('focus', trapFocus, true); + }); + } + } + + // Return focus on closing + if (settings.get('returnFocus')) { + $events.one(event_closed, function () { + $(settings.el).focus(); + }); + } } + + var opacity = parseFloat(settings.get('opacity')); + $overlay.css({ + opacity: opacity === opacity ? opacity : '', + cursor: settings.get('overlayClose') ? 'pointer' : '', + visibility: 'visible' + }).show(); - publicMethod.load(true); + if (settings.get('closeButton')) { + $close.html(settings.get('close')).appendTo($content); + } else { + $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4 + } + + load(); } } - // ColorBox's markup needs to be added to the DOM prior to being called + // Colorbox's markup needs to be added to the DOM prior to being called // so that the browser will go ahead and load the CSS background images. function appendHTML() { - if (!$box && document.body) { + if (!$box) { init = false; - $window = $(window); - $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide(); - $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide(); - $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")); + $box = $tag(div).attr({ + id: colorbox, + 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS. + role: 'dialog', + tabindex: '-1' + }).hide(); + $overlay = $tag(div, "Overlay").hide(); + $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]); $wrap = $tag(div, "Wrapper"); $content = $tag(div, "Content").append( $title = $tag(div, "Title"), $current = $tag(div, "Current"), - $next = $tag(div, "Next"), - $prev = $tag(div, "Previous"), - $slideshow = $tag(div, "Slideshow"), - $close = $tag(div, "Close") + $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}), + $next = $('<button type="button"/>').attr({id:prefix+'Next'}), + $slideshow = $tag('button', "Slideshow"), + $loadingOverlay ); + + $close = $('<button type="button"/>').attr({id:prefix+'Close'}); - $wrap.append( // The 3x3 Grid that makes up ColorBox + $wrap.append( // The 3x3 Grid that makes up Colorbox $tag(div).append( $tag(div, "TopLeft"), $topBorder = $tag(div, "TopCenter"), @@ -388,20 +475,21 @@ ) ).find('div div').css({'float': 'left'}); - $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); + $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;'); $groupControls = $next.add($prev).add($current).add($slideshow); - + } + if (document.body && !$box.parent().length) { $(document.body).append($overlay, $box.append($wrap, $loadingBay)); } } - // Add ColorBox's event bindings + // Add Colorbox's event bindings function addBindings() { function clickHandler(e) { // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. // See: http://jacklmoore.com/notes/click-events/ - if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) { + if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) { e.preventDefault(); launch(this); } @@ -422,7 +510,7 @@ publicMethod.close(); }); $overlay.click(function () { - if (settings.overlayClose) { + if (settings.get('overlayClose')) { publicMethod.close(); } }); @@ -430,11 +518,11 @@ // Key Bindings $(document).bind('keydown.' + prefix, function (e) { var key = e.keyCode; - if (open && settings.escKey && key === 27) { + if (open && settings.get('escKey') && key === 27) { e.preventDefault(); publicMethod.close(); } - if (open && settings.arrowKey && $related[1]) { + if (open && settings.get('arrowKey') && $related[1] && !e.altKey) { if (key === 37) { e.preventDefault(); $prev.click(); @@ -446,8 +534,12 @@ }); if ($.isFunction($.fn.on)) { + // For jQuery 1.7+ $(document).on('click.'+prefix, '.'+boxElement, clickHandler); - } else { // For jQuery 1.3.x -> 1.6.x + } else { + // For jQuery 1.3.x -> 1.6.x + // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed. + // This is not here for jQuery 1.9, it's here for legacy users. $('.'+boxElement).live('click.'+prefix, clickHandler); } } @@ -456,8 +548,8 @@ return false; } - // Don't do anything if ColorBox already exists. - if ($.colorbox) { + // Don't do anything if Colorbox already exists. + if ($[colorbox]) { return; } @@ -467,39 +559,49 @@ // **************** // PUBLIC FUNCTIONS - // Usage format: $.fn.colorbox.close(); - // Usage from within an iframe: parent.$.fn.colorbox.close(); + // Usage format: $.colorbox.close(); + // Usage from within an iframe: parent.jQuery.colorbox.close(); // **************** publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { - var $this = this; - + var settings; + var $obj = this; + options = options || {}; + + if ($.isFunction($obj)) { // assume a call to $.colorbox + $obj = $('<a/>'); + options.open = true; + } else if (!$obj[0]) { // colorbox being applied to empty collection + return $obj; + } + + + if (!$obj[0]) { // colorbox being applied to empty collection + return $obj; + } appendHTML(); if (addBindings()) { - if ($.isFunction($this)) { // assume a call to $.colorbox - $this = $('<a/>'); - options.open = true; - } else if (!$this[0]) { // colorbox being applied to empty collection - return $this; - } - + if (callback) { options.onComplete = callback; } - - $this.each(function () { - $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); + + $obj.each(function () { + var old = $.data(this, colorbox) || {}; + $.data(this, colorbox, $.extend(old, options)); }).addClass(boxElement); + + settings = new Settings($obj[0], options); - if (($.isFunction(options.open) && options.open.call($this)) || options.open) { - launch($this[0]); + if (settings.get('open')) { + launch($obj[0]); } } - return $this; + return $obj; }; publicMethod.position = function (speed, loadedCallback) { @@ -519,7 +621,7 @@ scrollTop = $window.scrollTop(); scrollLeft = $window.scrollLeft(); - if (settings.fixed && !isIE6) { + if (settings.get('fixed')) { offset.top -= scrollTop; offset.left -= scrollLeft; $box.css({position: 'fixed'}); @@ -530,46 +632,58 @@ } // keeps the top and left positions within the browser's viewport. - if (settings.right !== false) { - left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); - } else if (settings.left !== false) { - left += setSize(settings.left, 'x'); + if (settings.get('right') !== false) { + left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0); + } else if (settings.get('left') !== false) { + left += setSize(settings.get('left'), 'x'); } else { left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); } - if (settings.bottom !== false) { - top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); - } else if (settings.top !== false) { - top += setSize(settings.top, 'y'); + if (settings.get('bottom') !== false) { + top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0); + } else if (settings.get('top') !== false) { + top += setSize(settings.get('top'), 'y'); } else { - top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2); + top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); } $box.css({top: offset.top, left: offset.left, visibility:'visible'}); - - // setting the speed to 0 to reduce the delay between same-sized content. - speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0; // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, // but it has to be shrank down around the size of div#colorbox when it's done. If not, // it can invoke an obscure IE bug when using iframes. $wrap[0].style.width = $wrap[0].style.height = "9999px"; - function modalDimensions(that) { - $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt(that.style.width,10) - interfaceWidth)+'px'; - $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt(that.style.height,10) - interfaceHeight)+'px'; + function modalDimensions() { + $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px'; + $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px'; } css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left}; - if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273) + // setting the speed to 0 if the content hasn't changed size or position + if (speed) { + var tempSpeed = 0; + $.each(css, function(i){ + if (css[i] !== previousCSS[i]) { + tempSpeed = speed; + return; + } + }); + speed = tempSpeed; + } + + previousCSS = css; + + if (!speed) { $box.css(css); } + $box.dequeue().animate(css, { - duration: speed, + duration: speed || 0, complete: function () { - modalDimensions(this); + modalDimensions(); active = false; @@ -577,47 +691,57 @@ $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; - if (settings.reposition) { + if (settings.get('reposition')) { setTimeout(function () { // small delay before binding onresize due to an IE8 bug. $window.bind('resize.' + prefix, publicMethod.position); }, 1); } - if (loadedCallback) { + if ($.isFunction(loadedCallback)) { loadedCallback(); } }, - step: function () { - modalDimensions(this); - } + step: modalDimensions }); }; publicMethod.resize = function (options) { + var scrolltop; + if (open) { options = options || {}; if (options.width) { settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; } + if (options.innerWidth) { settings.w = setSize(options.innerWidth, 'x'); } + $loaded.css({width: settings.w}); if (options.height) { settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; } + if (options.innerHeight) { settings.h = setSize(options.innerHeight, 'y'); } + if (!options.innerHeight && !options.height) { + scrolltop = $loaded.scrollTop(); $loaded.css({height: "auto"}); settings.h = $loaded.height(); } + $loaded.css({height: settings.h}); + + if(scrolltop) { + $loaded.scrollTop(scrolltop); + } - publicMethod.position(settings.transition === "none" ? 0 : settings.speed); + publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed')); } }; @@ -626,9 +750,9 @@ return; } - var callback, speed = settings.transition === "none" ? 0 : settings.speed; - - $loaded.empty().remove(); // Using empty first may prevent some IE7 issues. + var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed'); + + $loaded.remove(); $loaded = $tag(div, 'LoadedContent').append(object); @@ -645,81 +769,65 @@ $loaded.hide() .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. - .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) + .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'}) .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. .prependTo($content); $loadingBay.hide(); // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. - //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'}); $(photo).css({'float': 'none'}); - + setClass(settings.get('className')); + callback = function () { var total = $related.length, iframe, - frameBorder = 'frameBorder', - allowTransparency = 'allowTransparency', complete; if (!open) { return; } - function removeFilter() { - if (isIE) { + function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2 + if ($.support.opacity === false) { $box[0].style.removeAttribute('filter'); } } complete = function () { clearTimeout(loadingTimer); - $loadingOverlay.remove(); - trigger(event_complete, settings.onComplete); + $loadingOverlay.hide(); + trigger(event_complete); + settings.get('onComplete'); }; + - if (isIE) { - //This fadeIn helps the bicubic resampling to kick-in. - if (photo) { - $loaded.fadeIn(100); - } - } - - $title.html(settings.title).add($loaded).show(); + $title.html(settings.get('title')).show(); + $loaded.show(); if (total > 1) { // handle grouping - if (typeof settings.current === "string") { - $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); + if (typeof settings.get('current') === "string") { + $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show(); } - $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); - $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); + $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next')); + $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous')); - if (settings.slideshow) { - $slideshow.show(); - } + slideshow(); // Preloads images within a rel group - if (settings.preloading) { + if (settings.get('preloading')) { $.each([getIndex(-1), getIndex(1)], function(){ - var src, - img, + var img, i = $related[this], - data = $.data(i, colorbox); - - if (data && data.href) { - src = data.href; - if ($.isFunction(src)) { - src = src.call(i); - } - } else { - src = $(i).attr('href'); - } + settings = new Settings(i, $.data(i, colorbox)), + src = settings.get('href'); - if (src && (isImage(src) || data.photo)) { - img = new Image(); + if (src && isImage(settings, src)) { + src = retinaUrl(settings, src); + img = document.createElement('img'); img.src = src; } }); @@ -728,29 +836,27 @@ $groupControls.hide(); } - if (settings.iframe) { - iframe = $tag('iframe')[0]; + if (settings.get('iframe')) { + iframe = document.createElement('iframe'); - if (frameBorder in iframe) { - iframe[frameBorder] = 0; + if ('frameBorder' in iframe) { + iframe.frameBorder = 0; } - if (allowTransparency in iframe) { - iframe[allowTransparency] = "true"; + if ('allowTransparency' in iframe) { + iframe.allowTransparency = "true"; } - if (!settings.scrolling) { + if (!settings.get('scrolling')) { iframe.scrolling = "no"; } $(iframe) .attr({ - src: settings.href, + src: settings.get('href'), name: (new Date()).getTime(), // give the iframe a unique name to prevent caching 'class': prefix + 'Iframe', - allowFullScreen : true, // allow HTML5 video to go fullscreen - webkitAllowFullScreen : true, - mozallowfullscreen : true + allowFullScreen : true // allow HTML5 video to go fullscreen }) .one('load', complete) .appendTo($loaded); @@ -759,21 +865,21 @@ iframe.src = "//about:blank"; }); - if (settings.fastIframe) { + if (settings.get('fastIframe')) { $(iframe).trigger('load'); } } else { complete(); } - if (settings.transition === 'fade') { + if (settings.get('transition') === 'fade') { $box.fadeTo(speed, 1, removeFilter); } else { removeFilter(); } }; - if (settings.transition === 'fade') { + if (settings.get('transition') === 'fade') { $box.fadeTo(speed, 0, function () { publicMethod.position(0, callback); }); @@ -782,38 +888,24 @@ } }; - publicMethod.load = function (launched) { - var href, setResize, prep = publicMethod.prep, $inline; + function load () { + var href, setResize, prep = publicMethod.prep, $inline, request = ++requests; active = true; photo = false; - element = $related[index]; - - if (!launched) { - makeSettings(); - } - - if (className) { - $box.add($overlay).removeClass(className); - } - if (settings.className) { - $box.add($overlay).addClass(settings.className); - } - className = settings.className; - trigger(event_purge); + trigger(event_load); + settings.get('onLoad'); - trigger(event_load, settings.onLoad); + settings.h = settings.get('height') ? + setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight : + settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y'); - settings.h = settings.height ? - setSize(settings.height, 'y') - loadedHeight - interfaceHeight : - settings.innerHeight && setSize(settings.innerHeight, 'y'); - - settings.w = settings.width ? - setSize(settings.width, 'x') - loadedWidth - interfaceWidth : - settings.innerWidth && setSize(settings.innerWidth, 'x'); + settings.w = settings.get('width') ? + setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth : + settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x'); // Sets the minimum dimensions for use in image scaling settings.mw = settings.w; @@ -821,153 +913,176 @@ // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. - if (settings.maxWidth) { - settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; + if (settings.get('maxWidth')) { + settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth; settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; } - if (settings.maxHeight) { - settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; + if (settings.get('maxHeight')) { + settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight; settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; } - href = settings.href; + href = settings.get('href'); loadingTimer = setTimeout(function () { - $loadingOverlay.appendTo($content); + $loadingOverlay.show(); }, 100); - if (settings.inline) { + if (settings.get('inline')) { + var $target = $(href); // Inserts an empty placeholder where inline content is being pulled from. - // An event is bound to put inline content back when ColorBox closes or loads new content. - $inline = $tag(div).hide().insertBefore($(href)[0]); + // An event is bound to put inline content back when Colorbox closes or loads new content. + $inline = $('<div>').hide().insertBefore($target); $events.one(event_purge, function () { - $inline.replaceWith($loaded.children()); + $inline.replaceWith($target); }); - prep($(href)); - } else if (settings.iframe) { + prep($target); + } else if (settings.get('iframe')) { // IFrame element won't be added to the DOM until it is ready to be displayed, // to avoid problems with DOM-ready JS that might be trying to run in that iframe. prep(" "); - } else if (settings.html) { - prep(settings.html); - } else if (isImage(href)) { - $(photo = new Image()) + } else if (settings.get('html')) { + prep(settings.get('html')); + } else if (isImage(settings, href)) { + + href = retinaUrl(settings, href); + + photo = new Image(); + + $(photo) .addClass(prefix + 'Photo') .bind('error',function () { - settings.title = false; - prep($tag(div, 'Error').html(settings.imgError)); + prep($tag(div, 'Error').html(settings.get('imgError'))); }) .one('load', function () { - var percent; - - if (settings.scalePhotos) { - setResize = function () { - photo.height -= photo.height * percent; - photo.width -= photo.width * percent; - }; - if (settings.mw && photo.width > settings.mw) { - percent = (photo.width - settings.mw) / photo.width; - setResize(); + if (request !== requests) { + return; + } + + // A small pause because some browsers will occassionaly report a + // img.width and img.height of zero immediately after the img.onload fires + setTimeout(function(){ + var percent; + + $.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){ + var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val); + if (attr) { + photo.setAttribute(val, attr); + } + }); + + if (settings.get('retinaImage') && window.devicePixelRatio > 1) { + photo.height = photo.height / window.devicePixelRatio; + photo.width = photo.width / window.devicePixelRatio; } - if (settings.mh && photo.height > settings.mh) { - percent = (photo.height - settings.mh) / photo.height; - setResize(); + + if (settings.get('scalePhotos')) { + setResize = function () { + photo.height -= photo.height * percent; + photo.width -= photo.width * percent; + }; + if (settings.mw && photo.width > settings.mw) { + percent = (photo.width - settings.mw) / photo.width; + setResize(); + } + if (settings.mh && photo.height > settings.mh) { + percent = (photo.height - settings.mh) / photo.height; + setResize(); + } } - } - - if (settings.h) { - photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px'; - } - - if ($related[1] && (settings.loop || $related[index + 1])) { - photo.style.cursor = 'pointer'; - photo.onclick = function () { - publicMethod.next(); - }; - } - - if (isIE) { - photo.style.msInterpolationMode = 'bicubic'; - } - - setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. + + if (settings.h) { + photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px'; + } + + if ($related[1] && (settings.get('loop') || $related[index + 1])) { + photo.style.cursor = 'pointer'; + photo.onclick = function () { + publicMethod.next(); + }; + } + + photo.style.width = photo.width + 'px'; + photo.style.height = photo.height + 'px'; prep(photo); }, 1); }); - setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. - photo.src = href; - }, 1); + photo.src = href; + } else if (href) { - $loadingBay.load(href, settings.data, function (data, status) { - prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents()); + $loadingBay.load(href, settings.get('data'), function (data, status) { + if (request === requests) { + prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents()); + } }); } - }; + } // Navigates to the next page/image in a set. publicMethod.next = function () { - if (!active && $related[1] && (settings.loop || $related[index + 1])) { + if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) { index = getIndex(1); - publicMethod.load(); + launch($related[index]); } }; publicMethod.prev = function () { - if (!active && $related[1] && (settings.loop || index)) { + if (!active && $related[1] && (settings.get('loop') || index)) { index = getIndex(-1); - publicMethod.load(); + launch($related[index]); } }; - // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close(); + // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close(); publicMethod.close = function () { if (open && !closing) { closing = true; - open = false; + trigger(event_cleanup); + settings.get('onCleanup'); + $window.unbind('.' + prefix); + $overlay.fadeTo(settings.get('fadeOut') || 0, 0); - trigger(event_cleanup, settings.onCleanup); - - $window.unbind('.' + prefix + ' .' + event_ie6); - - $overlay.fadeTo(200, 0); - - $box.stop().fadeTo(300, 0, function () { - - $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); - + $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () { + $box.hide(); + $overlay.hide(); trigger(event_purge); - - $loaded.empty().remove(); // Using empty first may prevent some IE7 issues. + $loaded.remove(); setTimeout(function () { closing = false; - trigger(event_closed, settings.onClosed); + trigger(event_closed); + settings.get('onClosed'); }, 1); }); } }; - // Removes changes ColorBox made to the document, but does not remove the plugin - // from jQuery. + // Removes changes Colorbox made to the document, but does not remove the plugin. publicMethod.remove = function () { - $([]).add($box).add($overlay).remove(); + if (!$box) { return; } + + $box.stop(); + $[colorbox].close(); + $box.stop(false, true).remove(); + $overlay.remove(); + closing = false; $box = null; $('.' + boxElement) .removeData(colorbox) .removeClass(boxElement); - $(document).unbind('click.'+prefix); + $(document).unbind('click.'+prefix).unbind('keydown.'+prefix); }; - // A method for fetching the current element ColorBox is referencing. + // A method for fetching the current element Colorbox is referencing. // returns a jQuery object. publicMethod.element = function () { - return $(element); + return $(settings.el); }; publicMethod.settings = defaults; |