role-rails 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module RoleRails
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
@@ -1 +1 @@
1
- !function(a){function b(b,c,d){var e=b[c];if(!e)return;b[c]=function(){return arguments[d]=arguments[d].replace(/@([\w\u00c0-\uFFFF\-]+)/g,'[role~="$1"]'),e.apply(b,arguments)},a.extend(b[c],e)}function c(b,c){var d,e=[],f=a.trim(b).split(/\s+/);for(var g=0;g<f.length;g++)d=f[g],!~a.inArray(d,e)&&(!c||!~a.inArray(d,c))&&e.push(d);return e}b(a,"find",0),b(a,"multiFilter",0),b(a.find,"matchesSelector",1),b(a.find,"matches",0),a.extend(a.fn,{roles:function(){return c(this.attr("role"))},hasRole:function(a){var b=c(a);for(var d=0;d<b.length;d++)if(!this.is("@"+b[d]))return!1;return!0},addRole:function(b){return this.hasRole(b)?this:this.each(function(d,e){var f=a(e);f.attr("role",c(f.attr("role")+" "+b).join(" "))})},removeRole:function(b){return this.hasRole(b)?this.each(function(d,e){var f=a(e);f.attr("role",c(f.attr("role"),c(b)).join(" "))}):this},toggleRole:function(a){var b=c(a);for(var d=0;d<b.length;d++)this[this.hasRole(b[d])?"removeRole":"addRole"].call(this,b[d]);return this}})}(jQuery);
1
+ !function(e){function t(t,n,r){var i=t[n];if(!i)return;t[n]=function(){return arguments[r]=arguments[r].replace(/@([\w\u00c0-\uFFFF\-]+)/g,'[role~="$1"]'),i.apply(t,arguments)},e.extend(t[n],i)}function n(t,n){var r,i=[],s=e.trim(t).split(/\s+/);for(var o=0;o<s.length;o++)r=s[o],!~e.inArray(r,i)&&(!n||!~e.inArray(r,n))&&i.push(r);return i}t(e,"find",0),t(e,"multiFilter",0),t(e.find,"matchesSelector",1),t(e.find,"matches",0),e.extend(e.fn,{roles:function(){return n(this.attr("role"))},hasRole:function(e){var t=n(e);for(var r=0;r<t.length;r++)if(!this.is("@"+t[r]))return!1;return!0},addRole:function(t){return this.hasRole(t)?this:this.each(function(r,i){var s=e(i);s.attr("role",n(s.attr("role")+" "+t).join(" "))})},removeRole:function(t){return this.hasRole(t)?this.each(function(r,i){var s=e(i);s.attr("role",n(s.attr("role"),n(t)).join(" "))}):this},toggleRole:function(e){var t=n(e);for(var r=0;r<t.length;r++)this[this.hasRole(t[r])?"removeRole":"addRole"].call(this,t[r]);return this}})}(jQuery);
@@ -8,11 +8,12 @@
8
8
  };
9
9
  }
10
10
  }
11
-
11
+
12
12
  function overridePrototype(klass){
13
13
  for(var i=0; i<methods.length; i++)
14
14
  overrideMethod(klass, methods[i]);
15
15
  }
16
-
17
- overridePrototype(window.Element); overridePrototype(window.Document);
18
- }(this, ['querySelector', 'querySelectorAll']);
16
+
17
+ overridePrototype(window.Element);
18
+ overridePrototype(window.Document);
19
+ }(this, ['querySelector', 'querySelectorAll', 'webkitMatchesSelector', 'mozMatchesSelector', 'oMatchesSelector', 'matchesSelector']);
@@ -1 +1 @@
1
- !function(a,b){function c(a,b){var c;a&&(c=a.prototype[b])&&(a.prototype[b]=function(){return arguments[0]=arguments[0].replace(/@([\w\u00c0-\uFFFF\-]+)/g,'[role~="$1"]'),c.apply(this,arguments)})}function d(a){for(var d=0;d<b.length;d++)c(a,b[d])}d(a.Element),d(a.Document)}(this,["querySelector","querySelectorAll"]);
1
+ !function(e,t){function n(e,t){var n;e&&(n=e.prototype[t])&&(e.prototype[t]=function(){return arguments[0]=arguments[0].replace(/@([\w\u00c0-\uFFFF\-]+)/g,'[role~="$1"]'),n.apply(this,arguments)})}function r(e){for(var r=0;r<t.length;r++)n(e,t[r])}r(e.Element),r(e.Document)}(this,["querySelector","querySelectorAll","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","matchesSelector"]);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: role-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project: role-rails
185
- rubygems_version: 1.8.24
185
+ rubygems_version: 1.8.23
186
186
  signing_key:
187
187
  specification_version: 3
188
188
  summary: jQuery plugin to provide easy way to handle DOM elements by role attribute