magnific-popup-rails 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzhlMzU2OTM5ZjZhNGQwMTlhYzBjMmEwYTI4MWU4MGZiMmZkZWFjYQ==
5
- data.tar.gz: !binary |-
6
- NmMxYzdiNjllYmRiZWQ2NDdhMzM3YTgzYTA3YjAwODI2Y2M1YzQ3OA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MTY0YzU1OWI1NDJjZTY5YjY5MzAyN2Y1OGQzZjdhMjJkMDM5YmI0ZGJiMjU1
10
- MTE5NmVjMTc5NGQzOGRlNmM0YWUzNTRkNDU3NjQxYmFiNGJiNDQ3NTA2ZTgx
11
- NzFiNDgyNWE2MTlmMjliMmYwNzA2YWUwNDhlM2Q2MzEwZGE0ZTY=
12
- data.tar.gz: !binary |-
13
- YTYyNjRjNGJjM2VjZjM3Y2EzMDQ3MzMzODRkNjVhOTkyZGVkZTA0ZWZjYmRm
14
- OTQ0YTk4ZjM2YmM4YzdhZTEwZTYwNzQ2YWYzYmUwZjAzMGM3NGFkY2M1NjE1
15
- N2Y2Y2ZjODNkODY4NzRjZGEyMDc5Y2VlZjVjNDdiMDJmZDAwNWM=
2
+ SHA1:
3
+ metadata.gz: ed7d6865db9632d40b6d09efef8db0aadc8fde9c
4
+ data.tar.gz: 3d640ca0319ca2b639ec7a3a4df9077b7fa38dd2
5
+ SHA512:
6
+ metadata.gz: ba4c302243334ed845aa2f2b5c80e5662c5c3300f691b4a40f3e13f6658e4b1774ec5cfd5d17b7f795c4242d0c427646a6b0b248eb08eef81794de25c3926178
7
+ data.tar.gz: 1f2641d076d09cd4ddb91b291bdf14bd5fdc58c35530d57f600dd064b5b4084c135d61691bc887b0b6a680486507eabe5b90fab22208e50621d176b358236694
@@ -1,5 +1,5 @@
1
1
  module MagnificPopup
2
2
  module Rails
3
- VERSION = "0.9.8"
3
+ VERSION = "0.9.9"
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- /*! Magnific Popup - v0.9.8 - 2013-10-26
1
+ /*! Magnific Popup - v0.9.9 - 2013-12-04
2
2
  * http://dimsemenov.com/plugins/magnific-popup/
3
3
  * Copyright (c) 2013 Dmitry Semenov; */
4
4
  ;(function($) {
@@ -76,9 +76,6 @@ var _mfpOn = function(name, f) {
76
76
  }
77
77
  }
78
78
  },
