magnific-popup-rails 0.8.7 → 0.8.8

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: 8dfa7fcdc9593679fa1242e1159cd1db871cb8fb
4
- data.tar.gz: 3ae93e0d073ba2defd4743edb016cf79f851f6ed
3
+ metadata.gz: 9f5c37f0a1bdc475a11a10ce7fc2a485d4fdc848
4
+ data.tar.gz: c7bc9ab3cbeeff9e0f788a4625081690ac1a4524
5
5
  SHA512:
6
- metadata.gz: a8a8a6ad828a49fbf29edf386977421b298e9736c3499564d15cdd92ae24b5298cda17466048542d7de9ff8521e400b353d8c30fa1eb5a16eed855fba508a530
7
- data.tar.gz: d174b7f1443a1d234b8ae97404f828b599e427c0513261a3b0de1c35c3f2d500ecbb08661989c4f388b7e7b0630dbea9b36ac73e83f645de5a6ca2be6f85bb3b
6
+ metadata.gz: c8047ae4afc82e5369ad9f868701122f7f60afa2e97a454363e7b29a1b3f09e5384472b182b3737a48acb0aa9cbb1d340e8d767afd5ae0a90fe04966580fb0c3
7
+ data.tar.gz: a628027ca149648562ff1fcb66cefd4d8c3b5641b1edfd88cccf4762cc9eb02e93736d931890fa6e6ae477c1e728dc5a9d34947560f1c37cc6423839cdd0f633
@@ -1,5 +1,5 @@
1
1
  module MagnificPopup
2
2
  module Rails
3
- VERSION = "0.8.7"
3
+ VERSION = "0.8.8"
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- /*! Magnific Popup - v0.8.7 - 2013-05-19
1
+ /*! Magnific Popup - v0.8.8 - 2013-05-24
2
2
  * http://dimsemenov.com/plugins/magnific-popup/
3
3
  * Copyright (c) 2013 Dmitry Semenov; */
4
4
  ;(function($) {
@@ -165,24 +165,7 @@ MagnificPopup.prototype = {
165
165
  if(data.isObj === false) {
166
166
  // convert jQuery collection to array to avoid conflicts later
167
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
173
- if(mfp.isOpen) {
174
- mfp.updateItemHTML();
175
- return;
176
- }
177
-
178
-
179
- mfp.types = [];
180
- _wrapClasses = '';
181
- mfp.ev = data.mainEl || _document;
182
168
 
183
- if(data.isObj) {
184
- mfp.index = data.index || 0;
185
- } else {
186
169
  mfp.index = 0;
187
170
  var items = data.items,
188
171
  item;
@@ -196,8 +179,20 @@ MagnificPopup.prototype = {
196
179
  break;
197
180
  }
198
181
  }
182
+ } else {
183
+ mfp.items = $.isArray(data.items) ? data.items : [data.items];
184
+ mfp.index = data.index || 0;
199
185
  }
200
186
 
187
+ // if popup is already opened - we just update the content
188
+ if(mfp.isOpen) {
189
+ mfp.updateItemHTML();
190
+ return;
191
+ }
192
+
193
+ mfp.types = [];
194
+ _wrapClasses = '';
195
+ mfp.ev = data.mainEl || _document;
201
196
 
202
197
  if(data.key) {
203
198
  if(!mfp.popupsCache[data.key]) {
@@ -643,9 +638,16 @@ MagnificPopup.prototype = {
643
638
  }
644
639
  }
645
640
 
646
- if(e.type)
641
+ if(e.type) {
647
642
  e.preventDefault();
648
643
 
644
+ // This will prevent popup from closing if element is inside and popup is already opened
645
+ if(mfp.isOpen) {
646
+ e.stopPropagation();
647
+ }
648
+ }
649
+
650
+
649
651
  options.el = $(e.mfpEl);
650
652
  if(options.delegate) {
651
653
  options.items = el.find(options.delegate);
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.7
4
+ version: 0.8.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-05-19 00:00:00.000000000 Z
11
+ date: 2013-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake