diff --git a/vendor/assets/images/blank.gif b/vendor/assets/images/blank.gif old mode 100755 new mode 100644 diff --git a/vendor/assets/images/fancybox_buttons.png b/vendor/assets/images/fancybox_buttons.png old mode 100755 new mode 100644 diff --git a/vendor/assets/images/fancybox_loading.gif b/vendor/assets/images/fancybox_loading.gif old mode 100755 new mode 100644 index 0158617..a03a40c Binary files a/vendor/assets/images/fancybox_loading.gif and b/vendor/assets/images/fancybox_loading.gif differ diff --git a/vendor/assets/images/fancybox_loading@2x.gif b/vendor/assets/images/fancybox_loading@2x.gif new file mode 100644 index 0000000..9205aeb Binary files /dev/null and b/vendor/assets/images/fancybox_loading@2x.gif differ diff --git a/vendor/assets/images/fancybox_overlay.png b/vendor/assets/images/fancybox_overlay.png old mode 100755 new mode 100644 index 74e0ea1..a439139 Binary files a/vendor/assets/images/fancybox_overlay.png and b/vendor/assets/images/fancybox_overlay.png differ diff --git a/vendor/assets/images/fancybox_sprite.png b/vendor/assets/images/fancybox_sprite.png old mode 100755 new mode 100644 diff --git a/vendor/assets/images/fancybox_sprite@2x.png b/vendor/assets/images/fancybox_sprite@2x.png new file mode 100644 index 0000000..d0e4779 Binary files /dev/null and b/vendor/assets/images/fancybox_sprite@2x.png differ diff --git a/vendor/assets/javascripts/jquery.fancybox-buttons.js b/vendor/assets/javascripts/jquery.fancybox-buttons.js old mode 100755 new mode 100644 index 50baeca..fd8b955 --- a/vendor/assets/javascripts/jquery.fancybox-buttons.js +++ b/vendor/assets/javascripts/jquery.fancybox-buttons.js @@ -22,7 +22,7 @@ defaults : { skipSingle : false, // disables if gallery contains single image position : 'top', // 'top' or 'bottom' - tpl : '
' + tpl : ' ' }, list : null, @@ -64,7 +64,8 @@ prev : this.list.find('.btnPrev').click( F.prev ), next : this.list.find('.btnNext').click( F.next ), play : this.list.find('.btnPlay').click( F.play ), - toggle : this.list.find('.btnToggle').click( F.toggle ) + toggle : this.list.find('.btnToggle').click( F.toggle ), + close : this.list.find('.btnClose').click( F.close ) } } @@ -118,4 +119,4 @@ } }; -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/vendor/assets/javascripts/jquery.fancybox-media.js b/vendor/assets/javascripts/jquery.fancybox-media.js old mode 100755 new mode 100644 index 4b5e783..3584c8a --- a/vendor/assets/javascripts/jquery.fancybox-media.js +++ b/vendor/assets/javascripts/jquery.fancybox-media.js @@ -1,6 +1,6 @@ /*! * Media helper for fancyBox - * version: 1.0.5 (Tue, 23 Oct 2012) + * version: 1.0.6 (Fri, 14 Jun 2013) * @requires fancyBox v2.0 or later * * Usage: @@ -25,7 +25,7 @@ * * Or: * $(".fancybox").fancybox({, - * helpers : { + * helpers : { * media: true * }, * youtube : { @@ -39,6 +39,7 @@ * http://www.youtube.com/watch?v=opj24KnzrWo * http://www.youtube.com/embed/opj24KnzrWo * http://youtu.be/opj24KnzrWo + * http://www.youtube-nocookie.com/embed/opj24KnzrWo * Vimeo * http://vimeo.com/40648169 * http://vimeo.com/channels/staffpicks/38843628 @@ -88,7 +89,7 @@ F.helpers.media = { defaults : { youtube : { - matcher : /(youtube\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, + matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, params : { autoplay : 1, autohide : 1, @@ -151,7 +152,7 @@ instagram : { matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, type : 'image', - url : '//$1/p/$2/media/' + url : '//$1/p/$2/media/?size=l' }, google_maps : { matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, @@ -171,16 +172,18 @@ params; for (what in opts) { - item = opts[ what ]; - rez = url.match( item.matcher ); + if (opts.hasOwnProperty(what)) { + item = opts[ what ]; + rez = url.match( item.matcher ); - if (rez) { - type = item.type; - params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); + if (rez) { + type = item.type; + params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); - url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); + url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); - break; + break; + } } } diff --git a/vendor/assets/javascripts/jquery.fancybox-thumbs.js b/vendor/assets/javascripts/jquery.fancybox-thumbs.js old mode 100755 new mode 100644 diff --git a/vendor/assets/javascripts/jquery.fancybox.js b/vendor/assets/javascripts/jquery.fancybox.js old mode 100755 new mode 100644 index 35282e7..e8e1987 --- a/vendor/assets/javascripts/jquery.fancybox.js +++ b/vendor/assets/javascripts/jquery.fancybox.js @@ -1,6 +1,6 @@ /*! * fancyBox - jQuery Plugin - * version: 2.1.4 (Thu, 17 Jan 2013) + * version: 2.1.5 (Fri, 14 Jun 2013) * @requires jQuery v1.6 or later * * Examples at http://fancyapps.com/fancybox/ @@ -13,14 +13,15 @@ (function (window, document, $, undefined) { "use strict"; - var W = $(window), + var H = $("html"), + W = $(window), D = $(document), F = $.fancybox = function () { F.open.apply( this, arguments ); }, IE = navigator.userAgent.match(/msie/i), - didUpdate = null, - isTouch = document.createTouch !== undefined, + didUpdate = null, + isTouch = document.createTouch !== undefined, isQuery = function(obj) { return obj && obj.hasOwnProperty && obj instanceof $; @@ -49,7 +50,7 @@ $.extend(F, { // The current version of fancyBox - version: '2.1.4', + version: '2.1.5', defaults: { padding : 15, @@ -61,6 +62,7 @@ minHeight : 100, maxWidth : 9999, maxHeight : 9999, + pixelRatio: 1, // Set to 2 for retina display support autoSize : true, autoHeight : false, @@ -754,9 +756,7 @@ if (obj.helpers) { $.each(obj.helpers, function (helper, opts) { if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { - opts = $.extend(true, {}, F.helpers[helper].defaults, opts); - - F.helpers[helper][event](opts, obj); + F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); } }); } @@ -765,7 +765,7 @@ }, isImage: function (str) { - return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i); + return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); }, isSWF: function (str) { @@ -942,8 +942,8 @@ img.onload = function () { this.onload = this.onerror = null; - F.coming.width = this.width; - F.coming.height = this.height; + F.coming.width = this.width / F.opts.pixelRatio; + F.coming.height = this.height / F.opts.pixelRatio; F._afterLoad(); }; @@ -1228,7 +1228,7 @@ body.css('overflow-x', 'hidden'); } - origHeight = body.height(); + origHeight = body.outerHeight(true); } } catch (e) {} @@ -1689,16 +1689,17 @@ F.helpers.overlay = { defaults : { - closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay - speedOut : 200, // duration of fadeOut animation - showEarly : true, // indicates if should be opened immediately or wait until the content is ready - css : {}, // custom CSS properties + closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay + speedOut : 200, // duration of fadeOut animation + showEarly : true, // indicates if should be opened immediately or wait until the content is ready + css : {}, // custom CSS properties locked : !isTouch, // if true, the content will be locked into overlay - fixed : true // if false, the overlay CSS position property will not be set to "fixed" + fixed : true // if false, the overlay CSS position property will not be set to "fixed" }, - overlay : null, // current handle - fixed : false, // indicates if the overlay has position "fixed" + overlay : null, // current handle + fixed : false, // indicates if the overlay has position "fixed" + el : $('html'), // element that contains "the lock" // Public methods create : function(opts) { @@ -1708,7 +1709,7 @@ this.close(); } - this.overlay = $('').appendTo( 'body' ); + this.overlay = $('').appendTo( F.coming ? F.coming.parent : opts.parent ); this.fixed = false; if (opts.fixed && F.defaults.fixed) { @@ -1744,6 +1745,8 @@ } else { that.close(); } + + return false; } }); } @@ -1752,21 +1755,27 @@ }, close : function() { - $('.fancybox-overlay').remove(); + var scrollV, scrollH; W.unbind('resize.overlay'); - this.overlay = null; + if (this.el.hasClass('fancybox-lock')) { + $('.fancybox-margin').removeClass('fancybox-margin'); - if (this.margin !== false) { - $('body').css('margin-right', this.margin); + scrollV = W.scrollTop(); + scrollH = W.scrollLeft(); - this.margin = false; - } - - if (this.el) { this.el.removeClass('fancybox-lock'); + + W.scrollTop( scrollV ).scrollLeft( scrollH ); } + + $('.fancybox-overlay').remove().hide(); + + $.extend(this, { + overlay : null, + fixed : false + }); }, // Private, callbacks @@ -1794,16 +1803,19 @@ // This is where we can manipulate DOM, because later it would cause iframes to reload onReady : function (opts, obj) { - $('.fancybox-overlay').stop(true, true); + var overlay = this.overlay; - if (!this.overlay) { - this.margin = D.height() > W.height() || $('body').css('overflow-y') === 'scroll' ? $('body').css('margin-right') : false; - this.el = document.all && !document.querySelector ? $('html') : $('body'); + $('.fancybox-overlay').stop(true, true); + if (!overlay) { this.create(opts); } - if (opts.locked && this.fixed) { + if (opts.locked && this.fixed && obj.fixed) { + if (!overlay) { + this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; + } + obj.locked = this.overlay.append( obj.wrap ); obj.fixed = false; } @@ -1814,12 +1826,23 @@ }, beforeShow : function(opts, obj) { - if (obj.locked) { - this.el.addClass('fancybox-lock'); + var scrollV, scrollH; + if (obj.locked) { if (this.margin !== false) { - $('body').css('margin-right', getScalar( this.margin ) + obj.scrollbarWidth); + $('*').filter(function(){ + return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); + }).addClass('fancybox-margin'); + + this.el.addClass('fancybox-margin'); } + + scrollV = W.scrollTop(); + scrollH = W.scrollLeft(); + + this.el.addClass('fancybox-lock'); + + W.scrollTop( scrollV ).scrollLeft( scrollH ); } this.open(opts); @@ -1834,7 +1857,8 @@ afterClose: function (opts) { // Remove overlay if exists and fancyBox is not opening // (e.g., it is not being open using afterClose callback) - if (this.overlay && !F.isActive) { + //if (this.overlay && !F.isActive) { + if (this.overlay && !F.coming) { this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); } } @@ -1949,6 +1973,8 @@ // Tests that need a body at doc ready D.ready(function() { + var w1, w2; + if ( $.scrollbarWidth === undefined ) { // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth $.scrollbarWidth = function() { @@ -1978,6 +2004,17 @@ fixed : $.support.fixedPosition, parent : $('body') }); + + //Get real width of page scroll-bar + w1 = $(window).width(); + + H.addClass('fancybox-lock-test'); + + w2 = $(window).width(); + + H.removeClass('fancybox-lock-test'); + + $("").appendTo("head"); }); }(window, document, jQuery)); \ No newline at end of file diff --git a/vendor/assets/stylesheets/jquery.fancybox-buttons.css.erb b/vendor/assets/stylesheets/jquery.fancybox-buttons.css.erb old mode 100755 new mode 100644 index f36683b..a26273a --- a/vendor/assets/stylesheets/jquery.fancybox-buttons.css.erb +++ b/vendor/assets/stylesheets/jquery.fancybox-buttons.css.erb @@ -46,7 +46,8 @@ width: 30px; height: 30px; text-indent: -9999px; - background-image: url(<%= asset_path 'fancybox_buttons.png' %>); + background-color: transparent; + background-image: url('fancybox_buttons.png'); background-repeat: no-repeat; outline: none; opacity: 0.8; diff --git a/vendor/assets/stylesheets/jquery.fancybox-thumbs.css b/vendor/assets/stylesheets/jquery.fancybox-thumbs.css old mode 100755 new mode 100644 index e40ae82..63d2943 --- a/vendor/assets/stylesheets/jquery.fancybox-thumbs.css +++ b/vendor/assets/stylesheets/jquery.fancybox-thumbs.css @@ -51,4 +51,5 @@ position: relative; border: 0; padding: 0; + max-width: none; } \ No newline at end of file diff --git a/vendor/assets/stylesheets/jquery.fancybox.css.erb b/vendor/assets/stylesheets/jquery.fancybox.css.erb old mode 100755 new mode 100644 index 1d879a1..367890a --- a/vendor/assets/stylesheets/jquery.fancybox.css.erb +++ b/vendor/assets/stylesheets/jquery.fancybox.css.erb @@ -1,4 +1,4 @@ -/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */ +/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ .fancybox-wrap, .fancybox-skin, .fancybox-outer, @@ -76,7 +76,7 @@ } #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url(<%= asset_path 'fancybox_sprite.png' %>); + background-image: url('fancybox_sprite.png'); } #fancybox-loading { @@ -94,7 +94,7 @@ #fancybox-loading div { width: 44px; height: 44px; - background: url(<%= asset_path 'fancybox_loading.gif' %>) center center no-repeat; + background: url('fancybox_loading.gif') center center no-repeat; } .fancybox-close { @@ -114,7 +114,7 @@ height: 100%; cursor: pointer; text-decoration: none; - background: transparent url(<%= asset_path 'blank.gif' %>); /* helps IE */ + background: transparent url('blank.gif'); /* helps IE */ -webkit-tap-highlight-color: rgba(0,0,0,0); z-index: 8040; } @@ -165,7 +165,16 @@ /* Overlay helper */ .fancybox-lock { - overflow: hidden; + overflow: hidden !important; + width: auto; +} + +.fancybox-lock body { + overflow: hidden !important; +} + +.fancybox-lock-test { + overflow-y: hidden !important; } .fancybox-overlay { @@ -175,7 +184,7 @@ overflow: hidden; display: none; z-index: 8010; - background: url(<%= asset_path 'fancybox_overlay.png' %>); + background: url('fancybox_overlay.png'); } .fancybox-overlay-fixed { @@ -247,3 +256,19 @@ background: #000; background: rgba(0, 0, 0, .8); } + +/*Retina graphics!*/ +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), + only screen and (min--moz-device-pixel-ratio: 1.5), + only screen and (min-device-pixel-ratio: 1.5){ + + #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { + background-image: url('fancybox_sprite@2x.png'); + background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ + } + + #fancybox-loading div { + background-image: url('fancybox_loading@2x.gif'); + background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ + } +} \ No newline at end of file