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 +4 -4
- data/README.md +11 -0
- data/lib/batman/touch/rails/version.rb +1 -1
- data/vendor/assets/javascripts/batman-touch.clicks-to-taps.js +14 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd6c6170afba8d1c31ba86d78b65edecf8ddc84e
|
4
|
+
data.tar.gz: 92338d130f8dd9a5a3462dcad8349597ad29fdc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -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.
|
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
|