magnific-popup-rails 0.8.9 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7f564e5818c04d199b66e9ae0697826be4cadc
|
4
|
+
data.tar.gz: 3b72f9ce7ca69fa517b7d9e6e2aa7fbdeb957ce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8d02290428074f7f860917966e6d72b6ac63f8773aba05f4f67fd8725c60144b877bc71db5121db6be4cc51417be00ccf8bdd8ffbe01b40c44ca20d69e0fb6
|
7
|
+
data.tar.gz: 3d9fdc61d4dd3397c4d9f4838c9e6ba7e7ee4ef45a5f510cd95b9648d714a773f6828dc56db3e482146cb07ae25aa7d2ef436c2b8d56ecb8f137887023eaf2c8
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Magnific Popup - v0.
|
1
|
+
/*! Magnific Popup - v0.9.3 - 2013-07-16
|
2
2
|
* http://dimsemenov.com/plugins/magnific-popup/
|
3
3
|
* Copyright (c) 2013 Dmitry Semenov; */
|
4
4
|
;(function($) {
|
@@ -15,6 +15,7 @@
|
|
15
15
|
* Private static constants
|
16
16
|
*/
|
17
17
|
var CLOSE_EVENT = 'Close',
|
18
|
+
BEFORE_CLOSE_EVENT = 'BeforeClose',
|
18
19
|
AFTER_CLOSE_EVENT = 'AfterClose',
|
19
20
|
BEFORE_APPEND_EVENT = 'BeforeAppend',
|
20
21
|
MARKUP_PARSE_EVENT = 'MarkupParse',
|
@@ -76,7 +77,7 @@ var _mfpOn = function(name, f) {
|
|
76
77
|
}
|
77
78
|
},
|
78
79
|
_setFocus = function() {
|
79
|
-
(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus
|
80
|
+
(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).trigger('focus');
|
80
81
|
},
|
81
82
|
_getCloseBtn = function(type) {
|
82
83
|
if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
|
@@ -116,13 +117,33 @@ var _mfpOn = function(name, f) {
|
|
116
117
|
// if click is outside the content
|
117
118
|
if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
|
118
119
|
if(closeOnBg) {
|
119
|
-
|
120
|
+
// last check, if the clicked element is in DOM, (in case it's removed onclick)
|
121
|
+
if( $.contains(document, target) ) {
|
122
|
+
return true;
|
123
|
+
}
|
120
124
|
}
|
121
125
|
} else if(closeOnContent) {
|
122
126
|
return true;
|
123
127
|
}
|
124
128
|
|
125
129
|
}
|
130
|
+
return false;
|
131
|
+
},
|
132
|
+
// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
|
133
|
+
supportsTransitions = function() {
|
134
|
+
var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
|
135
|
+
v = ['ms','O','Moz','Webkit']; // 'v' for vendor
|
136
|
+
|
137
|
+
if( s['transition'] !== undefined ) {
|
138
|
+
return true;
|
139
|
+
}
|
140
|
+
|
141
|
+
while( v.length ) {
|
142
|
+
if( v.pop() + 'Transition' in s ) {
|
143
|
+
return true;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
126
147
|
return false;
|
127
148
|
};
|
128
149
|
|
@@ -146,6 +167,8 @@ MagnificPopup.prototype = {
|
|
146
167
|
mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
|
147
168
|
mfp.isAndroid = (/android/gi).test(appVersion);
|
148
169
|
mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
|
170
|
+
mfp.supportsTransition = supportsTransitions();
|
171
|
+
|
149
172
|
// We disable fixed positioned lightbox on devices that don't handle it nicely.
|
150
173
|
// If you know a better way of detecting this - let me know.
|
151
174
|
mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
|
@@ -193,7 +216,11 @@ MagnificPopup.prototype = {
|
|
193
216
|
|
194
217
|
mfp.types = [];
|
195
218
|
_wrapClasses = '';
|
196
|
-
|
219
|
+
if(data.mainEl && data.mainEl.length) {
|
220
|
+
mfp.ev = data.mainEl.eq(0);
|
221
|
+
} else {
|
222
|
+
mfp.ev = _document;
|
223
|
+
}
|
197
224
|
|
198
225
|
if(data.key) {
|
199
226
|
if(!mfp.popupsCache[data.key]) {
|
@@ -208,7 +235,13 @@ MagnificPopup.prototype = {
|
|
208
235
|
|
209
236
|
mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
|
210
237
|
mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
|
211
|
-
|
238
|
+
|
239
|
+
if(mfp.st.modal) {
|
240
|
+
mfp.st.closeOnContentClick = false;
|
241
|
+
mfp.st.closeOnBgClick = false;
|
242
|
+
mfp.st.showCloseBtn = false;
|
243
|
+
mfp.st.enableEscapeKey = false;
|
244
|
+
}
|
212
245
|
|
213
246
|
|
214
247
|
// Building markup
|
@@ -245,14 +278,16 @@ MagnificPopup.prototype = {
|
|
245
278
|
_mfpTrigger('BeforeOpen');
|
246
279
|
|
247
280
|
|
248
|
-
|
249
|
-
|
250
|
-
mfp.
|
251
|
-
|
252
|
-
|
253
|
-
values
|
254
|
-
|
255
|
-
|
281
|
+
if(mfp.st.showCloseBtn) {
|
282
|
+
// Close button
|
283
|
+
if(!mfp.st.closeBtnInside) {
|
284
|
+
mfp.wrap.append( _getCloseBtn() );
|
285
|
+
} else {
|
286
|
+
_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
|
287
|
+
values.close_replaceWith = _getCloseBtn(item.type);
|
288
|
+
});
|
289
|
+
_wrapClasses += ' mfp-close-btn-in';
|
290
|
+
}
|
256
291
|
}
|
257
292
|
|
258
293
|
if(mfp.st.alignTop) {
|
@@ -282,12 +317,14 @@ MagnificPopup.prototype = {
|
|
282
317
|
|
283
318
|
|
284
319
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
320
|
+
if(mfp.st.enableEscapeKey) {
|
321
|
+
// Close on ESC key
|
322
|
+
_document.on('keyup' + EVENT_NS, function(e) {
|
323
|
+
if(e.keyCode === 27) {
|
324
|
+
mfp.close();
|
325
|
+
}
|
326
|
+
});
|
327
|
+
}
|
291
328
|
|
292
329
|
_window.on('resize' + EVENT_NS, function() {
|
293
330
|
mfp.updateSize();
|
@@ -306,20 +343,20 @@ MagnificPopup.prototype = {
|
|
306
343
|
var windowHeight = mfp.wH = _window.height();
|
307
344
|
|
308
345
|
|
309
|
-
var
|
346
|
+
var windowStyles = {};
|
310
347
|
|
311
348
|
if( mfp.fixedContentPos ) {
|
312
349
|
if(mfp._hasScrollBar(windowHeight)){
|
313
350
|
var s = mfp._getScrollbarSize();
|
314
351
|
if(s) {
|
315
|
-
|
352
|
+
windowStyles.paddingRight = s;
|
316
353
|
}
|
317
354
|
}
|
318
355
|
}
|
319
356
|
|
320
357
|
if(mfp.fixedContentPos) {
|
321
358
|
if(!mfp.isIE7) {
|
322
|
-
|
359
|
+
windowStyles.overflow = 'hidden';
|
323
360
|
} else {
|
324
361
|
// ie7 double-scroll bug
|
325
362
|
$('body, html').css('overflow', 'hidden');
|
@@ -343,7 +380,7 @@ MagnificPopup.prototype = {
|
|
343
380
|
|
344
381
|
|
345
382
|
// remove scrollbar, add padding e.t.c
|
346
|
-
|
383
|
+
$('html').css(windowStyles);
|
347
384
|
|
348
385
|
// add everything to DOM
|
349
386
|
mfp.bgOverlay.add(mfp.wrap).prependTo( document.body );
|
@@ -384,10 +421,11 @@ MagnificPopup.prototype = {
|
|
384
421
|
*/
|
385
422
|
close: function() {
|
386
423
|
if(!mfp.isOpen) return;
|
424
|
+
_mfpTrigger(BEFORE_CLOSE_EVENT);
|
387
425
|
|
388
426
|
mfp.isOpen = false;
|
389
427
|
// for CSS3 animation
|
390
|
-
if(mfp.st.removalDelay && !mfp.isLowIE) {
|
428
|
+
if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
|
391
429
|
mfp._addClassToMFP(REMOVING_CLASS);
|
392
430
|
setTimeout(function() {
|
393
431
|
mfp._close();
|
@@ -416,13 +454,13 @@ MagnificPopup.prototype = {
|
|
416
454
|
mfp._removeClassFromMFP(classesToRemove);
|
417
455
|
|
418
456
|
if(mfp.fixedContentPos) {
|
419
|
-
var
|
457
|
+
var windowStyles = {paddingRight: ''};
|
420
458
|
if(mfp.isIE7) {
|
421
459
|
$('body, html').css('overflow', '');
|
422
460
|
} else {
|
423
|
-
|
461
|
+
windowStyles.overflow = '';
|
424
462
|
}
|
425
|
-
|
463
|
+
$('html').css(windowStyles);
|
426
464
|
}
|
427
465
|
|
428
466
|
_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
|
@@ -434,14 +472,15 @@ MagnificPopup.prototype = {
|
|
434
472
|
mfp.container.attr('class', 'mfp-container');
|
435
473
|
|
436
474
|
// remove close button from target element
|
437
|
-
if(
|
475
|
+
if(mfp.st.showCloseBtn &&
|
476
|
+
(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
|
438
477
|
if(mfp.currTemplate.closeBtn)
|
439
478
|
mfp.currTemplate.closeBtn.detach();
|
440
479
|
}
|
441
480
|
|
442
481
|
|
443
482
|
if(mfp._lastFocusedEl) {
|
444
|
-
$(mfp._lastFocusedEl).focus
|
483
|
+
$(mfp._lastFocusedEl).trigger('focus'); // put tab focus back
|
445
484
|
}
|
446
485
|
mfp.currItem = null;
|
447
486
|
mfp.content = null;
|
@@ -539,7 +578,8 @@ MagnificPopup.prototype = {
|
|
539
578
|
mfp.content = newContent;
|
540
579
|
|
541
580
|
if(newContent) {
|
542
|
-
if(mfp.st.
|
581
|
+
if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
|
582
|
+
mfp.currTemplate[type] === true) {
|
543
583
|
// if there is no markup, we just append close button element inside
|
544
584
|
if(!mfp.content.find('.mfp-close').length) {
|
545
585
|
mfp.content.append(_getCloseBtn());
|
@@ -632,37 +672,41 @@ MagnificPopup.prototype = {
|
|
632
672
|
},
|
633
673
|
_openClick: function(e, el, options) {
|
634
674
|
var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
|
635
|
-
if( midClick || e.which !== 2 ) {
|
636
|
-
var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
|
637
675
|
|
638
|
-
if(disableOn) {
|
639
|
-
if($.isFunction(disableOn)) {
|
640
|
-
if( !disableOn.call(mfp) ) {
|
641
|
-
return true;
|
642
|
-
}
|
643
|
-
} else { // else it's number
|
644
|
-
if( _window.width() < disableOn ) {
|
645
|
-
return true;
|
646
|
-
}
|
647
|
-
}
|
648
|
-
}
|
649
|
-
|
650
|
-
if(e.type) {
|
651
|
-
e.preventDefault();
|
652
676
|
|
653
|
-
|
654
|
-
|
655
|
-
|
677
|
+
if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
|
678
|
+
return;
|
679
|
+
}
|
680
|
+
|
681
|
+
var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
|
682
|
+
|
683
|
+
if(disableOn) {
|
684
|
+
if($.isFunction(disableOn)) {
|
685
|
+
if( !disableOn.call(mfp) ) {
|
686
|
+
return true;
|
687
|
+
}
|
688
|
+
} else { // else it's number
|
689
|
+
if( _window.width() < disableOn ) {
|
690
|
+
return true;
|
656
691
|
}
|
657
692
|
}
|
658
|
-
|
693
|
+
}
|
694
|
+
|
695
|
+
if(e.type) {
|
696
|
+
e.preventDefault();
|
659
697
|
|
660
|
-
|
661
|
-
if(
|
662
|
-
|
698
|
+
// This will prevent popup from closing if element is inside and popup is already opened
|
699
|
+
if(mfp.isOpen) {
|
700
|
+
e.stopPropagation();
|
663
701
|
}
|
664
|
-
mfp.open(options);
|
665
702
|
}
|
703
|
+
|
704
|
+
|
705
|
+
options.el = $(e.mfpEl);
|
706
|
+
if(options.delegate) {
|
707
|
+
options.items = el.find(options.delegate);
|
708
|
+
}
|
709
|
+
mfp.open(options);
|
666
710
|
},
|
667
711
|
|
668
712
|
|
@@ -692,7 +736,7 @@ MagnificPopup.prototype = {
|
|
692
736
|
|
693
737
|
mfp.preloader.html(text);
|
694
738
|
|
695
|
-
mfp.preloader.find('a').click
|
739
|
+
mfp.preloader.find('a').on('click', function(e) {
|
696
740
|
e.stopImmediatePropagation();
|
697
741
|
});
|
698
742
|
|
@@ -714,7 +758,7 @@ MagnificPopup.prototype = {
|
|
714
758
|
mfp.wrap.removeClass(cName);
|
715
759
|
},
|
716
760
|
_hasScrollBar: function(winHeight) {
|
717
|
-
return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) )
|
761
|
+
return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
|
718
762
|
},
|
719
763
|
_parseMarkup: function(template, values, item) {
|
720
764
|
var arr;
|
@@ -826,6 +870,12 @@ $.magnificPopup = {
|
|
826
870
|
|
827
871
|
closeBtnInside: true,
|
828
872
|
|
873
|
+
showCloseBtn: true,
|
874
|
+
|
875
|
+
enableEscapeKey: true,
|
876
|
+
|
877
|
+
modal: false,
|
878
|
+
|
829
879
|
alignTop: false,
|
830
880
|
|
831
881
|
removalDelay: 0,
|
@@ -1222,6 +1272,8 @@ $.magnificPopup.registerModule('image', {
|
|
1222
1272
|
|
1223
1273
|
item.hasSize = true;
|
1224
1274
|
item.loaded = true;
|
1275
|
+
|
1276
|
+
_mfpTrigger('ImageLoadComplete');
|
1225
1277
|
|
1226
1278
|
}
|
1227
1279
|
else {
|
@@ -1265,6 +1317,9 @@ $.magnificPopup.registerModule('image', {
|
|
1265
1317
|
if(el.is('img')) {
|
1266
1318
|
item.img = item.img.clone();
|
1267
1319
|
}
|
1320
|
+
if(item.img[0].naturalWidth > 0) {
|
1321
|
+
item.hasSize = true;
|
1322
|
+
}
|
1268
1323
|
}
|
1269
1324
|
|
1270
1325
|
mfp._parseMarkup(template, {
|
@@ -1305,6 +1360,193 @@ $.magnificPopup.registerModule('image', {
|
|
1305
1360
|
|
1306
1361
|
/*>>image*/
|
1307
1362
|
|
1363
|
+
/*>>zoom*/
|
1364
|
+
var hasMozTransform,
|
1365
|
+
getHasMozTransform = function() {
|
1366
|
+
if(hasMozTransform === undefined) {
|
1367
|
+
hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
|
1368
|
+
}
|
1369
|
+
return hasMozTransform;
|
1370
|
+
};
|
1371
|
+
|
1372
|
+
$.magnificPopup.registerModule('zoom', {
|
1373
|
+
|
1374
|
+
options: {
|
1375
|
+
enabled: false,
|
1376
|
+
easing: 'ease-in-out',
|
1377
|
+
duration: 300,
|
1378
|
+
opener: function(element) {
|
1379
|
+
return element.is('img') ? element : element.find('img');
|
1380
|
+
}
|
1381
|
+
},
|
1382
|
+
|
1383
|
+
proto: {
|
1384
|
+
|
1385
|
+
initZoom: function() {
|
1386
|
+
var zoomSt = mfp.st.zoom,
|
1387
|
+
ns = '.zoom';
|
1388
|
+
|
1389
|
+
if(!zoomSt.enabled || !mfp.supportsTransition) {
|
1390
|
+
return;
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
var duration = zoomSt.duration,
|
1394
|
+
getElToAnimate = function(image) {
|
1395
|
+
var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
|
1396
|
+
transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
|
1397
|
+
cssObj = {
|
1398
|
+
position: 'fixed',
|
1399
|
+
zIndex: 9999,
|
1400
|
+
left: 0,
|
1401
|
+
top: 0,
|
1402
|
+
'-webkit-backface-visibility': 'hidden'
|
1403
|
+
},
|
1404
|
+
t = 'transition';
|
1405
|
+
|
1406
|
+
cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
|
1407
|
+
|
1408
|
+
newImg.css(cssObj);
|
1409
|
+
return newImg;
|
1410
|
+
},
|
1411
|
+
showMainContent = function() {
|
1412
|
+
mfp.content.css('visibility', 'visible');
|
1413
|
+
},
|
1414
|
+
openTimeout,
|
1415
|
+
animatedImg;
|
1416
|
+
|
1417
|
+
_mfpOn('BuildControls'+ns, function() {
|
1418
|
+
if(mfp._allowZoom()) {
|
1419
|
+
|
1420
|
+
clearTimeout(openTimeout);
|
1421
|
+
mfp.content.css('visibility', 'hidden');
|
1422
|
+
|
1423
|
+
// Basically, all code below does is clones existing image, puts in on top of the current one and animated it
|
1424
|
+
|
1425
|
+
image = mfp._getItemToZoom();
|
1426
|
+
|
1427
|
+
if(!image) {
|
1428
|
+
showMainContent();
|
1429
|
+
return;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
animatedImg = getElToAnimate(image);
|
1433
|
+
|
1434
|
+
animatedImg.css( mfp._getOffset() );
|
1435
|
+
|
1436
|
+
mfp.wrap.append(animatedImg);
|
1437
|
+
|
1438
|
+
openTimeout = setTimeout(function() {
|
1439
|
+
animatedImg.css( mfp._getOffset( true ) );
|
1440
|
+
openTimeout = setTimeout(function() {
|
1441
|
+
|
1442
|
+
showMainContent();
|
1443
|
+
|
1444
|
+
setTimeout(function() {
|
1445
|
+
animatedImg.remove();
|
1446
|
+
image = animatedImg = null;
|
1447
|
+
_mfpTrigger('ZoomAnimationEnded');
|
1448
|
+
}, 16); // avoid blink when switching images
|
1449
|
+
|
1450
|
+
}, duration); // this timeout equals animation duration
|
1451
|
+
|
1452
|
+
}, 16); // by adding this timeout we avoid short glitch at the beginning of animation
|
1453
|
+
|
1454
|
+
|
1455
|
+
// Lots of timeouts...
|
1456
|
+
}
|
1457
|
+
});
|
1458
|
+
_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
|
1459
|
+
if(mfp._allowZoom()) {
|
1460
|
+
|
1461
|
+
clearTimeout(openTimeout);
|
1462
|
+
|
1463
|
+
mfp.st.removalDelay = duration;
|
1464
|
+
|
1465
|
+
if(!image) {
|
1466
|
+
image = mfp._getItemToZoom();
|
1467
|
+
if(!image) {
|
1468
|
+
return;
|
1469
|
+
}
|
1470
|
+
animatedImg = getElToAnimate(image);
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
|
1474
|
+
animatedImg.css( mfp._getOffset(true) );
|
1475
|
+
mfp.wrap.append(animatedImg);
|
1476
|
+
mfp.content.css('visibility', 'hidden');
|
1477
|
+
|
1478
|
+
setTimeout(function() {
|
1479
|
+
animatedImg.css( mfp._getOffset() );
|
1480
|
+
}, 16);
|
1481
|
+
}
|
1482
|
+
|
1483
|
+
});
|
1484
|
+
|
1485
|
+
_mfpOn(CLOSE_EVENT+ns, function() {
|
1486
|
+
if(mfp._allowZoom()) {
|
1487
|
+
showMainContent();
|
1488
|
+
if(animatedImg) {
|
1489
|
+
animatedImg.remove();
|
1490
|
+
}
|
1491
|
+
}
|
1492
|
+
});
|
1493
|
+
},
|
1494
|
+
|
1495
|
+
_allowZoom: function() {
|
1496
|
+
return mfp.currItem.type === 'image';
|
1497
|
+
},
|
1498
|
+
|
1499
|
+
_getItemToZoom: function() {
|
1500
|
+
if(mfp.currItem.hasSize) {
|
1501
|
+
return mfp.currItem.img;
|
1502
|
+
} else {
|
1503
|
+
return false;
|
1504
|
+
}
|
1505
|
+
},
|
1506
|
+
|
1507
|
+
// Get element postion relative to viewport
|
1508
|
+
_getOffset: function(isLarge) {
|
1509
|
+
var el;
|
1510
|
+
if(isLarge) {
|
1511
|
+
el = mfp.currItem.img;
|
1512
|
+
} else {
|
1513
|
+
el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
|
1514
|
+
}
|
1515
|
+
|
1516
|
+
var offset = el.offset();
|
1517
|
+
var paddingTop = parseInt(el.css('padding-top'),10);
|
1518
|
+
var paddingBottom = parseInt(el.css('padding-bottom'),10);
|
1519
|
+
offset.top -= ( $(window).scrollTop() - paddingTop );
|
1520
|
+
|
1521
|
+
|
1522
|
+
/*
|
1523
|
+
|
1524
|
+
Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
|
1525
|
+
|
1526
|
+
*/
|
1527
|
+
var obj = {
|
1528
|
+
width: el.width(),
|
1529
|
+
// fix Zepto height+padding issue
|
1530
|
+
height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
|
1531
|
+
};
|
1532
|
+
|
1533
|
+
// I hate to do this, but there is no another option
|
1534
|
+
if( getHasMozTransform() ) {
|
1535
|
+
obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
|
1536
|
+
} else {
|
1537
|
+
obj.left = offset.left;
|
1538
|
+
obj.top = offset.top;
|
1539
|
+
}
|
1540
|
+
return obj;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
}
|
1544
|
+
});
|
1545
|
+
|
1546
|
+
|
1547
|
+
|
1548
|
+
/*>>zoom*/
|
1549
|
+
|
1308
1550
|
/*>>iframe*/
|
1309
1551
|
|
1310
1552
|
var IFRAME_NS = 'iframe',
|
@@ -1582,6 +1824,7 @@ $.magnificPopup.registerModule('gallery', {
|
|
1582
1824
|
}).on('error.mfploader', function() {
|
1583
1825
|
item.hasSize = true;
|
1584
1826
|
item.loadError = true;
|
1827
|
+
_mfpTrigger('LazyLoadError', item);
|
1585
1828
|
}).attr('src', item.src);
|
1586
1829
|
}
|
1587
1830
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
left: 0;
|
5
5
|
width: 100%;
|
6
6
|
height: 100%;
|
7
|
-
z-index:
|
7
|
+
z-index: 1042;
|
8
8
|
overflow: hidden;
|
9
9
|
position: fixed;
|
10
10
|
background: #0b0b0b;
|
@@ -16,13 +16,12 @@
|
|
16
16
|
left: 0;
|
17
17
|
width: 100%;
|
18
18
|
height: 100%;
|
19
|
-
z-index:
|
19
|
+
z-index: 1043;
|
20
20
|
position: fixed;
|
21
21
|
outline: none !important;
|
22
22
|
-webkit-backface-visibility: hidden; }
|
23
23
|
|
24
24
|
.mfp-container {
|
25
|
-
height: 100%;
|
26
25
|
text-align: center;
|
27
26
|
position: absolute;
|
28
27
|
width: 100%;
|
@@ -49,7 +48,7 @@
|
|
49
48
|
vertical-align: middle;
|
50
49
|
margin: 0 auto;
|
51
50
|
text-align: left;
|
52
|
-
z-index:
|
51
|
+
z-index: 1045; }
|
53
52
|
|
54
53
|
.mfp-inline-holder .mfp-content,
|
55
54
|
.mfp-ajax-holder .mfp-content {
|
@@ -97,7 +96,7 @@
|
|
97
96
|
margin-top: -0.8em;
|
98
97
|
left: 8px;
|
99
98
|
right: 8px;
|
100
|
-
z-index:
|
99
|
+
z-index: 1044; }
|
101
100
|
|
102
101
|
.mfp-preloader a {
|
103
102
|
color: #cccccc; }
|
@@ -120,7 +119,7 @@ button.mfp-arrow {
|
|
120
119
|
-webkit-appearance: none;
|
121
120
|
display: block;
|
122
121
|
padding: 0;
|
123
|
-
z-index:
|
122
|
+
z-index: 1046; }
|
124
123
|
|
125
124
|
button::-moz-focus-inner {
|
126
125
|
padding: 0;
|
@@ -167,7 +166,6 @@ button::-moz-focus-inner {
|
|
167
166
|
|
168
167
|
.mfp-arrow {
|
169
168
|
position: absolute;
|
170
|
-
top: 0;
|
171
169
|
opacity: 0.65;
|
172
170
|
margin: 0;
|
173
171
|
top: 50%;
|
@@ -196,37 +194,37 @@ button::-moz-focus-inner {
|
|
196
194
|
top: 0;
|
197
195
|
margin-top: 35px;
|
198
196
|
margin-left: 35px;
|
199
|
-
border:
|
197
|
+
border: medium inset transparent; }
|
200
198
|
.mfp-arrow:after,
|
201
199
|
.mfp-arrow .mfp-a {
|
202
|
-
|
203
|
-
border-
|
204
|
-
border-bottom-width: 12px;
|
200
|
+
border-top-width: 13px;
|
201
|
+
border-bottom-width: 13px;
|
205
202
|
top: 8px; }
|
206
203
|
.mfp-arrow:before,
|
207
204
|
.mfp-arrow .mfp-b {
|
208
|
-
border-top-width:
|
209
|
-
border-bottom-width:
|
205
|
+
border-top-width: 21px;
|
206
|
+
border-bottom-width: 21px; }
|
210
207
|
|
211
208
|
.mfp-arrow-left {
|
212
209
|
left: 0; }
|
213
210
|
.mfp-arrow-left:after,
|
214
211
|
.mfp-arrow-left .mfp-a {
|
215
|
-
border-right:
|
216
|
-
left:
|
212
|
+
border-right: 17px solid white;
|
213
|
+
margin-left: 31px; }
|
217
214
|
.mfp-arrow-left:before,
|
218
215
|
.mfp-arrow-left .mfp-b {
|
219
|
-
|
216
|
+
margin-left: 25px;
|
217
|
+
border-right: 27px solid #3f3f3f; }
|
220
218
|
|
221
219
|
.mfp-arrow-right {
|
222
220
|
right: 0; }
|
223
221
|
.mfp-arrow-right:after,
|
224
222
|
.mfp-arrow-right .mfp-a {
|
225
|
-
border-left:
|
226
|
-
left:
|
223
|
+
border-left: 17px solid white;
|
224
|
+
margin-left: 39px; }
|
227
225
|
.mfp-arrow-right:before,
|
228
226
|
.mfp-arrow-right .mfp-b {
|
229
|
-
border-left:
|
227
|
+
border-left: 27px solid #3f3f3f; }
|
230
228
|
|
231
229
|
.mfp-iframe-holder {
|
232
230
|
padding-top: 40px;
|
@@ -281,7 +279,8 @@ img.mfp-img {
|
|
281
279
|
width: auto;
|
282
280
|
height: auto;
|
283
281
|
z-index: -1;
|
284
|
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
282
|
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
283
|
+
background: #444444; }
|
285
284
|
|
286
285
|
.mfp-figure {
|
287
286
|
line-height: 0; }
|
@@ -361,7 +360,7 @@ img.mfp-img {
|
|
361
360
|
.mfp-img-mobile .mfp-figure small {
|
362
361
|
display: inline;
|
363
362
|
margin-left: 5px; } }
|
364
|
-
@media all and (max-width:
|
363
|
+
@media all and (max-width: 900px) {
|
365
364
|
.mfp-arrow {
|
366
365
|
-webkit-transform: scale(0.75);
|
367
366
|
transform: scale(0.75); }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magnific-popup-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Jansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|