From 7791d28a5d24193a01ce004988ba6767f45835ba Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 5 Jan 2015 17:10:08 +0100 Subject: Replace divgrow with more modern readmore.js --- library/readmore.js/README.md | 171 +++++++++++++++++++++ library/readmore.js/readmore.js | 319 ++++++++++++++++++++++++++++++++++++++++ view/js/main.js | 10 +- view/php/theme_init.php | 2 +- 4 files changed, 495 insertions(+), 7 deletions(-) create mode 100644 library/readmore.js/README.md create mode 100644 library/readmore.js/readmore.js diff --git a/library/readmore.js/README.md b/library/readmore.js/README.md new file mode 100644 index 000000000..0116fbe8b --- /dev/null +++ b/library/readmore.js/README.md @@ -0,0 +1,171 @@ +# Readmore.js + +A smooth, responsive jQuery plugin for collapsing and expanding long blocks of text with "Read more" and "Close" links. + +The markup Readmore.js requires is so simple, you can probably use it with your existing HTML—there's no need for complicated sets of `div`'s or hardcoded classes, just call `.readmore()` on the element containing your block of text and Readmore.js takes care of the rest. Readmore.js plays well in a responsive environment, too. + +Readmore.js is tested with—and supported on—all versions of jQuery greater than 1.9.1. All the "good" browsers are supported, as well as IE10+; IE8 & 9 _should_ work, but are not supported and the experience will not be ideal. + + +## Install + +Install Readmore.js with Bower: + +``` +$ bower install readmore +``` + +Then include it in your HTML: + +```html + +``` + + +## Use + +```javascript +$('article').readmore(); +``` + +It's that simple. You can change the speed of the animation, the height of the collapsed block, and the open and close elements. + +```javascript +$('article').readmore({ + speed: 75, + lessLink: 'Read less' +}); +``` + +### The options: + +* `speed: 100` in milliseconds +* `collapsedHeight: 200` in pixels +* `heightMargin: 16` in pixels, avoids collapsing blocks that are only slightly larger than `collapsedHeight` +* `moreLink: 'Read more'` +* `lessLink: 'Close'` +* `embedCSS: true` insert required CSS dynamically, set this to `false` if you include the necessary CSS in a stylesheet +* `blockCSS: 'display: block; width: 100%;'` sets the styling of the blocks, ignored if `embedCSS` is `false` +* `startOpen: false` do not immediately truncate, start in the fully opened position +* `beforeToggle: function() {}` called after a more or less link is clicked, but *before* the block is collapsed or expanded +* `afterToggle: function() {}` called *after* the block is collapsed or expanded + +If the element has a `max-height` CSS property, Readmore.js will use that value rather than the value of the `collapsedHeight` option. + +### The callbacks: + +The callback functions, `beforeToggle` and `afterToggle`, both receive the same arguments: `trigger`, `element`, and `expanded`. + +* `trigger`: the "Read more" or "Close" element that was clicked +* `element`: the block that is being collapsed or expanded +* `expanded`: Boolean; `true` means the block is expanded + +#### Callback example: + +Here's an example of how you could use the `afterToggle` callback to scroll back to the top of a block when the "Close" link is clicked. + +```javascript +$('article').readmore({ + afterToggle: function(trigger, element, expanded) { + if(! expanded) { // The "Close" link was clicked + $('html, body').animate( { scrollTop: element.offset().top }, {duration: 100 } ); + } + } +}); +``` + +### Removing Readmore: + +You can remove the Readmore.js functionality like so: + +```javascript +$('article').readmore('destroy'); +``` + +Or, you can be more surgical by specifying a particular element: + +```javascript +$('article:first').readmore('destroy'); +``` + +### Toggling blocks programmatically: + +You can toggle a block from code: + +```javascript +$('article:nth-of-type(3)').readmore('toggle'); +``` + + +## CSS: + +Readmore.js is designed to use CSS for as much functionality as possible: collapsed height can be set in CSS with the `max-height` property; "collapsing" is achieved by setting `overflow: hidden` on the containing block and changing the `height` property; and, finally, the expanding/collapsing animation is done with CSS3 transitions. + +By default, Readmore.js inserts the following CSS, in addition to some transition-related rules: + +```css +selector + [data-readmore-toggle], selector[data-readmore] { + display: block; + width: 100%; +} +``` + +_`selector` would be the element you invoked `readmore()` on, e.g.: `$('selector').readmore()`_ + +You can override the base rules when you set up Readmore.js like so: + +```javascript +$('article').readmore({blockCSS: 'display: inline-block; width: 50%;'}); +``` + +If you want to include the necessary styling in your site's stylesheet, you can disable the dynamic embedding by setting `embedCSS` to `false`: + +```javascript +$('article').readmore({embedCSS: false}); +``` + +### Media queries and other CSS tricks: + +If you wanted to set a `maxHeight` based on lines, you could do so in CSS with something like: + +```css +body { + font: 16px/1.5 sans-serif; +} + +/* Show only 4 lines in smaller screens */ +article { + max-height: 6em; /* (4 * 1.5 = 6) */ +} +``` + +Then, with a media query you could change the number of lines shown, like so: + +```css +/* Show 8 lines on larger screens */ +@media screen and (min-width: 640px) { + article { + max-height: 12em; + } +} +``` + + +## Contributing + +Pull requests are always welcome, but not all suggested features will get merged. Feel free to contact me if you have an idea for a feature. + +Pull requests should include the minified script and this readme and the demo HTML should be updated with descriptions of your new feature. + +You'll need NPM: + +``` +$ npm install +``` + +Which will install the necessary development dependencies. Then, to build the minified script: + +``` +$ gulp compress +``` + diff --git a/library/readmore.js/readmore.js b/library/readmore.js/readmore.js new file mode 100644 index 000000000..81cfb3cea --- /dev/null +++ b/library/readmore.js/readmore.js @@ -0,0 +1,319 @@ +/*! + * @preserve + * + * Readmore.js jQuery plugin + * Author: @jed_foster + * Project home: http://jedfoster.github.io/Readmore.js + * Licensed under the MIT license + * + * Debounce function from http://davidwalsh.name/javascript-debounce-function + */ + +/* global jQuery */ + +(function($) { + 'use strict'; + + var readmore = 'readmore', + defaults = { + speed: 100, + collapsedHeight: 200, + heightMargin: 16, + moreLink: 'Read More', + lessLink: 'Close', + embedCSS: true, + blockCSS: 'display: block; width: 100%;', + startOpen: false, + + // callbacks + beforeToggle: function(){}, + afterToggle: function(){} + }, + cssEmbedded = {}, + uniqueIdCounter = 0; + + function debounce(func, wait, immediate) { + var timeout; + + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (! immediate) { + func.apply(context, args); + } + }; + var callNow = immediate && !timeout; + + clearTimeout(timeout); + timeout = setTimeout(later, wait); + + if (callNow) { + func.apply(context, args); + } + }; + } + + function uniqueId(prefix) { + var id = ++uniqueIdCounter; + + return String(prefix == null ? 'rmjs-' : prefix) + id; + } + + function setBoxHeights(element) { + var el = element.clone().css({ + height: 'auto', + width: element.width(), + maxHeight: 'none', + overflow: 'hidden' + }).insertAfter(element), + expandedHeight = el.outerHeight(), + cssMaxHeight = parseInt(el.css({maxHeight: ''}).css('max-height').replace(/[^-\d\.]/g, ''), 10), + defaultHeight = element.data('defaultHeight'); + + el.remove(); + + var collapsedHeight = element.data('collapsedHeight') || defaultHeight; + + if (!cssMaxHeight) { + collapsedHeight = defaultHeight; + } + else if (cssMaxHeight > collapsedHeight) { + collapsedHeight = cssMaxHeight; + } + + // Store our measurements. + element.data({ + expandedHeight: expandedHeight, + maxHeight: cssMaxHeight, + collapsedHeight: collapsedHeight + }) + // and disable any `max-height` property set in CSS + .css({ + maxHeight: 'none' + }); + } + + var resizeBoxes = debounce(function() { + $('[data-readmore]').each(function() { + var current = $(this), + isExpanded = (current.attr('aria-expanded') === 'true'); + + setBoxHeights(current); + + current.css({ + height: current.data( (isExpanded ? 'expandedHeight' : 'collapsedHeight') ) + }); + }); + }, 100); + + function embedCSS(options) { + if (! cssEmbedded[options.selector]) { + var styles = ' '; + + if (options.embedCSS && options.blockCSS !== '') { + styles += options.selector + ' + [data-readmore-toggle], ' + + options.selector + '[data-readmore]{' + + options.blockCSS + + '}'; + } + + // Include the transition CSS even if embedCSS is false + styles += options.selector + '[data-readmore]{' + + 'transition: height ' + options.speed + 'ms;' + + 'overflow: hidden;' + + '}'; + + (function(d, u) { + var css = d.createElement('style'); + css.type = 'text/css'; + + if (css.styleSheet) { + css.styleSheet.cssText = u; + } + else { + css.appendChild(d.createTextNode(u)); + } + + d.getElementsByTagName('head')[0].appendChild(css); + }(document, styles)); + + cssEmbedded[options.selector] = true; + } + } + + function Readmore(element, options) { + var $this = this; + + this.element = element; + + this.options = $.extend({}, defaults, options); + + $(this.element).data({ + defaultHeight: this.options.collapsedHeight, + heightMargin: this.options.heightMargin + }); + + embedCSS(this.options); + + this._defaults = defaults; + this._name = readmore; + + window.addEventListener('load', function() { + $this.init(); + }); + } + + + Readmore.prototype = { + init: function() { + var $this = this; + + $(this.element).each(function() { + var current = $(this); + + setBoxHeights(current); + + var collapsedHeight = current.data('collapsedHeight'), + heightMargin = current.data('heightMargin'); + + if (current.outerHeight(true) <= collapsedHeight + heightMargin) { + // The block is shorter than the limit, so there's no need to truncate it. + return true; + } + else { + var id = current.attr('id') || uniqueId(), + useLink = $this.options.startOpen ? $this.options.lessLink : $this.options.moreLink; + + current.attr({ + 'data-readmore': '', + 'aria-expanded': false, + 'id': id + }); + + current.after($(useLink) + .on('click', function(event) { $this.toggle(this, current[0], event); }) + .attr({ + 'data-readmore-toggle': '', + 'aria-controls': id + })); + + if (! $this.options.startOpen) { + current.css({ + height: collapsedHeight + }); + } + } + }); + + window.addEventListener('resize', function() { + resizeBoxes(); + }); + }, + + toggle: function(trigger, element, event) { + if (event) { + event.preventDefault(); + } + + if (! trigger) { + trigger = $('[aria-controls="' + this.element.id + '"]')[0]; + } + + if (! element) { + element = this.element; + } + + var $this = this, + $element = $(element), + newHeight = '', + newLink = '', + expanded = false, + collapsedHeight = $element.data('collapsedHeight'); + + if ($element.height() <= collapsedHeight) { + newHeight = $element.data('expandedHeight') + 'px'; + newLink = 'lessLink'; + expanded = true; + } + else { + newHeight = collapsedHeight; + newLink = 'moreLink'; + } + + // Fire beforeToggle callback + // Since we determined the new "expanded" state above we're now out of sync + // with our true current state, so we need to flip the value of `expanded` + $this.options.beforeToggle(trigger, element, ! expanded); + + $element.css({'height': newHeight}); + + // Fire afterToggle callback + $element.on('transitionend', function() { + $this.options.afterToggle(trigger, element, expanded); + + $(this).attr({ + 'aria-expanded': expanded + }).off('transitionend'); + }); + + $(trigger).replaceWith($($this.options[newLink]) + .on('click', function(event) { $this.toggle(this, element, event); }) + .attr({ + 'data-readmore-toggle': '', + 'aria-controls': $element.attr('id') + })); + }, + + destroy: function() { + $(this.element).each(function() { + var current = $(this); + + current.attr({ + 'data-readmore': null, + 'aria-expanded': null + }) + .css({ + maxHeight: '', + height: '' + }) + .next('[data-readmore-toggle]') + .remove(); + + current.removeData(); + }); + } + }; + + + $.fn.readmore = function(options) { + var args = arguments, + selector = this.selector; + + options = options || {}; + + if (typeof options === 'object') { + return this.each(function() { + if ($.data(this, 'plugin_' + readmore)) { + var instance = $.data(this, 'plugin_' + readmore); + instance.destroy.apply(instance); + } + + options.selector = selector; + + $.data(this, 'plugin_' + readmore, new Readmore(this, options)); + }); + } + else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') { + return this.each(function () { + var instance = $.data(this, 'plugin_' + readmore); + if (instance instanceof Readmore && typeof instance[options] === 'function') { + instance[options].apply(instance, Array.prototype.slice.call(args, 1)); + } + }); + } + }; + +})(jQuery); + + diff --git a/view/js/main.js b/view/js/main.js index 8c48bbb72..80518768e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -596,12 +596,10 @@ function updateConvItems(mode,data) { function collapseHeight() { $(".wall-item-body, .contact-info").each(function() { - if($(this).height() > divmore_height + 10) { - if(! $(this).hasClass('divmore')) { - $(this).divgrow({ initialHeight: divmore_height, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); - $(this).addClass('divmore'); - } - } + if(! $(this).hasClass('divmore')) { + $(this).readmore({collapsedHeight: divmore_height, moreLink: ''+aStr['divgrowmore']+'', lessLink: ''+aStr['divgrowless']+''}); + $(this).addClass('divmore'); + } }); } diff --git a/view/php/theme_init.php b/view/php/theme_init.php index 33b7e87dc..9a545470f 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -25,7 +25,7 @@ head_add_js('autocomplete.js'); head_add_js('library/jquery-textcomplete/jquery.textcomplete.js'); head_add_js('library/fancybox/jquery.fancybox-1.3.4.js'); head_add_js('library/jquery.timeago.js'); -head_add_js('library/jquery.divgrow/jquery.divgrow-1.3.1.js'); +head_add_js('library/readmore.js/readmore.js'); head_add_js('library/jquery_ac/friendica.complete.js'); head_add_js('library/tiptip/jquery.tipTip.minified.js'); head_add_js('library/jgrowl/jquery.jgrowl_minimized.js'); -- cgit v1.2.3 From 128b0008eef797050cf5146fb1dd69505c4439d4 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 5 Jan 2015 18:30:12 +0100 Subject: Replace jslider with jRange --- include/widgets.php | 2 +- library/jRange/.gitignore | 2 + library/jRange/LICENSE | 21 ++ library/jRange/README.md | 5 + library/jRange/demo/index.html | 245 +++++++++++++++++++++ library/jRange/demo/main.css | 289 ++++++++++++++++++++++++ library/jRange/demo/main.less | 296 +++++++++++++++++++++++++ library/jRange/demo/normalize.css | 425 ++++++++++++++++++++++++++++++++++++ library/jRange/demo/prism/prism.css | 193 ++++++++++++++++ library/jRange/demo/prism/prism.js | 8 + library/jRange/jquery.range-min.js | 1 + library/jRange/jquery.range.css | 168 ++++++++++++++ library/jRange/jquery.range.js | 297 +++++++++++++++++++++++++ library/jRange/jquery.range.less | 192 ++++++++++++++++ view/php/theme_init.php | 4 +- view/tpl/contact_slider.tpl | 2 +- view/tpl/main_slider.tpl | 4 +- 17 files changed, 2148 insertions(+), 6 deletions(-) create mode 100644 library/jRange/.gitignore create mode 100644 library/jRange/LICENSE create mode 100644 library/jRange/README.md create mode 100644 library/jRange/demo/index.html create mode 100644 library/jRange/demo/main.css create mode 100644 library/jRange/demo/main.less create mode 100644 library/jRange/demo/normalize.css create mode 100644 library/jRange/demo/prism/prism.css create mode 100644 library/jRange/demo/prism/prism.js create mode 100644 library/jRange/jquery.range-min.js create mode 100644 library/jRange/jquery.range.css create mode 100644 library/jRange/jquery.range.js create mode 100644 library/jRange/jquery.range.less diff --git a/include/widgets.php b/include/widgets.php index bb9890add..18778ed36 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -421,7 +421,7 @@ function widget_affinity($arr) { if(feature_enabled(local_user(),'affinity')) { $tpl = get_markup_template('main_slider.tpl'); $x = replace_macros($tpl,array( - '$val' => $cmin . ';' . $cmax, + '$val' => $cmin . ',' . $cmax, '$refresh' => t('Refresh'), '$me' => t('Me'), '$intimate' => t('Best Friends'), diff --git a/library/jRange/.gitignore b/library/jRange/.gitignore new file mode 100644 index 000000000..089ae868a --- /dev/null +++ b/library/jRange/.gitignore @@ -0,0 +1,2 @@ + +*.codekit diff --git a/library/jRange/LICENSE b/library/jRange/LICENSE new file mode 100644 index 000000000..8f47b9a63 --- /dev/null +++ b/library/jRange/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nitin Hayaran + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/library/jRange/README.md b/library/jRange/README.md new file mode 100644 index 000000000..5cbfe6aa8 --- /dev/null +++ b/library/jRange/README.md @@ -0,0 +1,5 @@ +## jQuery plugin to create Range Selector + +![jRange Preview](http://i.imgur.com/da8uZwx.png) + +[Demo and Documentation](http://nitinhayaran.github.io/jRange/demo/) \ No newline at end of file diff --git a/library/jRange/demo/index.html b/library/jRange/demo/index.html new file mode 100644 index 000000000..ac443f11f --- /dev/null +++ b/library/jRange/demo/index.html @@ -0,0 +1,245 @@ + + + + + jRange : jQuery Range Selector + + + + + + + + +
+
+

