Version Description
- New: WooCommerce product gallery support
- New: Masonry Image Gallery and Strip Lightbox extensions
- Tweak: Tos"R"Us script updated to 2.4.2
- Tweak: Settings handler improvements.
Download this release
Release Info
Developer | dfactory |
Plugin | Responsive Lightbox & Gallery |
Version | 1.6.7 |
Comparing to | |
See all releases |
Code changes from version 1.6.6 to 1.6.7
- assets/tosrus/js/jquery.tosrus.min.all.js +5 -5
- assets/tosrus/js/jquery.tosrus.min.js +2 -2
- includes/class-frontend.php +34 -0
- includes/class-settings.php +10 -4
- readme.txt +14 -4
- responsive-lightbox.php +6 -5
assets/tosrus/js/jquery.tosrus.min.all.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
* jQuery Touch Optimized Sliders "R"Us 2.4.
|
3 |
*
|
4 |
* Copyright (c) Fred Heusschen
|
5 |
* www.frebsite.nl
|
@@ -10,7 +10,7 @@
|
|
10 |
* Licensed under the MIT license.
|
11 |
* http://en.wikipedia.org/wiki/MIT_License
|
12 |
*/
|
13 |
-
!function(s){function i(){o=function(s){return t+"-"+s},d=function(s){return t+"-"+s},a=function(s){return s+"."+t},s.each([o,d,a],function(s,i){i.add=function(s){s=s.split(" ");for(var e in s)i[s[e]]=i(s[e])}}),o.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),d.add("slide anchor"),a.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),r={complObject:function(i,e){return s.isPlainObject(i)||(i=e),i},complBoolean:function(s,i){return"boolean"!=typeof s&&(s=i),s},complNumber:function(i,e){return s.isNumeric(i)||(i=e),i},complString:function(s,i){return"string"!=typeof s&&(s=i),s},isPercentage:function(s){return"string"==typeof s&&"%"==s.slice(-1)},getPercentage:function(s){return parseInt(s.slice(0,-1))},resizeRatio:function(s,i,e,t,n){var o=i.width(),d=i.height();e&&o>e&&(o=e),t&&d>t&&(d=t),n>o/d?d=o/n:o=d*n,s.width(o).height(d)},transitionend:function(s,i,e){var t=!1,n=function(){t||i.call(s[0]),t=!0};s.one(a.transitionend,n),s.one(a.webkitTransitionEnd,n),setTimeout(n,1.1*e)},setViewportScale:function(){if(l.viewportScale){var s=l.viewportScale.getScale();"undefined"!=typeof s&&(s=1/s,l.$body.removeClass(o["scale-1"]).removeClass(o["scale-2"]).removeClass(o["scale-3"]).addClass(o["scale-"+Math.max(Math.min(Math.round(s),3),1)]))}}},l={$wndw:s(window),$html:s("html"),$body:s("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},l.$body.addClass(s[e].support.touch?o.touch:o.desktop),l.$wndw.on(a.scroll,function(s){l.$body.hasClass(o.opened)&&(window.scrollTo(0,l.scrollPosition),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation())}),!l.viewportScale&&s[e].support.touch&&"undefined"!=typeof FlameViewportScale&&(l.viewportScale=new FlameViewportScale,r.setViewportScale(),l.$wndw.on(a.orientationchange+" "+a.resize,function(){l.viewportScaleInterval&&(clearTimeout(l.viewportScaleInterval),l.viewportScaleInterval=null),l.viewportScaleInterval=setTimeout(function(){r.setViewportScale()},500)})),s[e]._c=o,s[e]._d=d,s[e]._e=a,s[e]._f=r,s[e]._g=l}var e="tosrus",t="tos",n="2.4.1";if(!s[e]){var o={},d={},a={},r={},l={};s[e]=function(s,i,e){return this.$node=s,this.opts=i,this.conf=e,this.vars={},this.nodes={},this.slides={},this._init(),this},s[e].prototype={_init:function(){var i=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=s('<div class="'+o.wrapper+'" />'),this.nodes.$sldr=s('<div class="'+o.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?o.fixed:o.inline).addClass(o("fx-"+this.opts.effect)).addClass(o(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(a.open+" "+a.close+" "+a.prev+" "+a.next+" "+a.slideTo,function(s){arguments=Array.prototype.slice.call(arguments);var s=arguments.shift(),e=s.type;s.stopPropagation(),"function"==typeof i[e]&&i[e].apply(i,arguments)}).on(a.opening+" "+a.closing+" "+a.sliding+" "+a.loading+" "+a.loaded,function(s){s.stopPropagation()}).on(a.click,function(e){switch(e.stopPropagation(),i.opts.wrapper.onClick){case"toggleUI":i.nodes.$wrpr.toggleClass(o.hover);break;case"close":s(e.target).is("img")||i.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var t=0;t<s[e].addons.length;t++)s.isFunction(this["_addon_"+s[e].addons[t]])&&this["_addon_"+s[e].addons[t]]();for(var n=0;n<s[e].ui.length;n++)this.nodes.$wrpr.find("."+o[s[e].ui[n]]).length&&this.nodes.$wrpr.addClass(o("has-"+s[e].ui[n]));"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||s().add(this.nodes.$capt||s()).add(this.nodes.$pagr||s()).on(a.click,function(s){s.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(l.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(i,e){var t=this;this.vars.opened||(this.vars.fixed&&(l.scrollPosition=l.$wndw.scrollTop(),l.$body.addClass(o.opened),r.setViewportScale()),e?this.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e]):setTimeout(function(){t.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e])},5),this.nodes.$wrpr.addClass(o.hover).addClass(o.opened)),this.vars.opened=!0,this._loadContents(),s.isNumeric(i)&&(e=e||!this.vars.opened,this.slideTo(i,e))},close:function(i){this.vars.opened&&(this.vars.fixed&&l.$body.removeClass(o.opened),i?this.nodes.$wrpr.removeClass(o.opened):r.transitionend(this.nodes.$wrpr,function(){s(this).removeClass(o.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(o.hover).removeClass(o.opening).trigger(a.closing,[this.slides.index,i])),this.vars.opened=!1},prev:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index-i,e)},next:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index+i,e)},slideTo:function(i,t){if(!this.vars.opened)return!1;if(!s.isNumeric(i))return!1;var n=!0;if(0>i){var d=0==this.slides.index;this.opts.infinite?i=d?this.slides.total-this.slides.visible:0:(i=0,d&&(n=!1))}if(i+this.slides.visible>this.slides.total){var l=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?i=l?0:this.slides.total-this.slides.visible:(i=this.slides.total-this.slides.visible,l&&(n=!1))}if(this.slides.index=i,this._loadContents(),n){var h=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(h+="%"),t&&(this.nodes.$sldr.addClass(o.noanimation),r.transitionend(this.nodes.$sldr,function(){s(this).removeClass(o.noanimation)},5));for(var c in s[e].effects)if(c==this.opts.effect){s[e].effects[c].call(this,h,t);break}this.nodes.$wrpr.trigger(a.sliding,[i,t])}},_initAnchors:function(){var i=this,t=s();if(this.$node.is("a"))for(var n in s[e].media)t=t.add(this.$node.filter(function(){if(i.opts.media[n]&&i.opts.media[n].filterAnchors){var t=i.opts.media[n].filterAnchors.call(i,s(this));if("boolean"==typeof t)return t}return s[e].media[n].filterAnchors.call(i,s(this))}));return t},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var i=this;this.nodes.$anchors.each(function(e){var t=s(this),n=s('<div class="'+o.slide+" "+o.loading+'" />').data(d.anchor,t).appendTo(i.nodes.$sldr);t.data(d.slide,n).on(a.click,function(s){s.preventDefault(),i.open(e)})})},_initSlidesFromContent:function(){var i=this;this.$node.children().each(function(){var t=s(this);s('<div class="'+o.slide+'" />').append(t).appendTo(i.nodes.$sldr);for(var n in s[e].media){var d=null;if(i.opts.media[n]&&i.opts.media[n].filterSlides&&(d=i.opts.media[n].filterSlides.call(i,t)),"boolean"!=typeof d&&(d=s[e].media[n].filterSlides.call(i,t)),d){s[e].media[n].initSlides.call(i,t),t.parent().addClass(o(n));break}}})},_loadContents:function(){var s=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){s._loadContent(s.slides.index-s.slides.visible,s.slides.index),s._loadContent(s.slides.index+s.slides.visible,s.slides.index+2*s.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(i,t){var n=this;this.nodes.$slides.slice(i,t).each(function(){var i=s(this);if(0==i.children().length){var t=i.data(d.anchor),r=t.attr("href");for(var l in s[e].media){var h=null;if(n.opts.media[l]&&n.opts.media[l].filterAnchors&&(h=n.opts.media[l].filterAnchors.call(n,t)),"boolean"!=typeof h&&(h=s[e].media[l].filterAnchors.call(n,t)),h){s[e].media[l].initAnchors.call(n,i,r),i.addClass(o(l));break}}i.trigger(a.loading,[i.data(d.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=s(this.opts.wrapper.target)),this.opts.show=r.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),s.isNumeric(this.opts.slides.width))this.slides.widthPercentage=!1,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,1);else{var i=r.isPercentage(this.opts.slides.width)?r.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,i?Math.floor(100/i):1),this.opts.slides.width=i?i:Math.ceil(1e4/this.opts.slides.visible)/100}this.opts.slides.slide=r.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=r.isPercentage(this.opts.slides.offset)?r.getPercentage(this.opts.slides.offset):r.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,o("uid-"+this.__uniqueID)}},s.fn[e]=function(t,n,o,d){l.$wndw||i(),t=s.extend(!0,{},s[e].defaults,t),t=s.extend(!0,{},t,s[e].support.touch?o:n),d=s.extend(!0,{},s[e].configuration,d);var a=new s[e](this,t,d);return this.data(e,a),a.nodes.$wrpr},s[e].support={touch:"ontouchstart"in window.document||navigator.msMaxTouchPoints},s[e].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},s[e].configuration={transitionDuration:400},s[e].constants={},s[e].debug=function(){},s[e].deprecated=function(s,i){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(e+": "+s+" is deprecated, use "+i+" instead.")},s[e].effects={slide:function(s){this.nodes.$sldr.css("left",s)},fade:function(i){r.transitionend(this.nodes.$sldr,function(){s(this).css("left",i).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},s[e].version=n,s[e].media={},s[e].addons=[],s[e].ui=[]}}(jQuery);
|
14 |
/*
|
15 |
* jQuery Touch Optimized Sliders "R"Us
|
16 |
* Autoplay addon
|
@@ -34,7 +34,7 @@
|
|
34 |
* Copyright (c) Fred Heusschen
|
35 |
* www.frebsite.nl
|
36 |
*/
|
37 |
-
!function(t){var i,s,a,e,d,n="tosrus",r="caption",o=!1;t[n].prototype["_addon_"+r]=function(){o||(i=t[n]._c,s=t[n]._d,a=t[n]._e,e=t[n]._f,d=t[n]._g,i.add("caption uibg"),s.add("caption"),o=!0);var p=this,c=this.opts[r];if(c.add){c.attributes=c.attributes||[],"string"==typeof c.target&&(c.target=t(c.target)),c.target instanceof t?this.nodes.$capt=c.target:(this.nodes.$capt=t('<div class="'+i.caption+'" />').appendTo(this.nodes.$wrpr),this.nodes.$uibg||(this.nodes.$uibg=t('<div class="'+i.uibg+'" />').prependTo(this.nodes.$wrpr)));for(var h=0,l=this.slides.visible;l>h;h++)t('<div class="'+i.caption+"-"+h+'" />').css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px")).appendTo(this.nodes.$capt);this.nodes.$slides.each(function(){var i=t(this),a=p.vars.fixed?i.data(s.anchor):i.children();i.data(s.caption,"");for(var e=0,d=c.attributes.length;d>e;e++){var n=a.attr(c.attributes[e]);if(n&&n.length){i.data(s.caption,n);break}}}),this.nodes.$wrpr.on(a.sliding,function(){for(var t=0,i=p.slides.visible;i>t;t++)p.nodes.$capt.children().eq(t).
|
38 |
/*
|
39 |
* jQuery Touch Optimized Sliders "R"Us
|
40 |
* Drag addon
|
@@ -82,7 +82,7 @@
|
|
82 |
* Copyright (c) Fred Heusschen
|
83 |
* www.frebsite.nl
|
84 |
*/
|
85 |
-
!function(i){function t(t){function l(){f.length&&(f.attr("src",""),f.attr("src",h))}c||(a=i[s]._c,e=i[s]._d,o=i[s]._e,r=i[s]._f,n=i[s]._g,e.add("ratio maxWidth maxHeight"),c=!0);var f=t.children(),m=t.data(i[s]._d.anchor)||i(),h=f.attr("src"),u=m.data(e.ratio)||this.opts[d].ratio,g=m.data(e.maxWidth)||this.opts[d].maxWidth,p=m.data(e.maxHeight)||this.opts[d].maxHeight;t.removeClass(a.loading).trigger(o.loaded).on(o.loading,function(){r.resizeRatio(f,t,g,p,u)}),this.nodes.$wrpr.on(o.sliding,function(){l()}).on(o.closing,function(){l()}),n.$wndw.on(o.resize,function(){r.resizeRatio(f,t,g,p,u)})}var a,e,o,r,n,s="tosrus",d="vimeo",c=!1;i[s].media[d]={filterAnchors:function(i){return i.attr("href").toLowerCase().indexOf("vimeo.com/")>-1},initAnchors:function(a,e){var o=this._uniqueID();e=e.split("vimeo.com/")[1].split("?")[0]+"?api=1&player_id="+o,i('<iframe id="'+o+'" src="
|
86 |
/*
|
87 |
* jQuery Touch Optimized Sliders "R"Us
|
88 |
* Youtube media
|
@@ -90,4 +90,4 @@
|
|
90 |
* Copyright (c) Fred Heusschen
|
91 |
* www.frebsite.nl
|
92 |
*/
|
93 |
-
!function(t){function e(e){function u(t){l.length&&l[0].contentWindow.postMessage('{ "event": "command", "func": "'+t+'Video" }',"*")}c||(i=t[s]._c,o=t[s]._d,a=t[s]._e,n=t[s]._f,r=t[s]._g,o.add("ratio maxWidth maxHeight"),c=!0);var l=e.children(),m=e.data(t[s]._d.anchor)||t(),f=m.data(o.ratio)||this.opts[d].ratio,h=m.data(o.maxWidth)||this.opts[d].maxWidth,p=m.data(o.maxHeight)||this.opts[d].maxHeight;e.removeClass(i.loading).trigger(a.loaded).on(a.loading,function(){n.resizeRatio(l,e,h,p,f)}),this.nodes.$wrpr.on(a.sliding,function(){u("pause")}).on(a.closing,function(){u("stop")}),r.$wndw.on(a.resize,function(){n.resizeRatio(l,e,h,p,f)})}var i,o,a,n,r,s="tosrus",d="youtube",c=!1;t[s].media[d]={filterAnchors:function(t){return t.attr("href").toLowerCase().indexOf("youtube.com/watch?v=")>-1},initAnchors:function(i,o){var a=o;o=o.split("?v=")[1].split("&")[0],this.opts[d].imageLink?(o="
|
1 |
/*
|
2 |
+
* jQuery Touch Optimized Sliders "R"Us 2.4.2
|
3 |
*
|
4 |
* Copyright (c) Fred Heusschen
|
5 |
* www.frebsite.nl
|
10 |
* Licensed under the MIT license.
|
11 |
* http://en.wikipedia.org/wiki/MIT_License
|
12 |
*/
|
13 |
+
!function(s){function i(){o=function(s){return t+"-"+s},d=function(s){return t+"-"+s},a=function(s){return s+"."+t},s.each([o,d,a],function(s,i){i.add=function(s){s=s.split(" ");for(var e in s)i[s[e]]=i(s[e])}}),o.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),d.add("slide anchor"),a.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),r={complObject:function(i,e){return s.isPlainObject(i)||(i=e),i},complBoolean:function(s,i){return"boolean"!=typeof s&&(s=i),s},complNumber:function(i,e){return s.isNumeric(i)||(i=e),i},complString:function(s,i){return"string"!=typeof s&&(s=i),s},isPercentage:function(s){return"string"==typeof s&&"%"==s.slice(-1)},getPercentage:function(s){return parseInt(s.slice(0,-1))},resizeRatio:function(s,i,e,t,n){var o=i.width(),d=i.height();e&&o>e&&(o=e),t&&d>t&&(d=t),n>o/d?d=o/n:o=d*n,s.width(o).height(d)},transitionend:function(s,i,e){var t=!1,n=function(){t||i.call(s[0]),t=!0};s.one(a.transitionend,n),s.one(a.webkitTransitionEnd,n),setTimeout(n,1.1*e)},setViewportScale:function(){if(l.viewportScale){var s=l.viewportScale.getScale();"undefined"!=typeof s&&(s=1/s,l.$body.removeClass(o["scale-1"]).removeClass(o["scale-2"]).removeClass(o["scale-3"]).addClass(o["scale-"+Math.max(Math.min(Math.round(s),3),1)]))}}},l={$wndw:s(window),$html:s("html"),$body:s("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},l.$body.addClass(s[e].support.touch?o.touch:o.desktop),l.$wndw.on(a.scroll,function(s){l.$body.hasClass(o.opened)&&(window.scrollTo(0,l.scrollPosition),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation())}),!l.viewportScale&&s[e].support.touch&&"undefined"!=typeof FlameViewportScale&&(l.viewportScale=new FlameViewportScale,r.setViewportScale(),l.$wndw.on(a.orientationchange+" "+a.resize,function(){l.viewportScaleInterval&&(clearTimeout(l.viewportScaleInterval),l.viewportScaleInterval=null),l.viewportScaleInterval=setTimeout(function(){r.setViewportScale()},500)})),s[e]._c=o,s[e]._d=d,s[e]._e=a,s[e]._f=r,s[e]._g=l}var e="tosrus",t="tos",n="2.4.2";if(!s[e]){var o={},d={},a={},r={},l={};s[e]=function(s,i,e){return this.$node=s,this.opts=i,this.conf=e,this.vars={},this.nodes={},this.slides={},this._init(),this},s[e].prototype={_init:function(){var i=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=s('<div class="'+o.wrapper+'" />'),this.nodes.$sldr=s('<div class="'+o.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?o.fixed:o.inline).addClass(o("fx-"+this.opts.effect)).addClass(o(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(a.open+" "+a.close+" "+a.prev+" "+a.next+" "+a.slideTo,function(s){arguments=Array.prototype.slice.call(arguments);var s=arguments.shift(),e=s.type;s.stopPropagation(),"function"==typeof i[e]&&i[e].apply(i,arguments)}).on(a.opening+" "+a.closing+" "+a.sliding+" "+a.loading+" "+a.loaded,function(s){s.stopPropagation()}).on(a.click,function(e){switch(e.stopPropagation(),i.opts.wrapper.onClick){case"toggleUI":i.nodes.$wrpr.toggleClass(o.hover);break;case"close":s(e.target).is("img")||i.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var t=0;t<s[e].addons.length;t++)s.isFunction(this["_addon_"+s[e].addons[t]])&&this["_addon_"+s[e].addons[t]]();for(var n=0;n<s[e].ui.length;n++)this.nodes.$wrpr.find("."+o[s[e].ui[n]]).length&&this.nodes.$wrpr.addClass(o("has-"+s[e].ui[n]));"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||s().add(this.nodes.$capt||s()).add(this.nodes.$pagr||s()).on(a.click,function(s){s.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(l.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(i,e){var t=this;this.vars.opened||(this.vars.fixed&&(l.scrollPosition=l.$wndw.scrollTop(),l.$body.addClass(o.opened),r.setViewportScale()),e?this.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e]):setTimeout(function(){t.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e])},5),this.nodes.$wrpr.addClass(o.hover).addClass(o.opened)),this.vars.opened=!0,this._loadContents(),s.isNumeric(i)&&(e=e||!this.vars.opened,this.slideTo(i,e))},close:function(i){this.vars.opened&&(this.vars.fixed&&l.$body.removeClass(o.opened),i?this.nodes.$wrpr.removeClass(o.opened):r.transitionend(this.nodes.$wrpr,function(){s(this).removeClass(o.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(o.hover).removeClass(o.opening).trigger(a.closing,[this.slides.index,i])),this.vars.opened=!1},prev:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index-i,e)},next:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index+i,e)},slideTo:function(i,t){if(!this.vars.opened)return!1;if(!s.isNumeric(i))return!1;var n=!0;if(0>i){var d=0==this.slides.index;this.opts.infinite?i=d?this.slides.total-this.slides.visible:0:(i=0,d&&(n=!1))}if(i+this.slides.visible>this.slides.total){var l=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?i=l?0:this.slides.total-this.slides.visible:(i=this.slides.total-this.slides.visible,l&&(n=!1))}if(this.slides.index=i,this._loadContents(),n){var h=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(h+="%"),t&&(this.nodes.$sldr.addClass(o.noanimation),r.transitionend(this.nodes.$sldr,function(){s(this).removeClass(o.noanimation)},5));for(var c in s[e].effects)if(c==this.opts.effect){s[e].effects[c].call(this,h,t);break}this.nodes.$wrpr.trigger(a.sliding,[i,t])}},_initAnchors:function(){var i=this,t=s();if(this.$node.is("a"))for(var n in s[e].media)t=t.add(this.$node.filter(function(){if(i.opts.media[n]&&i.opts.media[n].filterAnchors){var t=i.opts.media[n].filterAnchors.call(i,s(this));if("boolean"==typeof t)return t}return s[e].media[n].filterAnchors.call(i,s(this))}));return t},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var i=this;this.nodes.$anchors.each(function(e){var t=s(this),n=s('<div class="'+o.slide+" "+o.loading+'" />').data(d.anchor,t).appendTo(i.nodes.$sldr);t.data(d.slide,n).on(a.click,function(s){s.preventDefault(),i.open(e)})})},_initSlidesFromContent:function(){var i=this;this.$node.children().each(function(){var t=s(this);s('<div class="'+o.slide+'" />').append(t).appendTo(i.nodes.$sldr);for(var n in s[e].media){var d=null;if(i.opts.media[n]&&i.opts.media[n].filterSlides&&(d=i.opts.media[n].filterSlides.call(i,t)),"boolean"!=typeof d&&(d=s[e].media[n].filterSlides.call(i,t)),d){s[e].media[n].initSlides.call(i,t),t.parent().addClass(o(n));break}}})},_loadContents:function(){var s=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){s._loadContent(s.slides.index-s.slides.visible,s.slides.index),s._loadContent(s.slides.index+s.slides.visible,s.slides.index+2*s.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(i,t){var n=this;this.nodes.$slides.slice(i,t).each(function(){var i=s(this);if(0==i.children().length){var t=i.data(d.anchor),r=t.attr("href");for(var l in s[e].media){var h=null;if(n.opts.media[l]&&n.opts.media[l].filterAnchors&&(h=n.opts.media[l].filterAnchors.call(n,t)),"boolean"!=typeof h&&(h=s[e].media[l].filterAnchors.call(n,t)),h){s[e].media[l].initAnchors.call(n,i,r),i.addClass(o(l));break}}i.trigger(a.loading,[i.data(d.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=s(this.opts.wrapper.target)),this.opts.show=r.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),s.isNumeric(this.opts.slides.width))this.slides.widthPercentage=!1,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,1);else{var i=r.isPercentage(this.opts.slides.width)?r.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,i?Math.floor(100/i):1),this.opts.slides.width=i?i:Math.ceil(1e4/this.opts.slides.visible)/100}this.opts.slides.slide=r.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=r.isPercentage(this.opts.slides.offset)?r.getPercentage(this.opts.slides.offset):r.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,o("uid-"+this.__uniqueID)}},s.fn[e]=function(t,n,o,d){l.$wndw||i(),t=s.extend(!0,{},s[e].defaults,t),t=s.extend(!0,{},t,s[e].support.touch?o:n),d=s.extend(!0,{},s[e].configuration,d);var a=new s[e](this,t,d);return this.data(e,a),a.nodes.$wrpr},s[e].support={touch:"ontouchstart"in window.document||navigator.msMaxTouchPoints},s[e].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},s[e].configuration={transitionDuration:400},s[e].constants={},s[e].debug=function(){},s[e].deprecated=function(s,i){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(e+": "+s+" is deprecated, use "+i+" instead.")},s[e].effects={slide:function(s){this.nodes.$sldr.css("left",s)},fade:function(i){r.transitionend(this.nodes.$sldr,function(){s(this).css("left",i).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},s[e].version=n,s[e].media={},s[e].addons=[],s[e].ui=[]}}(jQuery);
|
14 |
/*
|
15 |
* jQuery Touch Optimized Sliders "R"Us
|
16 |
* Autoplay addon
|
34 |
* Copyright (c) Fred Heusschen
|
35 |
* www.frebsite.nl
|
36 |
*/
|
37 |
+
!function(t){var i,s,a,e,d,n="tosrus",r="caption",o=!1;t[n].prototype["_addon_"+r]=function(){o||(i=t[n]._c,s=t[n]._d,a=t[n]._e,e=t[n]._f,d=t[n]._g,i.add("caption uibg"),s.add("caption"),o=!0);var p=this,c=this.opts[r];if(c.add){c.attributes=c.attributes||[],"string"==typeof c.target&&(c.target=t(c.target)),c.target instanceof t?this.nodes.$capt=c.target:(this.nodes.$capt=t('<div class="'+i.caption+'" />').appendTo(this.nodes.$wrpr),this.nodes.$uibg||(this.nodes.$uibg=t('<div class="'+i.uibg+'" />').prependTo(this.nodes.$wrpr)));for(var h=0,l=this.slides.visible;l>h;h++)t('<div class="'+i.caption+"-"+h+'" />').css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px")).appendTo(this.nodes.$capt);this.nodes.$slides.each(function(){var i=t(this),a=p.vars.fixed?i.data(s.anchor):i.children();i.data(s.caption,"");for(var e=0,d=c.attributes.length;d>e;e++){var n=a.attr(c.attributes[e]);if(n&&n.length){i.data(s.caption,n);break}}}),this.nodes.$wrpr.on(a.sliding,function(){for(var t=0,i=p.slides.visible;i>t;t++)p.nodes.$capt.children().eq(t).html(p.nodes.$sldr.children().eq(p.slides.index+t).data(s.caption)||"")})}},t[n].defaults[r]={add:!1,target:null,attributes:["title","alt","rel"]},t[n].addons.push(r),t[n].ui.push("caption")}(jQuery);
|
38 |
/*
|
39 |
* jQuery Touch Optimized Sliders "R"Us
|
40 |
* Drag addon
|
82 |
* Copyright (c) Fred Heusschen
|
83 |
* www.frebsite.nl
|
84 |
*/
|
85 |
+
!function(i){function t(t){function l(){f.length&&(f.attr("src",""),f.attr("src",h))}c||(a=i[s]._c,e=i[s]._d,o=i[s]._e,r=i[s]._f,n=i[s]._g,e.add("ratio maxWidth maxHeight"),c=!0);var f=t.children(),m=t.data(i[s]._d.anchor)||i(),h=f.attr("src"),u=m.data(e.ratio)||this.opts[d].ratio,g=m.data(e.maxWidth)||this.opts[d].maxWidth,p=m.data(e.maxHeight)||this.opts[d].maxHeight;t.removeClass(a.loading).trigger(o.loaded).on(o.loading,function(){r.resizeRatio(f,t,g,p,u)}),this.nodes.$wrpr.on(o.sliding,function(){l()}).on(o.closing,function(){l()}),n.$wndw.on(o.resize,function(){r.resizeRatio(f,t,g,p,u)})}var a,e,o,r,n,s="tosrus",d="vimeo",c=!1;i[s].media[d]={filterAnchors:function(i){return i.attr("href").toLowerCase().indexOf("vimeo.com/")>-1},initAnchors:function(a,e){var o=this._uniqueID();e=e.split("vimeo.com/")[1].split("?")[0]+"?api=1&player_id="+o,i('<iframe id="'+o+'" src="http://player.vimeo.com/video/'+e+'" frameborder="0" allowfullscreen />').appendTo(a),t.call(this,a)},filterSlides:function(i){return i.is("iframe")&&i.attr("src")?i.attr("src").toLowerCase().indexOf("vimeo.com/video/")>-1:!1},initSlides:function(i){t.call(this,i)}},i[s].defaults.media[d]={},i[s].defaults[d]={ratio:16/9,maxWidth:!1,maxHeight:!1}}(jQuery);
|
86 |
/*
|
87 |
* jQuery Touch Optimized Sliders "R"Us
|
88 |
* Youtube media
|
90 |
* Copyright (c) Fred Heusschen
|
91 |
* www.frebsite.nl
|
92 |
*/
|
93 |
+
!function(t){function e(e){function u(t){l.length&&l[0].contentWindow.postMessage('{ "event": "command", "func": "'+t+'Video" }',"*")}c||(i=t[s]._c,o=t[s]._d,a=t[s]._e,n=t[s]._f,r=t[s]._g,o.add("ratio maxWidth maxHeight"),c=!0);var l=e.children(),m=e.data(t[s]._d.anchor)||t(),f=m.data(o.ratio)||this.opts[d].ratio,h=m.data(o.maxWidth)||this.opts[d].maxWidth,p=m.data(o.maxHeight)||this.opts[d].maxHeight;e.removeClass(i.loading).trigger(a.loaded).on(a.loading,function(){n.resizeRatio(l,e,h,p,f)}),this.nodes.$wrpr.on(a.sliding,function(){u("pause")}).on(a.closing,function(){u("stop")}),r.$wndw.on(a.resize,function(){n.resizeRatio(l,e,h,p,f)})}var i,o,a,n,r,s="tosrus",d="youtube",c=!1;t[s].media[d]={filterAnchors:function(t){return t.attr("href").toLowerCase().indexOf("youtube.com/watch?v=")>-1},initAnchors:function(i,o){var a=o;o=o.split("?v=")[1].split("&")[0],this.opts[d].imageLink?(o="http://img.youtube.com/vi/"+o+"/0.jpg",t('<a href="'+a+'" class="'+t[s]._c("play")+'" target="_blank" />').appendTo(i),t('<img border="0" />').on(t[s]._e.load,function(e){e.stopPropagation(),i.removeClass(t[s]._c.loading).trigger(t[s]._e.loaded)}).appendTo(i).attr("src",o)):(t('<iframe src="http://www.youtube.com/embed/'+o+'?enablejsapi=1" frameborder="0" allowfullscreen />').appendTo(i),e.call(this,i))},filterSlides:function(t){return t.is("iframe")&&t.attr("src")?t.attr("src").toLowerCase().indexOf("youtube.com/embed/")>-1:!1},initSlides:function(t){e.call(this,t)}},t[s].defaults.media[d]={},t[s].defaults[d]={ratio:16/9,maxWidth:!1,maxHeight:!1,imageLink:t[s].support.touch}}(jQuery);
|
assets/tosrus/js/jquery.tosrus.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
* jQuery Touch Optimized Sliders "R"Us 2.4.
|
3 |
*
|
4 |
* Copyright (c) Fred Heusschen
|
5 |
* www.frebsite.nl
|
@@ -10,4 +10,4 @@
|
|
10 |
* Licensed under the MIT license.
|
11 |
* http://en.wikipedia.org/wiki/MIT_License
|
12 |
*/
|
13 |
-
!function(s){function i(){o=function(s){return t+"-"+s},d=function(s){return t+"-"+s},a=function(s){return s+"."+t},s.each([o,d,a],function(s,i){i.add=function(s){s=s.split(" ");for(var e in s)i[s[e]]=i(s[e])}}),o.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),d.add("slide anchor"),a.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),r={complObject:function(i,e){return s.isPlainObject(i)||(i=e),i},complBoolean:function(s,i){return"boolean"!=typeof s&&(s=i),s},complNumber:function(i,e){return s.isNumeric(i)||(i=e),i},complString:function(s,i){return"string"!=typeof s&&(s=i),s},isPercentage:function(s){return"string"==typeof s&&"%"==s.slice(-1)},getPercentage:function(s){return parseInt(s.slice(0,-1))},resizeRatio:function(s,i,e,t,n){var o=i.width(),d=i.height();e&&o>e&&(o=e),t&&d>t&&(d=t),n>o/d?d=o/n:o=d*n,s.width(o).height(d)},transitionend:function(s,i,e){var t=!1,n=function(){t||i.call(s[0]),t=!0};s.one(a.transitionend,n),s.one(a.webkitTransitionEnd,n),setTimeout(n,1.1*e)},setViewportScale:function(){if(l.viewportScale){var s=l.viewportScale.getScale();"undefined"!=typeof s&&(s=1/s,l.$body.removeClass(o["scale-1"]).removeClass(o["scale-2"]).removeClass(o["scale-3"]).addClass(o["scale-"+Math.max(Math.min(Math.round(s),3),1)]))}}},l={$wndw:s(window),$html:s("html"),$body:s("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},l.$body.addClass(s[e].support.touch?o.touch:o.desktop),l.$wndw.on(a.scroll,function(s){l.$body.hasClass(o.opened)&&(window.scrollTo(0,l.scrollPosition),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation())}),!l.viewportScale&&s[e].support.touch&&"undefined"!=typeof FlameViewportScale&&(l.viewportScale=new FlameViewportScale,r.setViewportScale(),l.$wndw.on(a.orientationchange+" "+a.resize,function(){l.viewportScaleInterval&&(clearTimeout(l.viewportScaleInterval),l.viewportScaleInterval=null),l.viewportScaleInterval=setTimeout(function(){r.setViewportScale()},500)})),s[e]._c=o,s[e]._d=d,s[e]._e=a,s[e]._f=r,s[e]._g=l}var e="tosrus",t="tos",n="2.4.1";if(!s[e]){var o={},d={},a={},r={},l={};s[e]=function(s,i,e){return this.$node=s,this.opts=i,this.conf=e,this.vars={},this.nodes={},this.slides={},this._init(),this},s[e].prototype={_init:function(){var i=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=s('<div class="'+o.wrapper+'" />'),this.nodes.$sldr=s('<div class="'+o.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?o.fixed:o.inline).addClass(o("fx-"+this.opts.effect)).addClass(o(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(a.open+" "+a.close+" "+a.prev+" "+a.next+" "+a.slideTo,function(s){arguments=Array.prototype.slice.call(arguments);var s=arguments.shift(),e=s.type;s.stopPropagation(),"function"==typeof i[e]&&i[e].apply(i,arguments)}).on(a.opening+" "+a.closing+" "+a.sliding+" "+a.loading+" "+a.loaded,function(s){s.stopPropagation()}).on(a.click,function(e){switch(e.stopPropagation(),i.opts.wrapper.onClick){case"toggleUI":i.nodes.$wrpr.toggleClass(o.hover);break;case"close":s(e.target).is("img")||i.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var t=0;t<s[e].addons.length;t++)s.isFunction(this["_addon_"+s[e].addons[t]])&&this["_addon_"+s[e].addons[t]]();for(var n=0;n<s[e].ui.length;n++)this.nodes.$wrpr.find("."+o[s[e].ui[n]]).length&&this.nodes.$wrpr.addClass(o("has-"+s[e].ui[n]));"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||s().add(this.nodes.$capt||s()).add(this.nodes.$pagr||s()).on(a.click,function(s){s.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(l.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(i,e){var t=this;this.vars.opened||(this.vars.fixed&&(l.scrollPosition=l.$wndw.scrollTop(),l.$body.addClass(o.opened),r.setViewportScale()),e?this.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e]):setTimeout(function(){t.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e])},5),this.nodes.$wrpr.addClass(o.hover).addClass(o.opened)),this.vars.opened=!0,this._loadContents(),s.isNumeric(i)&&(e=e||!this.vars.opened,this.slideTo(i,e))},close:function(i){this.vars.opened&&(this.vars.fixed&&l.$body.removeClass(o.opened),i?this.nodes.$wrpr.removeClass(o.opened):r.transitionend(this.nodes.$wrpr,function(){s(this).removeClass(o.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(o.hover).removeClass(o.opening).trigger(a.closing,[this.slides.index,i])),this.vars.opened=!1},prev:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index-i,e)},next:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index+i,e)},slideTo:function(i,t){if(!this.vars.opened)return!1;if(!s.isNumeric(i))return!1;var n=!0;if(0>i){var d=0==this.slides.index;this.opts.infinite?i=d?this.slides.total-this.slides.visible:0:(i=0,d&&(n=!1))}if(i+this.slides.visible>this.slides.total){var l=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?i=l?0:this.slides.total-this.slides.visible:(i=this.slides.total-this.slides.visible,l&&(n=!1))}if(this.slides.index=i,this._loadContents(),n){var h=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(h+="%"),t&&(this.nodes.$sldr.addClass(o.noanimation),r.transitionend(this.nodes.$sldr,function(){s(this).removeClass(o.noanimation)},5));for(var c in s[e].effects)if(c==this.opts.effect){s[e].effects[c].call(this,h,t);break}this.nodes.$wrpr.trigger(a.sliding,[i,t])}},_initAnchors:function(){var i=this,t=s();if(this.$node.is("a"))for(var n in s[e].media)t=t.add(this.$node.filter(function(){if(i.opts.media[n]&&i.opts.media[n].filterAnchors){var t=i.opts.media[n].filterAnchors.call(i,s(this));if("boolean"==typeof t)return t}return s[e].media[n].filterAnchors.call(i,s(this))}));return t},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var i=this;this.nodes.$anchors.each(function(e){var t=s(this),n=s('<div class="'+o.slide+" "+o.loading+'" />').data(d.anchor,t).appendTo(i.nodes.$sldr);t.data(d.slide,n).on(a.click,function(s){s.preventDefault(),i.open(e)})})},_initSlidesFromContent:function(){var i=this;this.$node.children().each(function(){var t=s(this);s('<div class="'+o.slide+'" />').append(t).appendTo(i.nodes.$sldr);for(var n in s[e].media){var d=null;if(i.opts.media[n]&&i.opts.media[n].filterSlides&&(d=i.opts.media[n].filterSlides.call(i,t)),"boolean"!=typeof d&&(d=s[e].media[n].filterSlides.call(i,t)),d){s[e].media[n].initSlides.call(i,t),t.parent().addClass(o(n));break}}})},_loadContents:function(){var s=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){s._loadContent(s.slides.index-s.slides.visible,s.slides.index),s._loadContent(s.slides.index+s.slides.visible,s.slides.index+2*s.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(i,t){var n=this;this.nodes.$slides.slice(i,t).each(function(){var i=s(this);if(0==i.children().length){var t=i.data(d.anchor),r=t.attr("href");for(var l in s[e].media){var h=null;if(n.opts.media[l]&&n.opts.media[l].filterAnchors&&(h=n.opts.media[l].filterAnchors.call(n,t)),"boolean"!=typeof h&&(h=s[e].media[l].filterAnchors.call(n,t)),h){s[e].media[l].initAnchors.call(n,i,r),i.addClass(o(l));break}}i.trigger(a.loading,[i.data(d.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=s(this.opts.wrapper.target)),this.opts.show=r.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),s.isNumeric(this.opts.slides.width))this.slides.widthPercentage=!1,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,1);else{var i=r.isPercentage(this.opts.slides.width)?r.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,i?Math.floor(100/i):1),this.opts.slides.width=i?i:Math.ceil(1e4/this.opts.slides.visible)/100}this.opts.slides.slide=r.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=r.isPercentage(this.opts.slides.offset)?r.getPercentage(this.opts.slides.offset):r.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,o("uid-"+this.__uniqueID)}},s.fn[e]=function(t,n,o,d){l.$wndw||i(),t=s.extend(!0,{},s[e].defaults,t),t=s.extend(!0,{},t,s[e].support.touch?o:n),d=s.extend(!0,{},s[e].configuration,d);var a=new s[e](this,t,d);return this.data(e,a),a.nodes.$wrpr},s[e].support={touch:"ontouchstart"in window.document||navigator.msMaxTouchPoints},s[e].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},s[e].configuration={transitionDuration:400},s[e].constants={},s[e].debug=function(){},s[e].deprecated=function(s,i){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(e+": "+s+" is deprecated, use "+i+" instead.")},s[e].effects={slide:function(s){this.nodes.$sldr.css("left",s)},fade:function(i){r.transitionend(this.nodes.$sldr,function(){s(this).css("left",i).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},s[e].version=n,s[e].media={},s[e].addons=[],s[e].ui=[]}}(jQuery);
|
1 |
/*
|
2 |
+
* jQuery Touch Optimized Sliders "R"Us 2.4.2
|
3 |
*
|
4 |
* Copyright (c) Fred Heusschen
|
5 |
* www.frebsite.nl
|
10 |
* Licensed under the MIT license.
|
11 |
* http://en.wikipedia.org/wiki/MIT_License
|
12 |
*/
|
13 |
+
!function(s){function i(){o=function(s){return t+"-"+s},d=function(s){return t+"-"+s},a=function(s){return s+"."+t},s.each([o,d,a],function(s,i){i.add=function(s){s=s.split(" ");for(var e in s)i[s[e]]=i(s[e])}}),o.add("touch desktop scale-1 scale-2 scale-3 wrapper opened opening fixed inline hover slider slide loading noanimation fastanimation"),d.add("slide anchor"),a.add("open opening close closing prev next slideTo sliding click pinch scroll resize orientationchange load loading loaded transitionend webkitTransitionEnd"),r={complObject:function(i,e){return s.isPlainObject(i)||(i=e),i},complBoolean:function(s,i){return"boolean"!=typeof s&&(s=i),s},complNumber:function(i,e){return s.isNumeric(i)||(i=e),i},complString:function(s,i){return"string"!=typeof s&&(s=i),s},isPercentage:function(s){return"string"==typeof s&&"%"==s.slice(-1)},getPercentage:function(s){return parseInt(s.slice(0,-1))},resizeRatio:function(s,i,e,t,n){var o=i.width(),d=i.height();e&&o>e&&(o=e),t&&d>t&&(d=t),n>o/d?d=o/n:o=d*n,s.width(o).height(d)},transitionend:function(s,i,e){var t=!1,n=function(){t||i.call(s[0]),t=!0};s.one(a.transitionend,n),s.one(a.webkitTransitionEnd,n),setTimeout(n,1.1*e)},setViewportScale:function(){if(l.viewportScale){var s=l.viewportScale.getScale();"undefined"!=typeof s&&(s=1/s,l.$body.removeClass(o["scale-1"]).removeClass(o["scale-2"]).removeClass(o["scale-3"]).addClass(o["scale-"+Math.max(Math.min(Math.round(s),3),1)]))}}},l={$wndw:s(window),$html:s("html"),$body:s("body"),scrollPosition:0,viewportScale:null,viewportScaleInterval:null},l.$body.addClass(s[e].support.touch?o.touch:o.desktop),l.$wndw.on(a.scroll,function(s){l.$body.hasClass(o.opened)&&(window.scrollTo(0,l.scrollPosition),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation())}),!l.viewportScale&&s[e].support.touch&&"undefined"!=typeof FlameViewportScale&&(l.viewportScale=new FlameViewportScale,r.setViewportScale(),l.$wndw.on(a.orientationchange+" "+a.resize,function(){l.viewportScaleInterval&&(clearTimeout(l.viewportScaleInterval),l.viewportScaleInterval=null),l.viewportScaleInterval=setTimeout(function(){r.setViewportScale()},500)})),s[e]._c=o,s[e]._d=d,s[e]._e=a,s[e]._f=r,s[e]._g=l}var e="tosrus",t="tos",n="2.4.2";if(!s[e]){var o={},d={},a={},r={},l={};s[e]=function(s,i,e){return this.$node=s,this.opts=i,this.conf=e,this.vars={},this.nodes={},this.slides={},this._init(),this},s[e].prototype={_init:function(){var i=this;this._complementOptions(),this.vars.fixed="window"==this.opts.wrapper.target,this.nodes.$wrpr=s('<div class="'+o.wrapper+'" />'),this.nodes.$sldr=s('<div class="'+o.slider+'" />').appendTo(this.nodes.$wrpr),this.nodes.$wrpr.addClass(this.vars.fixed?o.fixed:o.inline).addClass(o("fx-"+this.opts.effect)).addClass(o(this.opts.slides.scale)).addClass(this.opts.wrapper.classes),this.nodes.$wrpr.on(a.open+" "+a.close+" "+a.prev+" "+a.next+" "+a.slideTo,function(s){arguments=Array.prototype.slice.call(arguments);var s=arguments.shift(),e=s.type;s.stopPropagation(),"function"==typeof i[e]&&i[e].apply(i,arguments)}).on(a.opening+" "+a.closing+" "+a.sliding+" "+a.loading+" "+a.loaded,function(s){s.stopPropagation()}).on(a.click,function(e){switch(e.stopPropagation(),i.opts.wrapper.onClick){case"toggleUI":i.nodes.$wrpr.toggleClass(o.hover);break;case"close":s(e.target).is("img")||i.close()}}),this.nodes.$anchors=this._initAnchors(),this.nodes.$slides=this._initSlides(),this.slides.total=this.nodes.$slides.length,this.slides.visible=this.opts.slides.visible,this.slides.index=0,this.vars.opened=!0;for(var t=0;t<s[e].addons.length;t++)s.isFunction(this["_addon_"+s[e].addons[t]])&&this["_addon_"+s[e].addons[t]]();for(var n=0;n<s[e].ui.length;n++)this.nodes.$wrpr.find("."+o[s[e].ui[n]]).length&&this.nodes.$wrpr.addClass(o("has-"+s[e].ui[n]));"close"==this.opts.wrapper.onClick&&(this.nodes.$uibg||s().add(this.nodes.$capt||s()).add(this.nodes.$pagr||s()).on(a.click,function(s){s.stopPropagation()})),this.vars.fixed?(this.nodes.$wrpr.appendTo(l.$body),this.close(!0)):(this.nodes.$wrpr.appendTo(this.opts.wrapper.target),this.opts.show?(this.vars.opened=!1,this.open(0,!0)):this.close(!0))},open:function(i,e){var t=this;this.vars.opened||(this.vars.fixed&&(l.scrollPosition=l.$wndw.scrollTop(),l.$body.addClass(o.opened),r.setViewportScale()),e?this.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e]):setTimeout(function(){t.nodes.$wrpr.addClass(o.opening).trigger(a.opening,[i,e])},5),this.nodes.$wrpr.addClass(o.hover).addClass(o.opened)),this.vars.opened=!0,this._loadContents(),s.isNumeric(i)&&(e=e||!this.vars.opened,this.slideTo(i,e))},close:function(i){this.vars.opened&&(this.vars.fixed&&l.$body.removeClass(o.opened),i?this.nodes.$wrpr.removeClass(o.opened):r.transitionend(this.nodes.$wrpr,function(){s(this).removeClass(o.opened)},this.conf.transitionDuration),this.nodes.$wrpr.removeClass(o.hover).removeClass(o.opening).trigger(a.closing,[this.slides.index,i])),this.vars.opened=!1},prev:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index-i,e)},next:function(i,e){s.isNumeric(i)||(i=this.opts.slides.slide),this.slideTo(this.slides.index+i,e)},slideTo:function(i,t){if(!this.vars.opened)return!1;if(!s.isNumeric(i))return!1;var n=!0;if(0>i){var d=0==this.slides.index;this.opts.infinite?i=d?this.slides.total-this.slides.visible:0:(i=0,d&&(n=!1))}if(i+this.slides.visible>this.slides.total){var l=this.slides.index+this.slides.visible>=this.slides.total;this.opts.infinite?i=l?0:this.slides.total-this.slides.visible:(i=this.slides.total-this.slides.visible,l&&(n=!1))}if(this.slides.index=i,this._loadContents(),n){var h=0-this.slides.index*this.opts.slides.width+this.opts.slides.offset;this.slides.widthPercentage&&(h+="%"),t&&(this.nodes.$sldr.addClass(o.noanimation),r.transitionend(this.nodes.$sldr,function(){s(this).removeClass(o.noanimation)},5));for(var c in s[e].effects)if(c==this.opts.effect){s[e].effects[c].call(this,h,t);break}this.nodes.$wrpr.trigger(a.sliding,[i,t])}},_initAnchors:function(){var i=this,t=s();if(this.$node.is("a"))for(var n in s[e].media)t=t.add(this.$node.filter(function(){if(i.opts.media[n]&&i.opts.media[n].filterAnchors){var t=i.opts.media[n].filterAnchors.call(i,s(this));if("boolean"==typeof t)return t}return s[e].media[n].filterAnchors.call(i,s(this))}));return t},_initSlides:function(){return this[this.$node.is("a")?"_initSlidesFromAnchors":"_initSlidesFromContent"](),this.nodes.$sldr.children().css("width",this.opts.slides.width+(this.slides.widthPercentage?"%":"px"))},_initSlidesFromAnchors:function(){var i=this;this.nodes.$anchors.each(function(e){var t=s(this),n=s('<div class="'+o.slide+" "+o.loading+'" />').data(d.anchor,t).appendTo(i.nodes.$sldr);t.data(d.slide,n).on(a.click,function(s){s.preventDefault(),i.open(e)})})},_initSlidesFromContent:function(){var i=this;this.$node.children().each(function(){var t=s(this);s('<div class="'+o.slide+'" />').append(t).appendTo(i.nodes.$sldr);for(var n in s[e].media){var d=null;if(i.opts.media[n]&&i.opts.media[n].filterSlides&&(d=i.opts.media[n].filterSlides.call(i,t)),"boolean"!=typeof d&&(d=s[e].media[n].filterSlides.call(i,t)),d){s[e].media[n].initSlides.call(i,t),t.parent().addClass(o(n));break}}})},_loadContents:function(){var s=this;switch(this.opts.slides.load){case"all":this._loadContent(0,this.slides.total);break;case"visible":this._loadContent(this.slides.index,this.slides.index+this.slides.visible);break;case"near-visible":default:this._loadContent(this.slides.index,this.slides.index+this.slides.visible),setTimeout(function(){s._loadContent(s.slides.index-s.slides.visible,s.slides.index),s._loadContent(s.slides.index+s.slides.visible,s.slides.index+2*s.slides.visible)},this.conf.transitionDuration)}},_loadContent:function(i,t){var n=this;this.nodes.$slides.slice(i,t).each(function(){var i=s(this);if(0==i.children().length){var t=i.data(d.anchor),r=t.attr("href");for(var l in s[e].media){var h=null;if(n.opts.media[l]&&n.opts.media[l].filterAnchors&&(h=n.opts.media[l].filterAnchors.call(n,t)),"boolean"!=typeof h&&(h=s[e].media[l].filterAnchors.call(n,t)),h){s[e].media[l].initAnchors.call(n,i,r),i.addClass(o(l));break}}i.trigger(a.loading,[i.data(d.anchor)])}})},_complementOptions:function(){if("undefined"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=this.$node.is("a")?"window":this.$node),"window"!=this.opts.wrapper.target&&"string"==typeof this.opts.wrapper.target&&(this.opts.wrapper.target=s(this.opts.wrapper.target)),this.opts.show=r.complBoolean(this.opts.show,"window"!=this.opts.wrapper.target),s.isNumeric(this.opts.slides.width))this.slides.widthPercentage=!1,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,1);else{var i=r.isPercentage(this.opts.slides.width)?r.getPercentage(this.opts.slides.width):!1;this.slides.widthPercentage=!0,this.opts.slides.visible=r.complNumber(this.opts.slides.visible,i?Math.floor(100/i):1),this.opts.slides.width=i?i:Math.ceil(1e4/this.opts.slides.visible)/100}this.opts.slides.slide=r.complNumber(this.opts.slides.slide,this.opts.slides.visible),this.opts.slides.offset=r.isPercentage(this.opts.slides.offset)?r.getPercentage(this.opts.slides.offset):r.complNumber(this.opts.slides.offset,0)},_uniqueID:function(){return this.__uniqueID||(this.__uniqueID=0),this.__uniqueID++,o("uid-"+this.__uniqueID)}},s.fn[e]=function(t,n,o,d){l.$wndw||i(),t=s.extend(!0,{},s[e].defaults,t),t=s.extend(!0,{},t,s[e].support.touch?o:n),d=s.extend(!0,{},s[e].configuration,d);var a=new s[e](this,t,d);return this.data(e,a),a.nodes.$wrpr},s[e].support={touch:"ontouchstart"in window.document||navigator.msMaxTouchPoints},s[e].defaults={infinite:!1,effect:"slide",wrapper:{classes:"",onClick:"toggleUI"},slides:{offset:0,scale:"fit",load:"near-visible",visible:1},media:{}},s[e].configuration={transitionDuration:400},s[e].constants={},s[e].debug=function(){},s[e].deprecated=function(s,i){"undefined"!=typeof console&&"undefined"!=typeof console.warn&&console.warn(e+": "+s+" is deprecated, use "+i+" instead.")},s[e].effects={slide:function(s){this.nodes.$sldr.css("left",s)},fade:function(i){r.transitionend(this.nodes.$sldr,function(){s(this).css("left",i).css("opacity",1)},this.conf.transitionDuration),this.nodes.$sldr.css("opacity",0)}},s[e].version=n,s[e].media={},s[e].addons=[],s[e].ui=[]}}(jQuery);
|
includes/class-frontend.php
CHANGED
@@ -23,6 +23,11 @@ class Responsive_Lightbox_Frontend {
|
|
23 |
add_filter( 'wp_get_attachment_link', array( $this, 'add_gallery_lightbox_selector' ), 1000, 6 );
|
24 |
add_filter( 'the_content', array( $this, 'add_videos_lightbox_selector' ) );
|
25 |
add_filter( 'the_content', array( $this, 'add_links_lightbox_selector' ) );
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -204,6 +209,35 @@ class Responsive_Lightbox_Frontend {
|
|
204 |
|
205 |
return $content;
|
206 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
/**
|
209 |
* Get attachment title function
|
23 |
add_filter( 'wp_get_attachment_link', array( $this, 'add_gallery_lightbox_selector' ), 1000, 6 );
|
24 |
add_filter( 'the_content', array( $this, 'add_videos_lightbox_selector' ) );
|
25 |
add_filter( 'the_content', array( $this, 'add_links_lightbox_selector' ) );
|
26 |
+
add_filter( 'woocommerce_single_product_image_html', array( $this, 'woocommerce_single_product_image_html' ), 100 );
|
27 |
+
add_filter( 'woocommerce_single_product_image_thumbnail_html', array( $this, 'woocommerce_single_product_image_html' ), 100 );
|
28 |
+
|
29 |
+
// actions
|
30 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'woocommerce_remove_lightbox' ), 100 );
|
31 |
}
|
32 |
|
33 |
/**
|
209 |
|
210 |
return $content;
|
211 |
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Remove WooCommerce prettyPhoto lightbox stylrs and scripts.
|
215 |
+
*/
|
216 |
+
public function woocommerce_remove_lightbox() {
|
217 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
218 |
+
// remove styles
|
219 |
+
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
220 |
+
|
221 |
+
// remove scripts
|
222 |
+
wp_dequeue_script( 'prettyPhoto' );
|
223 |
+
wp_dequeue_script( 'prettyPhoto-init' );
|
224 |
+
wp_dequeue_script( 'fancybox' );
|
225 |
+
wp_dequeue_script( 'enable-lightbox' );
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Apply lightbox to WooCommerce procust gallery.
|
231 |
+
*
|
232 |
+
* @param mixed $html
|
233 |
+
* @return mixed
|
234 |
+
*/
|
235 |
+
public function woocommerce_single_product_image_html( $html ) {
|
236 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
237 |
+
$html = str_replace( 'data-rel="prettyPhoto[product-gallery]"', 'data-rel="lightbox-gallery-' . $this->gallery_no . '"', $html );
|
238 |
+
}
|
239 |
+
return $html;
|
240 |
+
}
|
241 |
|
242 |
/**
|
243 |
* Get attachment title function
|
includes/class-settings.php
CHANGED
@@ -214,6 +214,12 @@ class Responsive_Lightbox_Settings {
|
|
214 |
'type' => 'boolean',
|
215 |
'label' => __( 'Try to force lightbox for custom WP gallery replacements, like Jetpack tiled galleries.', 'responsive-lightbox' ),
|
216 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
'videos' => array(
|
218 |
'title' => __( 'Video links', 'responsive-lightbox' ),
|
219 |
'section' => 'responsive_lightbox_settings',
|
@@ -1139,7 +1145,7 @@ class Responsive_Lightbox_Settings {
|
|
1139 |
case ( 'checkbox' ) :
|
1140 |
|
1141 |
foreach ( $args['options'] as $key => $name ) {
|
1142 |
-
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '-' . $key . '" type="checkbox" name="' . $args['name'] . '
|
1143 |
}
|
1144 |
break;
|
1145 |
|
@@ -1226,7 +1232,7 @@ class Responsive_Lightbox_Settings {
|
|
1226 |
break;
|
1227 |
|
1228 |
case 'checkbox':
|
1229 |
-
$value = is_array( $value ) ? array_map( 'sanitize_text_field', $value ) :
|
1230 |
break;
|
1231 |
|
1232 |
case 'radio':
|
@@ -1343,11 +1349,11 @@ class Responsive_Lightbox_Settings {
|
|
1343 |
|
1344 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
|
1345 |
|
1346 |
-
$input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) : ( $field['type']
|
1347 |
|
1348 |
} else {
|
1349 |
|
1350 |
-
$input[$field_id] = isset( $input[$field_id] ) ? $this->sanitize_field( $input[$field_id], $field['type'] ) : ( $field['type']
|
1351 |
|
1352 |
}
|
1353 |
|
214 |
'type' => 'boolean',
|
215 |
'label' => __( 'Try to force lightbox for custom WP gallery replacements, like Jetpack tiled galleries.', 'responsive-lightbox' ),
|
216 |
),
|
217 |
+
'woocommerce_gallery_lightbox' => array(
|
218 |
+
'title' => __( 'WooCommerce lightbox', 'responsive-lightbox' ),
|
219 |
+
'section' => 'responsive_lightbox_settings',
|
220 |
+
'type' => 'boolean',
|
221 |
+
'label' => __( 'Replace WooCommerce product gallery lightbox.', 'responsive-lightbox' ),
|
222 |
+
),
|
223 |
'videos' => array(
|
224 |
'title' => __( 'Video links', 'responsive-lightbox' ),
|
225 |
'section' => 'responsive_lightbox_settings',
|
1145 |
case ( 'checkbox' ) :
|
1146 |
|
1147 |
foreach ( $args['options'] as $key => $name ) {
|
1148 |
+
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '-' . $key . '" type="checkbox" name="' . $args['name'] . '[' . $key . ']" value="1" ' . checked( in_array( $key, $args['value'] ), true, false ) . ' />' . $name . '</label> ';
|
1149 |
}
|
1150 |
break;
|
1151 |
|
1232 |
break;
|
1233 |
|
1234 |
case 'checkbox':
|
1235 |
+
$value = is_array( $value ) && ! empty( $value ) ? array_map( 'sanitize_text_field', $value ) : array();
|
1236 |
break;
|
1237 |
|
1238 |
case 'radio':
|
1349 |
|
1350 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
|
1351 |
|
1352 |
+
$input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_parent][$field_id] );
|
1353 |
|
1354 |
} else {
|
1355 |
|
1356 |
+
$input[$field_id] = isset( $input[$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_id] );
|
1357 |
|
1358 |
}
|
1359 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.4
|
7 |
-
Stable tag: 1.6.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -22,6 +22,7 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
|
|
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 |
* Option to display single post images as a gallery
|
26 |
* Option to modify native WP gallery links image size
|
27 |
* Option to set gallery images title from image title, caption, alt or description
|
@@ -37,7 +38,9 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
|
|
37 |
= Available Extensions: =
|
38 |
|
39 |
* [Justified Gallery](https://www.dfactory.eu/products/justified-gallery/)
|
|
|
40 |
* [Lightcase Lightbox](https://www.dfactory.eu/products/lightcase-lightbox/)
|
|
|
41 |
|
42 |
= Translations: =
|
43 |
|
@@ -74,6 +77,12 @@ No questions yet.
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
= 1.6.6 =
|
78 |
* Tweak: Confirmed WordPress 4.4 compatibility
|
79 |
|
@@ -274,5 +283,6 @@ Initial release
|
|
274 |
|
275 |
== Upgrade Notice ==
|
276 |
|
277 |
-
= 1.6.
|
278 |
-
*
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, images, lightbox, links, photos, template, theme, photo, image, picture, slideshow, modal, overlay, YouTube, Vimeo, video, videos
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: 1.6.7
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
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 |
+
* WooCommerce product gallery support
|
26 |
* Option to display single post images as a gallery
|
27 |
* Option to modify native WP gallery links image size
|
28 |
* Option to set gallery images title from image title, caption, alt or description
|
38 |
= Available Extensions: =
|
39 |
|
40 |
* [Justified Gallery](https://www.dfactory.eu/products/justified-gallery/)
|
41 |
+
* [Masonry Image Gallery](https://www.dfactory.eu/products/masonry-image-gallery/)
|
42 |
* [Lightcase Lightbox](https://www.dfactory.eu/products/lightcase-lightbox/)
|
43 |
+
* [Strip Lightbox](https://www.dfactory.eu/products/strip-lightbox/)
|
44 |
|
45 |
= Translations: =
|
46 |
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.6.7 =
|
81 |
+
* New: WooCommerce product gallery support
|
82 |
+
* New: [Masonry Image Gallery](https://www.dfactory.eu/products/masonry-image-gallery/) and [Strip Lightbox](https://www.dfactory.eu/products/strip-lightbox/) extensions
|
83 |
+
* Tweak: Tos"R"Us script updated to 2.4.2
|
84 |
+
* Tweak: Settings handler improvements.
|
85 |
+
|
86 |
= 1.6.6 =
|
87 |
* Tweak: Confirmed WordPress 4.4 compatibility
|
88 |
|
283 |
|
284 |
== Upgrade Notice ==
|
285 |
|
286 |
+
= 1.6.7 =
|
287 |
+
* New: WooCommerce product gallery support
|
288 |
+
* New: [Masonry Image Gallery](https://www.dfactory.eu/products/masonry-image-gallery/) and [Strip Lightbox](https://www.dfactory.eu/products/strip-lightbox/) extensions
|
responsive-lightbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox
|
4 |
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
-
Version: 1.6.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
@@ -12,7 +12,7 @@ Text Domain: responsive-lightbox
|
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Responsive Lightbox
|
15 |
-
Copyright (C) 2013-
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
@@ -36,7 +36,7 @@ include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-settings.php' );
|
|
36 |
* Responsive Lightbox class.
|
37 |
*
|
38 |
* @class Responsive_Lightbox
|
39 |
-
* @version 1.6.
|
40 |
*/
|
41 |
class Responsive_Lightbox {
|
42 |
|
@@ -48,6 +48,7 @@ class Responsive_Lightbox {
|
|
48 |
'gallery_image_size' => 'full',
|
49 |
'gallery_image_title' => 'default',
|
50 |
'force_custom_gallery' => false,
|
|
|
51 |
'videos' => true,
|
52 |
'image_links' => true,
|
53 |
'image_title' => 'default',
|
@@ -146,7 +147,7 @@ class Responsive_Lightbox {
|
|
146 |
'pagination_type' => 'thumbnails'
|
147 |
)
|
148 |
),
|
149 |
-
'version' => '1.6.
|
150 |
);
|
151 |
public $options = array();
|
152 |
private $notices = array();
|
@@ -635,7 +636,7 @@ class Responsive_Lightbox {
|
|
635 |
'responsive-lightbox-tosrus', plugins_url( 'assets/tosrus/js/jquery.tosrus.min.all.js', __FILE__ ), array( 'jquery' ), $this->defaults['version'], ($this->options['settings']['loading_place'] === 'header' ? false : true )
|
636 |
);
|
637 |
wp_register_style(
|
638 |
-
'responsive-lightbox-tosrus', plugins_url( 'assets/tosrus/css/jquery.tosrus.all.
|
639 |
);
|
640 |
|
641 |
$scripts[] = 'responsive-lightbox-tosrus';
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox
|
4 |
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
+
Version: 1.6.7
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
12 |
Domain Path: /languages
|
13 |
|
14 |
Responsive Lightbox
|
15 |
+
Copyright (C) 2013-2016, Digital Factory - info@digitalfactory.pl
|
16 |
|
17 |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
18 |
|
36 |
* Responsive Lightbox class.
|
37 |
*
|
38 |
* @class Responsive_Lightbox
|
39 |
+
* @version 1.6.7
|
40 |
*/
|
41 |
class Responsive_Lightbox {
|
42 |
|
48 |
'gallery_image_size' => 'full',
|
49 |
'gallery_image_title' => 'default',
|
50 |
'force_custom_gallery' => false,
|
51 |
+
'woocommerce_gallery_lightbox' => false,
|
52 |
'videos' => true,
|
53 |
'image_links' => true,
|
54 |
'image_title' => 'default',
|
147 |
'pagination_type' => 'thumbnails'
|
148 |
)
|
149 |
),
|
150 |
+
'version' => '1.6.7'
|
151 |
);
|
152 |
public $options = array();
|
153 |
private $notices = array();
|
636 |
'responsive-lightbox-tosrus', plugins_url( 'assets/tosrus/js/jquery.tosrus.min.all.js', __FILE__ ), array( 'jquery' ), $this->defaults['version'], ($this->options['settings']['loading_place'] === 'header' ? false : true )
|
637 |
);
|
638 |
wp_register_style(
|
639 |
+
'responsive-lightbox-tosrus', plugins_url( 'assets/tosrus/css/jquery.tosrus.all.css', __FILE__ ), array(), $this->defaults['version']
|
640 |
);
|
641 |
|
642 |
$scripts[] = 'responsive-lightbox-tosrus';
|