batman-touch-rails 1.0.0 → 1.1.0

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: 0f5263a4398b06fa265ab056e9e9eb10ecc3fbfb
4
- data.tar.gz: 9701a4f50da605a96be3dfaf4542c46c8669d796
3
+ metadata.gz: cd6c6170afba8d1c31ba86d78b65edecf8ddc84e
4
+ data.tar.gz: 92338d130f8dd9a5a3462dcad8349597ad29fdc0
5
5
  SHA512:
6
- metadata.gz: e5c50f6c3adeb6677c7048ac5e6b533c50cbf85ace5eabe51a4f20940ba8ad00664d426c0a8bab4bfb3acdc884ac1f155a8627019c4915127ac6a0f4ea5fb76b
7
- data.tar.gz: f58a70b976ed06b35a25f908028e5d419cb6f412ec4bb6cdc51ef7ca89cdbec4f8b31000f1c9e705e48cd162678529a2ab2f3e0618235449f222fe458aa30e6c
6
+ metadata.gz: dd2b654fd7c2c4ac4f1a934094bdd6a797203d31e7149a3d5cc254694f1862956565885d4cb6e4c80e2af3970da07c7459a8f394551adb02a71fc4f13dc2851b
7
+ data.tar.gz: c002a19d0c7741e81660e5898a6407bebdce0f6302362600b7b767d6304b8f94c8f2223dc89575a9553480d85f7975247f8e79edac9eb68a40e89940e46ef502
data/README.md CHANGED
@@ -30,6 +30,17 @@ Include `batman-touch` and `jquery.mobile` in your `application.js` manifest:
30
30
  //= require batman-touch
31
31
  ```
32
32
 
33
+ Additionally, you can use the `clicks-to-taps` utility to modify the click
34
+ registrations to use `tap/virtual-mousedown`. This allows you to retrofit your
35
+ existing apps to be mobile-friendly.
36
+
37
+ ```js
38
+ // application.js
39
+
40
+ // ...
41
+ //= require batman-touch.clicks-to-taps
42
+ ```
43
+
33
44
  **Bring your own Batman.js**
34
45
 
35
46
  There are a number of ways you could have batman included. Just be sure to
@@ -1,7 +1,7 @@
1
1
  module Batman
2
2
  module Touch
3
3
  module Rails
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+ (function() {
2
+ Batman.DOM.primaryInteractionEventName = 'tap';
3
+
4
+ Batman.DOM.events.click = function(node, callback, view, eventName, preventDefault) {
5
+ if (eventName == null) {
6
+ eventName = 'tap';
7
+ }
8
+ if (preventDefault == null) {
9
+ preventDefault = true;
10
+ }
11
+ return Batman.DOM.events.primaryInteractionEvent(node, callback, view, eventName, preventDefault);
12
+ };
13
+
14
+ }).call(this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batman-touch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chan
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - lib/batman/touch/rails/version.rb
63
63
  - lib/batman/touch/rails.rb
64
+ - vendor/assets/javascripts/batman-touch.clicks-to-taps.js
64
65
  - vendor/assets/javascripts/batman-touch.js
65
66
  - MIT-LICENSE
66
67
  - README.md