jRange

+

jQuery Plugin to create Range Selector

+
+
+
+ + + +
+
+ + + +
+
+
+
+
+

See it in Action

+

Play around with the demo

+
+
+
+
$('.single-slider').jRange({
+    from: 0,
+    to: 100,
+    step: 1,
+    scale: [0,50,100],
+    format: '%s',
+    width: 300,
+    showLabels: true
+});
+
+
+ +
+
+
+
+
$('.range-slider').jRange({
+    from: 0,
+    to: 100,
+    step: 1,
+    scale: [0,25,50,75,100],
+    format: '%s',
+    width: 300,
+    showLabels: true,
+    isRange : true
+});
+
+
+ +
+
+ + +
+
+

How to Use

+

Lets see some code

+

To get started you'll have to include jquery.range.js and jquery.range.css files in your html file.

+
<link rel="stylesheet" href="jquery.range.css">
+<script src="jquery.range.js"></script>
+

Later just add an hidden input, where ever you want this slider to be shown.

+
<input type="hidden" class="slider-input" value="23" />
+

After this you'll have to intialize this plugin for that input, as shown in the example above

+ +

Options

+

See configuration options

+

Options can also be set programatically, by passing an options hash to the jRange method. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionOverrideTypeDetails
fromMandatoryIntegerLower bound of slider
toMandatoryIntegerUpper bound of slider
stepOptionalInteger + Default : 1 +

