fitvidsjs_rails 1.1.1 → 1.1.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: eec309f4238e1c396f97c5f2ab013f82db17737e
4
- data.tar.gz: b08ca01fdce432aec699b2d09a5b910cc13a5c4a
3
+ metadata.gz: 7e7357b172d0732e32cb7b9cffa3469b6ad7eeab
4
+ data.tar.gz: 457201c58d6441bb031b66648dab5718483f276d
5
5
  SHA512:
6
- metadata.gz: 5e80140df5f71f11ad2bf655b31dc7d4629f4e08059018e4ed9a2224b558d5f554945d65965a7ac53f36c566be2b7063d4d7210eaa26ef9b8530b74b3afe6d0c
7
- data.tar.gz: 748aab0bf0645fc85d3f72ecf34514a3af55bc6708a7f4b7bcbad55c1c172623e7917deb820fd770534b61584c793c92849306503514897d7cf7948fde011445
6
+ metadata.gz: 24ee58356fa179e8d6cc02ccb4b8cbe86383e15c5cd72b6e84b59f00e2835ec70e386ff2ff717d935e0c55782abb4bfdbd5fc318719c276c6a6a6e7e4f14fca5
7
+ data.tar.gz: 74742d8c089955e31906bbaa4e0f6135bee1406f5f34db40f89abf5a6c3ce2538a52f4e628d0cd8ccb593ceacfaa1bbe47478b51aff93afcd085e6399cae4a16
@@ -15,7 +15,8 @@
15
15
 
16
16
  $.fn.fitVids = function( options ) {
17
17
  var settings = {
18
- customSelector: null
18
+ customSelector: null,
19
+ ignore: null
19
20
  };
20
21
 
21
22
  if(!document.getElementById('fit-vids-style')) {
@@ -45,13 +46,23 @@
45
46
  selectors.push(settings.customSelector);
46
47
  }
47
48
 
49
+ var ignoreList = '.fitvidsignore';
50
+
51
+ if(settings.ignore) {
52
+ ignoreList = ignoreList + ', ' + settings.ignore;
53
+ }
54
+
48
55
  var $allVideos = $(this).find(selectors.join(','));
49
56
  $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
57
+ $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
50
58
 
51
59
  $allVideos.each(function(){
52
60
  var $this = $(this);
61
+ if($this.parents(ignoreList).length > 0) {
62
+ return; // Disable FitVids on this video.
63
+ }
53
64
  if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
54
- if (isNaN($this.attr('height')) || isNaN($this.attr('width')))
65
+ if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
55
66
  {
56
67
  $this.attr('height', 9);
57
68
  $this.attr('width', 16);
@@ -69,4 +80,4 @@
69
80
  });
70
81
  };
71
82
  // Works with either jQuery or Zepto
72
- })( window.jQuery || window.Zepto );
83
+ })( window.jQuery || window.Zepto );
@@ -1,3 +1,3 @@
1
1
  module FitvidsjsRails
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitvidsjs_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Israeli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -88,8 +88,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.2.1
91
+ rubygems_version: 2.2.2
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: asset pipeline wrapper for Fitvids.js - Rails 3.1+
95
95
  test_files: []
96
+ has_rdoc: