magnific-popup-rails 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzhlMzU2OTM5ZjZhNGQwMTlhYzBjMmEwYTI4MWU4MGZiMmZkZWFjYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmMxYzdiNjllYmRiZWQ2NDdhMzM3YTgzYTA3YjAwODI2Y2M1YzQ3OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTY0YzU1OWI1NDJjZTY5YjY5MzAyN2Y1OGQzZjdhMjJkMDM5YmI0ZGJiMjU1
|
10
|
+
MTE5NmVjMTc5NGQzOGRlNmM0YWUzNTRkNDU3NjQxYmFiNGJiNDQ3NTA2ZTgx
|
11
|
+
NzFiNDgyNWE2MTlmMjliMmYwNzA2YWUwNDhlM2Q2MzEwZGE0ZTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTYyNjRjNGJjM2VjZjM3Y2EzMDQ3MzMzODRkNjVhOTkyZGVkZTA0ZWZjYmRm
|
14
|
+
OTQ0YTk4ZjM2YmM4YzdhZTEwZTYwNzQ2YWYzYmUwZjAzMGM3NGFkY2M1NjE1
|
15
|
+
N2Y2Y2ZjODNkODY4NzRjZGEyMDc5Y2VlZjVjNDdiMDJmZDAwNWM=
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Magnific Popup - v0.9.
|
1
|
+
/*! Magnific Popup - v0.9.8 - 2013-10-26
|
2
2
|
* http://dimsemenov.com/plugins/magnific-popup/
|
3
3
|
* Copyright (c) 2013 Dmitry Semenov; */
|
4
4
|
;(function($) {
|
@@ -94,41 +94,6 @@ var _mfpOn = function(name, f) {
|
|
94
94
|
$.magnificPopup.instance = mfp;
|
95
95
|
}
|
96
96
|
},
|
97
|
-
// Check to close popup or not
|
98
|
-
// "target" is an element that was clicked
|
99
|
-
_checkIfClose = function(target) {
|
100
|
-
|
101
|
-
if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
|
102
|
-
return;
|
103
|
-
}
|
104
|
-
|
105
|
-
var closeOnContent = mfp.st.closeOnContentClick;
|
106
|
-
var closeOnBg = mfp.st.closeOnBgClick;
|
107
|
-
|
108
|
-
if(closeOnContent && closeOnBg) {
|
109
|
-
return true;
|
110
|
-
} else {
|
111
|
-
|
112
|
-
// We close the popup if click is on close button or on preloader. Or if there is no content.
|
113
|
-
if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
|
114
|
-
return true;
|
115
|
-
}
|
116
|
-
|
117
|
-
// if click is outside the content
|
118
|
-
if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
|
119
|
-
if(closeOnBg) {
|
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
|
-
}
|
124
|
-
}
|
125
|
-
} else if(closeOnContent) {
|
126
|
-
return true;
|
127
|
-
}
|
128
|
-
|
129
|
-
}
|
130
|
-
return false;
|
131
|
-
},
|
132
97
|
// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
|
133
98
|
supportsTransitions = function() {
|
134
99
|
var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
|
@@ -254,7 +219,7 @@ MagnificPopup.prototype = {
|
|
254
219
|
});
|
255
220
|
|
256
221
|
mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
|
257
|
-
if(_checkIfClose(e.target)) {
|
222
|
+
if(mfp._checkIfClose(e.target)) {
|
258
223
|
mfp.close();
|
259
224
|
}
|
260
225
|
});
|
@@ -349,7 +314,7 @@ MagnificPopup.prototype = {
|
|
349
314
|
if(mfp._hasScrollBar(windowHeight)){
|
350
315
|
var s = mfp._getScrollbarSize();
|
351
316
|
if(s) {
|
352
|
-
windowStyles.
|
317
|
+
windowStyles.marginRight = s;
|
353
318
|
}
|
354
319
|
}
|
355
320
|
}
|
@@ -379,7 +344,7 @@ MagnificPopup.prototype = {
|
|
379
344
|
_mfpTrigger('BuildControls');
|
380
345
|
|
381
346
|
|
382
|
-
// remove scrollbar, add
|
347
|
+
// remove scrollbar, add margin e.t.c
|
383
348
|
$('html').css(windowStyles);
|
384
349
|
|
385
350
|
// add everything to DOM
|
@@ -456,7 +421,7 @@ MagnificPopup.prototype = {
|
|
456
421
|
mfp._removeClassFromMFP(classesToRemove);
|
457
422
|
|
458
423
|
if(mfp.fixedContentPos) {
|
459
|
-
var windowStyles = {
|
424
|
+
var windowStyles = {marginRight: ''};
|
460
425
|
if(mfp.isIE7) {
|
461
426
|
$('body, html').css('overflow', '');
|
462
427
|
} else {
|
@@ -751,6 +716,41 @@ MagnificPopup.prototype = {
|
|
751
716
|
/*
|
752
717
|
"Private" helpers that aren't private at all
|
753
718
|
*/
|
719
|
+
// Check to close popup or not
|
720
|
+
// "target" is an element that was clicked
|
721
|
+
_checkIfClose: function(target) {
|
722
|
+
|
723
|
+
if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
|
724
|
+
return;
|
725
|
+
}
|
726
|
+
|
727
|
+
var closeOnContent = mfp.st.closeOnContentClick;
|
728
|
+
var closeOnBg = mfp.st.closeOnBgClick;
|
729
|
+
|
730
|
+
if(closeOnContent && closeOnBg) {
|
731
|
+
return true;
|
732
|
+
} else {
|
733
|
+
|
734
|
+
// We close the popup if click is on close button or on preloader. Or if there is no content.
|
735
|
+
if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
|
736
|
+
return true;
|
737
|
+
}
|
738
|
+
|
739
|
+
// if click is outside the content
|
740
|
+
if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
|
741
|
+
if(closeOnBg) {
|
742
|
+
// last check, if the clicked element is in DOM, (in case it's removed onclick)
|
743
|
+
if( $.contains(document, target) ) {
|
744
|
+
return true;
|
745
|
+
}
|
746
|
+
}
|
747
|
+
} else if(closeOnContent) {
|
748
|
+
return true;
|
749
|
+
}
|
750
|
+
|
751
|
+
}
|
752
|
+
return false;
|
753
|
+
},
|
754
754
|
_addClassToMFP: function(cName) {
|
755
755
|
mfp.bgOverlay.addClass(cName);
|
756
756
|
mfp.wrap.addClass(cName);
|
@@ -1153,11 +1153,15 @@ $.magnificPopup.registerModule('image', {
|
|
1153
1153
|
options: {
|
1154
1154
|
markup: '<div class="mfp-figure">'+
|
1155
1155
|
'<div class="mfp-close"></div>'+
|
1156
|
-
'<
|
1157
|
-
|
1158
|
-
'<
|
1159
|
-
|
1160
|
-
|
1156
|
+
'<figure>'+
|
1157
|
+
'<div class="mfp-img"></div>'+
|
1158
|
+
'<figcaption>'+
|
1159
|
+
'<div class="mfp-bottom-bar">'+
|
1160
|
+
'<div class="mfp-title"></div>'+
|
1161
|
+
'<div class="mfp-counter"></div>'+
|
1162
|
+
'</div>'+
|
1163
|
+
'</figcaption>'+
|
1164
|
+
'</figure>'+
|
1161
1165
|
'</div>',
|
1162
1166
|
cursor: 'mfp-zoom-out-cur',
|
1163
1167
|
titleSrc: 'title',
|
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.9.
|
4
|
+
version: 0.9.8
|
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-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|