amount of increment on each step

+
scaleOptionalArray +

Array containing label which are shown below the slider. By default its [from, to].

+
showLabelsOptionalBoolean +

False, if you'd like to hide label which are shown on top of slider.

+ Default : true +
showScaleOptionalBoolean +

False, if you'd like to hide scale which are shown below the slider.

+ Default : true +
formatOptionalString / Function +

this is used to show label on the pointer

+ Default : "%s" +

String : %s is replaced by its value, e.g., "%s days", "%s goats"

+

+ Function : format(value, pointer) +
+ return : string label for a given value and pointer.
+ pointer could be 'low'/'high' if isRange is true, else undefined +

+
widthOptionalInteger + Default : 300 +
themeOptionalString + Default : "theme-green" +

This is the css class name added to the container. Available themes are "theme-blue", "theme-green". You can also add more themes, just like in jquery.range.less

+
isRangeOptionalBoolean + Default : false +

True if this is a range selector. If its a range the value of hidden input will be set comma-seperated, e.g., "25,75"

+
onstatechangeOptionalFunction +

This function is called whenever the value is changed by user. This same value is also automatically set for the provided Hidden Input.

+

For single slider value is without comma, however for a range selector value is comma-seperated.

+
+ +

+
+
+
+ + + + + + + \ No newline at end of file diff --git a/library/jRange/demo/main.css b/library/jRange/demo/main.css new file mode 100644 index 000000000..1e29a98af --- /dev/null +++ b/library/jRange/demo/main.css @@ -0,0 +1,289 @@ +html, +body { + height: 100%; + width: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial sans-serif; + font-size: 16px; + line-height: 1.6; + color: #434343; +} +a { + text-decoration: none; +} +pre code { + line-height: 1.5; +} +.container { + width: 1130px; + padding: 0 20px; + margin: 0px auto; +} +.text-container { + width: 900px; + position: relative; + margin: 0px auto; +} +.clearfix:after { + content: " "; + /* Older browser do not support empty content */ + visibility: hidden; + display: block; + height: 0; + clear: both; +} +.pane { + position: relative; + width: 100%; + height: 50%; + min-height: 450px; +} +.body { + position: relative; +} +section.header { + background-color: #606c88; + background: -webkit-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); + /* Chrome 10+, Saf5.1+ */ + background: -moz-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); + /* FF3.6+ */ + background: -ms-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); + /* IE10 */ + background: -o-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); + /* Opera 11.10+ */ + background: linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); + /* W3C */ +} +section.header footer { + position: absolute; + width: 100%; + bottom: 0; + padding: 10px 30px; + box-sizing: border-box; +} +.left { + float: left; + text-align: left; +} +.right { + float: right; + text-align: right; +} +div.header { + color: #fff; + width: 600px; + text-align: center; + position: absolute; + top: 40%; + left: 50%; + transform: translate(-50%, -50%); + border-radius: 5px; +} +div.header h1, +div.header h2 { + font-family: 'Raleway' sans-serif; + font-weight: 100; + line-height: 1; + margin: 0; +} +div.header h1 { + font-size: 72px; + margin-bottom: 25px; +} +section.demo h2, +section.demo h3 { + font-family: 'Raleway' sans-serif; + font-weight: 300; + line-height: 1; + margin: 0; + text-align: center; +} +section.demo h2 { + font-size: 48px; + margin-top: 1em; +} +section.demo h3 { + font-size: 28px; + margin: 0.8em 0 1em; +} +section.demo .demo-container { + margin: 40px 0 80px; +} +section.demo .demo-section { + margin: 20px 0; + clear: both; +} +section.demo .demo-section .demo-code { + width: 50%; + float: left; +} +section.demo .demo-section .demo-output { + margin-left: 50%; + padding: 50px 0; +} +section.demo .demo-section .slider-container { + margin: 0 auto; +} +section.demo .text-container h2 { + margin-top: 3em; +} +section.demo .form-vertical { + width: 200px; + float: left; +} +section.demo .image-container { + margin-left: 200px; + padding: 1px; + border: 1px solid #eee; +} +section.demo .form-group { + margin-bottom: 20px; +} +section.demo label { + color: #999; + font-size: 13px; + display: block; +} +section.demo input { + width: 150px; + margin-top: 3px; + border: 1px solid #999; + border-width: 0 0 1px 0; + padding: 3px 0 3px; + transition: 0.3s all; +} +section.demo input:focus, +section.demo input:active { + outline: none; + border-color: #2fc7ff; + box-shadow: 0 1px 3px -3px #2fc7ff; + color: #000; +} +section.demo button { + position: relative; + overflow: visible; + display: inline-block; + padding: 0.3em 1em; + border: 1px solid #d4d4d4; + margin: 0; + text-decoration: none; + text-align: center; + text-shadow: 1px 1px 0 #fff; + font-size: 12px; + color: #333; + white-space: nowrap; + cursor: pointer; + outline: none; + background-color: #ececec; + background-image: linear-gradient(#f4f4f4, #ececec); + background-clip: padding-box; + border-radius: 0.2em; + zoom: 1; + transition: background-image 0.3s; +} +section.demo button:hover, +section.demo button:active { + border-color: #3072b3; + border-bottom-color: #2a65a0; + text-decoration: none; + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); + color: #fff; + background-color: #3c8dde; + background-image: linear-gradient(#599bdc, #3072b3); +} +section.demo p { + font-family: 'Raleway' sans-serif; + margin: 1em auto; +} +section.demo .footer { + margin-top: 80px; + text-align: center; +} +section.demo .large-github { + display: inline-block; + border: 1px solid #21b0ff; + font-weight: 400; + font-family: 'Raleway' sans-serif; + text-shadow: none; + background-color: #fff; + background-image: none; + padding: 8px 25px; + color: #21b0ff; + font-size: 18px; + border-radius: 25px; +} +section.demo .large-github:hover, +section.demo .large-github:active { + background-color: #21b0ff; + color: #fff; + background-image: none; + text-shadow: none; +} +.two-coloumn em { + font-weight: normal; + text-decoration: none; + font-style: normal; + display: inline-block; + width: 85px; +} +.plugin-options { + font-size: 14px; + margin-bottom: 40px; + width: 900px; + font-weight: 200; +} +.plugin-options td, +.plugin-options th { + padding: 8px ; + text-align: left; + vertical-align: top; +} +.plugin-options td:first-child, +.plugin-options th:first-child { + font-weight: bold; +} +.plugin-options td:nth-child(2), +.plugin-options td:nth-child(3) { + font-size: 13px; + color: #999; +} +.plugin-options td p { + font-family: Helvetica Neue, Helvetica, Arial, sans-serif; + margin: 4px 0; +} +.plugin-options td p:first-child { + margin-top: 0; +} +.plugin-options th { + background-color: #358ccb; + color: #fff; +} +.plugin-options tr:nth-child(2n + 1) td { + background-color: #f5f5f5; +} +.plugin-options small { + display: block; +} +.plugin-options ul { + list-style: none; + padding: 0; +} +.plugin-options ul ul { + list-style: circle inside; +} +section.footer { + margin-top: 80px; + padding: 30px; + text-align: center; + background-color: #333; + color: #999; + font-weight: 300; + font-size: 13px; +} +section.footer p { + margin: 5px 0; +} +section.footer a { + color: #fff; +} diff --git a/library/jRange/demo/main.less b/library/jRange/demo/main.less new file mode 100644 index 000000000..e9ee232a1 --- /dev/null +++ b/library/jRange/demo/main.less @@ -0,0 +1,296 @@ +@font-family: 'Raleway' sans-serif; +html, body{ + height: 100%; + width: 100%; +} +body{ + font-family: Helvetica Neue, Helvetica, Arial sans-serif; + font-size: 16px; + line-height: 1.6; + color: #434343; +} +a{ + text-decoration: none; +} +pre code{ + line-height: 1.5; +} +.container{ + width: 1130px; + padding: 0 20px; + margin: 0px auto; +} +.text-container{ + width: 900px; + position: relative; + margin: 0px auto; +} +.clearfix:after { + content: " "; /* Older browser do not support empty content */ + visibility: hidden; + display: block; + height: 0; + clear: both; +} +.pane{ + position: relative; + width: 100%; + height: 50%; + min-height: 450px; +} +.body{ + position: relative; +} +section.header{ + background-color: #606c88; + + background: -webkit-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); /* Chrome 10+, Saf5.1+ */ + background: -moz-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); /* FF3.6+ */ + background: -ms-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); /* IE10 */ + background: -o-linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); /* Opera 11.10+ */ + background: linear-gradient(90deg, #606c88 10%, #3f4c6b 90%); /* W3C */ + + // background-image: radial-gradient(50% 102%, #3cb3db 48%, #2e6c9a 100%); + footer{ + position: absolute; + width: 100%; + bottom: 0; + padding: 10px 30px; + box-sizing: border-box; + } +} +.left{ + float: left; + text-align: left; +} +.right{ + float: right; + text-align: right; +} +div.header{ + color: #fff; + width: 600px; + text-align: center; + position: absolute; + top: 40%; + left: 50%; + transform: translate(-50%, -50%); + // background-color: #333; + border-radius: 5px; + h1, h2{ + font-family: @font-family; + font-weight: 100; + line-height: 1; + margin: 0; + } + h1{ + font-size: 72px; + margin-bottom: 25px; + } +} +section.demo{ + h2, h3{ + font-family: @font-family; + font-weight: 300; + line-height: 1; + margin: 0; + text-align: center; + } + h2{ + font-size: 48px; + margin-top: 1em; + } + h3{ + font-size: 28px; + margin: 0.8em 0 1em; + } + .demo-container{ + margin: 40px 0 80px; + } + .demo-section{ + margin: 20px 0; + clear: both; + .demo-code{ + width: 50%; + float: left; + } + .demo-output{ + margin-left: 50%; + padding: 50px 0; + } + .slider-container{ + margin: 0 auto; + } + } + .text-container{ + h2{ + margin-top: 3em; + } + } + .form-vertical{ + width: 200px; + float: left; + } + .image-container{ + margin-left: 200px; + padding: 1px; + border: 1px solid #eee; + // background-color: #333; + } + .form-group{ + margin-bottom: 20px; + } + label{ + color: #999; + font-size: 13px; + display: block; + } + input{ + width: 150px; + margin-top: 3px; + // border-radius: 2px; + border: 1px solid #999; + border-width: 0 0 1px 0; + padding: 3px 0 3px; + transition: 0.3s all; + // color: #999; + &:focus, &:active{ + outline: none; + border-color: #2fc7ff; + box-shadow: 0 1px 3px -3px #2fc7ff; + color: #000; + } + } + button{ + position: relative; + overflow: visible; + display: inline-block; + padding: 0.3em 1em; + border: 1px solid #d4d4d4; + margin: 0; + text-decoration: none; + text-align: center; + text-shadow: 1px 1px 0 #fff; + font-size: 12px; + color: #333; + white-space: nowrap; + cursor: pointer; + outline: none; + background-color: #ececec; + background-image: linear-gradient(#f4f4f4, #ececec); + background-clip: padding-box; + border-radius: 0.2em; + zoom: 1; + transition: background-image 0.3s; + &:hover, &:active{ + border-color: #3072b3; + border-bottom-color: #2a65a0; + text-decoration: none; + text-shadow: -1px -1px 0 rgba(0,0,0,0.3); + color: #fff; + background-color: #3c8dde; + background-image: linear-gradient(#599bdc, #3072b3); + } + } + p{ + font-family: @font-family; + margin: 1em auto; + } + .footer{ + margin-top: 80px; + text-align: center; + } + .large-github{ + display: inline-block; + border: 1px solid #21b0ff; + font-weight: 400; + font-family: @font-family; + text-shadow: none; + background-color: #fff; + background-image: none; + padding: 8px 25px; + color: #21b0ff; + font-size: 18px; + border-radius: 25px; + &:hover, &:active{ + background-color: #21b0ff; + color: #fff; + background-image: none; + text-shadow: none; + } + } +} +.two-coloumn{ + em{ + font-weight: normal; + text-decoration: none; + font-style: normal; + display: inline-block; + width: 85px; + } +} +.plugin-options{ + font-size: 14px; + margin-bottom: 40px; + width: 900px; + font-weight: 200; + td, th{ + padding: 8px ; + text-align: left; + vertical-align: top; + &:first-child{ + font-weight: bold; + } + } + td{ + &:nth-child(2), &:nth-child(3){ + font-size: 13px; + color: #999; + } + p{ + font-family: Helvetica Neue, Helvetica, Arial, sans-serif; + margin: 4px 0; + &:first-child{ + margin-top: 0; + } + } + } + th{ + background-color: #358ccb; + color: #fff; + } + tr{ + &:nth-child(2n + 1){ + td{ + background-color: #f5f5f5; + } + } + } + small{ + display: block; + // white-space: nowrap; + } + ul{ + list-style: none; + padding: 0; + ul{ + list-style: circle inside; + // padding-left: 25px; + } + } +} +section.footer{ + margin-top: 80px; + padding: 30px; + text-align: center; + background-color: #333; + color: #999; + font-weight: 300; + font-size: 13px; + p{ + margin: 5px 0; + } + a{ + color: #fff; + } +} \ No newline at end of file diff --git a/library/jRange/demo/normalize.css b/library/jRange/demo/normalize.css new file mode 100644 index 000000000..08f895079 --- /dev/null +++ b/library/jRange/demo/normalize.css @@ -0,0 +1,425 @@ +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/library/jRange/demo/prism/prism.css b/library/jRange/demo/prism/prism.css new file mode 100644 index 000000000..afc94b354 --- /dev/null +++ b/library/jRange/demo/prism/prism.css @@ -0,0 +1,193 @@ +/* http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+css-extras+clike+javascript */ +/** + * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML + * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); + * @author Tim Shedor + */ + +code[class*="language-"], +pre[class*="language-"] { + color: black; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*="language-"] { + position:relative; + padding: 1em; + margin: .5em 0; + -webkit-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf; + -moz-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf; + box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf; + border-left: 10px solid #358ccb; + background-color: #fdfdfd; + background-image: -webkit-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-image: -moz-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-image: -ms-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-image: -o-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-size: 3em 3em; + background-origin:content-box; + overflow:visible; + max-height:30em; +} + +code[class*="language"] { + max-height:29em; + display:block; + overflow:scroll; +} + +/* Margin bottom to accomodate shadow */ +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background-color:#fdfdfd; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 1em; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + position:relative; + padding: .2em; + -webkit-border-radius: 0.3em; + -moz-border-radius: 0.3em; + -ms-border-radius: 0.3em; + -o-border-radius: 0.3em; + border-radius: 0.3em; + color: #c92c2c; + border: 1px solid rgba(0, 0, 0, 0.1); +} + +pre[class*="language-"]:before, +pre[class*="language-"]:after { + content: ''; + z-index: -2; + display:block; + position: absolute; + bottom: 0.75em; + left: 0.18em; + width: 40%; + height: 20%; + -webkit-box-shadow: 0px 13px 8px #979797; + -moz-box-shadow: 0px 13px 8px #979797; + box-shadow: 0px 13px 8px #979797; + -webkit-transform: rotate(-2deg); + -moz-transform: rotate(-2deg); + -ms-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + transform: rotate(-2deg); +} + +:not(pre) > code[class*="language-"]:after, +pre[class*="language-"]:after { + right: 0.75em; + left: auto; + -webkit-transform: rotate(2deg); + -moz-transform: rotate(2deg); + -ms-transform: rotate(2deg); + -o-transform: rotate(2deg); + transform: rotate(2deg); +} + +.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #7D8B99; +} + +.token.punctuation { + color: #5F6364; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.function-name, +.token.constant, +.token.symbol { + color: #c92c2c; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.function, +.token.builtin { + color: #2f9c0a; +} + +.token.operator, +.token.entity, +.token.url, +.token.variable { + color: #a67f59; + background: rgba(255, 255, 255, 0.5); +} + +.token.atrule, +.token.attr-value, +.token.keyword, +.token.class-name { + color: #1990b8; +} + +.token.regex, +.token.important { + color: #e90; +} +.language-css .token.string, +.style .token.string { + color: #a67f59; + background: rgba(255, 255, 255, 0.5); +} + +.token.important { + font-weight: normal; +} + +.token.entity { + cursor: help; +} + +.namespace { + opacity: .7; +} + +@media screen and (max-width:767px){ + pre[class*="language-"]:before, + pre[class*="language-"]:after { + bottom:14px; + -webkit-box-shadow:none; + -moz-box-shadow:none; + box-shadow:none; + } + +} + +/* Plugin styles */ +.token.tab:not(:empty):before, +.token.cr:before, +.token.lf:before { + color: #e0d7d1; +} + diff --git a/library/jRange/demo/prism/prism.js b/library/jRange/demo/prism/prism.js new file mode 100644 index 000000000..dace66766 --- /dev/null +++ b/library/jRange/demo/prism/prism.js @@ -0,0 +1,8 @@ +/* http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+css-extras+clike+javascript */ +var self=typeof window!="undefined"?window:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content)):t.util.type(e)==="Array"?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+""};if(!self.document){if(!self.addEventListener)return self.Prism;self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return self.Prism}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}return self.Prism}();typeof module!="undefined"&&module.exports&&(module.exports=Prism);; +Prism.languages.markup={comment://g,prolog:/<\?.+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});; +Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/ig};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/[\w\W]*?<\/style>/ig,inside:{tag:{pattern:/|<\/style>/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});; +Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/g,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/g,"pseudo-class":/:[-\w]+(?:\(.*\))?/g,"class":/\.[-:\.\w]+/g,id:/#[-:\.\w]+/g}};Prism.languages.insertBefore("css","ignore",{hexcode:/#[\da-f]{3,6}/gi,entity:/\\[\da-f]{1,8}/gi,number:/[\d%\.]+/g});; +Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/ig,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/ig,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};; +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/[\w\W]*?<\/script>/ig,inside:{tag:{pattern:/|<\/script>/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}}); +; diff --git a/library/jRange/jquery.range-min.js b/library/jRange/jquery.range-min.js new file mode 100644 index 000000000..8aa6e7ecb --- /dev/null +++ b/library/jRange/jquery.range-min.js @@ -0,0 +1 @@ +!function($,t,i,s){"use strict";var o=function(){return this.init.apply(this,arguments)};o.prototype={defaults:{onstatechange:function(){},isRange:!1,showLabels:!0,showScale:!0,step:1,format:"%s",theme:"theme-green",width:300},template:'
123456
456789
',init:function(t,i){this.options=$.extend({},this.defaults,i),this.inputNode=$(t),this.options.value=this.inputNode.val()||(this.options.isRange?this.options.from+","+this.options.from:this.options.from),this.domNode=$(this.template),this.domNode.addClass(this.options.theme),this.inputNode.after(this.domNode),this.domNode.on("change",this.onChange),this.pointers=$(".pointer",this.domNode),this.lowPointer=this.pointers.first(),this.highPointer=this.pointers.last(),this.labels=$(".pointer-label",this.domNode),this.lowLabel=this.labels.first(),this.highLabel=this.labels.last(),this.scale=$(".scale",this.domNode),this.bar=$(".selected-bar",this.domNode),this.clickableBar=this.domNode.find(".clickable-dummy"),this.interval=this.options.to-this.options.from,this.render()},render:function(){return 0!==this.inputNode.width()||this.options.width?(this.domNode.width(this.options.width||this.inputNode.width()),this.inputNode.hide(),this.isSingle()&&(this.lowPointer.hide(),this.lowLabel.hide()),this.options.showLabels||this.labels.hide(),this.attachEvents(),this.options.showScale&&this.renderScale(),void this.setValue(this.options.value)):void console.log("jRange : no width found, returning")},isSingle:function(){return"number"==typeof this.options.value?!0:-1!==this.options.value.indexOf(",")||this.options.isRange?!1:!0},attachEvents:function(){this.clickableBar.click($.proxy(this.barClicked,this)),this.pointers.mousedown($.proxy(this.onDragStart,this)),this.pointers.bind("dragstart",function(t){t.preventDefault()})},onDragStart:function(t){if(1===t.which){t.stopPropagation(),t.preventDefault();var s=$(t.target);s.addClass("focused"),this[(s.hasClass("low")?"low":"high")+"Label"].addClass("focused"),$(i).on("mousemove.slider",$.proxy(this.onDrag,this,s)),$(i).on("mouseup.slider",$.proxy(this.onDragEnd,this))}},onDrag:function(t,i){i.stopPropagation(),i.preventDefault();var s=i.clientX-this.domNode.offset().left;this.domNode.trigger("change",[this,t,s])},onDragEnd:function(){this.pointers.removeClass("focused"),this.labels.removeClass("focused"),$(i).off(".slider"),$(i).off(".slider")},barClicked:function(t){var i=t.pageX-this.clickableBar.offset().left;if(this.isSingle())this.setPosition(this.pointers.last(),i,!0,!0);else{var s=Math.abs(parseInt(this.pointers.first().css("left"),10)-i+this.pointers.first().width()/2)'+("|"!=t[o]?""+t[o]+"":"")+"";this.scale.html(s),$("ins",this.scale).each(function(){$(this).css({marginLeft:-$(this).outerWidth()/2})})},getBarWidth:function(){var t=this.options.value.split(",");return t.length>1?parseInt(t[1],10)-parseInt(t[0],10):parseInt(t[0],10)},showPointerValue:function(t,i,o){var e=$(".pointer-label",this.domNode)[t.hasClass("low")?"first":"last"](),n,h=this.positionToValue(i);if($.isFunction(this.options.format)){var a=this.isSingle()?s:t.hasClass("low")?"low":"high";n=this.options.format(h,a)}else n=this.options.format.replace("%s",h);var r=e.html(n).width(),l=i-r/2;l=Math.min(Math.max(l,0),this.options.width-r),e[o?"animate":"css"]({left:l}),this.setInputValue(t,h)},valuesToPrc:function(t){var i=100*(t[0]-this.options.from)/this.interval,s=100*(t[1]-this.options.from)/this.interval;return[i,s]},prcToPx:function(t){return this.domNode.width()*t/100},positionToValue:function(t){var i=t/this.domNode.width()*this.interval;return i+=this.options.from,Math.round(i/this.options.step)*this.options.step},setInputValue:function(t,i){if(this.isSingle())this.options.value=i.toString();else{var s=this.options.value.split(",");this.options.value=t.hasClass("low")?i+","+s[1]:s[0]+","+i}this.inputNode.val()!==this.options.value&&(this.inputNode.val(this.options.value),this.options.onstatechange.call(this,this.options.value))},getValue:function(){return this.options.value}};var e="jRange";$.fn[e]=function(t){var i=arguments,s;return this.each(function(){var n=$(this),h=$.data(this,"plugin_"+e),a="object"==typeof t&&t;h||n.data("plugin_"+e,h=new o(this,a)),"string"==typeof t&&(s=h[t].apply(h,Array.prototype.slice.call(i,1)))}),s||this}}(jQuery,window,document); \ No newline at end of file diff --git a/library/jRange/jquery.range.css b/library/jRange/jquery.range.css new file mode 100644 index 000000000..27375c846 --- /dev/null +++ b/library/jRange/jquery.range.css @@ -0,0 +1,168 @@ +.slider-container { + width: 300px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.slider-container .back-bar { + height: 10px; + position: relative; +} +.slider-container .back-bar .selected-bar { + position: absolute; + height: 100%; +} +.slider-container .back-bar .pointer { + position: absolute; + width: 10px; + height: 10px; + background-color: red; + cursor: move; + opacity: 1; + z-index: 2; +} +.slider-container .back-bar .pointer-label { + position: absolute; + top: -17px; + font-size: 8px; + background: white; + white-space: nowrap; + line-height: 1; +} +.slider-container .back-bar .focused { + z-index: 10; +} +.slider-container .clickable-dummy { + cursor: pointer; + position: absolute; + width: 100%; + height: 100%; + z-index: 1; +} +.slider-container .scale { + top: 2px; + position: relative; +} +.slider-container .scale span { + position: absolute; + height: 5px; + border-left: 1px solid #999; + font-size: 0; +} +.slider-container .scale ins { + font-size: 9px; + text-decoration: none; + position: absolute; + left: 0; + top: 5px; + color: #999; + line-height: 1; +} +.theme-green .back-bar { + height: 5px; + border-radius: 2px; + background-color: #eeeeee; + background-color: #e7e7e7; + background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); + background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); + background-image: -o-linear-gradient(top, #eeeeee, #dddddd); + background-image: linear-gradient(to bottom, #eeeeee, #dddddd); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); +} +.theme-green .back-bar .selected-bar { + border-radius: 2px; + background-color: #a1fad0; + background-image: -moz-linear-gradient(top, #bdfade, #76fabc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bdfade), to(#76fabc)); + background-image: -webkit-linear-gradient(top, #bdfade, #76fabc); + background-image: -o-linear-gradient(top, #bdfade, #76fabc); + background-image: linear-gradient(to bottom, #bdfade, #76fabc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbdfade', endColorstr='#ff76fabc', GradientType=0); +} +.theme-green .back-bar .pointer { + width: 14px; + height: 14px; + top: -5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 10px; + border: 1px solid #AAA; + background-color: #e7e7e7; + background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); + background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); + background-image: -o-linear-gradient(top, #eeeeee, #dddddd); + background-image: linear-gradient(to bottom, #eeeeee, #dddddd); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); + cursor: col-resize; +} +.theme-green .back-bar .pointer-label { + color: #999; +} +.theme-green .back-bar .focused { + color: #333; +} +.theme-green .scale span { + border-left: 1px solid #e5e5e5; +} +.theme-green .scale ins { + color: #999; +} +.theme-blue .back-bar { + height: 5px; + border-radius: 2px; + background-color: #eeeeee; + background-color: #e7e7e7; + background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); + background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); + background-image: -o-linear-gradient(top, #eeeeee, #dddddd); + background-image: linear-gradient(to bottom, #eeeeee, #dddddd); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); +} +.theme-blue .back-bar .selected-bar { + border-radius: 2px; + background-color: #92c1f9; + background-image: -moz-linear-gradient(top, #b1d1f9, #64a8f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b1d1f9), to(#64a8f9)); + background-image: -webkit-linear-gradient(top, #b1d1f9, #64a8f9); + background-image: -o-linear-gradient(top, #b1d1f9, #64a8f9); + background-image: linear-gradient(to bottom, #b1d1f9, #64a8f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb1d1f9', endColorstr='#ff64a8f9', GradientType=0); +} +.theme-blue .back-bar .pointer { + width: 14px; + height: 14px; + top: -5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 10px; + border: 1px solid #AAA; + background-color: #e7e7e7; + background-image: -moz-linear-gradient(top, #eeeeee, #dddddd); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eeeeee), to(#dddddd)); + background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd); + background-image: -o-linear-gradient(top, #eeeeee, #dddddd); + background-image: linear-gradient(to bottom, #eeeeee, #dddddd); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffeeeeee', endColorstr='#ffdddddd', GradientType=0); + cursor: col-resize; +} +.theme-blue .back-bar .pointer-label { + color: #999; +} +.theme-blue .back-bar .focused { + color: #333; +} +.theme-blue .scale span { + border-left: 1px solid #e5e5e5; +} +.theme-blue .scale ins { + color: #999; +} diff --git a/library/jRange/jquery.range.js b/library/jRange/jquery.range.js new file mode 100644 index 000000000..978b3e7ba --- /dev/null +++ b/library/jRange/jquery.range.js @@ -0,0 +1,297 @@ +/*jshint multistr:true, curly: false */ +/*global jQuery:false, define: false */ +/** + * jRange - Awesome range control + * + * Written by + * ---------- + * Nitin Hayaran (nitinhayaran@gmail.com) + * + * Licensed under the MIT (MIT-LICENSE.txt). + * + * @author Nitin Hayaran + * @version 0.1-RELEASE + * + * Dependencies + * ------------ + * jQuery (http://jquery.com) + * + **/ + ; + (function($, window, document, undefined) { + 'use strict'; + + var jRange = function(){ + return this.init.apply(this, arguments); + }; + jRange.prototype = { + defaults : { + onstatechange : function(){}, + isRange : false, + showLabels : true, + showScale : true, + step : 1, + format: '%s', + theme : 'theme-green', + width : 300 + }, + template : '
\ +
\ +
\ +
123456
\ +
456789
\ +
\ +
\ +
\ +
', + init : function(node, options){ + this.options = $.extend({}, this.defaults, options); + this.inputNode = $(node); + this.options.value = this.inputNode.val() || (this.options.isRange ? this.options.from+','+this.options.from : this.options.from); + this.domNode = $(this.template); + this.domNode.addClass(this.options.theme); + this.inputNode.after(this.domNode); + this.domNode.on('change', this.onChange); + this.pointers = $('.pointer', this.domNode); + this.lowPointer = this.pointers.first(); + this.highPointer = this.pointers.last(); + this.labels = $('.pointer-label', this.domNode); + this.lowLabel = this.labels.first(); + this.highLabel = this.labels.last(); + this.scale = $('.scale', this.domNode); + this.bar = $('.selected-bar', this.domNode); + this.clickableBar = this.domNode.find('.clickable-dummy'); + this.interval = this.options.to - this.options.from; + this.render(); + }, + render: function(){ + // Check if inputNode is visible, and have some width, so that we can set slider width accordingly. + if( this.inputNode.width() === 0 && !this.options.width ){ + console.log('jRange : no width found, returning'); + return; + }else{ + this.domNode.width( this.options.width || this.inputNode.width() ); + this.inputNode.hide(); + } + + if(this.isSingle()){ + this.lowPointer.hide(); + this.lowLabel.hide(); + } + if(!this.options.showLabels){ + this.labels.hide(); + } + this.attachEvents(); + if(this.options.showScale){ + this.renderScale(); + } + this.setValue(this.options.value); + }, + isSingle: function(){ + if(typeof(this.options.value) === 'number'){ + return true; + } + return (this.options.value.indexOf(',') !== -1 || this.options.isRange) ? + false : true; + }, + attachEvents: function(){ + this.clickableBar.click($.proxy(this.barClicked, this)); + this.pointers.mousedown($.proxy(this.onDragStart, this)); + this.pointers.bind('dragstart', function(event) { event.preventDefault(); }); + }, + onDragStart: function(e){ + if(e.which !== 1){return;} + e.stopPropagation(); e.preventDefault(); + var pointer = $(e.target); + pointer.addClass('focused'); + this[(pointer.hasClass('low')?'low':'high') + 'Label'].addClass('focused'); + $(document).on('mousemove.slider', $.proxy(this.onDrag, this, pointer)); + $(document).on('mouseup.slider', $.proxy(this.onDragEnd, this)); + }, + onDrag: function(pointer, e){ + e.stopPropagation(); e.preventDefault(); + var position = e.clientX - this.domNode.offset().left; + this.domNode.trigger('change', [this, pointer, position]); + }, + onDragEnd: function(){ + this.pointers.removeClass('focused'); + this.labels.removeClass('focused'); + $(document).off('.slider'); + $(document).off('.slider'); + }, + barClicked: function(e){ + var x = e.pageX - this.clickableBar.offset().left; + if(this.isSingle()) + this.setPosition(this.pointers.last(), x, true, true); + else{ + var pointer = Math.abs(parseInt(this.pointers.first().css('left'), 10) - x + this.pointers.first().width() / 2) < Math.abs(parseInt(this.pointers.last().css('left'), 10) - x + this.pointers.first().width() / 2) ? + this.pointers.first() : this.pointers.last(); + this.setPosition(pointer, x, true, true); + } + }, + onChange: function(e, self, pointer, position){ + var min, max; + if(self.isSingle()){ + min = 0; + max = self.domNode.width(); + }else{ + min = pointer.hasClass('high')? self.lowPointer.position().left + self.lowPointer.width() / 2 : 0; + max = pointer.hasClass('low') ? self.highPointer.position().left + self.highPointer.width() / 2 : self.domNode.width(); + } + var value = Math.min(Math.max(position, min), max); + self.setPosition(pointer, value, true); + }, + setPosition: function(pointer, position, isPx, animate){ + var leftPos, + lowPos = this.lowPointer.position().left, + highPos = this.highPointer.position().left, + circleWidth = this.highPointer.width() / 2; + if(!isPx){ + position = this.prcToPx(position); + } + if(pointer[0] === this.highPointer[0]){ + highPos = Math.round(position - circleWidth); + }else{ + lowPos = Math.round(position - circleWidth); + } + pointer[animate?'animate':'css']({'left': Math.round(position - circleWidth)}); + if(this.isSingle()){ + leftPos = 0; + }else{ + leftPos = lowPos + circleWidth; + } + this.bar[animate?'animate':'css']({ + 'width' : Math.round(highPos + circleWidth - leftPos), + 'left' : leftPos + }); + this.showPointerValue(pointer, position, animate); + }, + // will be called from outside + setValue: function(value){ + var values = value.toString().split(','); + this.options.value = value; + var prc = this.valuesToPrc( values.length === 2 ? values : [0, values[0]] ); + if(this.isSingle()){ + this.setPosition(this.highPointer, prc[1]); + }else{ + this.setPosition(this.lowPointer, prc[0]); + this.setPosition(this.highPointer, prc[1]); + } + }, + renderScale: function(){ + var s = this.options.scale || [this.options.from, this.options.to]; + var prc = Math.round((100 / (s.length - 1)) * 10) / 10; + var str = ''; + for(var i = 0; i < s.length ; i++ ){ + str += '' + (s[i] != '|' ? '' + s[i] + '' : '') + ''; + } + this.scale.html(str); + + $('ins', this.scale).each(function () { + $(this).css({ + marginLeft: -$(this).outerWidth() / 2 + }); + }); + }, + getBarWidth: function(){ + var values = this.options.value.split(','); + if(values.length > 1){ + return parseInt(values[1], 10) - parseInt(values[0], 10); + }else{ + return parseInt(values[0], 10); + } + }, + showPointerValue: function(pointer, position, animate){ + var label = $('.pointer-label', this.domNode)[pointer.hasClass('low')?'first':'last'](); + var text; + var value = this.positionToValue(position); + if($.isFunction(this.options.format)){ + var type = this.isSingle() ? undefined : (pointer.hasClass('low') ? 'low':'high'); + text = this.options.format(value, type); + }else{ + text = this.options.format.replace('%s', value); + } + + var width = label.html(text).width(), + left = position - width / 2; + left = Math.min(Math.max(left, 0), this.options.width - width); + label[animate?'animate':'css']({left: left}); + this.setInputValue(pointer, value); + }, + valuesToPrc: function(values){ + var lowPrc = ( ( values[0] - this.options.from ) * 100 / this.interval ), + highPrc = ( ( values[1] - this.options.from ) * 100 / this.interval ); + return [lowPrc, highPrc]; + }, + prcToPx: function(prc){ + return (this.domNode.width() * prc) / 100; + }, + positionToValue: function(pos){ + var value = (pos / this.domNode.width()) * this.interval; + value = value + this.options.from; + return Math.round(value / this.options.step) * this.options.step; + }, + setInputValue: function(pointer, v){ + // if(!isChanged) return; + if(this.isSingle()){ + this.options.value = v.toString(); + }else{ + var values = this.options.value.split(','); + if(pointer.hasClass('low')){ + this.options.value = v + ',' + values[1]; + }else{ + this.options.value = values[0] + ',' + v; + } + } + if( this.inputNode.val() !== this.options.value ){ + this.inputNode.val(this.options.value); + this.options.onstatechange.call(this, this.options.value); + } + }, + getValue: function(){ + return this.options.value; + } + }; + + /*$.jRange = function (node, options) { + var jNode = $(node); + if(!jNode.data('jrange')){ + jNode.data('jrange', new jRange(node, options)); + } + return jNode.data('jrange'); + }; + + $.fn.jRange = function (options) { + return this.each(function(){ + $.jRange(this, options); + }); + };*/ + + var pluginName = 'jRange'; + // A really lightweight plugin wrapper around the constructor, + // preventing against multiple instantiations + $.fn[pluginName] = function(option) { + var args = arguments, + result; + + this.each(function() { + var $this = $(this), + data = $.data(this, 'plugin_' + pluginName), + options = typeof option === 'object' && option; + if (!data) { + $this.data('plugin_' + pluginName, (data = new jRange(this, options))); + } + // if first argument is a string, call silimarly named function + // this gives flexibility to call functions of the plugin e.g. + // - $('.dial').plugin('destroy'); + // - $('.dial').plugin('render', $('.new-child')); + if (typeof option === 'string') { + result = data[option].apply(data, Array.prototype.slice.call(args, 1)); + } + }); + + // To enable plugin returns values + return result || this; + }; + +})(jQuery, window, document); \ No newline at end of file diff --git a/library/jRange/jquery.range.less b/library/jRange/jquery.range.less new file mode 100644 index 000000000..979ed2e1a --- /dev/null +++ b/library/jRange/jquery.range.less @@ -0,0 +1,192 @@ +#gradient { + .horizontal(@startColor: #555, @endColor: #333) { + background-color: @endColor; + background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down + } + .vertical(@startColor: #555, @endColor: #333) { + background-color: mix(@startColor, @endColor, 60%); + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down + } + .directional(@startColor: #555, @endColor: #333, @deg: 45deg) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10 + } + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + } + .radial(@innerColor: #555, @outerColor: #333) { + background-color: @outerColor; + background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor)); + background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor); + background-image: -moz-radial-gradient(circle, @innerColor, @outerColor); + background-image: -o-radial-gradient(circle, @innerColor, @outerColor); + background-repeat: no-repeat; + } + .striped(@color: #555, @angle: 45deg) { + background-color: @color; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); + } +} + +.slider-container { + width: 300px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + .back-bar { + height: 10px; + position: relative; + .selected-bar { + position: absolute; + height: 100%; + } + .pointer { + position: absolute; + width: 10px; + height: 10px; + background-color: red; + cursor: move; + opacity: 1; + z-index: 2; + } + .pointer-label { + position: absolute; + top: -17px; + font-size: 8px; + background: white; + white-space: nowrap; + line-height: 1; + } + .focused { + z-index: 10; + } + } + .clickable-dummy { + cursor: pointer; + position: absolute; + width: 100%; + height: 100%; + z-index: 1; + } + .scale { + top: 2px; + position: relative; + span { + position: absolute; + height: 5px; + border-left: 1px solid #999; + font-size: 0; + } + ins { + font-size: 9px; + text-decoration: none; + position: absolute; + left: 0; + top: 5px; + color: #999; + line-height: 1; + } + } +} +.theme-green { + .back-bar { + height: 5px; + border-radius: 2px; + background-color: #eeeeee; + #gradient > .vertical(#eeeeee, #dddddd); + .selected-bar { + border-radius: 2px; + #gradient > .vertical(#bdfade, #76fabc); + } + .pointer { + width: 14px; + height: 14px; + top: -5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 10px; + border: 1px solid #AAA; + #gradient > .vertical(#eeeeee, #dddddd); + cursor: col-resize; + } + .pointer-label { + color: #999; + } + .focused { + color: #333; + } + } + .scale { + span { + border-left: 1px solid #e5e5e5; + } + ins { + color: #999; + } + } +} + +.theme-blue { + .back-bar { + height: 5px; + border-radius: 2px; + background-color: #eeeeee; + #gradient > .vertical(#eeeeee, #dddddd); + .selected-bar { + border-radius: 2px; + #gradient > .vertical(#b1d1f9, #64a8f9); + } + .pointer { + width: 14px; + height: 14px; + top: -5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 10px; + border: 1px solid #AAA; + #gradient > .vertical(#eeeeee, #dddddd); + cursor: col-resize; + } + .pointer-label { + color: #999; + } + .focused { + color: #333; + } + } + .scale { + span { + border-left: 1px solid #e5e5e5; + } + ins { + color: #999; + } + } +} diff --git a/view/php/theme_init.php b/view/php/theme_init.php index 9a545470f..5987835ac 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -5,7 +5,7 @@ require_once('include/plugin.php'); head_add_css('library/fancybox/jquery.fancybox-1.3.4.css'); head_add_css('library/tiptip/tipTip.css'); head_add_css('library/jgrowl/jquery.jgrowl.css'); -head_add_css('library/jslider/css/jslider.css'); +head_add_css('library/jRange/jquery.range.css'); head_add_css('library/colorbox/colorbox.css'); head_add_css('view/css/conversation.css'); @@ -39,7 +39,7 @@ head_add_js('acl.js'); head_add_js('webtoolkit.base64.js'); head_add_js('main.js'); head_add_js('crypto.js'); -head_add_js('library/jslider/bin/jquery.slider.min.js'); +head_add_js('library/jRange/jquery.range.js'); head_add_js('docready.js'); head_add_js('library/colorbox/jquery.colorbox-min.js'); head_add_js('library/bootstrap-tagsinput/bootstrap-tagsinput.js'); diff --git a/view/tpl/contact_slider.tpl b/view/tpl/contact_slider.tpl index 93d0cc625..09a79edd8 100755 --- a/view/tpl/contact_slider.tpl +++ b/view/tpl/contact_slider.tpl @@ -1,4 +1,4 @@
diff --git a/view/tpl/main_slider.tpl b/view/tpl/main_slider.tpl index fbc290df1..c8f3d2e06 100755 --- a/view/tpl/main_slider.tpl +++ b/view/tpl/main_slider.tpl @@ -2,8 +2,8 @@ + -

ColorBox Demonstration

+

Colorbox Demonstration

Elastic Transition

Grouped Photo 1

Grouped Photo 2

@@ -63,7 +66,7 @@

Other Content Types

Outside HTML (Ajax)

-

Flash / Video (Iframe/Direct Link To YouTube)

+

Flash / Video (Iframe/Direct Link To YouTube)

Flash / Video (Iframe/Direct Link To Vimeo)

Outside Webpage (Iframe)

Inline HTML

@@ -71,6 +74,11 @@

Demonstration of using callbacks

Example with alerts. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.

+ +

Retina Images

+

Retina

+

Non-Retina

+
@@ -78,7 +86,7 @@

The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

Click me, it will be preserved!

-

If you try to open a new ColorBox while it is already open, it will update itself with the new content.

+

If you try to open a new Colorbox while it is already open, it will update itself with the new content.

Updating Content Example:
Click here to load new content

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 index 8569b57f1..36f526992 100644 Binary files a/library/colorbox/example2/images/controls.png and b/library/colorbox/example2/images/controls.png differ diff --git a/library/colorbox/example2/images/loading.gif b/library/colorbox/example2/images/loading.gif index 19c67bbd0..a32df5c08 100644 Binary files a/library/colorbox/example2/images/loading.gif and b/library/colorbox/example2/images/loading.gif differ 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 @@ - ColorBox Examples + Colorbox Examples - + -

ColorBox Demonstration

+

Colorbox Demonstration

Elastic Transition

Grouped Photo 1

Grouped Photo 2

@@ -63,7 +66,7 @@

Other Content Types

Outside HTML (Ajax)

-

Flash / Video (Iframe/Direct Link To YouTube)

+

Flash / Video (Iframe/Direct Link To YouTube)

Flash / Video (Iframe/Direct Link To Vimeo)

Outside Webpage (Iframe)

Inline HTML

@@ -71,6 +74,11 @@

Demonstration of using callbacks

Example with alerts. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.

+ +

Retina Images

+

Retina

+

Non-Retina

+
@@ -78,7 +86,7 @@

The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

Click me, it will be preserved!

-

If you try to open a new ColorBox while it is already open, it will update itself with the new content.

+

If you try to open a new Colorbox while it is already open, it will update itself with the new content.

Updating Content Example:
Click here to load new content

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 index 19c67bbd0..a32df5c08 100644 Binary files a/library/colorbox/example3/images/loading.gif and b/library/colorbox/example3/images/loading.gif differ 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 @@ - ColorBox Examples + Colorbox Examples - + -

ColorBox Demonstration

+

Colorbox Demonstration

Elastic Transition

Grouped Photo 1

Grouped Photo 2

@@ -63,7 +66,7 @@

Other Content Types

Outside HTML (Ajax)

-

Flash / Video (Iframe/Direct Link To YouTube)

+

Flash / Video (Iframe/Direct Link To YouTube)

Flash / Video (Iframe/Direct Link To Vimeo)

Outside Webpage (Iframe)

Inline HTML

@@ -71,6 +74,11 @@

Demonstration of using callbacks

Example with alerts. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.

+ +

Retina Images

+

Retina

+

Non-Retina

+
@@ -78,7 +86,7 @@

The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

Click me, it will be preserved!

-

If you try to open a new ColorBox while it is already open, it will update itself with the new content.

+

If you try to open a new Colorbox while it is already open, it will update itself with the new content.

Updating Content Example:
Click here to load new content

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 index 0ddc70405..ea73e1592 100644 Binary files a/library/colorbox/example4/images/border1.png and b/library/colorbox/example4/images/border1.png differ diff --git a/library/colorbox/example4/images/border2.png b/library/colorbox/example4/images/border2.png index aa62a0b72..72cad44ce 100644 Binary files a/library/colorbox/example4/images/border2.png and b/library/colorbox/example4/images/border2.png differ diff --git a/library/colorbox/example4/images/ie6/borderBottomCenter.png b/library/colorbox/example4/images/ie6/borderBottomCenter.png deleted file mode 100644 index 12e0e9ac0..000000000 Binary files a/library/colorbox/example4/images/ie6/borderBottomCenter.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderBottomLeft.png b/library/colorbox/example4/images/ie6/borderBottomLeft.png deleted file mode 100644 index b7a474ae0..000000000 Binary files a/library/colorbox/example4/images/ie6/borderBottomLeft.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderBottomRight.png b/library/colorbox/example4/images/ie6/borderBottomRight.png deleted file mode 100644 index 6b6cb159b..000000000 Binary files a/library/colorbox/example4/images/ie6/borderBottomRight.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderMiddleLeft.png b/library/colorbox/example4/images/ie6/borderMiddleLeft.png deleted file mode 100644 index 8d0eb739d..000000000 Binary files a/library/colorbox/example4/images/ie6/borderMiddleLeft.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderMiddleRight.png b/library/colorbox/example4/images/ie6/borderMiddleRight.png deleted file mode 100644 index d65509e30..000000000 Binary files a/library/colorbox/example4/images/ie6/borderMiddleRight.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderTopCenter.png b/library/colorbox/example4/images/ie6/borderTopCenter.png deleted file mode 100644 index 35d8da2d0..000000000 Binary files a/library/colorbox/example4/images/ie6/borderTopCenter.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderTopLeft.png b/library/colorbox/example4/images/ie6/borderTopLeft.png deleted file mode 100644 index ae9bda040..000000000 Binary files a/library/colorbox/example4/images/ie6/borderTopLeft.png and /dev/null differ diff --git a/library/colorbox/example4/images/ie6/borderTopRight.png b/library/colorbox/example4/images/ie6/borderTopRight.png deleted file mode 100644 index 0d8868399..000000000 Binary files a/library/colorbox/example4/images/ie6/borderTopRight.png and /dev/null differ diff --git a/library/colorbox/example4/images/loading.gif b/library/colorbox/example4/images/loading.gif index 602ce3c3a..1f3a2c0ab 100644 Binary files a/library/colorbox/example4/images/loading.gif and b/library/colorbox/example4/images/loading.gif differ 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 @@ - ColorBox Examples + Colorbox Examples - + -

ColorBox Demonstration

+

Colorbox Demonstration

Elastic Transition

Grouped Photo 1

Grouped Photo 2

@@ -63,7 +66,7 @@

Other Content Types

Outside HTML (Ajax)

-

Flash / Video (Iframe/Direct Link To YouTube)

+

Flash / Video (Iframe/Direct Link To YouTube)

Flash / Video (Iframe/Direct Link To Vimeo)

Outside Webpage (Iframe)

Inline HTML

@@ -71,6 +74,11 @@

Demonstration of using callbacks

Example with alerts. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.

+ +

Retina Images

+

Retina

+

Non-Retina

+
@@ -78,7 +86,7 @@

The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

Click me, it will be preserved!

-

If you try to open a new ColorBox while it is already open, it will update itself with the new content.

+

If you try to open a new Colorbox while it is already open, it will update itself with the new content.

Updating Content Example:
Click here to load new content

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 index df13bb6da..c1cd1a2a4 100644 Binary files a/library/colorbox/example5/images/border.png and b/library/colorbox/example5/images/border.png differ diff --git a/library/colorbox/example5/images/controls.png b/library/colorbox/example5/images/controls.png index 65cfd1dc9..259130cd5 100644 Binary files a/library/colorbox/example5/images/controls.png and b/library/colorbox/example5/images/controls.png differ diff --git a/library/colorbox/example5/images/loading.gif b/library/colorbox/example5/images/loading.gif index b4695d811..dba33c816 100644 Binary files a/library/colorbox/example5/images/loading.gif and b/library/colorbox/example5/images/loading.gif differ diff --git a/library/colorbox/example5/images/loading_background.png b/library/colorbox/example5/images/loading_background.png index 9de11f467..23a336b39 100644 Binary files a/library/colorbox/example5/images/loading_background.png and b/library/colorbox/example5/images/loading_background.png differ 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 @@ - ColorBox Examples + Colorbox Examples - + -

ColorBox Demonstration

+

Colorbox Demonstration

Elastic Transition

Grouped Photo 1

Grouped Photo 2

@@ -63,7 +66,7 @@

Other Content Types

Outside HTML (Ajax)

-

Flash / Video (Iframe/Direct Link To YouTube)

+

Flash / Video (Iframe/Direct Link To YouTube)

Flash / Video (Iframe/Direct Link To Vimeo)

Outside Webpage (Iframe)

Inline HTML

@@ -71,6 +74,11 @@

Demonstration of using callbacks

Example with alerts. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.

+ +

Retina Images

+

Retina

+

Non-Retina

+
@@ -78,7 +86,7 @@

The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.

Click me, it will be preserved!

-

If you try to open a new ColorBox while it is already open, it will update itself with the new content.

+

If you try to open a new Colorbox while it is already open, it will update itself with the new content.

Updating Content Example:
Click here to load new content

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 deleted file mode 100644 index df13bb6da..000000000 Binary files a/library/colorbox/images/border.png and /dev/null differ diff --git a/library/colorbox/images/controls.png b/library/colorbox/images/controls.png deleted file mode 100644 index 65cfd1dc9..000000000 Binary files a/library/colorbox/images/controls.png and /dev/null differ diff --git a/library/colorbox/images/loading.gif b/library/colorbox/images/loading.gif deleted file mode 100644 index b4695d811..000000000 Binary files a/library/colorbox/images/loading.gif and /dev/null differ diff --git a/library/colorbox/images/loading_background.png b/library/colorbox/images/loading_background.png deleted file mode 100644 index 9de11f467..000000000 Binary files a/library/colorbox/images/loading_background.png and /dev/null differ 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=$("");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.mw1){if(typeof settings.current==="string"){$current.html(settings.current.replace("{current}",index+1).replace("{total}",total)).show()}$next[settings.loop||indexsettings.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("
"),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('