Responsive Lightbox & Gallery - Version 1.0.1

Version Description

  • New: Support for video links (YouTube and Vimeo)
  • New: Added Polish translation
  • New: Added Persian translation by Ali Mirzaei
  • Tweak: Changed method of applying lightbox rel attribute to single images
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Responsive Lightbox & Gallery
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

assets/swipebox/README.md CHANGED
@@ -27,31 +27,44 @@ Chrome, Safari, Firefox, Opera, IE8+, IOS4+, Android, windows phone.
27
28
Include jquery and the swipebox script in your head tags or right before your body closing tag.
29
30
- `<script src="lib/jquery-1.9.0.js"></script>`
31
-
32
- `<script src="source/jquery.swipebox.min.js"></script>`
33
34
###CSS
35
36
Include the swipebox CSS style in your head tags.
37
38
- `<link rel="stylesheet" href="source/swipebox.css">`
39
40
###HTML
41
42
Use a specific class for your links and use the title attribute as caption.
43
44
- `<a href="big/image.jpg" class="swipebox" title="My Caption">`
45
46
###Fire the plugin
47
48
Bind the swipebox behaviour on every link with the "swipebox" class.
49
50
- `$(".swipebox").swipebox();`
51
-
52
53
- ###Need a couple of options?
54
55
56
- `useCSS : true, // false will force the use of jQuery for animations`
57
- `hideBarsDelay : 3000 // 0 to always show caption and action bar`
27
28
Include jquery and the swipebox script in your head tags or right before your body closing tag.
29
30
+ ```html
31
+ <script src="lib/jquery-1.9.0.js"></script>
32
+ <script src="source/jquery.swipebox.js"></script>
33
+ ```
34
35
###CSS
36
37
Include the swipebox CSS style in your head tags.
38
39
+ ```html
40
+ <link rel="stylesheet" href="source/swipebox.css">
41
+ ```
42
43
###HTML
44
45
Use a specific class for your links and use the title attribute as caption.
46
47
+ ```html
48
+ <a href="big/image.jpg" class="swipebox" title="My Caption">
49
+ ```
50
51
###Fire the plugin
52
53
Bind the swipebox behaviour on every link with the "swipebox" class.
54
55
+ ```javascript
56
+ $(".swipebox").swipebox();
57
+ ```
58
59
+ ###Options
60
61
+ ```javascript
62
+ useCSS : true, // false will force the use of jQuery for animations
63
+ hideBarsDelay : 3000, // 0 to always show caption and action bar
64
+ videoMaxWidth : 1140, // videos max width
65
+ beforeOpen: function(){} , // called before opening
66
+ afterClose: function(){} // called after closing
67
+ ```
68
69
+ ####Credits
70
+ Photos by [Daniele Zedda](http://www.flickr.com/photos/astragony/)
assets/swipebox/lib/ios-orientationchange-fix.js CHANGED
@@ -1,56 +1,56 @@
1
- /*! A fix for the iOS orientationchange zoom bug.
2
- Script by @scottjehl, rebound by @wilto.
3
- MIT / GPLv2 License.
4
- */
5
- (function(w){
6
-
7
- // This fix addresses an iOS bug, so return early if the UA claims it's something else.
8
- var ua = navigator.userAgent;
9
- if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(ua) && ua.indexOf( "AppleWebKit" ) > -1 ) ){
10
- return;
11
- }
12
-
13
- var doc = w.document;
14
-
15
- if( !doc.querySelector ){ return; }
16
-
17
- var meta = doc.querySelector( "meta[name=viewport]" ),
18
- initialContent = meta && meta.getAttribute( "content" ),
19
- disabledZoom = initialContent + ",maximum-scale=1",
20
- enabledZoom = initialContent + ",maximum-scale=10",
21
- enabled = true,
22
- x, y, z, aig;
23
-
24
- if( !meta ){ return; }
25
-
26
- function restoreZoom(){
27
- meta.setAttribute( "content", enabledZoom );
28
- enabled = true;
29
- }
30
-
31
- function disableZoom(){
32
- meta.setAttribute( "content", disabledZoom );
33
- enabled = false;
34
- }
35
-
36
- function checkTilt( e ){
37
- aig = e.accelerationIncludingGravity;
38
- x = Math.abs( aig.x );
39
- y = Math.abs( aig.y );
40
- z = Math.abs( aig.z );
41
-
42
- // If portrait orientation and in one of the danger zones
43
- if( (!w.orientation || w.orientation === 180) && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
44
- if( enabled ){
45
- disableZoom();
46
- }
47
- }
48
- else if( !enabled ){
49
- restoreZoom();
50
- }
51
- }
52
-
53
- w.addEventListener( "orientationchange", restoreZoom, false );
54
- w.addEventListener( "devicemotion", checkTilt, false );
55
-
56
})( this );
1
+ /*! A fix for the iOS orientationchange zoom bug.
2
+ Script by @scottjehl, rebound by @wilto.
3
+ MIT / GPLv2 License.
4
+ */
5
+ (function(w){
6
+
7
+ // This fix addresses an iOS bug, so return early if the UA claims it's something else.
8
+ var ua = navigator.userAgent;
9
+ if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(ua) && ua.indexOf( "AppleWebKit" ) > -1 ) ){
10
+ return;
11
+ }
12
+
13
+ var doc = w.document;
14
+
15
+ if( !doc.querySelector ){ return; }
16
+
17
+ var meta = doc.querySelector( "meta[name=viewport]" ),
18
+ initialContent = meta && meta.getAttribute( "content" ),
19
+ disabledZoom = initialContent + ",maximum-scale=1",
20
+ enabledZoom = initialContent + ",maximum-scale=10",
21
+ enabled = true,
22
+ x, y, z, aig;
23
+
24
+ if( !meta ){ return; }
25
+
26
+ function restoreZoom(){
27
+ meta.setAttribute( "content", enabledZoom );
28
+ enabled = true;
29
+ }
30
+
31
+ function disableZoom(){
32
+ meta.setAttribute( "content", disabledZoom );
33
+ enabled = false;
34
+ }
35
+
36
+ function checkTilt( e ){
37
+ aig = e.accelerationIncludingGravity;
38
+ x = Math.abs( aig.x );
39
+ y = Math.abs( aig.y );
40
+ z = Math.abs( aig.z );
41
+
42
+ // If portrait orientation and in one of the danger zones
43
+ if( (!w.orientation || w.orientation === 180) && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
44
+ if( enabled ){
45
+ disableZoom();
46
+ }
47
+ }
48
+ else if( !enabled ){
49
+ restoreZoom();
50
+ }
51
+ }
52
+
53
+ w.addEventListener( "orientationchange", restoreZoom, false );
54
+ w.addEventListener( "devicemotion", checkTilt, false );
55
+
56
})( this );
assets/swipebox/source/jquery.swipebox.js CHANGED
@@ -1,451 +1,593 @@
1
- /*---------------------------------------------------------------------------------------------
2
-
3
- @author Constantin Saguin - @brutaldesign
4
- @link http://bsign.co
5
- @github http://github.com/brutaldesign/swipebox
6
- @version 1.1.2
7
- @license MIT License
8
-
9
- ----------------------------------------------------------------------------------------------*/
10
-
11
- ;(function (window, document, $, undefined) {
12
-
13
- $.swipebox = function(elem, options) {
14
-
15
- var defaults = {
16
- useCSS : true,
17
- hideBarsDelay : 3000
18
- },
19
-
20
- plugin = this,
21
- $elem = $(elem),
22
- elem = elem,
23
- selector = elem.selector,
24
- $selector = $(selector),
25
- isTouch = document.createTouch !== undefined || ('ontouchstart' in window) || ('onmsgesturechange' in window) || navigator.msMaxTouchPoints,
26
- supportSVG = !!(window.SVGSVGElement),
27
- html = '<div id="swipebox-overlay">\
28
- <div id="swipebox-slider"></div>\
29
- <div id="swipebox-caption"></div>\
30
- <div id="swipebox-action">\
31
- <a id="swipebox-close"></a>\
32
- <a id="swipebox-prev"></a>\
33
- <a id="swipebox-next"></a>\
34
- </div>\
35
- </div>';
36
-
37
- plugin.settings = {}
38
-
39
- plugin.init = function(){
40
-
41
- plugin.settings = $.extend({}, defaults, options);
42
-
43
- $selector.click(function(e){
44
- e.preventDefault();
45
- e.stopPropagation();
46
- index = $elem.index($(this));
47
- ui.target = $(e.target);
48
- ui.init(index);
49
- });
50
- }
51
-
52
- var ui = {
53
-
54
- init : function(index){
55
- this.target.trigger('swipebox-start');
56
- this.build();
57
- this.openSlide(index);
58
- this.openImg(index);
59
- this.preloadImg(index+1);
60
- this.preloadImg(index-1);
61
- },
62
-
63
- build : function(){
64
- var $this = this;
65
-
66
- $('body').append(html);
67
-
68
- if($this.doCssTrans()){
69
- $('#swipebox-slider').css({
70
- '-webkit-transition' : 'left 0.4s ease',
71
- '-moz-transition' : 'left 0.4s ease',
72
- '-o-transition' : 'left 0.4s ease',
73
- '-khtml-transition' : 'left 0.4s ease',
74
- 'transition' : 'left 0.4s ease'
75
- });
76
- $('#swipebox-overlay').css({
77
- '-webkit-transition' : 'opacity 1s ease',
78
- '-moz-transition' : 'opacity 1s ease',
79
- '-o-transition' : 'opacity 1s ease',
80
- '-khtml-transition' : 'opacity 1s ease',
81
- 'transition' : 'opacity 1s ease'
82
- });
83
- $('#swipebox-action, #swipebox-caption').css({
84
- '-webkit-transition' : '0.5s',
85
- '-moz-transition' : '0.5s',
86
- '-o-transition' : '0.5s',
87
- '-khtml-transition' : '0.5s',
88
- 'transition' : '0.5s'
89
- });
90
- }
91
-
92
-
93
- if(supportSVG){
94
- var bg = $('#swipebox-action #swipebox-close').css('background-image');
95
- bg = bg.replace('png', 'svg');
96
- $('#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close').css({
97
- 'background-image' : bg
98
- });
99
- }
100
-
101
- $elem.each(function(){
102
- $('#swipebox-slider').append('<div class="slide"></div>');
103
- });
104
-
105
- $this.setDim();
106
- $this.actions();
107
- $this.keyboard();
108
- $this.gesture();
109
- $this.animBars();
110
-
111
- $(window).resize(function() {
112
- $this.setDim();
113
- }).resize();
114
- },
115
-
116
- setDim : function(){
117
- var sliderCss = {
118
- width : $(window).width(),
119
- height : window.innerHeight ? window.innerHeight : $(window).height() // fix IOS bug
120
- }
121
-
122
- $('#swipebox-overlay').css(sliderCss);
123
-
124
- },
125
-
126
- supportTransition : function() {
127
- var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split(' ');
128
- for(var i = 0; i < prefixes.length; i++) {
129
- if(document.createElement('div').style[prefixes[i]] !== undefined) {
130
- return prefixes[i];
131
- }
132
- }
133
- return false;
134
- },
135
-
136
- doCssTrans : function(){
137
- if(plugin.settings.useCSS && this.supportTransition() ){
138
- return true;
139
- }
140
- },
141
-
142
- gesture : function(){
143
- if ( isTouch ){
144
- var $this = this,
145
- distance = null,
146
- swipMinDistance = 10,
147
- startCoords = {},
148
- endCoords = {};
149
- var b = $('#swipebox-caption, #swipebox-action');
150
-
151
- b.addClass('visible-bars');
152
- $this.setTimeout();
153
-
154
- $('body').bind('touchstart', function(e){
155
-
156
- $(this).addClass('touching');
157
-
158
- endCoords = e.originalEvent.targetTouches[0];
159
- startCoords.pageX = e.originalEvent.targetTouches[0].pageX;
160
-
161
- $('.touching').bind('touchmove',function(e){
162
- e.preventDefault();
163
- e.stopPropagation();
164
- endCoords = e.originalEvent.targetTouches[0];
165
-
166
- });
167
-
168
- return false;
169
-
170
- }).bind('touchend',function(e){
171
- e.preventDefault();
172
- e.stopPropagation();
173
-
174
- distance = endCoords.pageX - startCoords.pageX;
175
-
176
- if( distance >= swipMinDistance ){
177
- // swipeLeft
178
- $this.getPrev();
179
- }
180
-
181
- else if( distance <= - swipMinDistance ){
182
- // swipeRight
183
- $this.getNext();
184
-
185
- }else{
186
- // tap
187
- if(!b.hasClass('visible-bars')){
188
- $this.showBars();
189
- $this.setTimeout();
190
- }else{
191
- $this.clearTimeout();
192
- $this.hideBars();
193
- }
194
-
195
- }
196
-
197
- $('.touching').off('touchmove').removeClass('touching');
198
-
199
- });
200
-
201
- }
202
- },
203
-
204
- setTimeout: function(){
205
- if(plugin.settings.hideBarsDelay > 0){
206
- var $this = this;
207
- $this.clearTimeout();
208
- $this.timeout = window.setTimeout( function(){
209
- $this.hideBars() },
210
- plugin.settings.hideBarsDelay
211
- );
212
- }
213
- },
214
-
215
- clearTimeout: function(){
216
- window.clearTimeout(this.timeout);
217
- this.timeout = null;
218
- },
219
-
220
- showBars : function(){
221
- var b = $('#swipebox-caption, #swipebox-action');
222
- if(this.doCssTrans()){
223
- b.addClass('visible-bars');
224
- }else{
225
- $('#swipebox-caption').animate({ top : 0 }, 500);
226
- $('#swipebox-action').animate({ bottom : 0 }, 500);
227
- setTimeout(function(){
228
- b.addClass('visible-bars');
229
- }, 1000);
230
- }
231
- },
232
-
233
- hideBars : function(){
234
- var b = $('#swipebox-caption, #swipebox-action');
235
- if(this.doCssTrans()){
236
- b.removeClass('visible-bars');
237
- }else{
238
- $('#swipebox-caption').animate({ top : '-50px' }, 500);
239
- $('#swipebox-action').animate({ bottom : '-50px' }, 500);
240
- setTimeout(function(){
241
- b.removeClass('visible-bars');
242
- }, 1000);
243
- }
244
- },
245
-
246
- animBars : function(){
247
- var $this = this;
248
- var b = $('#swipebox-caption, #swipebox-action');
249
-
250
- b.addClass('visible-bars');
251
- $this.setTimeout();
252
-
253
- $('#swipebox-slider').click(function(e){
254
- if(!b.hasClass('visible-bars')){
255
- $this.showBars();
256
- $this.setTimeout();
257
- }
258
- });
259
-
260
- $('#swipebox-action').hover(function() {
261
- $this.showBars();
262
- b.addClass('force-visible-bars');
263
- $this.clearTimeout();
264
-
265
- },function() {
266
- b.removeClass('force-visible-bars');
267
- $this.setTimeout();
268
-
269
- });
270
- },
271
-
272
- keyboard : function(){
273
- var $this = this;
274
- $(window).bind('keyup', function(e){
275
- e.preventDefault();
276
- e.stopPropagation();
277
- if (e.keyCode == 37){
278
- $this.getPrev();
279
- }
280
- else if (e.keyCode==39){
281
- $this.getNext();
282
- }
283
- else if (e.keyCode == 27) {
284
- $this.closeSlide();
285
- }
286
- });
287
- },
288
-
289
- actions : function(){
290
- var $this = this;
291
-
292
- if( $elem.length < 2 ){
293
- $('#swipebox-prev, #swipebox-next').hide();
294
- }else{
295
- $('#swipebox-prev').bind('click touchend', function(e){
296
- e.preventDefault();
297
- e.stopPropagation();
298
- $this.getPrev();
299
- $this.setTimeout();
300
- });
301
-
302
- $('#swipebox-next').bind('click touchend', function(e){
303
- e.preventDefault();
304
- e.stopPropagation();
305
- $this.getNext();
306
- $this.setTimeout();
307
- });
308
- }
309
-
310
- $('#swipebox-close').bind('click touchend', function(e){
311
- $this.closeSlide();
312
- });
313
- },
314
-
315
- setSlide : function (index, isFirst){
316
- isFirst = isFirst || false;
317
-
318
- var slider = $('#swipebox-slider');
319
-
320
- if(this.doCssTrans()){
321
- slider.css({ left : (-index*100)+'%' });
322
- }else{
323
- slider.animate({ left : (-index*100)+'%' });
324
- }
325
-
326
- $('#swipebox-slider .slide').removeClass('current');
327
- $('#swipebox-slider .slide').eq(index).addClass('current');
328
- this.setTitle(index);
329
-
330
- if( isFirst ){
331
- slider.fadeIn();
332
- }
333
-
334
- $('#swipebox-prev, #swipebox-next').removeClass('disabled');
335
- if(index == 0){
336
- $('#swipebox-prev').addClass('disabled');
337
- }else if( index == $elem.length - 1 ){
338
- $('#swipebox-next').addClass('disabled');
339
- }
340
- },
341
-
342
- openSlide : function (index){
343
-
344
- $('html').addClass('swipebox');
345
- $(window).trigger('resize'); // fix scroll bar visibility on desktop
346
- this.setSlide(index, true);
347
- },
348
-
349
- preloadImg : function (index){
350
- var $this = this;
351
- setTimeout(function(){
352
- $this.openImg(index);
353
- }, 1000);
354
- },
355
-
356
- openImg : function (index){
357
- var $this = this;
358
- if(index < 0 || index >= $elem.length){
359
- return false;
360
- }
361
-
362
- $this.loadImg($elem.eq(index).attr('href'), function(){
363
- $('#swipebox-slider .slide').eq(index).html(this);
364
- });
365
- },
366
-
367
-
368
- setTitle : function(index, isFirst){
369
- $('#swipebox-caption').empty();
370
-
371
- if($elem.eq(index).attr('title')){
372
- $('#swipebox-caption').append($elem.eq(index).attr('title'));
373
- }
374
- },
375
-
376
- loadImg : function (src, callback){
377
- var img = $('<img>').on('load', function(){
378
- callback.call(img);
379
- });
380
-
381
- img.attr('src',src);
382
- },
383
-
384
- getNext : function (){
385
- var $this = this;
386
- index = $('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
387
- if(index+1 < $elem.length){
388
- index++;
389
- $this.setSlide(index);
390
- $this.preloadImg(index+1);
391
- }
392
- else{
393
-
394
- $('#swipebox-slider').addClass('rightSpring');
395
- setTimeout(function(){
396
- $('#swipebox-slider').removeClass('rightSpring');
397
- },500);
398
- }
399
- },
400
-
401
- getPrev : function (){
402
- var $this = this;
403
- index = $('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
404
- if(index > 0){
405
- index--;
406
- $this.setSlide(index);
407
- $this.preloadImg(index-1);
408
- }
409
- else{
410
-
411
- $('#swipebox-slider').addClass('leftSpring');
412
- setTimeout(function(){
413
- $('#swipebox-slider').removeClass('leftSpring');
414
- },500);
415
- }
416
- },
417
-
418
-
419
- closeSlide : function (){
420
- var $this = this;
421
- $(window).trigger('resize');
422
- $('html').removeClass('swipebox');
423
- $this.destroy();
424
- },
425
-
426
- destroy : function(){
427
- var $this = this;
428
- $(window).unbind('keyup');
429
- $('body').unbind('touchstart');
430
- $('body').unbind('touchmove');
431
- $('body').unbind('touchend');
432
- $('#swipebox-slider').unbind();
433
- $('#swipebox-overlay').remove();
434
- $elem.removeData('_swipebox');
435
- $this.target.trigger('swipebox-destroy');
436
- }
437
-
438
- }
439
-
440
- plugin.init();
441
-
442
- }
443
-
444
- $.fn.swipebox = function(options){
445
- if (!$.data(this, "_swipebox")) {
446
- var swipebox = new $.swipebox(this, options);
447
- this.data('_swipebox', swipebox);
448
- }
449
- }
450
-
451
- }(window, document, jQuery));
1
+ /*---------------------------------------------------------------------------------------------
2
+
3
+ @author Constantin Saguin - @brutaldesign
4
+ @link http://csag.co
5
+ @github http://github.com/brutaldesign/swipebox
6
+ @version 1.2.1
7
+ @license MIT License
8
+
9
+ ----------------------------------------------------------------------------------------------*/
10
+
11
+ ;(function (window, document, $, undefined) {
12
+
13
+ $.swipebox = function(elem, options) {
14
+
15
+ var defaults = {
16
+ useCSS : true,
17
+ hideBarsDelay : 3000,
18
+ videoMaxWidth : 1140,
19
+ vimeoColor : 'CCCCCC',
20
+ beforeOpen: null,
21
+ afterClose: null
22
+ },
23
+
24
+ plugin = this,
25
+ elements = [], // slides array [{href:'...', title:'...'}, ...],
26
+ elem = elem,
27
+ selector = elem.selector,
28
+ $selector = $(selector),
29
+ isTouch = document.createTouch !== undefined || ('ontouchstart' in window) || ('onmsgesturechange' in window) || navigator.msMaxTouchPoints,
30
+ supportSVG = !!(window.SVGSVGElement),
31
+ winWidth = window.innerWidth ? window.innerWidth : $(window).width(),
32
+ winHeight = window.innerHeight ? window.innerHeight : $(window).height(),
33
+ html = '<div id="swipebox-overlay">\
34
+ <div id="swipebox-slider"></div>\
35
+ <div id="swipebox-caption"></div>\
36
+ <div id="swipebox-action">\
37
+ <a id="swipebox-close"></a>\
38
+ <a id="swipebox-prev"></a>\
39
+ <a id="swipebox-next"></a>\
40
+ </div>\
41
+ </div>';
42
+
43
+ plugin.settings = {}
44
+
45
+ plugin.init = function(){
46
+
47
+ plugin.settings = $.extend({}, defaults, options);
48
+
49
+ if ($.isArray(elem)) {
50
+
51
+ elements = elem;
52
+ ui.target = $(window);
53
+ ui.init(0);
54
+
55
+ }else{
56
+
57
+ $selector.click(function(e){
58
+ elements = [];
59
+ var index , relType, relVal;
60
+
61
+ if (!relVal) {
62
+ relType = 'rel';
63
+ relVal = $(this).attr(relType);
64
+ }
65
+
66
+ if (relVal && relVal !== '' && relVal !== 'nofollow') {
67
+ $elem = $selector.filter('[' + relType + '="' + relVal + '"]');
68
+ }else{
69
+ $elem = $(selector);
70
+ }
71
+
72
+ $elem.each(function(){
73
+
74
+ var title = null, href = null;
75
+
76
+ if( $(this).attr('title') )
77
+ title = $(this).attr('title');
78
+
79
+ if( $(this).attr('href') )
80
+ href = $(this).attr('href');
81
+
82
+ elements.push({
83
+ href: href,
84
+ title: title
85
+ });
86
+ });
87
+
88
+ index = $elem.index($(this));
89
+ e.preventDefault();
90
+ e.stopPropagation();
91
+ ui.target = $(e.target);
92
+ ui.init(index);
93
+ });
94
+ }
95
+ }
96
+
97
+ plugin.refresh = function() {
98
+ if (!$.isArray(elem)) {
99
+ ui.destroy();
100
+ $elem = $(selector);
101
+ ui.actions();
102
+ }
103
+ }
104
+
105
+ var ui = {
106
+
107
+ init : function(index){
108
+ if (plugin.settings.beforeOpen)
109
+ plugin.settings.beforeOpen();
110
+ this.target.trigger('swipebox-start');
111
+ $.swipebox.isOpen = true;
112
+ this.build();
113
+ this.openSlide(index);
114
+ this.openMedia(index);
115
+ this.preloadMedia(index+1);
116
+ this.preloadMedia(index-1);
117
+ },
118
+
119
+ build : function(){
120
+ var $this = this;
121
+
122
+ $('body').append(html);
123
+
124
+ if($this.doCssTrans()){
125
+ $('#swipebox-slider').css({
126
+ '-webkit-transition' : 'left 0.4s ease',
127
+ '-moz-transition' : 'left 0.4s ease',
128
+ '-o-transition' : 'left 0.4s ease',
129
+ '-khtml-transition' : 'left 0.4s ease',
130
+ 'transition' : 'left 0.4s ease'
131
+ });
132
+ $('#swipebox-overlay').css({
133
+ '-webkit-transition' : 'opacity 1s ease',
134
+ '-moz-transition' : 'opacity 1s ease',
135
+ '-o-transition' : 'opacity 1s ease',
136
+ '-khtml-transition' : 'opacity 1s ease',
137
+ 'transition' : 'opacity 1s ease'
138
+ });
139
+ $('#swipebox-action, #swipebox-caption').css({
140
+ '-webkit-transition' : '0.5s',
141
+ '-moz-transition' : '0.5s',
142
+ '-o-transition' : '0.5s',
143
+ '-khtml-transition' : '0.5s',
144
+ 'transition' : '0.5s'
145
+ });
146
+ }
147
+
148
+
149
+ if(supportSVG){
150
+ var bg = $('#swipebox-action #swipebox-close').css('background-image');
151
+ bg = bg.replace('png', 'svg');
152
+ $('#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close').css({
153
+ 'background-image' : bg
154
+ });
155
+ }
156
+
157
+ $.each( elements, function(){
158
+ $('#swipebox-slider').append('<div class="slide"></div>');
159
+ });
160
+
161
+ $this.setDim();
162
+ $this.actions();
163
+ $this.keyboard();
164
+ $this.gesture();
165
+ $this.animBars();
166
+ $this.resize();
167
+
168
+ },
169
+
170
+ setDim : function(){
171
+
172
+ var width, height, sliderCss = {};
173
+
174
+ if( "onorientationchange" in window ){
175
+
176
+ window.addEventListener("orientationchange", function() {
177
+ if( window.orientation == 0 ){
178
+ width = winWidth;
179
+ height = winHeight;
180
+ }else if( window.orientation == 90 || window.orientation == -90 ){
181
+ width = winHeight;
182
+ height = winWidth;
183
+ }
184
+ }, false);
185
+
186
+
187
+ }else{
188
+
189
+ width = window.innerWidth ? window.innerWidth : $(window).width();
190
+ height = window.innerHeight ? window.innerHeight : $(window).height();
191
+ }
192
+
193
+ sliderCss = {
194
+ width : width,
195
+ height : height
196
+ }
197
+
198
+
199
+ $('#swipebox-overlay').css(sliderCss);
200
+
201
+ },
202
+
203
+ resize : function (){
204
+ var $this = this;
205
+
206
+ $(window).resize(function() {
207
+ $this.setDim();
208
+ }).resize();
209
+ },
210
+
211
+ supportTransition : function() {
212
+ var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split(' ');
213
+ for(var i = 0; i < prefixes.length; i++) {
214
+ if(document.createElement('div').style[prefixes[i]] !== undefined) {
215
+ return prefixes[i];
216
+ }
217
+ }
218
+ return false;
219
+ },
220
+
221
+ doCssTrans : function(){
222
+ if(plugin.settings.useCSS && this.supportTransition() ){
223
+ return true;
224
+ }
225
+ },
226
+
227
+ gesture : function(){
228
+ if ( isTouch ){
229
+ var $this = this,
230
+ distance = null,
231
+ swipMinDistance = 10,
232
+ startCoords = {},
233
+ endCoords = {};
234
+ var bars = $('#swipebox-caption, #swipebox-action');
235
+
236
+ bars.addClass('visible-bars');
237
+ $this.setTimeout();
238
+
239
+ $('body').bind('touchstart', function(e){
240
+
241
+ $(this).addClass('touching');
242
+
243
+ endCoords = e.originalEvent.targetTouches[0];
244
+ startCoords.pageX = e.originalEvent.targetTouches[0].pageX;
245
+
246
+ $('.touching').bind('touchmove',function(e){
247
+ e.preventDefault();
248
+ e.stopPropagation();
249
+ endCoords = e.originalEvent.targetTouches[0];
250
+
251
+ });
252
+
253
+ return false;
254
+
255
+ }).bind('touchend',function(e){
256
+ e.preventDefault();
257
+ e.stopPropagation();
258
+
259
+ distance = endCoords.pageX - startCoords.pageX;
260
+
261
+ if( distance >= swipMinDistance ){
262
+
263
+ // swipeLeft
264
+ $this.getPrev();
265
+
266
+ }else if( distance <= - swipMinDistance ){
267
+
268
+ // swipeRight
269
+ $this.getNext();
270
+
271
+ }else{
272
+ // tap
273
+ if(!bars.hasClass('visible-bars')){
274
+ $this.showBars();
275
+ $this.setTimeout();
276
+ }else{
277
+ $this.clearTimeout();
278
+ $this.hideBars();
279
+ }
280
+
281
+ }
282
+
283
+ $('.touching').off('touchmove').removeClass('touching');
284
+
285
+ });
286
+
287
+ }
288
+ },
289
+
290
+ setTimeout: function(){
291
+ if(plugin.settings.hideBarsDelay > 0){
292
+ var $this = this;
293
+ $this.clearTimeout();
294
+ $this.timeout = window.setTimeout( function(){
295
+ $this.hideBars() },
296
+ plugin.settings.hideBarsDelay
297
+ );
298
+ }
299
+ },
300
+
301
+ clearTimeout: function(){
302
+ window.clearTimeout(this.timeout);
303
+ this.timeout = null;
304
+ },
305
+
306
+ showBars : function(){
307
+ var bars = $('#swipebox-caption, #swipebox-action');
308
+ if(this.doCssTrans()){
309
+ bars.addClass('visible-bars');
310
+ }else{
311
+ $('#swipebox-caption').animate({ top : 0 }, 500);
312
+ $('#swipebox-action').animate({ bottom : 0 }, 500);
313
+ setTimeout(function(){
314
+ bars.addClass('visible-bars');
315
+ }, 1000);
316
+ }
317
+ },
318
+
319
+ hideBars : function(){
320
+ var bars = $('#swipebox-caption, #swipebox-action');
321
+ if(this.doCssTrans()){
322
+ bars.removeClass('visible-bars');
323
+ }else{
324
+ $('#swipebox-caption').animate({ top : '-50px' }, 500);
325
+ $('#swipebox-action').animate({ bottom : '-50px' }, 500);
326
+ setTimeout(function(){
327
+ bars.removeClass('visible-bars');
328
+ }, 1000);
329
+ }
330
+ },
331
+
332
+ animBars : function(){
333
+ var $this = this;
334
+ var bars = $('#swipebox-caption, #swipebox-action');
335
+
336
+ bars.addClass('visible-bars');
337
+ $this.setTimeout();
338
+
339
+ $('#swipebox-slider').click(function(e){
340
+ if(!bars.hasClass('visible-bars')){
341
+ $this.showBars();
342
+ $this.setTimeout();
343
+ }
344
+ });
345
+
346
+ $('#swipebox-action').hover(function() {
347
+ $this.showBars();
348
+ bars.addClass('force-visible-bars');
349
+ $this.clearTimeout();
350
+
351
+ },function() {
352
+ bars.removeClass('force-visible-bars');
353
+ $this.setTimeout();
354
+
355
+ });
356
+ },
357
+
358
+ keyboard : function(){
359
+ var $this = this;
360
+ $(window).bind('keyup', function(e){
361
+ e.preventDefault();
362
+ e.stopPropagation();
363
+ if (e.keyCode == 37){
364
+ $this.getPrev();
365
+ }
366
+ else if (e.keyCode==39){
367
+ $this.getNext();
368
+ }
369
+ else if (e.keyCode == 27) {
370
+ $this.closeSlide();
371
+ }
372
+ });
373
+ },
374
+
375
+ actions : function(){
376
+ var $this = this;
377
+
378
+ if( elements.length < 2 ){
379
+ $('#swipebox-prev, #swipebox-next').hide();
380
+ }else{
381
+ $('#swipebox-prev').bind('click touchend', function(e){
382
+ e.preventDefault();
383
+ e.stopPropagation();
384
+ $this.getPrev();
385
+ $this.setTimeout();
386
+ });
387
+
388
+ $('#swipebox-next').bind('click touchend', function(e){
389
+ e.preventDefault();
390
+ e.stopPropagation();
391
+ $this.getNext();
392
+ $this.setTimeout();
393
+ });
394
+ }
395
+
396
+ $('#swipebox-close').bind('click touchend', function(e){
397
+ $this.closeSlide();
398
+ });
399
+ },
400
+
401
+ setSlide : function (index, isFirst){
402
+ isFirst = isFirst || false;
403
+
404
+ var slider = $('#swipebox-slider');
405
+
406
+ if(this.doCssTrans()){
407
+ slider.css({ left : (-index*100)+'%' });
408
+ }else{
409
+ slider.animate({ left : (-index*100)+'%' });
410
+ }
411
+
412
+ $('#swipebox-slider .slide').removeClass('current');
413
+ $('#swipebox-slider .slide').eq(index).addClass('current');
414
+ this.setTitle(index);
415
+
416
+ if( isFirst ){
417
+ slider.fadeIn();
418
+ }
419
+
420
+ $('#swipebox-prev, #swipebox-next').removeClass('disabled');
421
+ if(index == 0){
422
+ $('#swipebox-prev').addClass('disabled');
423
+ }else if( index == elements.length - 1 ){
424
+ $('#swipebox-next').addClass('disabled');
425
+ }
426
+ },
427
+
428
+ openSlide : function (index){
429
+ $('html').addClass('swipebox');
430
+ $(window).trigger('resize'); // fix scroll bar visibility on desktop
431
+ this.setSlide(index, true);
432
+ },
433
+
434
+ preloadMedia : function (index){
435
+ var $this = this, src = null;
436
+
437
+ if( elements[index] !== undefined )
438
+ src = elements[index].href;
439
+
440
+ if( !$this.isVideo(src) ){
441
+ setTimeout(function(){
442
+ $this.openMedia(index);
443
+ }, 1000);
444
+ }else{
445
+ $this.openMedia(index);
446
+ }
447
+ },
448
+
449
+ openMedia : function (index){
450
+ var $this = this, src = null;
451
+
452
+ if( elements[index] !== undefined )
453
+ src = elements[index].href;
454
+
455
+ if(index < 0 || index >= elements.length){
456
+ return false;
457
+ }
458
+
459
+ if( !$this.isVideo(src) ){
460
+ $this.loadMedia(src, function(){
461
+ $('#swipebox-slider .slide').eq(index).html(this);
462
+ });
463
+ }else{
464
+ $('#swipebox-slider .slide').eq(index).html($this.getVideo(src));
465
+ }
466
+
467
+ },
468
+
469
+ setTitle : function (index, isFirst){
470
+ var title = null;
471
+
472
+ $('#swipebox-caption').empty();
473
+
474
+ if( elements[index] !== undefined )
475
+ title = elements[index].title;
476
+
477
+ if(title){
478
+ $('#swipebox-caption').append(title);
479
+ }
480
+ },
481
+
482
+ isVideo : function (src){
483
+
484
+ if( src ){
485
+ if(
486
+ src.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/)
487
+ || src.match(/vimeo\.com\/([0-9]*)/)
488
+ ){
489
+ return true;
490
+ }
491
+ }
492
+
493
+ },
494
+
495
+ getVideo : function(url){
496
+ var iframe = '';
497
+ var output = '';
498
+ var youtubeUrl = url.match(/watch\?v=([a-zA-Z0-9\-_]+)/);
499
+ var vimeoUrl = url.match(/vimeo\.com\/([0-9]*)/);
500
+ if( youtubeUrl ){
501
+
502
+ iframe = '<iframe width="560" height="315" src="//www.youtube.com/embed/'+youtubeUrl[1]+'" frameborder="0" allowfullscreen></iframe>';
503
+
504
+ }else if(vimeoUrl){
505
+
506
+ iframe = '<iframe width="560" height="315" src="http://player.vimeo.com/video/'+vimeoUrl[1]+'?byline=0&amp;portrait=0&amp;color='+plugin.settings.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
507
+
508
+ }
509
+
510
+ return '<div class="swipebox-video-container" style="max-width:'+plugin.settings.videomaxWidth+'px"><div class="swipebox-video">'+iframe+'</div></div>';
511
+ },
512
+
513
+ loadMedia : function (src, callback){
514
+ if( !this.isVideo(src) ){
515
+ var img = $('<img>').on('load', function(){
516
+ callback.call(img);
517
+ });
518
+
519
+ img.attr('src',src);
520
+ }
521
+ },
522
+
523
+ getNext : function (){
524
+ var $this = this;
525
+ index = $('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
526
+ if(index+1 < elements.length){
527
+ index++;
528
+ $this.setSlide(index);
529
+ $this.preloadMedia(index+1);
530
+ }
531
+ else{
532
+
533
+ $('#swipebox-slider').addClass('rightSpring');
534
+ setTimeout(function(){
535
+ $('#swipebox-slider').removeClass('rightSpring');
536
+ },500);
537
+ }
538
+ },
539
+
540
+ getPrev : function (){
541
+ index = $('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
542
+ if(index > 0){
543
+ index--;
544
+ this.setSlide(index);
545
+ this.preloadMedia(index-1);
546
+ }
547
+ else{
548
+
549
+ $('#swipebox-slider').addClass('leftSpring');
550
+ setTimeout(function(){
551
+ $('#swipebox-slider').removeClass('leftSpring');
552
+ },500);
553
+ }
554
+ },
555
+
556
+
557
+ closeSlide : function (){
558
+ $('html').removeClass('swipebox');
559
+ $(window).trigger('resize');
560
+ this.destroy();
561
+ },
562
+
563
+ destroy : function(){
564
+ $(window).unbind('keyup');
565
+ $('body').unbind('touchstart');
566
+ $('body').unbind('touchmove');
567
+ $('body').unbind('touchend');
568
+ $('#swipebox-slider').unbind();
569
+ $('#swipebox-overlay').remove();
570
+ if (!$.isArray(elem))
571
+ elem.removeData('_swipebox');
572
+ if ( this.target )
573
+ this.target.trigger('swipebox-destroy');
574
+ $.swipebox.isOpen = false;
575
+ if (plugin.settings.afterClose)
576
+ plugin.settings.afterClose();
577
+ }
578
+
579
+ };
580
+
581
+ plugin.init();
582
+
583
+ };
584
+
585
+ $.fn.swipebox = function(options){
586
+ if (!$.data(this, "_swipebox")) {
587
+ var swipebox = new $.swipebox(this, options);
588
+ this.data('_swipebox', swipebox);
589
+ }
590
+ return this.data('_swipebox');
591
+ }
592
+
593
+ }(window, document, jQuery));
assets/swipebox/source/jquery.swipebox.min.js CHANGED
@@ -1 +1,10 @@
1
- ;(function(e,t,n,r){n.swipebox=function(i,s){var o={useCSS:true,hideBarsDelay:3e3},u=this,a=n(i),i=i,f=i.selector,l=n(f),c=t.createTouch!==r||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,h=!!e.SVGSVGElement,p='<div id="swipebox-overlay"> <div id="swipebox-slider"></div> <div id="swipebox-caption"></div> <div id="swipebox-action"> <a id="swipebox-close"></a> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div>';u.settings={};u.init=function(){u.settings=n.extend({},o,s);l.click(function(e){e.preventDefault();e.stopPropagation();index=a.index(n(this));d.target=n(e.target);d.init(index)})};var d={init:function(e){this.target.trigger("swipebox-start");this.build();this.openSlide(e);this.openImg(e);this.preloadImg(e+1);this.preloadImg(e-1)},build:function(){var t=this;n("body").append(p);if(t.doCssTrans()){n("#swipebox-slider").css({"-webkit-transition":"left 0.4s ease","-moz-transition":"left 0.4s ease","-o-transition":"left 0.4s ease","-khtml-transition":"left 0.4s ease",transition:"left 0.4s ease"});n("#swipebox-overlay").css({"-webkit-transition":"opacity 1s ease","-moz-transition":"opacity 1s ease","-o-transition":"opacity 1s ease","-khtml-transition":"opacity 1s ease",transition:"opacity 1s ease"});n("#swipebox-action, #swipebox-caption").css({"-webkit-transition":"0.5s","-moz-transition":"0.5s","-o-transition":"0.5s","-khtml-transition":"0.5s",transition:"0.5s"})}if(h){var r=n("#swipebox-action #swipebox-close").css("background-image");r=r.replace("png","svg");n("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({"background-image":r})}a.each(function(){n("#swipebox-slider").append('<div class="slide"></div>')});t.setDim();t.actions();t.keyboard();t.gesture();t.animBars();n(e).resize(function(){t.setDim()}).resize()},setDim:function(){var t={width:n(e).width(),height:e.innerHeight?e.innerHeight:n(e).height()};n("#swipebox-overlay").css(t)},supportTransition:function(){var e="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(var n=0;n<e.length;n++){if(t.createElement("div").style[e[n]]!==r){return e[n]}}return false},doCssTrans:function(){if(u.settings.useCSS&&this.supportTransition()){return true}},gesture:function(){if(c){var e=this,t=null,r=10,i={},s={};var o=n("#swipebox-caption, #swipebox-action");o.addClass("visible-bars");e.setTimeout();n("body").bind("touchstart",function(e){n(this).addClass("touching");s=e.originalEvent.targetTouches[0];i.pageX=e.originalEvent.targetTouches[0].pageX;n(".touching").bind("touchmove",function(e){e.preventDefault();e.stopPropagation();s=e.originalEvent.targetTouches[0]});return false}).bind("touchend",function(u){u.preventDefault();u.stopPropagation();t=s.pageX-i.pageX;if(t>=r){e.getPrev()}else if(t<=-r){e.getNext()}else{if(!o.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}}n(".touching").off("touchmove").removeClass("touching")})}},setTimeout:function(){if(u.settings.hideBarsDelay>0){var t=this;t.clearTimeout();t.timeout=e.setTimeout(function(){t.hideBars()},u.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout);this.timeout=null},showBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.addClass("visible-bars")}else{n("#swipebox-caption").animate({top:0},500);n("#swipebox-action").animate({bottom:0},500);setTimeout(function(){e.addClass("visible-bars")},1e3)}},hideBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.removeClass("visible-bars")}else{n("#swipebox-caption").animate({top:"-50px"},500);n("#swipebox-action").animate({bottom:"-50px"},500);setTimeout(function(){e.removeClass("visible-bars")},1e3)}},animBars:function(){var e=this;var t=n("#swipebox-caption, #swipebox-action");t.addClass("visible-bars");e.setTimeout();n("#swipebox-slider").click(function(n){if(!t.hasClass("visible-bars")){e.showBars();e.setTimeout()}});n("#swipebox-action").hover(function(){e.showBars();t.addClass("force-visible-bars");e.clearTimeout()},function(){t.removeClass("force-visible-bars");e.setTimeout()})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault();e.stopPropagation();if(e.keyCode==37){t.getPrev()}else if(e.keyCode==39){t.getNext()}else if(e.keyCode==27){t.closeSlide()}})},actions:function(){var e=this;if(a.length<2){n("#swipebox-prev, #swipebox-next").hide()}else{n("#swipebox-prev").bind("click touchend",function(t){t.preventDefault();t.stopPropagation();e.getPrev();e.setTimeout()});n("#swipebox-next").bind("click touchend",function(t){t.preventDefault();t.stopPropagation();e.getNext();e.setTimeout()})}n("#swipebox-close").bind("click touchend",function(t){e.closeSlide()})},setSlide:function(e,t){t=t||false;var r=n("#swipebox-slider");if(this.doCssTrans()){r.css({left:-e*100+"%"})}else{r.animate({left:-e*100+"%"})}n("#swipebox-slider .slide").removeClass("current");n("#swipebox-slider .slide").eq(e).addClass("current");this.setTitle(e);if(t){r.fadeIn()}n("#swipebox-prev, #swipebox-next").removeClass("disabled");if(e==0){n("#swipebox-prev").addClass("disabled")}else if(e==a.length-1){n("#swipebox-next").addClass("disabled")}},openSlide:function(t){n("html").addClass("swipebox");n(e).trigger("resize");this.setSlide(t,true)},preloadImg:function(e){var t=this;setTimeout(function(){t.openImg(e)},1e3)},openImg:function(e){var t=this;if(e<0||e>=a.length){return false}t.loadImg(a.eq(e).attr("href"),function(){n("#swipebox-slider .slide").eq(e).html(this)})},setTitle:function(e,t){n("#swipebox-caption").empty();if(a.eq(e).attr("title")){n("#swipebox-caption").append(a.eq(e).attr("title"))}},loadImg:function(e,t){var r=n("<img>").on("load",function(){t.call(r)});r.attr("src",e)},getNext:function(){var e=this;index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index+1<a.length){index++;e.setSlide(index);e.preloadImg(index+1)}else{n("#swipebox-slider").addClass("rightSpring");setTimeout(function(){n("#swipebox-slider").removeClass("rightSpring")},500)}},getPrev:function(){var e=this;index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index>0){index--;e.setSlide(index);e.preloadImg(index-1)}else{n("#swipebox-slider").addClass("leftSpring");setTimeout(function(){n("#swipebox-slider").removeClass("leftSpring")},500)}},closeSlide:function(){var t=this;n(e).trigger("resize");n("html").removeClass("swipebox");t.destroy()},destroy:function(){var t=this;n(e).unbind("keyup");n("body").unbind("touchstart");n("body").unbind("touchmove");n("body").unbind("touchend");n("#swipebox-slider").unbind();n("#swipebox-overlay").remove();a.removeData("_swipebox");t.target.trigger("swipebox-destroy")}};u.init()};n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}}})(window,document,jQuery);
1
+ /*---------------------------------------------------------------------------------------------
2
+
3
+ @author Constantin Saguin - @brutaldesign
4
+ @link http://csag.co
5
+ @github http://github.com/brutaldesign/swipebox
6
+ @version 1.2.1
7
+ @license MIT License
8
+
9
+ ----------------------------------------------------------------------------------------------*/
10
+ ;(function(e,t,n,r){n.swipebox=function(i,s){var o={useCSS:true,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"CCCCCC",beforeOpen:null,afterClose:null},u=this,a=[],i=i,f=i.selector,l=n(f),c=t.createTouch!==r||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,h=!!e.SVGSVGElement,p=e.innerWidth?e.innerWidth:n(e).width(),d=e.innerHeight?e.innerHeight:n(e).height(),v='<div id="swipebox-overlay"> <div id="swipebox-slider"></div> <div id="swipebox-caption"></div> <div id="swipebox-action"> <a id="swipebox-close"></a> <a id="swipebox-prev"></a> <a id="swipebox-next"></a> </div> </div>';u.settings={};u.init=function(){u.settings=n.extend({},o,s);if(n.isArray(i)){a=i;m.target=n(e);m.init(0)}else{l.click(function(e){a=[];var t,r,i;if(!i){r="rel";i=n(this).attr(r)}if(i&&i!==""&&i!=="nofollow"){$elem=l.filter("["+r+'="'+i+'"]')}else{$elem=n(f)}$elem.each(function(){var e=null,t=null;if(n(this).attr("title"))e=n(this).attr("title");if(n(this).attr("href"))t=n(this).attr("href");a.push({href:t,title:e})});t=$elem.index(n(this));e.preventDefault();e.stopPropagation();m.target=n(e.target);m.init(t)})}};u.refresh=function(){if(!n.isArray(i)){m.destroy();$elem=n(f);m.actions()}};var m={init:function(e){if(u.settings.beforeOpen)u.settings.beforeOpen();this.target.trigger("swipebox-start");n.swipebox.isOpen=true;this.build();this.openSlide(e);this.openMedia(e);this.preloadMedia(e+1);this.preloadMedia(e-1)},build:function(){var e=this;n("body").append(v);if(e.doCssTrans()){n("#swipebox-slider").css({"-webkit-transition":"left 0.4s ease","-moz-transition":"left 0.4s ease","-o-transition":"left 0.4s ease","-khtml-transition":"left 0.4s ease",transition:"left 0.4s ease"});n("#swipebox-overlay").css({"-webkit-transition":"opacity 1s ease","-moz-transition":"opacity 1s ease","-o-transition":"opacity 1s ease","-khtml-transition":"opacity 1s ease",transition:"opacity 1s ease"});n("#swipebox-action, #swipebox-caption").css({"-webkit-transition":"0.5s","-moz-transition":"0.5s","-o-transition":"0.5s","-khtml-transition":"0.5s",transition:"0.5s"})}if(h){var t=n("#swipebox-action #swipebox-close").css("background-image");t=t.replace("png","svg");n("#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close").css({"background-image":t})}n.each(a,function(){n("#swipebox-slider").append('<div class="slide"></div>')});e.setDim();e.actions();e.keyboard();e.gesture();e.animBars();e.resize()},setDim:function(){var t,r,i={};if("onorientationchange"in e){e.addEventListener("orientationchange",function(){if(e.orientation==0){t=p;r=d}else if(e.orientation==90||e.orientation==-90){t=d;r=p}},false)}else{t=e.innerWidth?e.innerWidth:n(e).width();r=e.innerHeight?e.innerHeight:n(e).height()}i={width:t,height:r};n("#swipebox-overlay").css(i)},resize:function(){var t=this;n(e).resize(function(){t.setDim()}).resize()},supportTransition:function(){var e="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(var n=0;n<e.length;n++){if(t.createElement("div").style[e[n]]!==r){return e[n]}}return false},doCssTrans:function(){if(u.settings.useCSS&&this.supportTransition()){return true}},gesture:function(){if(c){var e=this,t=null,r=10,i={},s={};var o=n("#swipebox-caption, #swipebox-action");o.addClass("visible-bars");e.setTimeout();n("body").bind("touchstart",function(e){n(this).addClass("touching");s=e.originalEvent.targetTouches[0];i.pageX=e.originalEvent.targetTouches[0].pageX;n(".touching").bind("touchmove",function(e){e.preventDefault();e.stopPropagation();s=e.originalEvent.targetTouches[0]});return false}).bind("touchend",function(u){u.preventDefault();u.stopPropagation();t=s.pageX-i.pageX;if(t>=r){e.getPrev()}else if(t<=-r){e.getNext()}else{if(!o.hasClass("visible-bars")){e.showBars();e.setTimeout()}else{e.clearTimeout();e.hideBars()}}n(".touching").off("touchmove").removeClass("touching")})}},setTimeout:function(){if(u.settings.hideBarsDelay>0){var t=this;t.clearTimeout();t.timeout=e.setTimeout(function(){t.hideBars()},u.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout);this.timeout=null},showBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.addClass("visible-bars")}else{n("#swipebox-caption").animate({top:0},500);n("#swipebox-action").animate({bottom:0},500);setTimeout(function(){e.addClass("visible-bars")},1e3)}},hideBars:function(){var e=n("#swipebox-caption, #swipebox-action");if(this.doCssTrans()){e.removeClass("visible-bars")}else{n("#swipebox-caption").animate({top:"-50px"},500);n("#swipebox-action").animate({bottom:"-50px"},500);setTimeout(function(){e.removeClass("visible-bars")},1e3)}},animBars:function(){var e=this;var t=n("#swipebox-caption, #swipebox-action");t.addClass("visible-bars");e.setTimeout();n("#swipebox-slider").click(function(n){if(!t.hasClass("visible-bars")){e.showBars();e.setTimeout()}});n("#swipebox-action").hover(function(){e.showBars();t.addClass("force-visible-bars");e.clearTimeout()},function(){t.removeClass("force-visible-bars");e.setTimeout()})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault();e.stopPropagation();if(e.keyCode==37){t.getPrev()}else if(e.keyCode==39){t.getNext()}else if(e.keyCode==27){t.closeSlide()}})},actions:function(){var e=this;if(a.length<2){n("#swipebox-prev, #swipebox-next").hide()}else{n("#swipebox-prev").bind("click touchend",function(t){t.preventDefault();t.stopPropagation();e.getPrev();e.setTimeout()});n("#swipebox-next").bind("click touchend",function(t){t.preventDefault();t.stopPropagation();e.getNext();e.setTimeout()})}n("#swipebox-close").bind("click touchend",function(t){e.closeSlide()})},setSlide:function(e,t){t=t||false;var r=n("#swipebox-slider");if(this.doCssTrans()){r.css({left:-e*100+"%"})}else{r.animate({left:-e*100+"%"})}n("#swipebox-slider .slide").removeClass("current");n("#swipebox-slider .slide").eq(e).addClass("current");this.setTitle(e);if(t){r.fadeIn()}n("#swipebox-prev, #swipebox-next").removeClass("disabled");if(e==0){n("#swipebox-prev").addClass("disabled")}else if(e==a.length-1){n("#swipebox-next").addClass("disabled")}},openSlide:function(t){n("html").addClass("swipebox");n(e).trigger("resize");this.setSlide(t,true)},preloadMedia:function(e){var t=this,n=null;if(a[e]!==r)n=a[e].href;if(!t.isVideo(n)){setTimeout(function(){t.openMedia(e)},1e3)}else{t.openMedia(e)}},openMedia:function(e){var t=this,i=null;if(a[e]!==r)i=a[e].href;if(e<0||e>=a.length){return false}if(!t.isVideo(i)){t.loadMedia(i,function(){n("#swipebox-slider .slide").eq(e).html(this)})}else{n("#swipebox-slider .slide").eq(e).html(t.getVideo(i))}},setTitle:function(e,t){var i=null;n("#swipebox-caption").empty();if(a[e]!==r)i=a[e].title;if(i){n("#swipebox-caption").append(i)}},isVideo:function(e){if(e){if(e.match(/youtube\.com\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)){return true}}},getVideo:function(e){var t="";var n="";var r=e.match(/watch\?v=([a-zA-Z0-9\-_]+)/);var i=e.match(/vimeo\.com\/([0-9]*)/);if(r){t='<iframe width="560" height="315" src="//www.youtube.com/embed/'+r[1]+'" frameborder="0" allowfullscreen></iframe>'}else if(i){t='<iframe width="560" height="315" src="http://player.vimeo.com/video/'+i[1]+"?byline=0&portrait=0&color="+u.settings.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}return'<div class="swipebox-video-container" style="max-width:'+u.settings.videomaxWidth+'px"><div class="swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){if(!this.isVideo(e)){var r=n("<img>").on("load",function(){t.call(r)});r.attr("src",e)}},getNext:function(){var e=this;index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index+1<a.length){index++;e.setSlide(index);e.preloadMedia(index+1)}else{n("#swipebox-slider").addClass("rightSpring");setTimeout(function(){n("#swipebox-slider").removeClass("rightSpring")},500)}},getPrev:function(){index=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));if(index>0){index--;this.setSlide(index);this.preloadMedia(index-1)}else{n("#swipebox-slider").addClass("leftSpring");setTimeout(function(){n("#swipebox-slider").removeClass("leftSpring")},500)}},closeSlide:function(){n("html").removeClass("swipebox");n(e).trigger("resize");this.destroy()},destroy:function(){n(e).unbind("keyup");n("body").unbind("touchstart");n("body").unbind("touchmove");n("body").unbind("touchend");n("#swipebox-slider").unbind();n("#swipebox-overlay").remove();if(!n.isArray(i))i.removeData("_swipebox");if(this.target)this.target.trigger("swipebox-destroy");n.swipebox.isOpen=false;if(u.settings.afterClose)u.settings.afterClose()}};u.init()};n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}})(window,document,jQuery);
assets/swipebox/source/swipebox.css CHANGED
@@ -1,223 +1,264 @@
1
- .swipebox {
2
- overflow: hidden!important;
3
- }
4
-
5
- #swipebox-overlay img {
6
- border: none!important;
7
- }
8
-
9
- #swipebox-overlay {
10
- width: 100%;
11
- height: 100%;
12
- position: fixed;
13
- top: 0;
14
- left: 0;
15
- z-index: 99999!important;
16
- overflow: hidden;
17
- -webkit-user-select: none;
18
- -moz-user-select: none;
19
- user-select: none;
20
- }
21
-
22
- #swipebox-slider {
23
- height: 100%;
24
- left: 0;
25
- top: 0;
26
- width: 100%;
27
- white-space: nowrap;
28
- position: absolute;
29
- display: none;
30
- }
31
-
32
- #swipebox-slider .slide {
33
- background: url("img/loader.gif") no-repeat center center;
34
- height: 100%;
35
- width: 100%;
36
- line-height: 1px;
37
- text-align: center;
38
- display: inline-block;
39
- }
40
-
41
- #swipebox-slider .slide:before {
42
- content: "";
43
- display: inline-block;
44
- height: 50%;
45
- width: 1px;
46
- margin-right: -1px;
47
- }
48
-
49
- #swipebox-slider .slide img {
50
- display: inline-block;
51
- max-height: 100%;
52
- max-width: 100%;
53
- margin: 0;
54
- padding: 0;
55
- width: auto;
56
- height: auto;
57
- vertical-align: middle;
58
- }
59
-
60
- #swipebox-action, #swipebox-caption {
61
- position: absolute;
62
- left: 0;
63
- z-index: 999;
64
- height: 50px;
65
- width: 100%;
66
- }
67
-
68
- #swipebox-action {
69
- bottom: -50px;
70
- }
71
- #swipebox-action.visible-bars {
72
- bottom: 0;
73
- }
74
-
75
- #swipebox-action.force-visible-bars {
76
- bottom: 0!important;
77
- }
78
-
79
- #swipebox-caption {
80
- top: -50px;
81
- text-align: center;
82
- }
83
- #swipebox-caption.visible-bars {
84
- top: 0;
85
- }
86
-
87
- #swipebox-caption.force-visible-bars {
88
- top: 0!important;
89
- }
90
-
91
- #swipebox-action #swipebox-prev, #swipebox-action #swipebox-next,
92
- #swipebox-action #swipebox-close {
93
- background-image: url("img/icons.png");
94
- background-repeat: no-repeat;
95
- border: none!important;
96
- text-decoration: none!important;
97
- cursor: pointer;
98
- position: absolute;
99
- width: 50px;
100
- height: 50px;
101
- top: 0;
102
- }
103
-
104
- #swipebox-action #swipebox-close {
105
- background-position: 15px 12px;
106
- left: 40px;
107
- }
108
-
109
- #swipebox-action #swipebox-prev {
110
- background-position: -32px 13px;
111
- right: 100px;
112
- }
113
-
114
- #swipebox-action #swipebox-next {
115
- background-position: -78px 13px;
116
- right: 40px;
117
- }
118
-
119
- #swipebox-action #swipebox-prev.disabled,
120
- #swipebox-action #swipebox-next.disabled {
121
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
122
- opacity: 0.3;
123
- }
124
-
125
- #swipebox-slider.rightSpring {
126
- -moz-animation: rightSpring 0.3s;
127
- -webkit-animation: rightSpring 0.3s;
128
- }
129
-
130
- #swipebox-slider.leftSpring {
131
- -moz-animation: leftSpring 0.3s;
132
- -webkit-animation: leftSpring 0.3s;
133
- }
134
-
135
- @-moz-keyframes rightSpring {
136
- 0% {
137
- margin-left: 0px;
138
- }
139
-
140
- 50% {
141
- margin-left: -30px;
142
- }
143
-
144
- 100% {
145
- margin-left: 0px;
146
- }
147
- }
148
-
149
- @-moz-keyframes leftSpring {
150
- 0% {
151
- margin-left: 0px;
152
- }
153
-
154
- 50% {
155
- margin-left: 30px;
156
- }
157
-
158
- 100% {
159
- margin-left: 0px;
160
- }
161
- }
162
-
163
- @-webkit-keyframes rightSpring {
164
- 0% {
165
- margin-left: 0px;
166
- }
167
-
168
- 50% {
169
- margin-left: -30px;
170
- }
171
-
172
- 100% {
173
- margin-left: 0px;
174
- }
175
- }
176
-
177
- @-webkit-keyframes leftSpring {
178
- 0% {
179
- margin-left: 0px;
180
- }
181
-
182
- 50% {
183
- margin-left: 30px;
184
- }
185
-
186
- 100% {
187
- margin-left: 0px;
188
- }
189
- }
190
-
191
- /* Skin
192
- --------------------------*/
193
- #swipebox-overlay {
194
- background: #0d0d0d;
195
- }
196
-
197
- #swipebox-action, #swipebox-caption {
198
- text-shadow: 1px 1px 1px black;
199
- background-color: #0d0d0d;
200
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0d0d0d), color-stop(100%, #000000));
201
- background-image: -webkit-linear-gradient(#0d0d0d, #000000);
202
- background-image: -moz-linear-gradient(#0d0d0d, #000000);
203
- background-image: -o-linear-gradient(#0d0d0d, #000000);
204
- background-image: linear-gradient(#0d0d0d, #000000);
205
- -webkit-box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black;
206
- -moz-box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black;
207
- box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black;
208
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95);
209
- opacity: 0.95;
210
- }
211
-
212
- #swipebox-action {
213
- -webkit-box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black;
214
- -moz-box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black;
215
- box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black;
216
- }
217
-
218
- #swipebox-caption {
219
- color: white!important;
220
- font-size: 15px;
221
- line-height: 43px;
222
- font-family: Helvetica, Arial, sans-serif;
223
- }
1
+ html.swipebox {
2
+ overflow: hidden!important;
3
+ }
4
+
5
+ #swipebox-overlay img {
6
+ border: none!important;
7
+ }
8
+
9
+ #swipebox-overlay {
10
+ width: 100%;
11
+ height: 100%;
12
+ position: fixed;
13
+ top: 0;
14
+ left: 0;
15
+ z-index: 99999!important;
16
+ overflow: hidden;
17
+ -webkit-user-select: none;
18
+ -moz-user-select: none;
19
+ user-select: none;
20
+ }
21
+
22
+ #swipebox-slider {
23
+ height: 100%;
24
+ left: 0;
25
+ top: 0;
26
+ width: 100%;
27
+ white-space: nowrap;
28
+ position: absolute;
29
+ display: none;
30
+ }
31
+
32
+ #swipebox-slider .slide {
33
+ background: url("img/loader.gif") no-repeat center center;
34
+ height: 100%;
35
+ width: 100%;
36
+ line-height: 1px;
37
+ text-align: center;
38
+ display: inline-block;
39
+ }
40
+
41
+ #swipebox-slider .slide:before {
42
+ content: "";
43
+ display: inline-block;
44
+ height: 50%;
45
+ width: 1px;
46
+ margin-right: -1px;
47
+ }
48
+
49
+ #swipebox-slider .slide img,
50
+ #swipebox-slider .slide .swipebox-video-container {
51
+ display: inline-block;
52
+ max-height: 100%;
53
+ max-width: 100%;
54
+ margin: 0;
55
+ padding: 0;
56
+ width: auto;
57
+ height: auto;
58
+ vertical-align: middle;
59
+ }
60
+
61
+ #swipebox-slider .slide .swipebox-video-container {
62
+ background:none;
63
+ max-width: 1140px;
64
+ max-height: 100%;
65
+ width: 100%;
66
+ padding:5%;
67
+ box-sizing: border-box;
68
+ -webkit-box-sizing: border-box;
69
+ -moz-box-sizing: border-box;
70
+ }
71
+
72
+
73
+ #swipebox-slider .slide .swipebox-video-container .swipebox-video{
74
+ width: 100%;
75
+ height: 0;
76
+ padding-bottom: 56.25%;
77
+ overflow: hidden;
78
+ position: relative;
79
+ }
80
+
81
+ #swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{
82
+ width: 100%!important;
83
+ height: 100%!important;
84
+ position: absolute;
85
+ top: 0; left: 0;
86
+ }
87
+
88
+ #swipebox-action, #swipebox-caption {
89
+ position: absolute;
90
+ left: 0;
91
+ z-index: 999;
92
+ height: 50px;
93
+ width: 100%;
94
+ }
95
+
96
+ #swipebox-action {
97
+ bottom: -50px;
98
+ }
99
+ #swipebox-action.visible-bars {
100
+ bottom: 0;
101
+ }
102
+
103
+ #swipebox-action.force-visible-bars {
104
+ bottom: 0!important;
105
+ }
106
+
107
+ #swipebox-caption {
108
+ top: -50px;
109
+ text-align: center;
110
+ }
111
+ #swipebox-caption.visible-bars {
112
+ top: 0;
113
+ }
114
+
115
+ #swipebox-caption.force-visible-bars {
116
+ top: 0!important;
117
+ }
118
+
119
+ #swipebox-action #swipebox-prev, #swipebox-action #swipebox-next,
120
+ #swipebox-action #swipebox-close {
121
+ background-image: url("img/icons.png");
122
+ background-repeat: no-repeat;
123
+ border: none!important;
124
+ text-decoration: none!important;
125
+ cursor: pointer;
126
+ position: absolute;
127
+ width: 50px;
128
+ height: 50px;
129
+ top: 0;
130
+ }
131
+
132
+ #swipebox-action #swipebox-close {
133
+ background-position: 15px 12px;
134
+ left: 40px;
135
+ }
136
+
137
+ #swipebox-action #swipebox-prev {
138
+ background-position: -32px 13px;
139
+ right: 100px;
140
+ }
141
+
142
+ #swipebox-action #swipebox-next {
143
+ background-position: -78px 13px;
144
+ right: 40px;
145
+ }
146
+
147
+ #swipebox-action #swipebox-prev.disabled,
148
+ #swipebox-action #swipebox-next.disabled {
149
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
150
+ opacity: 0.3;
151
+ }
152
+
153
+ #swipebox-slider.rightSpring {
154
+ -moz-animation: rightSpring 0.3s;
155
+ -webkit-animation: rightSpring 0.3s;
156
+ }
157
+
158
+ #swipebox-slider.leftSpring {
159
+ -moz-animation: leftSpring 0.3s;
160
+ -webkit-animation: leftSpring 0.3s;
161
+ }
162
+
163
+ @-moz-keyframes rightSpring {
164
+ 0% {
165
+ margin-left: 0px;
166
+ }
167
+
168
+ 50% {
169
+ margin-left: -30px;
170
+ }
171
+
172
+ 100% {
173
+ margin-left: 0px;
174
+ }
175
+ }
176
+
177
+ @-moz-keyframes leftSpring {
178
+ 0% {
179
+ margin-left: 0px;
180
+ }
181
+
182
+ 50% {
183
+ margin-left: 30px;
184
+ }
185
+
186
+ 100% {
187
+ margin-left: 0px;
188
+ }
189
+ }
190
+
191
+ @-webkit-keyframes rightSpring {
192
+ 0% {
193
+ margin-left: 0px;
194
+ }
195
+
196
+ 50% {
197
+ margin-left: -30px;
198
+ }
199
+
200
+ 100% {
201
+ margin-left: 0px;
202
+ }
203
+ }
204
+
205
+ @-webkit-keyframes leftSpring {
206
+ 0% {
207
+ margin-left: 0px;
208
+ }
209
+
210
+ 50% {
211
+ margin-left: 30px;
212
+ }
213
+
214
+ 100% {
215
+ margin-left: 0px;
216
+ }
217
+ }
218
+
219
+ @media screen and (max-width: 800px) {
220
+ #swipebox-action #swipebox-close {
221
+ left: 0;
222
+ }
223
+
224
+ #swipebox-action #swipebox-prev {
225
+ right: 60px;
226
+ }
227
+
228
+ #swipebox-action #swipebox-next {
229
+ right: 0;
230
+ }
231
+ }
232
+
233
+
234
+ /* Skin
235
+ --------------------------*/
236
+ #swipebox-overlay {
237
+ background: #0d0d0d;
238
+ }
239
+
240
+ #swipebox-action, #swipebox-caption {
241
+ text-shadow: 1px 1px 1px black;
242
+ background-color: #0d0d0d;
243
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0d0d0d), color-stop(100%, #000000));
244
+ background-image: -webkit-linear-gradient(#0d0d0d, #000000);
245
+ background-image: -moz-linear-gradient(#0d0d0d, #000000);
246
+ background-image: -o-linear-gradient(#0d0d0d, #000000);
247
+ background-image: linear-gradient(#0d0d0d, #000000);
248
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95);
249
+ opacity: 0.95;
250
+ }
251
+
252
+ #swipebox-action {
253
+ border-top: 1px solid rgba(255, 255, 255, 0.2);
254
+ }
255
+
256
+ #swipebox-caption {
257
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
258
+ color: white!important;
259
+ font-size: 15px;
260
+ line-height: 43px;
261
+ font-family: Helvetica, Arial, sans-serif;
262
+ }
263
+
264
+
js/responsive-lightbox-admin.js CHANGED
@@ -1,6 +1,6 @@
1
jQuery(document).ready(function($) {
2
3
- $('#rl_script, #rl_galleries, #rl_image_links, #rl_deactivation_delete, #rl_sw_animation, #rl_sw_hide_bars, #rl_pp_animation_speed, #rl_pp_slideshow, #rl_pp_slideshow_autoplay, #rl_pp_title, #rl_pp_allow_resize, #rl_pp_theme, #rl_pp_hide_flash, #rl_pp_wmode, #rl_pp_video_autoplay, #rl_pp_modal, #rl_pp_deeplinking, #rl_pp_overlay_gallery, #rl_pp_keyboard_shortcuts, #rl_pp_social').buttonset();
4
5
$('#rl-slideshow-yes, #rl-slideshow-no').change(function()
6
{
1
jQuery(document).ready(function($) {
2
3
+ $('#rl_script, #rl_videos, #rl_galleries, #rl_image_links, #rl_deactivation_delete, #rl_sw_animation, #rl_sw_hide_bars, #rl_pp_animation_speed, #rl_pp_slideshow, #rl_pp_slideshow_autoplay, #rl_pp_title, #rl_pp_allow_resize, #rl_pp_theme, #rl_pp_hide_flash, #rl_pp_wmode, #rl_pp_video_autoplay, #rl_pp_modal, #rl_pp_deeplinking, #rl_pp_overlay_gallery, #rl_pp_keyboard_shortcuts, #rl_pp_social').buttonset();
4
5
$('#rl-slideshow-yes, #rl-slideshow-no').change(function()
6
{
js/responsive-lightbox-front.js CHANGED
@@ -5,30 +5,11 @@ jQuery(document).ready(function($) {
5
}
6
7
if(rlArgs.script === 'swipebox') {
8
- $('a[rel="'+rlArgs.selector+'"]').swipebox({
9
useCSS: rlArgs.animation,
10
hideBarsDelay: (rlArgs.hideBars === '1' ? parseInt(rlArgs.hideBarsDelay) : 0),
11
});
12
-
13
- if(rlArgs.activeGalleries === '1') {
14
- var rlGalleriesArr = new Array();
15
-
16
- jQuery.each($('a').filter(function() {
17
- return this.rel.match(new RegExp(rlArgs.selector+'\\[gallery-\\d+\\]'));
18
- }), function(i) {
19
- rlGalleriesArr[i] = $(this).attr('rel');
20
- });
21
-
22
- var rlUniqueGalleriesArr = rlGalleriesArr.filter(rlUniqueArr);
23
-
24
- for(var i = 0; i < rlUniqueGalleriesArr.length; i++)
25
- {
26
- $('a[rel="'+rlUniqueGalleriesArr[i]+'"]').swipebox({
27
- useCSS: rlArgs.animation,
28
- hideBarsDelay: (rlArgs.hideBars === '1' ? parseInt(rlArgs.hideBarsDelay) : 0),
29
- });
30
- }
31
- }
32
} else {
33
$('a[rel*="'+rlArgs.selector+'"]').prettyPhoto({
34
animation_speed: rlArgs.animationSpeed,
5
}
6
7
if(rlArgs.script === 'swipebox') {
8
+ $('a[rel*="'+rlArgs.selector+'"]').swipebox({
9
useCSS: rlArgs.animation,
10
hideBarsDelay: (rlArgs.hideBars === '1' ? parseInt(rlArgs.hideBarsDelay) : 0),
11
+ videoMaxWidth: parseInt(rlArgs.videoMaxWidth)
12
});
13
} else {
14
$('a[rel*="'+rlArgs.selector+'"]').prettyPhoto({
15
animation_speed: rlArgs.animationSpeed,
languages/responsive-lightbox.pot CHANGED
@@ -1,400 +1,408 @@
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Responsive Lightbox\n"
4
- "POT-Creation-Date: 2013-07-03 12:26+0100\n"
5
- "PO-Revision-Date: 2013-07-03 12:26+0100\n"
6
"Last-Translator: Bartosz Arendt <info@digitalfactory.pl>\n"
7
"Language-Team: dFactory <info@dfactory.eu>\n"
8
"Language: English\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.5\n"
13
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
14
"X-Poedit-Basepath: .\n"
15
"X-Poedit-SourceCharset: UTF-8\n"
16
"X-Poedit-SearchPath-0: ..\n"
17
18
- #: ../responsive-lightbox.php:129
19
msgid "prettyPhoto"
20
msgstr ""
21
22
- #: ../responsive-lightbox.php:131
23
msgid "slow"
24
msgstr ""
25
26
- #: ../responsive-lightbox.php:132
27
msgid "normal"
28
msgstr ""
29
30
- #: ../responsive-lightbox.php:133
31
msgid "fast"
32
msgstr ""
33
34
- #: ../responsive-lightbox.php:136
35
msgid "default"
36
msgstr ""
37
38
- #: ../responsive-lightbox.php:137
39
msgid "light rounded"
40
msgstr ""
41
42
- #: ../responsive-lightbox.php:138
43
msgid "dark rounded"
44
msgstr ""
45
46
- #: ../responsive-lightbox.php:139
47
msgid "light square"
48
msgstr ""
49
50
- #: ../responsive-lightbox.php:140
51
msgid "dark square"
52
msgstr ""
53
54
- #: ../responsive-lightbox.php:141
55
msgid "facebook"
56
msgstr ""
57
58
- #: ../responsive-lightbox.php:144
59
msgid "window"
60
msgstr ""
61
62
- #: ../responsive-lightbox.php:145
63
msgid "transparent"
64
msgstr ""
65
66
- #: ../responsive-lightbox.php:146
67
msgid "opaque"
68
msgstr ""
69
70
- #: ../responsive-lightbox.php:147
71
msgid "direct"
72
msgstr ""
73
74
- #: ../responsive-lightbox.php:148
75
msgid "gpu"
76
msgstr ""
77
78
- #: ../responsive-lightbox.php:153
79
msgid "SwipeBox"
80
msgstr ""
81
82
- #: ../responsive-lightbox.php:155
83
msgid "CSS"
84
msgstr ""
85
86
- #: ../responsive-lightbox.php:156
87
msgid "jQuery"
88
msgstr ""
89
90
- #: ../responsive-lightbox.php:162
91
- msgid "rel"
92
- msgstr ""
93
-
94
- #: ../responsive-lightbox.php:163
95
- msgid "class"
96
- msgstr ""
97
-
98
- #: ../responsive-lightbox.php:167
99
msgid "Enable"
100
msgstr ""
101
102
- #: ../responsive-lightbox.php:168
103
msgid "Disable"
104
msgstr ""
105
106
- #: ../responsive-lightbox.php:173 ../responsive-lightbox.php:209
107
msgid "General settings"
108
msgstr ""
109
110
- #: ../responsive-lightbox.php:178 ../responsive-lightbox.php:218
111
msgid "Lightbox settings"
112
msgstr ""
113
114
- #: ../responsive-lightbox.php:210
115
msgid "Lightbox script"
116
msgstr ""
117
118
- #: ../responsive-lightbox.php:211
119
msgid "Selector"
120
msgstr ""
121
122
- #: ../responsive-lightbox.php:212
123
msgid "Galleries"
124
msgstr ""
125
126
- #: ../responsive-lightbox.php:213
127
msgid "Image links"
128
msgstr ""
129
130
- #: ../responsive-lightbox.php:214
131
msgid "Deactivation"
132
msgstr ""
133
134
- #: ../responsive-lightbox.php:222
135
- msgid "Animation"
136
msgstr ""
137
138
- #: ../responsive-lightbox.php:223
139
msgid "Top and bottom bars"
140
msgstr ""
141
142
- #: ../responsive-lightbox.php:227
143
msgid "Animation speed"
144
msgstr ""
145
146
- #: ../responsive-lightbox.php:228
147
msgid "Slideshow"
148
msgstr ""
149
150
- #: ../responsive-lightbox.php:229
151
msgid "Slideshow autoplay"
152
msgstr ""
153
154
- #: ../responsive-lightbox.php:230
155
msgid "Opacity"
156
msgstr ""
157
158
- #: ../responsive-lightbox.php:231
159
msgid "Show title"
160
msgstr ""
161
162
- #: ../responsive-lightbox.php:232
163
msgid "Allow resize big images"
164
msgstr ""
165
166
- #: ../responsive-lightbox.php:233
167
- msgid "Width"
168
msgstr ""
169
170
- #: ../responsive-lightbox.php:234
171
- msgid "Height"
172
msgstr ""
173
174
- #: ../responsive-lightbox.php:235
175
msgid "Theme"
176
msgstr ""
177
178
- #: ../responsive-lightbox.php:236
179
msgid "Horizontal padding"
180
msgstr ""
181
182
- #: ../responsive-lightbox.php:237
183
msgid "Hide Flash"
184
msgstr ""
185
186
- #: ../responsive-lightbox.php:238
187
msgid "Flash Window Mode (wmode)"
188
msgstr ""
189
190
- #: ../responsive-lightbox.php:239
191
msgid "Video autoplay"
192
msgstr ""
193
194
- #: ../responsive-lightbox.php:240
195
msgid "Modal"
196
msgstr ""
197
198
- #: ../responsive-lightbox.php:241
199
msgid "Deeplinking"
200
msgstr ""
201
202
- #: ../responsive-lightbox.php:242
203
msgid "Overlay gallery"
204
msgstr ""
205
206
- #: ../responsive-lightbox.php:243
207
msgid "Keyboard shortcuts"
208
msgstr ""
209
210
- #: ../responsive-lightbox.php:244
211
msgid "Social (Twitter, Facebook)"
212
msgstr ""
213
214
- #: ../responsive-lightbox.php:262
215
msgid "Select your preffered ligthbox effect script."
216
msgstr ""
217
218
- #: ../responsive-lightbox.php:272
219
msgid "Select to which rel selector lightbox effect will be applied to."
220
msgstr ""
221
222
- #: ../responsive-lightbox.php:290
223
msgid "Add lightbox to WordPress image galleries by default"
224
msgstr ""
225
226
- #: ../responsive-lightbox.php:308
227
msgid "Add lightbox to WordPress image links by default"
228
msgstr ""
229
230
- #: ../responsive-lightbox.php:326
231
msgid "Delete settings on plugin deactivation"
232
msgstr ""
233
234
- #: ../responsive-lightbox.php:344
235
msgid "Select a method of applying a lightbox effect."
236
msgstr ""
237
238
- #: ../responsive-lightbox.php:362
239
msgid "Disable if you don't want to display top and bottom bars."
240
msgstr ""
241
242
- #: ../responsive-lightbox.php:366
243
msgid "Enter the time for images animation (in miliseconds)"
244
msgstr ""
245
246
- #: ../responsive-lightbox.php:384
247
msgid "Select animation speed for lightbox effect"
248
msgstr ""
249
250
- #: ../responsive-lightbox.php:402
251
msgid "Display images as slideshow"
252
msgstr ""
253
254
- #: ../responsive-lightbox.php:406
255
msgid "Enter time (in miliseconds)"
256
msgstr ""
257
258
- #: ../responsive-lightbox.php:424
259
msgid "Automatically start slideshow"
260
msgstr ""
261
262
- #: ../responsive-lightbox.php:434
263
msgid "Value between 0 and 1 (for e.g. 0.5)"
264
msgstr ""
265
266
- #: ../responsive-lightbox.php:452
267
msgid "Display image tiltle"
268
msgstr ""
269
270
- #: ../responsive-lightbox.php:470
271
msgid "Resize the photos bigger than viewport."
272
msgstr ""
273
274
- #: ../responsive-lightbox.php:480 ../responsive-lightbox.php:490
275
msgid "in pixels"
276
msgstr ""
277
278
- #: ../responsive-lightbox.php:508
279
msgid "Select theme for lightbox effect"
280
msgstr ""
281
282
- #: ../responsive-lightbox.php:518
283
msgid "Horizontal padding (in pixels)"
284
msgstr ""
285
286
- #: ../responsive-lightbox.php:536
287
msgid ""
288
"Hides all the flash object on a page. Enable this if flash appears over "
289
"prettyPhoto"
290
msgstr ""
291
292
- #: ../responsive-lightbox.php:554
293
msgid "Select flash window mode"
294
msgstr ""
295
296
- #: ../responsive-lightbox.php:572
297
msgid "Automatically start videos"
298
msgstr ""
299
300
- #: ../responsive-lightbox.php:590
301
msgid "If set to true, only the close button will close the window"
302
msgstr ""
303
304
- #: ../responsive-lightbox.php:608
305
msgid "Allow prettyPhoto to update the url to enable deeplinking"
306
msgstr ""
307
308
- #: ../responsive-lightbox.php:626
309
msgid "If enabled, a gallery will overlay the fullscreen image on mouse over"
310
msgstr ""
311
312
- #: ../responsive-lightbox.php:644
313
msgid "Set to false if you open forms inside prettyPhoto"
314
msgstr ""
315
316
- #: ../responsive-lightbox.php:662
317
msgid "Display links to Facebook and Twitter"
318
msgstr ""
319
320
- #: ../responsive-lightbox.php:755
321
msgid ""
322
"Changes were not saved because there was attempt to save settings of "
323
"inactive script. The site has been reloaded to the proper script settings."
324
msgstr ""
325
326
- #: ../responsive-lightbox.php:767
327
msgid "Settings of SwipeBox script were restored to defaults."
328
msgstr ""
329
330
- #: ../responsive-lightbox.php:773
331
msgid "Settings of prettyPhoto script were restored to defaults."
332
msgstr ""
333
334
- #: ../responsive-lightbox.php:777
335
msgid ""
336
"Changes were not set to defaults because there was attempt to reset settings "
337
"of inactive script. The site has been reloaded to the proper script settings."
338
msgstr ""
339
340
- #: ../responsive-lightbox.php:791 ../responsive-lightbox.php:792
341
- #: ../responsive-lightbox.php:806 ../responsive-lightbox.php:838
342
msgid "Responsive Lightbox"
343
msgstr ""
344
345
- #: ../responsive-lightbox.php:831
346
msgid "Reset to defaults"
347
msgstr ""
348
349
- #: ../responsive-lightbox.php:840
350
msgid "Need support?"
351
msgstr ""
352
353
- #: ../responsive-lightbox.php:841
354
msgid ""
355
"If you are having problems with this plugin, please talk about them in the"
356
msgstr ""
357
358
- #: ../responsive-lightbox.php:841
359
msgid "Support forum"
360
msgstr ""
361
362
- #: ../responsive-lightbox.php:843
363
msgid "Do you like this plugin?"
364
msgstr ""
365
366
- #: ../responsive-lightbox.php:844
367
msgid "Rate it 5"
368
msgstr ""
369
370
- #: ../responsive-lightbox.php:844
371
msgid "on WordPress.org"
372
msgstr ""
373
374
- #: ../responsive-lightbox.php:845
375
msgid "Blog about it & link to the"
376
msgstr ""
377
378
- #: ../responsive-lightbox.php:845
379
msgid "plugin page"
380
msgstr ""
381
382
- #: ../responsive-lightbox.php:846
383
msgid "Check out our other"
384
msgstr ""
385
386
- #: ../responsive-lightbox.php:846
387
msgid "WordPress plugins"
388
msgstr ""
389
390
- #: ../responsive-lightbox.php:871
391
msgid "Are you sure you want to reset scripts settings to defaults?"
392
msgstr ""
393
394
- #: ../responsive-lightbox.php:997
395
msgid "Support"
396
msgstr ""
397
398
- #: ../responsive-lightbox.php:1019
399
msgid "Settings"
400
msgstr ""
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Responsive Lightbox\n"
4
+ "POT-Creation-Date: 2013-07-09 19:35+0100\n"
5
+ "PO-Revision-Date: 2013-07-09 19:35+0100\n"
6
"Last-Translator: Bartosz Arendt <info@digitalfactory.pl>\n"
7
"Language-Team: dFactory <info@dfactory.eu>\n"
8
"Language: English\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.7\n"
13
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
14
"X-Poedit-Basepath: .\n"
15
"X-Poedit-SourceCharset: UTF-8\n"
16
"X-Poedit-SearchPath-0: ..\n"
17
18
+ #: ../responsive-lightbox.php:253
19
msgid "prettyPhoto"
20
msgstr ""
21
22
+ #: ../responsive-lightbox.php:255
23
msgid "slow"
24
msgstr ""
25
26
+ #: ../responsive-lightbox.php:256
27
msgid "normal"
28
msgstr ""
29
30
+ #: ../responsive-lightbox.php:257
31
msgid "fast"
32
msgstr ""
33
34
+ #: ../responsive-lightbox.php:260
35
msgid "default"
36
msgstr ""
37
38
+ #: ../responsive-lightbox.php:261
39
msgid "light rounded"
40
msgstr ""
41
42
+ #: ../responsive-lightbox.php:262
43
msgid "dark rounded"
44
msgstr ""
45
46
+ #: ../responsive-lightbox.php:263
47
msgid "light square"
48
msgstr ""
49
50
+ #: ../responsive-lightbox.php:264
51
msgid "dark square"
52
msgstr ""
53
54
+ #: ../responsive-lightbox.php:265
55
msgid "facebook"
56
msgstr ""
57
58
+ #: ../responsive-lightbox.php:268
59
msgid "window"
60
msgstr ""
61
62
+ #: ../responsive-lightbox.php:269
63
msgid "transparent"
64
msgstr ""
65
66
+ #: ../responsive-lightbox.php:270
67
msgid "opaque"
68
msgstr ""
69
70
+ #: ../responsive-lightbox.php:271
71
msgid "direct"
72
msgstr ""
73
74
+ #: ../responsive-lightbox.php:272
75
msgid "gpu"
76
msgstr ""
77
78
+ #: ../responsive-lightbox.php:277
79
msgid "SwipeBox"
80
msgstr ""
81
82
+ #: ../responsive-lightbox.php:279
83
msgid "CSS"
84
msgstr ""
85
86
+ #: ../responsive-lightbox.php:280
87
msgid "jQuery"
88
msgstr ""
89
90
+ #: ../responsive-lightbox.php:286
91
msgid "Enable"
92
msgstr ""
93
94
+ #: ../responsive-lightbox.php:287
95
msgid "Disable"
96
msgstr ""
97
98
+ #: ../responsive-lightbox.php:292 ../responsive-lightbox.php:328
99
msgid "General settings"
100
msgstr ""
101
102
+ #: ../responsive-lightbox.php:297 ../responsive-lightbox.php:338
103
msgid "Lightbox settings"
104
msgstr ""
105
106
+ #: ../responsive-lightbox.php:329
107
msgid "Lightbox script"
108
msgstr ""
109
110
+ #: ../responsive-lightbox.php:330
111
msgid "Selector"
112
msgstr ""
113
114
+ #: ../responsive-lightbox.php:331
115
msgid "Galleries"
116
msgstr ""
117
118
+ #: ../responsive-lightbox.php:332
119
+ msgid "Video links"
120
+ msgstr ""
121
+
122
+ #: ../responsive-lightbox.php:333
123
msgid "Image links"
124
msgstr ""
125
126
+ #: ../responsive-lightbox.php:334
127
msgid "Deactivation"
128
msgstr ""
129
130
+ #: ../responsive-lightbox.php:342
131
+ msgid "Animation type"
132
msgstr ""
133
134
+ #: ../responsive-lightbox.php:343
135
msgid "Top and bottom bars"
136
msgstr ""
137
138
+ #: ../responsive-lightbox.php:344
139
+ msgid "Video max width"
140
+ msgstr ""
141
+
142
+ #: ../responsive-lightbox.php:348
143
msgid "Animation speed"
144
msgstr ""
145
146
+ #: ../responsive-lightbox.php:349
147
msgid "Slideshow"
148
msgstr ""
149
150
+ #: ../responsive-lightbox.php:350
151
msgid "Slideshow autoplay"
152
msgstr ""
153
154
+ #: ../responsive-lightbox.php:351
155
msgid "Opacity"
156
msgstr ""
157
158
+ #: ../responsive-lightbox.php:352
159
msgid "Show title"
160
msgstr ""
161
162
+ #: ../responsive-lightbox.php:353
163
msgid "Allow resize big images"
164
msgstr ""
165
166
+ #: ../responsive-lightbox.php:354
167
+ msgid "Video width"
168
msgstr ""
169
170
+ #: ../responsive-lightbox.php:355
171
+ msgid "Video height"
172
msgstr ""
173
174
+ #: ../responsive-lightbox.php:356
175
msgid "Theme"
176
msgstr ""
177
178
+ #: ../responsive-lightbox.php:357
179
msgid "Horizontal padding"
180
msgstr ""
181
182
+ #: ../responsive-lightbox.php:358
183
msgid "Hide Flash"
184
msgstr ""
185
186
+ #: ../responsive-lightbox.php:359
187
msgid "Flash Window Mode (wmode)"
188
msgstr ""
189
190
+ #: ../responsive-lightbox.php:360
191
msgid "Video autoplay"
192
msgstr ""
193
194
+ #: ../responsive-lightbox.php:361
195
msgid "Modal"
196
msgstr ""
197
198
+ #: ../responsive-lightbox.php:362
199
msgid "Deeplinking"
200
msgstr ""
201
202
+ #: ../responsive-lightbox.php:363
203
msgid "Overlay gallery"
204
msgstr ""
205
206
+ #: ../responsive-lightbox.php:364
207
msgid "Keyboard shortcuts"
208
msgstr ""
209
210
+ #: ../responsive-lightbox.php:365
211
msgid "Social (Twitter, Facebook)"
212
msgstr ""
213
214
+ #: ../responsive-lightbox.php:383
215
msgid "Select your preffered ligthbox effect script."
216
msgstr ""
217
218
+ #: ../responsive-lightbox.php:393
219
msgid "Select to which rel selector lightbox effect will be applied to."
220
msgstr ""
221
222
+ #: ../responsive-lightbox.php:411
223
msgid "Add lightbox to WordPress image galleries by default"
224
msgstr ""
225
226
+ #: ../responsive-lightbox.php:429
227
+ msgid "Add lightbox to YouTube and Vimeo video links by default"
228
+ msgstr ""
229
+
230
+ #: ../responsive-lightbox.php:447
231
msgid "Add lightbox to WordPress image links by default"
232
msgstr ""
233
234
+ #: ../responsive-lightbox.php:465
235
msgid "Delete settings on plugin deactivation"
236
msgstr ""
237
238
+ #: ../responsive-lightbox.php:483
239
msgid "Select a method of applying a lightbox effect."
240
msgstr ""
241
242
+ #: ../responsive-lightbox.php:501
243
msgid "Disable if you don't want to display top and bottom bars."
244
msgstr ""
245
246
+ #: ../responsive-lightbox.php:505
247
msgid "Enter the time for images animation (in miliseconds)"
248
msgstr ""
249
250
+ #: ../responsive-lightbox.php:515
251
+ msgid "Enter the max video width in a lightbox"
252
+ msgstr ""
253
+
254
+ #: ../responsive-lightbox.php:533
255
msgid "Select animation speed for lightbox effect"
256
msgstr ""
257
258
+ #: ../responsive-lightbox.php:551
259
msgid "Display images as slideshow"
260
msgstr ""
261
262
+ #: ../responsive-lightbox.php:555
263
msgid "Enter time (in miliseconds)"
264
msgstr ""
265
266
+ #: ../responsive-lightbox.php:573
267
msgid "Automatically start slideshow"
268
msgstr ""
269
270
+ #: ../responsive-lightbox.php:583
271
msgid "Value between 0 and 1 (for e.g. 0.5)"
272
msgstr ""
273
274
+ #: ../responsive-lightbox.php:601
275
msgid "Display image tiltle"
276
msgstr ""
277
278
+ #: ../responsive-lightbox.php:619
279
msgid "Resize the photos bigger than viewport."
280
msgstr ""
281
282
+ #: ../responsive-lightbox.php:629 ../responsive-lightbox.php:639
283
msgid "in pixels"
284
msgstr ""
285
286
+ #: ../responsive-lightbox.php:657
287
msgid "Select theme for lightbox effect"
288
msgstr ""
289
290
+ #: ../responsive-lightbox.php:667
291
msgid "Horizontal padding (in pixels)"
292
msgstr ""
293
294
+ #: ../responsive-lightbox.php:685
295
msgid ""
296
"Hides all the flash object on a page. Enable this if flash appears over "
297
"prettyPhoto"
298
msgstr ""
299
300
+ #: ../responsive-lightbox.php:703
301
msgid "Select flash window mode"
302
msgstr ""
303
304
+ #: ../responsive-lightbox.php:721
305
msgid "Automatically start videos"
306
msgstr ""
307
308
+ #: ../responsive-lightbox.php:739
309
msgid "If set to true, only the close button will close the window"
310
msgstr ""
311
312
+ #: ../responsive-lightbox.php:757
313
msgid "Allow prettyPhoto to update the url to enable deeplinking"
314
msgstr ""
315
316
+ #: ../responsive-lightbox.php:775
317
msgid "If enabled, a gallery will overlay the fullscreen image on mouse over"
318
msgstr ""
319
320
+ #: ../responsive-lightbox.php:793
321
msgid "Set to false if you open forms inside prettyPhoto"
322
msgstr ""
323
324
+ #: ../responsive-lightbox.php:811
325
msgid "Display links to Facebook and Twitter"
326
msgstr ""
327
328
+ #: ../responsive-lightbox.php:906
329
msgid ""
330
"Changes were not saved because there was attempt to save settings of "
331
"inactive script. The site has been reloaded to the proper script settings."
332
msgstr ""
333
334
+ #: ../responsive-lightbox.php:918
335
msgid "Settings of SwipeBox script were restored to defaults."
336
msgstr ""
337
338
+ #: ../responsive-lightbox.php:924
339
msgid "Settings of prettyPhoto script were restored to defaults."
340
msgstr ""
341
342
+ #: ../responsive-lightbox.php:928
343
msgid ""
344
"Changes were not set to defaults because there was attempt to reset settings "
345
"of inactive script. The site has been reloaded to the proper script settings."
346
msgstr ""
347
348
+ #: ../responsive-lightbox.php:942 ../responsive-lightbox.php:943
349
+ #: ../responsive-lightbox.php:957 ../responsive-lightbox.php:989
350
msgid "Responsive Lightbox"
351
msgstr ""
352
353
+ #: ../responsive-lightbox.php:982
354
msgid "Reset to defaults"
355
msgstr ""
356
357
+ #: ../responsive-lightbox.php:991
358
msgid "Need support?"
359
msgstr ""
360
361
+ #: ../responsive-lightbox.php:992
362
msgid ""
363
"If you are having problems with this plugin, please talk about them in the"
364
msgstr ""
365
366
+ #: ../responsive-lightbox.php:992
367
msgid "Support forum"
368
msgstr ""
369
370
+ #: ../responsive-lightbox.php:994
371
msgid "Do you like this plugin?"
372
msgstr ""
373
374
+ #: ../responsive-lightbox.php:995
375
msgid "Rate it 5"
376
msgstr ""
377
378
+ #: ../responsive-lightbox.php:995
379
msgid "on WordPress.org"
380
msgstr ""
381
382
+ #: ../responsive-lightbox.php:996
383
msgid "Blog about it & link to the"
384
msgstr ""
385
386
+ #: ../responsive-lightbox.php:996
387
msgid "plugin page"
388
msgstr ""
389
390
+ #: ../responsive-lightbox.php:997
391
msgid "Check out our other"
392
msgstr ""
393
394
+ #: ../responsive-lightbox.php:997
395
msgid "WordPress plugins"
396
msgstr ""
397
398
+ #: ../responsive-lightbox.php:1022
399
msgid "Are you sure you want to reset scripts settings to defaults?"
400
msgstr ""
401
402
+ #: ../responsive-lightbox.php:1149
403
msgid "Support"
404
msgstr ""
405
406
+ #: ../responsive-lightbox.php:1171
407
msgid "Settings"
408
msgstr ""
readme.txt CHANGED
@@ -1,18 +1,18 @@
1
=== Responsive Lightbox ===
2
Contributors: dfactory
3
Donate link: http://www.dfactory.eu/
4
- Tags: gallery, images, lightbox, photos, template, theme, lightbox, photo, image, picture, slideshow, modal, overlay
5
Requires at least: 3.3
6
Tested up to: 3.5.2
7
- Stable tag: 1.0.0
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
11
- Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overaly) effect optimized for mobile devices.
12
13
== Description ==
14
15
- [Responsive Lightbox](http://www.dfactory.eu/plugins/responsive-lightbox/) allows users to view larger versions of images and galleries in a lightbox (overaly) effect optimized for mobile devices.
16
17
For more information, check out plugin page at [dFactory](http://www.dfactory.eu/) or see the [Live demo](http://www.dfactory.eu/plugins/responsive-lightbox/) on our site.
18
@@ -21,10 +21,16 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
21
* Select from 2 responsive lightbox scripts
22
* Automatically add lightbox to WordPress image galleries
23
* Automatically add lightbox to WordPress image links
24
* Enter a selector for lightbox
25
- * Highly customizable settings for each lightbox scripts
26
* .pot file for translations included
27
28
29
== Installation ==
30
@@ -43,9 +49,16 @@ No questions yet.
43
44
== Changelog ==
45
46
= 1.0.0 =
47
Initial release
48
49
== Upgrade Notice ==
50
51
- Initial release of Responsive Lightbox
1
=== Responsive Lightbox ===
2
Contributors: dfactory
3
Donate link: http://www.dfactory.eu/
4
+ Tags: gallery, images, lightbox, links, photos, template, theme, lightbox, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
5
Requires at least: 3.3
6
Tested up to: 3.5.2
7
+ Stable tag: 1.0.1
8
License: MIT License
9
License URI: http://opensource.org/licenses/MIT
10
11
+ Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
12
13
== Description ==
14
15
+ [Responsive Lightbox](http://www.dfactory.eu/plugins/responsive-lightbox/) allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
16
17
For more information, check out plugin page at [dFactory](http://www.dfactory.eu/) or see the [Live demo](http://www.dfactory.eu/plugins/responsive-lightbox/) on our site.
18
21
* Select from 2 responsive lightbox scripts
22
* Automatically add lightbox to WordPress image galleries
23
* Automatically add lightbox to WordPress image links
24
+ * Automatically add lightbox to WordPress video links (YouTube, Vimeo)
25
* Enter a selector for lightbox
26
+ * Highly customizable settings for each of the lightbox scripts
27
* .pot file for translations included
28
29
+ = Translations: =
30
+
31
+ * Polish
32
+ * Persian - by Ali Mirzaei
33
+
34
35
== Installation ==
36
49
50
== Changelog ==
51
52
+ = 1.0.1 =
53
+ * New: Support for video links (YouTube and Vimeo)
54
+ * New: Added Polish translation
55
+ * New: Added Persian translation by Ali Mirzaei
56
+ * Tweak: Changed method of applying lightbox rel attribute to single images
57
+
58
= 1.0.0 =
59
Initial release
60
61
== Upgrade Notice ==
62
63
+ = 1.0.1 =
64
+ New: Support for video links (YouTube and Vimeo), Polish and Persian translations
responsive-lightbox.php CHANGED
@@ -1,8 +1,8 @@
1
<?php
2
/*
3
Plugin Name: Responsive Lightbox
4
- Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overaly) effect optimized for mobile devices.
5
- Version: 1.0.0
6
Author: dFactory
7
Author URI: http://www.dfactory.eu/
8
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
@@ -27,6 +27,7 @@ class Responsive_Lightbox
27
'script' => 'swipebox',
28
'selector' => 'lightbox',
29
'galleries' => TRUE,
30
'image_links' => TRUE,
31
'deactivation_delete' => FALSE
32
),
@@ -39,8 +40,8 @@ class Responsive_Lightbox
39
'opacity' => 75,
40
'show_title' => TRUE,
41
'allow_resize' => TRUE,
42
- 'width' => 600,
43
- 'height' => 360,
44
'separator' => '/',
45
'theme' => 'pp_default',
46
'horizontal_padding' => 20,
@@ -56,15 +57,14 @@ class Responsive_Lightbox
56
'swipebox' => array(
57
'animation' => 'css',
58
'hide_bars' => TRUE,
59
- 'hide_bars_delay' => 5000
60
)
61
)
62
);
63
private $scripts = array();
64
private $options = array();
65
- private $selectors = array();
66
private $tabs = array();
67
- private $galleries = array();
68
private $gallery_no = 0;
69
70
@@ -75,6 +75,13 @@ class Responsive_Lightbox
75
76
$this->options = array_merge(array('settings' => get_option('rl_settings')), array('configuration' => get_option('rl_configuration')));
77
78
//actions
79
add_action('plugins_loaded', array(&$this, 'load_textdomain'));
80
add_action('plugins_loaded', array(&$this, 'load_defaults'));
@@ -89,14 +96,137 @@ class Responsive_Lightbox
89
add_filter('post_gallery', array(&$this, 'gallery_attributes'), 1000);
90
91
if($this->options['settings']['galleries'] === TRUE)
92
- {
93
add_filter('wp_get_attachment_link', array(&$this, 'add_gallery_lightbox_selector'), 1000, 6);
94
- }
95
96
if($this->options['settings']['image_links'] === TRUE)
97
{
98
- add_filter('image_send_to_editor', array(&$this, 'add_links_lightbox_selector'), 1000);
99
}
100
}
101
102
@@ -116,12 +246,6 @@ class Responsive_Lightbox
116
}
117
118
119
- public function add_links_lightbox_selector($link)
120
- {
121
- return (preg_match('/<a.*? rel=".*?">/', $link) === 1 ? preg_replace('/(<a.*? rel=".*?)(".*?>)/', '$1 '.$this->options['settings']['selector'].'$2', $link) : preg_replace('/(<a.*?)>/', '$1 rel="'.$this->options['settings']['selector'].'">', $link));
122
- }
123
-
124
-
125
public function load_defaults()
126
{
127
$this->scripts = array(
@@ -158,11 +282,6 @@ class Responsive_Lightbox
158
)
159
);
160
161
- $this->selectors = array(
162
- 'rel' => __('rel', 'responsive-lightbox'),
163
- 'class' => __('class', 'responsive-lightbox')
164
- );
165
-
166
$this->choices = array(
167
'yes' => __('Enable', 'responsive-lightbox'),
168
'no' => __('Disable', 'responsive-lightbox')
@@ -210,6 +329,7 @@ class Responsive_Lightbox
210
add_settings_field('rl_script', __('Lightbox script', 'responsive-lightbox'), array(&$this, 'rl_script'), 'rl_settings', 'rl_settings');
211
add_settings_field('rl_selector', __('Selector', 'responsive-lightbox'), array(&$this, 'rl_selector'), 'rl_settings', 'rl_settings');
212
add_settings_field('rl_galleries', __('Galleries', 'responsive-lightbox'), array(&$this, 'rl_galleries'), 'rl_settings', 'rl_settings');
213
add_settings_field('rl_image_links', __('Image links', 'responsive-lightbox'), array(&$this, 'rl_image_links'), 'rl_settings', 'rl_settings');
214
add_settings_field('rl_deactivation_delete', __('Deactivation', 'responsive-lightbox'), array(&$this, 'rl_deactivation_delete'), 'rl_settings', 'rl_settings');
215
@@ -221,6 +341,7 @@ class Responsive_Lightbox
221
{
222
add_settings_field('rl_sw_animation', __('Animation type', 'responsive-lightbox'), array(&$this, 'rl_sw_animation'), 'rl_configuration', 'rl_configuration');
223
add_settings_field('rl_sw_hide_bars', __('Top and bottom bars', 'responsive-lightbox'), array(&$this, 'rl_sw_hide_bars'), 'rl_configuration', 'rl_configuration');
224
}
225
elseif($this->options['settings']['script'] === 'prettyphoto')
226
{
@@ -230,8 +351,8 @@ class Responsive_Lightbox
230
add_settings_field('rl_pp_opacity', __('Opacity', 'responsive-lightbox'), array(&$this, 'rl_pp_opacity'), 'rl_configuration', 'rl_configuration');
231
add_settings_field('rl_pp_title', __('Show title', 'responsive-lightbox'), array(&$this, 'rl_pp_title'), 'rl_configuration', 'rl_configuration');
232
add_settings_field('rl_pp_allow_resize', __('Allow resize big images', 'responsive-lightbox'), array(&$this, 'rl_pp_allow_resize'), 'rl_configuration', 'rl_configuration');
233
- add_settings_field('rl_pp_width', __('Width', 'responsive-lightbox'), array(&$this, 'rl_pp_width'), 'rl_configuration', 'rl_configuration');
234
- add_settings_field('rl_pp_height', __('Height', 'responsive-lightbox'), array(&$this, 'rl_pp_height'), 'rl_configuration', 'rl_configuration');
235
add_settings_field('rl_pp_theme', __('Theme', 'responsive-lightbox'), array(&$this, 'rl_pp_theme'), 'rl_configuration', 'rl_configuration');
236
add_settings_field('rl_pp_horizontal_padding', __('Horizontal padding', 'responsive-lightbox'), array(&$this, 'rl_pp_horizontal_padding'), 'rl_configuration', 'rl_configuration');
237
add_settings_field('rl_pp_hide_flash', __('Hide Flash', 'responsive-lightbox'), array(&$this, 'rl_pp_hide_flash'), 'rl_configuration', 'rl_configuration');
@@ -292,6 +413,24 @@ class Responsive_Lightbox
292
}
293
294
295
public function rl_image_links()
296
{
297
echo '
@@ -368,6 +507,16 @@ class Responsive_Lightbox
368
}
369
370
371
public function rl_pp_animation_speed()
372
{
373
echo '
@@ -679,6 +828,7 @@ class Responsive_Lightbox
679
680
//checkboxes
681
$input['galleries'] = (isset($input['galleries']) && in_array($input['galleries'], array_keys($this->choices)) ? ($input['galleries'] === 'yes' ? TRUE : FALSE) : $this->options['settings']['galleries']);
682
$input['image_links'] = (isset($input['image_links']) && in_array($input['image_links'], array_keys($this->choices)) ? ($input['image_links'] === 'yes' ? TRUE : FALSE) : $this->options['settings']['image_links']);
683
$input['deactivation_delete'] = (isset($input['deactivation_delete']) && in_array($input['deactivation_delete'], array_keys($this->choices)) ? ($input['deactivation_delete'] === 'yes' ? TRUE : FALSE) : $this->options['settings']['deactivation_delete']);
684
}
@@ -692,6 +842,7 @@ class Responsive_Lightbox
692
//hide bars
693
$input['swipebox']['hide_bars'] = (isset($input['swipebox']['hide_bars']) && in_array($input['swipebox']['hide_bars'], array_keys($this->choices)) ? ($input['swipebox']['hide_bars'] === 'yes' ? TRUE : FALSE) : $this->options['configuration']['swipebox']['hide_bars']);
694
$input['swipebox']['hide_bars_delay'] = (int)($input['swipebox']['hide_bars_delay'] > 0 ? $input['swipebox']['hide_bars_delay'] : $this->options['configuration']['swipebox']['hide_bars_delay']);
695
}
696
elseif($this->options['settings']['script'] === 'prettyphoto' && $_POST['script_r'] === 'prettyphoto')
697
{
@@ -950,7 +1101,8 @@ class Responsive_Lightbox
950
array(
951
'animation' => ($this->options['configuration']['swipebox']['animation'] === 'css' ? TRUE : FALSE),
952
'hideBars' => $this->getBooleanValue($this->options['configuration']['swipebox']['hide_bars']),
953
- 'hideBarsDelay' => $this->options['configuration']['swipebox']['hide_bars_delay']
954
)
955
);