mousetrap-rails 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- ## v0.0.5.wip
1
+ ## v0.0.5
2
+
3
+ * update mousetrap.js to 1.1.4 (old Firefox versions support)
2
4
 
3
5
  ## v0.0.4
4
6
 
data/README.md CHANGED
@@ -24,7 +24,7 @@ And then execute:
24
24
  It will create sample `keybindings.js.coffee` file in `app/assets/javascripts` and insert mousetrap-rails files to manifests of assert pipeline
25
25
 
26
26
  //= require mousetrap # ---> application.js
27
- *= require moustrap # ---> application.css
27
+ *= require mousetrap # ---> application.css
28
28
 
29
29
  Voila!
30
30
 
@@ -42,7 +42,8 @@ Instead of `gem 'mousetrap-rails'` add to your Gemfile
42
42
  You can add keyboard navigation to your links by using `data-keybinding` attribute.
43
43
 
44
44
  ```haml
45
- = link_to 'Homepage', root_path, data: { keybinding: 'h' } # Press 'h' to navigate to homepage
45
+ = link_to 'Homepage', root_path, data: { keybinding: 'h' } # Press 'h' to navigate to homepage
46
+ = link_to 'About', about_path, data: { keybinding: '["a", "c"]' } # Press 'a' or 'c' to navigate to about
46
47
  ```
47
48
 
48
49
  You can jump to input
@@ -47,4 +47,4 @@ a[data-keybinding]
47
47
  &:hover
48
48
  background: white
49
49
  opacity: $mtOpacity + 0.25
50
- @include transform(scale(1.25))
50
+ @include transform(scale(1.20))
@@ -1,5 +1,5 @@
1
1
  module Mousetrap
2
2
  module Rails
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -16,7 +16,7 @@
16
16
  * Mousetrap is a simple keyboard shortcut library for Javascript with
17
17
  * no external dependencies
18
18
  *
19
- * @version 1.1.3
19
+ * @version 1.1.4
20
20
  * @url craig.is/killing/mice
21
21
  */
22
22
  (function() {
@@ -454,7 +454,9 @@
454
454
 
455
455
  // normalize e.which for key events
456
456
  // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion
457
- e.which = typeof e.which == "number" ? e.which : e.keyCode;
457
+ if (typeof e.which !== 'number') {
458
+ e.which = e.keyCode;
459
+ }
458
460
 
459
461
  var character = _characterFromEvent(e);
460
462
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mousetrap-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
12
+ date: 2012-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -175,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  segments:
177
177
  - 0
178
- hash: 1496954347725522784
178
+ hash: 942320878644081280
179
179
  required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  none: false
181
181
  requirements:
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  segments:
186
186
  - 0
187
- hash: 1496954347725522784
187
+ hash: 942320878644081280
188
188
  requirements: []
189
189
  rubyforge_project:
190
190
  rubygems_version: 1.8.24