79
- _setFocus = function() {
80
- (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
81
- },
82
79
  _getCloseBtn = function(type) {
83
80
  if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
84
81
  mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
@@ -137,7 +134,6 @@ MagnificPopup.prototype = {
137
134
  // We disable fixed positioned lightbox on devices that don't handle it nicely.
138
135
  // If you know a better way of detecting this - let me know.
139
136
  mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
140
- _body = $(document.body);
141
137
  _document = $(document);
142
138
 
143
139
  mfp.popupsCache = {};
@@ -149,6 +145,10 @@ MagnificPopup.prototype = {
149
145
  */
150
146
  open: function(data) {
151
147
 
148
+ if(!_body) {
149
+ _body = $(document.body);
150
+ }
151
+
152
152
  var i;
153
153
 
154
154
  if(data.isObj === false) {
@@ -343,14 +343,11 @@ MagnificPopup.prototype = {
343
343
 
344
344
  _mfpTrigger('BuildControls');
345
345
 
346
-
347
346
  // remove scrollbar, add margin e.t.c
348
347
  $('html').css(windowStyles);
349
348
 
350
349
  // add everything to DOM
351
- mfp.bgOverlay.add(mfp.wrap).prependTo( document.body );
352
-
353
-
350
+ mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || _body );
354
351
 
355
352
  // Save last focused element
356
353
  mfp._lastFocusedEl = document.activeElement;
@@ -360,19 +357,14 @@ MagnificPopup.prototype = {
360
357
 
361
358
  if(mfp.content) {
362
359
  mfp._addClassToMFP(READY_CLASS);
363
- _setFocus();
360
+ mfp._setFocus();
364
361
  } else {
365
362
  // if content is not defined (not loaded e.t.c) we add class only for BG
366
363
  mfp.bgOverlay.addClass(READY_CLASS);
367
364
  }
368
365
 
369
366
  // Trap the focus in popup
370
- _document.on('focusin' + EVENT_NS, function (e) {
371
- if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
372
- _setFocus();
373
- return false;
374
- }
375
- });
367
+ _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
376
368
 
377
369
  }, 16);
378
370
 
@@ -762,6 +754,15 @@ MagnificPopup.prototype = {
762
754
  _hasScrollBar: function(winHeight) {
763
755
  return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
764
756
  },
757
+ _setFocus: function() {
758
+ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
759
+ },
760
+ _onFocusIn: function(e) {
761
+ if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
762
+ mfp._setFocus();
763
+ return false;
764
+ }
765
+ },
765
766
  _parseMarkup: function(template, values, item) {
766
767
  var arr;
767
768
  if(item.data) {
@@ -885,6 +886,8 @@ $.magnificPopup = {
885
886
  alignTop: false,
886
887
 
887
888
  removalDelay: 0,
889
+
890
+ prependTo: null,
888
891
 
889
892
  fixedContentPos: 'auto',
890
893
 
@@ -1098,7 +1101,7 @@ $.magnificPopup.registerModule(AJAX_NS, {
1098
1101
 
1099
1102
  _removeAjaxCursor();
1100
1103
 
1101
- _setFocus();
1104
+ mfp._setFocus();
1102
1105
 
1103
1106
  setTimeout(function() {
1104
1107
  mfp.wrap.addClass(READY_CLASS);
@@ -1330,8 +1333,12 @@ $.magnificPopup.registerModule('image', {
1330
1333
  if(el.is('img')) {
1331
1334
  item.img = item.img.clone();
1332
1335
  }
1333
- if(item.img[0].naturalWidth > 0) {
1336
+
1337
+ img = item.img[0];
1338
+ if(img.naturalWidth > 0) {
1334
1339
  item.hasSize = true;
1340
+ } else if(!img.width) {
1341
+ item.hasSize = false;
1335
1342
  }
1336
1343
  }
1337
1344
 
@@ -2038,4 +2045,4 @@ $.magnificPopup.registerModule(RETINA_NS, {
2038
2045
  })();
2039
2046
 
2040
2047
  /*>>fastclick*/
2041
- })(window.jQuery || window.Zepto);
2048
+ _checkInstance(); })(window.jQuery || window.Zepto);
@@ -129,13 +129,15 @@ button::-moz-focus-inner {
129
129
  text-decoration: none;
130
130
  text-align: center;
131
131
  opacity: 0.65;
132
+ filter: alpha(opacity=65);
132
133
  padding: 0 0 18px 10px;
133
134
  color: white;
134
135
  font-style: normal;
135
136
  font-size: 28px;
136
137
  font-family: Arial, Baskerville, monospace; }
137
138
  .mfp-close:hover, .mfp-close:focus {
138
- opacity: 1; }
139
+ opacity: 1;
140
+ filter: alpha(opacity=100); }
139
141
  .mfp-close:active {
140
142
  top: 1px; }
141
143
 
@@ -160,6 +162,7 @@ button::-moz-focus-inner {
160
162
  .mfp-arrow {
161
163
  position: absolute;
162
164
  opacity: 0.65;
165
+ filter: alpha(opacity=65);
163
166
  margin: 0;
164
167
  top: 50%;
165
168
  margin-top: -55px;
@@ -170,7 +173,8 @@ button::-moz-focus-inner {
170
173
  .mfp-arrow:active {
171
174
  margin-top: -54px; }
172
175
  .mfp-arrow:hover, .mfp-arrow:focus {
173
- opacity: 1; }
176
+ opacity: 1;
177
+ filter: alpha(opacity=100); }
174
178
  .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
175
179
  content: '';
176
180
  display: block;
@@ -266,6 +270,8 @@ img.mfp-img {
266
270
  display: block;
267
271
  font-size: 12px;
268
272
  line-height: 14px; }
273
+ .mfp-figure figure {
274
+ margin: 0; }
269
275
 
270
276
  .mfp-bottom-bar {
271
277
  margin-top: -36px;
@@ -297,14 +303,12 @@ img.mfp-img {
297
303
  padding-right: 0; }
298
304
  .mfp-img-mobile img.mfp-img {
299
305
  padding: 0; }
300
- .mfp-img-mobile .mfp-figure {
301
- /* The shadow behind the image */ }
302
- .mfp-img-mobile .mfp-figure:after {
303
- top: 0;
304
- bottom: 0; }
305
- .mfp-img-mobile .mfp-figure small {
306
- display: inline;
307
- margin-left: 5px; }
306
+ .mfp-img-mobile .mfp-figure:after {
307
+ top: 0;
308
+ bottom: 0; }
309
+ .mfp-img-mobile .mfp-figure small {
310
+ display: inline;
311
+ margin-left: 5px; }
308
312
  .mfp-img-mobile .mfp-bottom-bar {
309
313
  background: rgba(0, 0, 0, 0.6);
310
314
  bottom: 0;
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magnific-popup-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
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-04 00:00:00.000000000 Z
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Magnific Popup is a free responsive jQuery lightbox plugin that is focused
@@ -54,12 +54,12 @@ require_paths:
54
54
  - lib
55
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ! '>='
57
+ - - '>='
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ! '>='
62
+ - - '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []