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.
data/lib/role-rails/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(
|
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);
|
18
|
-
|
16
|
+
|
17
|
+
overridePrototype(window.Element);
|
18
|
+
overridePrototype(window.Document);
|
19
|
+
}(this, ['querySelector', 'querySelectorAll', 'webkitMatchesSelector', 'mozMatchesSelector', 'oMatchesSelector', 'matchesSelector']);
|
@@ -1 +1 @@
|
|
1
|
-
!function(
|
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.
|
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.
|
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
|