mobile-fu-for-jquery-mobile 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +113 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +102 -0
- data/MIT-LICENSE +20 -0
- data/README.md +159 -0
- data/Rakefile +77 -0
- data/app/assets/images/mobile-fu-jquery-mobile/ajax-loader.gif +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/action-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/action-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/alert-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/alert-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-l-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-l-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-r-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-r-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-d-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-l-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-l-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-r-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-r-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-l-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-l-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-r-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-r-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/arrow-u-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/audio-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/audio-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/back-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/back-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/bars-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/bars-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/bullets-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/bullets-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/calendar-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/calendar-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/camera-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/camera-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-d-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-d-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-l-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-l-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-r-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-r-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-u-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/carat-u-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/check-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/check-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/clock-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/clock-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/cloud-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/cloud-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/comment-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/comment-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/delete-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/delete-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/edit-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/edit-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/eye-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/eye-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/forbidden-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/forbidden-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/forward-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/forward-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/gear-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/gear-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/grid-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/grid-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/heart-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/heart-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/home-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/home-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/info-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/info-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/location-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/location-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/lock-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/lock-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/mail-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/mail-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/minus-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/minus-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/navigation-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/navigation-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/phone-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/phone-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/plus-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/plus-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/power-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/power-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/recycle-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/recycle-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/refresh-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/refresh-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/search-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/search-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/shop-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/shop-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/star-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/star-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/tag-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/tag-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/user-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/user-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/video-black.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-png/video-white.png +0 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/action-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/action-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/alert-black.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/alert-white.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-l-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-l-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-r-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-r-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-d-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-l-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-l-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-r-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-r-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-l-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-l-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-r-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-r-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/arrow-u-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/audio-black.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/audio-white.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/back-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/back-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/bars-black.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/bars-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/bullets-black.svg +10 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/bullets-white.svg +11 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/calendar-black.svg +39 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/calendar-white.svg +39 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/camera-black.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/camera-white.svg +10 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-d-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-d-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-l-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-l-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-r-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-r-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-u-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/carat-u-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/check-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/check-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/clock-black.svg +38 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/clock-white.svg +38 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/cloud-black.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/cloud-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/comment-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/comment-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/delete-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/delete-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/edit-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/edit-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/eye-black.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/eye-white.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/forbidden-black.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/forbidden-white.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/forward-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/forward-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/gear-black.svg +52 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/gear-white.svg +52 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/grid-black.svg +44 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/grid-white.svg +44 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/heart-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/heart-white.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/home-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/home-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/info-black.svg +38 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/info-white.svg +38 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/location-black.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/location-white.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/lock-black.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/lock-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/mail-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/mail-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/minus-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/minus-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/navigation-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/navigation-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/phone-black.svg +12 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/phone-white.svg +12 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/plus-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/plus-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/power-black.svg +12 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/power-white.svg +12 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/recycle-black.svg +8 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/recycle-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/refresh-black.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/refresh-white.svg +40 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/search-black.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/search-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/shop-black.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/shop-white.svg +9 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/star-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/star-white.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/tag-black.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/tag-white.svg +37 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/user-black.svg +41 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/user-white.svg +41 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/video-black.svg +7 -0
- data/app/assets/images/mobile-fu-jquery-mobile/icons-svg/video-white.svg +8 -0
- data/app/assets/javascripts/jquery.mobile.simpledialog2.js +380 -0
- data/app/assets/javascripts/mobile.fu.jquery.mobile.js +15057 -0
- data/app/assets/stylesheets/jquery.mobile.simpledialog.min.css +8 -0
- data/app/assets/stylesheets/mobile.fu.jquery.mobile.css.scss +4698 -0
- data/lib/mobile-fu-for-jquery-mobile.rb +204 -0
- data/lib/mobile-fu-for-jquery-mobile/helper.rb +44 -0
- data/lib/mobile-fu-for-jquery-mobile/tablet.rb +13 -0
- data/lib/mobile-fu-for-jquery-mobile/version.rb +3 -0
- data/mobile-fu-for-jquery-mobile-1.0.0.gem +0 -0
- data/mobile-fu-for-jquery-mobile.gemspec +31 -0
- metadata +335 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 50c4cc0fbf36925216cc21a6812e19df5d644e61
|
4
|
+
data.tar.gz: a8ef319e70b57b77ad3dc362e3bde3fdd06d6134
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 71ca7cdaa0b5ae01b4b062bd257edb8b879c7bec701dd939c06c6e28c7b7f124dce73139bdf895e8b35236fa5e652517765fdd476c767b18162e7a8017cd743c
|
7
|
+
data.tar.gz: 82327bb1cfd8e7fd62d0aebf8e30cf8811e0f97e4f6d83c99f5dc9c5180c2101613e0f4d70f5b4172df213249470ede36ca694b6b49f2f8972b582682807a73c
|
data/CHANGELOG
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
commit a46e0d5ff0a95407bbd8f3437a372ced53d90c9b
|
2
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
3
|
+
Date: Sat Dec 20 20:59:49 2008 -0500
|
4
|
+
|
5
|
+
Added a helper method to determine if a device is JavaScript enabled and one to output the XHTML Mobile 1.0 doctype
|
6
|
+
|
7
|
+
commit f4b29b2e2c68a79b8904dddb7a91efd4341540ee
|
8
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
9
|
+
Date: Sun Sep 21 21:39:10 2008 -0400
|
10
|
+
|
11
|
+
Fixes issue with 'in_mobile_view' instead of 'is_mobile_view' helper method
|
12
|
+
|
13
|
+
commit 29e8e8b407dd3dc8d5f3248183223d11c6a78843
|
14
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
15
|
+
Date: Wed Sep 10 12:51:12 2008 -0400
|
16
|
+
|
17
|
+
Updating CHANGELOG
|
18
|
+
|
19
|
+
commit 0aac5bd7f0d2f71e6af7b144a04a18dad9f5aca5
|
20
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
21
|
+
Date: Wed Sep 10 12:50:50 2008 -0400
|
22
|
+
|
23
|
+
Styling overrides for iPods
|
24
|
+
|
25
|
+
commit f30c97c794ba74e737856aa9226328469c8395b6
|
26
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
27
|
+
Date: Mon Sep 8 00:07:27 2008 -0400
|
28
|
+
|
29
|
+
Adding in some comments to the latest changes
|
30
|
+
|
31
|
+
commit 78dae861e46d383356d7e4d6dfdaefbf60072e27
|
32
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
33
|
+
Date: Mon Sep 8 00:06:16 2008 -0400
|
34
|
+
|
35
|
+
Updating README
|
36
|
+
|
37
|
+
commit 1a66ccd2142e387f6d3138acb688a58df4687fcd
|
38
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
39
|
+
Date: Mon Sep 8 00:05:48 2008 -0400
|
40
|
+
|
41
|
+
Adding in a helper method to check for a specific mobile device and adding in 'ipod' to the list of mobile user agents
|
42
|
+
|
43
|
+
commit cbb26fff3287e16a757ee2aed2dcc8e98cbfb369
|
44
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
45
|
+
Date: Fri Aug 22 22:16:19 2008 -0400
|
46
|
+
|
47
|
+
Updating the CHANGELOG
|
48
|
+
|
49
|
+
commit ee49945b593b1c55bf546da1d595a0941d071f94
|
50
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
51
|
+
Date: Fri Aug 22 22:16:00 2008 -0400
|
52
|
+
|
53
|
+
Updating README
|
54
|
+
|
55
|
+
commit 02c12a8563466f7cef6aba8e53915dc2efec908c
|
56
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
57
|
+
Date: Mon Aug 18 16:08:51 2008 -0400
|
58
|
+
|
59
|
+
Adding in support for Android
|
60
|
+
|
61
|
+
commit 2dffa5958905c0419288d03a0650127a0734b41a
|
62
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
63
|
+
Date: Sat Jul 26 14:08:56 2008 -0400
|
64
|
+
|
65
|
+
Adding in other phone user agents, including some Japanese and French manufacturers
|
66
|
+
|
67
|
+
commit e8f9f1a9c2e668d639690f4f1beb4f701f742cfa
|
68
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
69
|
+
Date: Fri Jul 18 11:15:52 2008 -0400
|
70
|
+
|
71
|
+
Adding in CHANGELOG
|
72
|
+
|
73
|
+
commit a3122b40c0c722b2942e9cb5341614d0e0d834a5
|
74
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
75
|
+
Date: Fri Jul 18 11:14:35 2008 -0400
|
76
|
+
|
77
|
+
Changes to README
|
78
|
+
|
79
|
+
commit 64a24e36b6a770757963eb2d961262fb8a14ec1b
|
80
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
81
|
+
Date: Fri Jul 18 11:10:40 2008 -0400
|
82
|
+
|
83
|
+
Quick fix
|
84
|
+
|
85
|
+
commit 116fa5b7c1168471cf56cb9961b98f0b73fc3308
|
86
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
87
|
+
Date: Fri Jul 18 10:04:41 2008 -0400
|
88
|
+
|
89
|
+
Fixed issue with mobile view session variable getting set incorrectly, when forcing mobile format
|
90
|
+
|
91
|
+
commit d172665c9d0458801fd672076e269a3c0ee9d80d
|
92
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
93
|
+
Date: Fri Jul 18 01:04:19 2008 -0400
|
94
|
+
|
95
|
+
Adding in more MIT license goodness
|
96
|
+
|
97
|
+
commit a6c947d684d2d9abdbe354dc1ea757f23cd5a633
|
98
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
99
|
+
Date: Fri Jul 18 01:00:55 2008 -0400
|
100
|
+
|
101
|
+
Change to the README
|
102
|
+
|
103
|
+
commit dad4f4db1f3cb816283069a91c01982c953ff8a5
|
104
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
105
|
+
Date: Fri Jul 18 01:00:16 2008 -0400
|
106
|
+
|
107
|
+
Change to the README
|
108
|
+
|
109
|
+
commit c5ec9de6ef19e48a66917d8f6f3a59771295765b
|
110
|
+
Author: Brendan G. Lim <brendan@intridea.com>
|
111
|
+
Date: Fri Jul 18 00:59:36 2008 -0400
|
112
|
+
|
113
|
+
Releasing Mobile Fu to the world
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mobile-fu (1.3.1)
|
5
|
+
rack-mobile-detect
|
6
|
+
rails
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.0.2)
|
12
|
+
actionpack (= 4.0.2)
|
13
|
+
mail (~> 2.5.4)
|
14
|
+
actionpack (4.0.2)
|
15
|
+
activesupport (= 4.0.2)
|
16
|
+
builder (~> 3.1.0)
|
17
|
+
erubis (~> 2.7.0)
|
18
|
+
rack (~> 1.5.2)
|
19
|
+
rack-test (~> 0.6.2)
|
20
|
+
activemodel (4.0.2)
|
21
|
+
activesupport (= 4.0.2)
|
22
|
+
builder (~> 3.1.0)
|
23
|
+
activerecord (4.0.2)
|
24
|
+
activemodel (= 4.0.2)
|
25
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
26
|
+
activesupport (= 4.0.2)
|
27
|
+
arel (~> 4.0.0)
|
28
|
+
activerecord-deprecated_finders (1.0.3)
|
29
|
+
activesupport (4.0.2)
|
30
|
+
i18n (~> 0.6, >= 0.6.4)
|
31
|
+
minitest (~> 4.2)
|
32
|
+
multi_json (~> 1.3)
|
33
|
+
thread_safe (~> 0.1)
|
34
|
+
tzinfo (~> 0.3.37)
|
35
|
+
arel (4.0.1)
|
36
|
+
atomic (1.1.14)
|
37
|
+
builder (3.1.4)
|
38
|
+
erubis (2.7.0)
|
39
|
+
hike (1.2.3)
|
40
|
+
httparty (0.11.0)
|
41
|
+
multi_json (~> 1.0)
|
42
|
+
multi_xml (>= 0.5.2)
|
43
|
+
i18n (0.6.9)
|
44
|
+
json (1.6.4)
|
45
|
+
mail (2.5.4)
|
46
|
+
mime-types (~> 1.16)
|
47
|
+
treetop (~> 1.4.8)
|
48
|
+
metaclass (0.0.2)
|
49
|
+
mime-types (1.25.1)
|
50
|
+
minitest (4.7.5)
|
51
|
+
mocha (1.0.0)
|
52
|
+
metaclass (~> 0.0.1)
|
53
|
+
multi_json (1.8.4)
|
54
|
+
multi_xml (0.5.5)
|
55
|
+
polyglot (0.3.3)
|
56
|
+
rack (1.5.2)
|
57
|
+
rack-mobile-detect (0.4.0)
|
58
|
+
rack
|
59
|
+
rack-test (0.6.2)
|
60
|
+
rack (>= 1.0)
|
61
|
+
rails (4.0.2)
|
62
|
+
actionmailer (= 4.0.2)
|
63
|
+
actionpack (= 4.0.2)
|
64
|
+
activerecord (= 4.0.2)
|
65
|
+
activesupport (= 4.0.2)
|
66
|
+
bundler (>= 1.3.0, < 2.0)
|
67
|
+
railties (= 4.0.2)
|
68
|
+
sprockets-rails (~> 2.0.0)
|
69
|
+
railties (4.0.2)
|
70
|
+
actionpack (= 4.0.2)
|
71
|
+
activesupport (= 4.0.2)
|
72
|
+
rake (>= 0.8.7)
|
73
|
+
thor (>= 0.18.1, < 2.0)
|
74
|
+
rake (10.1.1)
|
75
|
+
rdoc (3.12)
|
76
|
+
json (~> 1.4)
|
77
|
+
sprockets (2.10.1)
|
78
|
+
hike (~> 1.2)
|
79
|
+
multi_json (~> 1.0)
|
80
|
+
rack (~> 1.0)
|
81
|
+
tilt (~> 1.1, != 1.3.0)
|
82
|
+
sprockets-rails (2.0.1)
|
83
|
+
actionpack (>= 3.0)
|
84
|
+
activesupport (>= 3.0)
|
85
|
+
sprockets (~> 2.8)
|
86
|
+
thor (0.18.1)
|
87
|
+
thread_safe (0.1.3)
|
88
|
+
atomic
|
89
|
+
tilt (1.4.1)
|
90
|
+
treetop (1.4.15)
|
91
|
+
polyglot
|
92
|
+
polyglot (>= 0.3.1)
|
93
|
+
tzinfo (0.3.38)
|
94
|
+
|
95
|
+
PLATFORMS
|
96
|
+
ruby
|
97
|
+
|
98
|
+
DEPENDENCIES
|
99
|
+
httparty
|
100
|
+
mobile-fu!
|
101
|
+
mocha
|
102
|
+
rdoc
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 Brendan G. Lim, Intridea, Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
Mobile Fu
|
2
|
+
=========
|
3
|
+
|
4
|
+
Want to automatically detect mobile devices that access your Rails application?
|
5
|
+
Mobile Fu allows you to do just that. People can access your site from a Palm,
|
6
|
+
Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format
|
7
|
+
of the request from :html to :mobile or :tablet.
|
8
|
+
|
9
|
+
Installation
|
10
|
+
------------
|
11
|
+
|
12
|
+
Simply add `gem 'mobile-fu-for-jquery-mobile'` to your Gemfile and run bundle install.
|
13
|
+
|
14
|
+
Usage
|
15
|
+
-----
|
16
|
+
|
17
|
+
Add this this one line to the controller.
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
class ApplicationController < ActionController::Base
|
21
|
+
has_mobile_fu
|
22
|
+
end
|
23
|
+
```
|
24
|
+
|
25
|
+
Once this is in place, any request that comes from a mobile device will be
|
26
|
+
set as :mobile format. It is up to you to determine how you want to handle
|
27
|
+
these requests. It is also up to you to create the .mobile.erb versions of
|
28
|
+
your views that are to be requested.
|
29
|
+
|
30
|
+
If you do not want to set the format to :mobile or :tablet and only use the
|
31
|
+
helper functions, pass false as an argument.
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
class ApplicationController < ActionController::Base
|
35
|
+
has_mobile_fu false
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
If you dont want to have all the methods respond to :mobile and :tablet, you can opt-in this actions
|
40
|
+
using the following class method: `has_mobile_fu_for :action`
|
41
|
+
Example:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
class YourAwesomeClass < ActionController::Base
|
45
|
+
has_mobile_fu
|
46
|
+
has_mobile_fu_for :index
|
47
|
+
|
48
|
+
def index
|
49
|
+
# Mobile format will be set as normal here if user is on a mobile device
|
50
|
+
end
|
51
|
+
|
52
|
+
def another_method
|
53
|
+
# Mobile format will not be set, even if user is on a mobile device
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
Mobile Fu automatically adds a new `:mobile` and `:tablet` to `text/html` mime type
|
58
|
+
alias for Rails apps. If you already have a custom `:mobile` alias registered in
|
59
|
+
`config/initializers/mime_types.rb`, you can remove that.
|
60
|
+
|
61
|
+
I recommend that you setup a before_filter that will redirect to a specific page
|
62
|
+
depending on whether or not it is a mobile request. How can you check this?
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
is_mobile_device? # => Returns true or false depending on the device or
|
66
|
+
|
67
|
+
is_tablet_device? # => Returns true if the device is a tablet
|
68
|
+
```
|
69
|
+
|
70
|
+
You can also determine which format is currently set in by calling the following:
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
in_mobile_view? # => Returns true or false depending on current req. format or
|
74
|
+
|
75
|
+
in_tablet_view? # => Returns true if the current req. format is for tablet view
|
76
|
+
```
|
77
|
+
|
78
|
+
Also, if you want the ability to allow a user to switch between 'mobile' and
|
79
|
+
'standard' format (:html), you can just adjust the mobile_view session variable
|
80
|
+
in a custom controller action.
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
session[:mobile_view] # => Set to true if request format is :mobile and false
|
84
|
+
if set to :html
|
85
|
+
|
86
|
+
session[:tablet_view] # => Set to true if request format is :tablet and false
|
87
|
+
if set to :html
|
88
|
+
```
|
89
|
+
|
90
|
+
If you want to use the default response templates, like index.html.erb, instead of the index.tablet.erb you can
|
91
|
+
exclude the tablet rendering from beeing used:
|
92
|
+
you can create a `before_filter` and put it before the has_mobile_fu call
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
before_filter :force_tablet_html
|
96
|
+
has_mobile_fu
|
97
|
+
|
98
|
+
def force_tablet_html
|
99
|
+
session[:tablet_view] = false
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
Same will work for mobile, just change the `tablet` values to `mobile`
|
104
|
+
|
105
|
+
So, different devices need different styling. Don't worry, we've got this
|
106
|
+
baked in to Mobile Fu.
|
107
|
+
|
108
|
+
If you are including a css or sass file via `stylesheet_link_tag`, all you have
|
109
|
+
to do is add _device to the name of one of your files to override your styling
|
110
|
+
for a certain device. The stylesheet that is loaded is dependant on which device
|
111
|
+
is making the request.
|
112
|
+
|
113
|
+
e.g., Accessing a page from a Blackberry.
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
stylesheet_link_tag 'mobile.css'
|
117
|
+
```
|
118
|
+
|
119
|
+
This loads mobile.css, and mobile_blackberry.css if the file exists.
|
120
|
+
|
121
|
+
Supported stylesheet override device extensions at the moment are:
|
122
|
+
|
123
|
+
* blackberry
|
124
|
+
* iphone (iphone,ipod)
|
125
|
+
* ipad
|
126
|
+
* android
|
127
|
+
* mobileexplorer
|
128
|
+
* nokia
|
129
|
+
* palm
|
130
|
+
|
131
|
+
The stylesheet awesomeness was derived from [Michael Bleigh's browserized styles](http://www.intridea.com/2007/12/9/announcing-browserized-styles)
|
132
|
+
|
133
|
+
Inspiration for Mobile Fu came from [Noel Rappin's rails_iui](http://blogs.pathf.com/agileajax/2008/05/rails-developme.html)
|
134
|
+
|
135
|
+
Hopefully this should help you create some awesome mobile applications.
|
136
|
+
|
137
|
+
Testing Mobile Interface
|
138
|
+
------------------------
|
139
|
+
|
140
|
+
If you want to force the mobile interface for testing, you can either use a
|
141
|
+
mobile device emulator, or you can call `force_mobile_format` in a before filter.
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
class ApplicationController < ActionController::Base
|
145
|
+
has_mobile_fu
|
146
|
+
before_filter :force_mobile_format
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
150
|
+
You can also force the tablet view by calling `force_tablet_format` instead
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
class ApplicationController < ActionController::Base
|
154
|
+
has_mobile_fu
|
155
|
+
before_filter :force_tablet_format
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
Copyright (c) 2008 Brendan G. Lim, Intridea, Inc., released under the MIT license
|
data/Rakefile
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'json'
|
4
|
+
require 'httparty'
|
5
|
+
|
6
|
+
MOBILE_DETECT_JSON = 'https://raw.github.com/serbanghita/Mobile-Detect/master/Mobile_Detect.json'
|
7
|
+
TABLET_FILE = 'lib/mobile-fu/tablet.rb'
|
8
|
+
|
9
|
+
task :default => [:test]
|
10
|
+
|
11
|
+
Rake::TestTask.new do |t|
|
12
|
+
t.libs.push 'lib'
|
13
|
+
t.test_files = FileList['spec/*_spec.rb', 'spec/mobile-fu/*_spec.rb']
|
14
|
+
t.verbose = true
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Pull in data from Mobile Detect"
|
18
|
+
task :pull_mobile_detect_data do
|
19
|
+
|
20
|
+
# call out to Mobile Detect to get the data
|
21
|
+
content = HTTParty.get(MOBILE_DETECT_JSON).body
|
22
|
+
|
23
|
+
# build a new tablet regex
|
24
|
+
data = JSON.parse content
|
25
|
+
regexes = data['uaMatch']['tablets'].each.map { |_, v| v }
|
26
|
+
new_regex = regexes.join('|').downcase
|
27
|
+
|
28
|
+
# rewrite the tablet regex in our file
|
29
|
+
new_content = File.read(TABLET_FILE).gsub!(/TABLET_USER_AGENTS = \/.*\//, "TABLET_USER_AGENTS = \/#{new_regex}\/")
|
30
|
+
File.open(TABLET_FILE, 'w') { |f| f.write new_content }
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
# desc 'Generate documentation for the mobile_fu plugin.'
|
36
|
+
# Rake::RDocTask.new(:rdoc) do |rdoc|
|
37
|
+
# rdoc.rdoc_dir = 'rdoc'
|
38
|
+
# rdoc.title = 'MobileFu'
|
39
|
+
# rdoc.options << '--line-numbers' << '--inline-source'
|
40
|
+
# rdoc.rdoc_files.include('README')
|
41
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
42
|
+
# end
|
43
|
+
|
44
|
+
desc "Update asset files for Rails"
|
45
|
+
task :update_assets do
|
46
|
+
|
47
|
+
Dir.glob(File.join('app/assets/stylesheets', '*.css')).each do |css_file_name|
|
48
|
+
# rename css file
|
49
|
+
css_file_name_out = css_file_name.split('-').first + '.css.scss'
|
50
|
+
File.rename(css_file_name, css_file_name_out)
|
51
|
+
# update image reference
|
52
|
+
file_content = ''
|
53
|
+
File.open(css_file_name_out, "r:UTF-8") do |file|
|
54
|
+
file_content = file.read
|
55
|
+
end
|
56
|
+
file_content.gsub! /url\(images\/icons-png\/([A-Za-z0-9_-]*\.)(png|gif)\)/ do
|
57
|
+
"image-url(\"jquery-mobile/icons-png/#{$1}#{$2}\")"
|
58
|
+
end
|
59
|
+
file_content.gsub! /url\(images\/([A-Za-z0-9_-]*\.)(png|gif)\)/ do
|
60
|
+
"image-url(\"jquery-mobile/#{$1}#{$2}\")"
|
61
|
+
end
|
62
|
+
File.open(css_file_name_out, 'w') do |file|
|
63
|
+
file << file_content
|
64
|
+
end
|
65
|
+
puts "Renamed and updated #{css_file_name_out}"
|
66
|
+
end
|
67
|
+
|
68
|
+
Dir.glob(File.join('app/assets/javascripts', '*.js')).each do |js_file_name|
|
69
|
+
# rename js file
|
70
|
+
if js_file_name.include? "-"
|
71
|
+
js_file_name_out = js_file_name.split('-').first + '.js'
|
72
|
+
File.rename(js_file_name, js_file_name_out)
|
73
|
+
puts "Renamed #{js_file_name_out}"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|