magnific-popup-rails 0.8.5 → 0.8.7
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: 8dfa7fcdc9593679fa1242e1159cd1db871cb8fb
|
4
|
+
data.tar.gz: 3ae93e0d073ba2defd4743edb016cf79f851f6ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8a8a6ad828a49fbf29edf386977421b298e9736c3499564d15cdd92ae24b5298cda17466048542d7de9ff8521e400b353d8c30fa1eb5a16eed855fba508a530
|
7
|
+
data.tar.gz: d174b7f1443a1d234b8ae97404f828b599e427c0513261a3b0de1c35c3f2d500ecbb08661989c4f388b7e7b0630dbea9b36ac73e83f645de5a6ca2be6f85bb3b
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Magnific Popup - v0.8.
|
1
|
+
/*! Magnific Popup - v0.8.7 - 2013-05-19
|
2
2
|
* http://dimsemenov.com/plugins/magnific-popup/
|
3
3
|
* Copyright (c) 2013 Dmitry Semenov; */
|
4
4
|
;(function($) {
|
@@ -160,19 +160,25 @@ MagnificPopup.prototype = {
|
|
160
160
|
*/
|
161
161
|
open: function(data) {
|
162
162
|
|
163
|
-
|
164
|
-
|
163
|
+
var i;
|
164
|
+
|
165
|
+
if(data.isObj === false) {
|
166
|
+
// convert jQuery collection to array to avoid conflicts later
|
167
|
+
mfp.items = data.items.toArray();
|
168
|
+
} else {
|
169
|
+
mfp.items = $.isArray(data.items) ? data.items : [data.items];
|
170
|
+
}
|
171
|
+
|
172
|
+
// if popup is already opened - we just update the content
|
165
173
|
if(mfp.isOpen) {
|
166
174
|
mfp.updateItemHTML();
|
167
175
|
return;
|
168
176
|
}
|
169
177
|
|
170
|
-
|
171
|
-
|
178
|
+
|
172
179
|
mfp.types = [];
|
173
180
|
_wrapClasses = '';
|
174
|
-
|
175
|
-
mfp.ev = data.el || _document;
|
181
|
+
mfp.ev = data.mainEl || _document;
|
176
182
|
|
177
183
|
if(data.isObj) {
|
178
184
|
mfp.index = data.index || 0;
|
@@ -557,7 +563,6 @@ MagnificPopup.prototype = {
|
|
557
563
|
parseEl: function(index) {
|
558
564
|
var item = mfp.items[index],
|
559
565
|
type = item.type;
|
560
|
-
|
561
566
|
|
562
567
|
if(item.tagName) {
|
563
568
|
item = { el: $(item) };
|
@@ -1353,7 +1358,9 @@ $.magnificPopup.registerModule(IFRAME_NS, {
|
|
1353
1358
|
//}
|
1354
1359
|
});
|
1355
1360
|
|
1356
|
-
_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS,
|
1361
|
+
_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
|
1362
|
+
_fixIframeBugs();
|
1363
|
+
});
|
1357
1364
|
},
|
1358
1365
|
|
1359
1366
|
getIframe: function(item, template) {
|
@@ -1439,8 +1446,10 @@ $.magnificPopup.registerModule('gallery', {
|
|
1439
1446
|
|
1440
1447
|
if(gSt.navigateByImgClick) {
|
1441
1448
|
mfp.wrap.on('click'+ns, '.mfp-img', function() {
|
1442
|
-
mfp.
|
1443
|
-
|
1449
|
+
if(mfp.items.length > 1) {
|
1450
|
+
mfp.next();
|
1451
|
+
return false;
|
1452
|
+
}
|
1444
1453
|
});
|
1445
1454
|
}
|
1446
1455
|
|
@@ -1461,11 +1470,11 @@ $.magnificPopup.registerModule('gallery', {
|
|
1461
1470
|
|
1462
1471
|
_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
|
1463
1472
|
var l = mfp.items.length;
|
1464
|
-
values.counter = l ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
|
1473
|
+
values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
|
1465
1474
|
});
|
1466
1475
|
|
1467
1476
|
_mfpOn('BuildControls' + ns, function() {
|
1468
|
-
if(gSt.arrows && !mfp.arrowLeft) {
|
1477
|
+
if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
|
1469
1478
|
var markup = gSt.arrowMarkup,
|
1470
1479
|
arrowLeft = mfp.arrowLeft = $( markup.replace('%title%', gSt.tPrev).replace('%dir%', 'left') ).addClass(PREVENT_CLOSE_CLASS),
|
1471
1480
|
arrowRight = mfp.arrowRight = $( markup.replace('%title%', gSt.tNext).replace('%dir%', 'right') ).addClass(PREVENT_CLOSE_CLASS);
|
@@ -1504,7 +1513,7 @@ $.magnificPopup.registerModule('gallery', {
|
|
1504
1513
|
_document.off(ns);
|
1505
1514
|
mfp.wrap.off('click'+ns);
|
1506
1515
|
|
1507
|
-
if(supportsFastClick) {
|
1516
|
+
if(mfp.arrowLeft && supportsFastClick) {
|
1508
1517
|
mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
|
1509
1518
|
}
|
1510
1519
|
mfp.arrowRight = mfp.arrowLeft = null;
|
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.8.
|
4
|
+
version: 0.8.7
|
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-05-
|
11
|
+
date: 2013-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|