jqmobile_helpers 0.0.1

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.
Files changed (128) hide show
  1. data/Gemfile +13 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +6 -0
  4. data/Rakefile +29 -0
  5. data/lib/jqmobile_helpers.rb +1 -0
  6. data/lib/jqmobile_helpers/action_view_extensions/form_helper.rb +54 -0
  7. data/lib/jqmobile_helpers/buttons_helper.rb +639 -0
  8. data/lib/jqmobile_helpers/form_builder.rb +301 -0
  9. data/lib/jqmobile_helpers/list_views_helper.rb +326 -0
  10. data/lib/jqmobile_helpers/railtie.rb +23 -0
  11. data/lib/jqmobile_helpers/toolbars_helper.rb +115 -0
  12. data/rdoc/JqmobileHelpers.html +185 -0
  13. data/rdoc/JqmobileHelpers/ActionViewExtensions.html +160 -0
  14. data/rdoc/JqmobileHelpers/ActionViewExtensions/FormHelper.html +231 -0
  15. data/rdoc/JqmobileHelpers/ButtonsHelper.html +1502 -0
  16. data/rdoc/JqmobileHelpers/FormBuilder.html +816 -0
  17. data/rdoc/JqmobileHelpers/ListViewsHelper.html +952 -0
  18. data/rdoc/JqmobileHelpers/Railtie.html +177 -0
  19. data/rdoc/JqmobileHelpers/ToolbarsHelper.html +416 -0
  20. data/rdoc/README_rdoc.html +109 -0
  21. data/rdoc/created.rid +9 -0
  22. data/rdoc/index.html +180 -0
  23. data/rdoc/js/darkfish.js +116 -0
  24. data/rdoc/js/jquery.js +32 -0
  25. data/rdoc/js/quicksearch.js +114 -0
  26. data/rdoc/js/thickbox-compressed.js +10 -0
  27. data/rdoc/lib/jqmobile_helpers/action_view_extensions/form_helper_rb.html +52 -0
  28. data/rdoc/lib/jqmobile_helpers/buttons_helper_rb.html +52 -0
  29. data/rdoc/lib/jqmobile_helpers/form_builder_rb.html +52 -0
  30. data/rdoc/lib/jqmobile_helpers/list_views_helper_rb.html +52 -0
  31. data/rdoc/lib/jqmobile_helpers/railtie_rb.html +62 -0
  32. data/rdoc/lib/jqmobile_helpers/toolbars_helper_rb.html +52 -0
  33. data/rdoc/lib/jqmobile_helpers_rb.html +54 -0
  34. data/rdoc/rdoc.css +706 -0
  35. data/test/buttons_helper_test.rb +112 -0
  36. data/test/dummy/Rakefile +7 -0
  37. data/test/dummy/app/controllers/application_controller.rb +3 -0
  38. data/test/dummy/app/controllers/buttons_controller.rb +9 -0
  39. data/test/dummy/app/controllers/forms_controller.rb +71 -0
  40. data/test/dummy/app/controllers/posts_controller.rb +83 -0
  41. data/test/dummy/app/controllers/toolbars_controller.rb +16 -0
  42. data/test/dummy/app/helpers/application_helper.rb +2 -0
  43. data/test/dummy/app/helpers/posts_helper.rb +2 -0
  44. data/test/dummy/app/helpers/toolbars_helper.rb +2 -0
  45. data/test/dummy/app/models/post.rb +2 -0
  46. data/test/dummy/app/models/toolbar.rb +2 -0
  47. data/test/dummy/app/views/buttons/index.html.erb +168 -0
  48. data/test/dummy/app/views/forms/_form.html.erb +20 -0
  49. data/test/dummy/app/views/forms/edit.html.erb +6 -0
  50. data/test/dummy/app/views/forms/index.html.erb +7 -0
  51. data/test/dummy/app/views/forms/new.html.erb +5 -0
  52. data/test/dummy/app/views/forms/show.html.erb +24 -0
  53. data/test/dummy/app/views/layouts/application.html.erb +49 -0
  54. data/test/dummy/app/views/posts/_form.html.erb +29 -0
  55. data/test/dummy/app/views/posts/edit.html.erb +6 -0
  56. data/test/dummy/app/views/posts/index.html.erb +128 -0
  57. data/test/dummy/app/views/posts/new.html.erb +5 -0
  58. data/test/dummy/app/views/posts/show.html.erb +24 -0
  59. data/test/dummy/app/views/toolbars/index.html.erb +25 -0
  60. data/test/dummy/config.ru +4 -0
  61. data/test/dummy/config/application.rb +45 -0
  62. data/test/dummy/config/boot.rb +10 -0
  63. data/test/dummy/config/database.yml +22 -0
  64. data/test/dummy/config/environment.rb +5 -0
  65. data/test/dummy/config/environments/development.rb +26 -0
  66. data/test/dummy/config/environments/production.rb +49 -0
  67. data/test/dummy/config/environments/test.rb +35 -0
  68. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  69. data/test/dummy/config/initializers/inflections.rb +10 -0
  70. data/test/dummy/config/initializers/mime_types.rb +5 -0
  71. data/test/dummy/config/initializers/secret_token.rb +7 -0
  72. data/test/dummy/config/initializers/session_store.rb +8 -0
  73. data/test/dummy/config/locales/en.yml +5 -0
  74. data/test/dummy/config/routes.rb +69 -0
  75. data/test/dummy/db/development.sqlite3 +0 -0
  76. data/test/dummy/db/migrate/20110218095442_create_posts.rb +15 -0
  77. data/test/dummy/db/migrate/20110223031713_create_toolbars.rb +12 -0
  78. data/test/dummy/db/schema.rb +29 -0
  79. data/test/dummy/db/test.sqlite3 +0 -0
  80. data/test/dummy/log/development.log +7446 -0
  81. data/test/dummy/log/production.log +0 -0
  82. data/test/dummy/log/server.log +0 -0
  83. data/test/dummy/log/test.log +2278 -0
  84. data/test/dummy/public/404.html +26 -0
  85. data/test/dummy/public/422.html +26 -0
  86. data/test/dummy/public/500.html +26 -0
  87. data/test/dummy/public/favicon.ico +0 -0
  88. data/test/dummy/public/images/ajax-loader.png +0 -0
  89. data/test/dummy/public/images/form-check-off.png +0 -0
  90. data/test/dummy/public/images/form-check-on.png +0 -0
  91. data/test/dummy/public/images/form-radio-off.png +0 -0
  92. data/test/dummy/public/images/form-radio-on.png +0 -0
  93. data/test/dummy/public/images/icon-search-black.png +0 -0
  94. data/test/dummy/public/images/icons-18-black.png +0 -0
  95. data/test/dummy/public/images/icons-18-white.png +0 -0
  96. data/test/dummy/public/images/icons-36-black.png +0 -0
  97. data/test/dummy/public/images/icons-36-white.png +0 -0
  98. data/test/dummy/public/javascripts/application.js +2 -0
  99. data/test/dummy/public/javascripts/jquery-1.5.min.js +8176 -0
  100. data/test/dummy/public/javascripts/jquery-ui-1.8.9.custom.min.js +781 -0
  101. data/test/dummy/public/javascripts/jquery.mobile-1.0a3.min.js +121 -0
  102. data/test/dummy/public/javascripts/rails.js +175 -0
  103. data/test/dummy/public/stylesheets/images/ajax-loader.png +0 -0
  104. data/test/dummy/public/stylesheets/images/form-check-off.png +0 -0
  105. data/test/dummy/public/stylesheets/images/form-check-on.png +0 -0
  106. data/test/dummy/public/stylesheets/images/form-radio-off.png +0 -0
  107. data/test/dummy/public/stylesheets/images/form-radio-on.png +0 -0
  108. data/test/dummy/public/stylesheets/images/icon-search-black.png +0 -0
  109. data/test/dummy/public/stylesheets/images/icons-18-black.png +0 -0
  110. data/test/dummy/public/stylesheets/images/icons-18-white.png +0 -0
  111. data/test/dummy/public/stylesheets/images/icons-36-black.png +0 -0
  112. data/test/dummy/public/stylesheets/images/icons-36-white.png +0 -0
  113. data/test/dummy/public/stylesheets/jquery-ui-1.8.9.custom.css +573 -0
  114. data/test/dummy/public/stylesheets/jquery.mobile-1.0a3.min.css +16 -0
  115. data/test/dummy/public/stylesheets/scaffold.css +56 -0
  116. data/test/dummy/script/rails +6 -0
  117. data/test/dummy/tmp/pids/server.pid +1 -0
  118. data/test/form_helper_test.rb +13 -0
  119. data/test/integration/navigation_test.rb +7 -0
  120. data/test/list_views_helper_test.rb +65 -0
  121. data/test/support/integration_case.rb +5 -0
  122. data/test/support/misc_helpers.rb +18 -0
  123. data/test/support/mock_controller.rb +15 -0
  124. data/test/support/mock_response.rb +14 -0
  125. data/test/support/models.rb +135 -0
  126. data/test/test_helper.rb +92 -0
  127. data/test/toolbars_helper_test.rb +21 -0
  128. metadata +182 -0
@@ -0,0 +1,112 @@
1
+ require 'test_helper'
2
+
3
+ class ButtonsHelperTest < ActiveSupport::TestCase
4
+ include JqmobileHelpers::ButtonsHelper
5
+
6
+ test "button link helper" do
7
+ jq_button_link = button_link("New Post", "http://google.com",{'data-theme' => 'c', 'data-icon' => 'plus', 'data-iconpos' => 'right'})
8
+ assert_equal "<a data-icon=\"plus\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">New Post</a>", jq_button_link
9
+ end
10
+
11
+ test "delete button link helper" do
12
+ jq_delete_button_link = delete_button_link("Delete", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
13
+ assert_equal "<a data-icon=\"delete\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Delete</a>", jq_delete_button_link
14
+ end
15
+
16
+ test "left button link helper" do
17
+ jq_left_button_link = left_button_link("Back", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'left'})
18
+ assert_equal "<a data-icon=\"arrow-l\" data-iconpos=\"left\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Back</a>", jq_left_button_link
19
+ end
20
+
21
+ test "right button link helper" do
22
+ jq_right_button_link = right_button_link("Proceed", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
23
+ assert_equal "<a data-icon=\"arrow-r\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Proceed</a>", jq_right_button_link
24
+ end
25
+
26
+ test "up button link helper" do
27
+ jq_up_button_link = up_button_link("Top", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'top'})
28
+ assert_equal "<a data-icon=\"arrow-u\" data-iconpos=\"top\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Top</a>", jq_up_button_link
29
+ end
30
+
31
+ test "down button link helper" do
32
+ jq_down_button_link = down_button_link("bottom", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'bottom'})
33
+ assert_equal "<a data-icon=\"arrow-d\" data-iconpos=\"bottom\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">bottom</a>", jq_down_button_link
34
+ end
35
+
36
+ test "plus button link helper" do
37
+ jq_plus_button_link = plus_button_link("Add as friend", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
38
+ assert_equal "<a data-icon=\"plus\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Add as friend</a>", jq_plus_button_link
39
+ end
40
+
41
+ test "minus button link helper" do
42
+ jq_minus_button_link = minus_button_link("Remove friend", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
43
+ assert_equal "<a data-icon=\"minus\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Remove friend</a>", jq_minus_button_link
44
+ end
45
+
46
+ test "check button link helper" do
47
+ jq_check_button_link = check_button_link("Check", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
48
+ assert_equal "<a data-icon=\"check\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">Check</a>", jq_check_button_link
49
+ end
50
+
51
+ test "gear button link helper" do
52
+ jq_gear_button_link = gear_button_link("gear", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
53
+ assert_equal "<a data-icon=\"gear\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">gear</a>", jq_gear_button_link
54
+ end
55
+
56
+ test "refresh button link helper" do
57
+ jq_refresh_button_link = refresh_button_link("refresh", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
58
+ assert_equal "<a data-icon=\"refresh\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">refresh</a>", jq_refresh_button_link
59
+ end
60
+
61
+ test "forward button link helper" do
62
+ jq_forward_button_link = forward_button_link("forward", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
63
+ assert_equal "<a data-icon=\"forward\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">forward</a>", jq_forward_button_link
64
+ end
65
+
66
+ test "back button link helper" do
67
+ jq_back_button_link = back_button_link("back", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
68
+ assert_equal "<a data-icon=\"back\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">back</a>", jq_back_button_link
69
+ end
70
+
71
+ test "grid button link helper" do
72
+ jq_grid_button_link = grid_button_link("grid", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
73
+ assert_equal "<a data-icon=\"grid\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">grid</a>", jq_grid_button_link
74
+ end
75
+
76
+ test "star button link helper" do
77
+ jq_star_button_link = star_button_link("star", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
78
+ assert_equal "<a data-icon=\"star\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">star</a>", jq_star_button_link
79
+ end
80
+
81
+ test "alert button link helper" do
82
+ jq_alert_button_link = alert_button_link("alert", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
83
+ assert_equal "<a data-icon=\"alert\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">alert</a>", jq_alert_button_link
84
+ end
85
+
86
+ test "info button link helper" do
87
+ jq_info_button_link = info_button_link("info", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
88
+ assert_equal "<a data-icon=\"info\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">info</a>", jq_info_button_link
89
+ end
90
+
91
+ test "home button link helper" do
92
+ jq_home_button_link = home_button_link("home", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
93
+ assert_equal "<a data-icon=\"home\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">home</a>", jq_home_button_link
94
+ end
95
+
96
+ test "search button link helper" do
97
+ jq_search_button_link = search_button_link("search", "http://google.com",{'data-theme' => 'c', 'data-iconpos' => 'right'})
98
+ assert_equal "<a data-icon=\"search\" data-iconpos=\"right\" data-role=\"button\" data-theme=\"c\" href=\"http://google.com\">search</a>", jq_search_button_link
99
+ end
100
+
101
+ test "group button helper" do
102
+ jq_group_button = group_button("<a data-icon=\"home\" data-iconpos=\"right\" data-role=\"button\" href=\"/buttons\">home</a>",{'data-type' => 'horizontal'})
103
+ assert_equal "<div data-role=\"controlgroup\" data-type=\"horizontal\"><a data-icon=\"home\" data-iconpos=\"right\" data-role=\"button\" href=\"/buttons\">home</a></div>", jq_group_button
104
+ end
105
+
106
+ test "inline button helper" do
107
+ jq_inline_button = inline_button("<a data-icon=\"home\" data-iconpos=\"right\" data-role=\"button\" href=\"/buttons\">home</a>")
108
+ assert_equal "<div data-inline=\"true\" data-role=\"controlgroup\" data-type=\"horizontal\"><a data-icon=\"home\" data-iconpos=\"right\" data-role=\"button\" href=\"/buttons\">home</a></div>", jq_inline_button
109
+ end
110
+
111
+ end
112
+
@@ -0,0 +1,7 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+ require 'rake'
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,9 @@
1
+ class ButtonsController < ApplicationController
2
+ # GET /buttons
3
+ # GET /buttons.xml
4
+ def index
5
+
6
+ end
7
+
8
+ end
9
+
@@ -0,0 +1,71 @@
1
+ class FormsController < ApplicationController
2
+ def index
3
+ @posts = Post.all
4
+
5
+ respond_to do |format|
6
+ format.html # index.html.erb
7
+ format.xml { render :xml => @posts }
8
+ end
9
+ end
10
+
11
+ def show
12
+ @post = Post.find(params[:id])
13
+
14
+ respond_to do |format|
15
+ format.html # show.html.erb
16
+ format.xml { render :xml => @post }
17
+ end
18
+ end
19
+
20
+ def new
21
+ @post = Post.new
22
+
23
+ respond_to do |format|
24
+ format.html # new.html.erb
25
+ format.xml { render :xml => @post }
26
+ end
27
+ end
28
+
29
+ def edit
30
+ @post = Post.find(params[:id])
31
+ end
32
+
33
+ def create
34
+ @post = Post.new(params[:post])
35
+
36
+ respond_to do |format|
37
+ if @post.save
38
+ format.html { redirect_to(@post, :notice => 'Post was successfully created.') }
39
+ format.xml { render :xml => @post, :status => :created, :location => @post }
40
+ else
41
+ format.html { render :action => "new" }
42
+ format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
43
+ end
44
+ end
45
+ end
46
+
47
+ def update
48
+ @post = Post.find(params[:id])
49
+
50
+ respond_to do |format|
51
+ if @post.update_attributes(params[:post])
52
+ format.html { redirect_to(@post, :notice => 'Post was successfully updated.') }
53
+ format.xml { head :ok }
54
+ else
55
+ format.html { render :action => "edit" }
56
+ format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
57
+ end
58
+ end
59
+ end
60
+
61
+ def destroy
62
+ @post = Post.find(params[:id])
63
+ @post.destroy
64
+
65
+ respond_to do |format|
66
+ format.html { redirect_to(posts_url) }
67
+ format.xml { head :ok }
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,83 @@
1
+ class PostsController < ApplicationController
2
+ # GET /posts
3
+ # GET /posts.xml
4
+ def index
5
+ @posts = Post.all
6
+
7
+ respond_to do |format|
8
+ format.html # index.html.erb
9
+ format.xml { render :xml => @posts }
10
+ end
11
+ end
12
+
13
+ # GET /posts/1
14
+ # GET /posts/1.xml
15
+ def show
16
+ @post = Post.find(params[:id])
17
+
18
+ respond_to do |format|
19
+ format.html # show.html.erb
20
+ format.xml { render :xml => @post }
21
+ end
22
+ end
23
+
24
+ # GET /posts/new
25
+ # GET /posts/new.xml
26
+ def new
27
+ @post = Post.new
28
+
29
+ respond_to do |format|
30
+ format.html # new.html.erb
31
+ format.xml { render :xml => @post }
32
+ end
33
+ end
34
+
35
+ # GET /posts/1/edit
36
+ def edit
37
+ @post = Post.find(params[:id])
38
+ end
39
+
40
+ # POST /posts
41
+ # POST /posts.xml
42
+ def create
43
+ @post = Post.new(params[:post])
44
+
45
+ respond_to do |format|
46
+ if @post.save
47
+ format.html { redirect_to(@post, :notice => 'Post was successfully created.') }
48
+ format.xml { render :xml => @post, :status => :created, :location => @post }
49
+ else
50
+ format.html { render :action => "new" }
51
+ format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
52
+ end
53
+ end
54
+ end
55
+
56
+ # PUT /posts/1
57
+ # PUT /posts/1.xml
58
+ def update
59
+ @post = Post.find(params[:id])
60
+
61
+ respond_to do |format|
62
+ if @post.update_attributes(params[:post])
63
+ format.html { redirect_to(@post, :notice => 'Post was successfully updated.') }
64
+ format.xml { head :ok }
65
+ else
66
+ format.html { render :action => "edit" }
67
+ format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
68
+ end
69
+ end
70
+ end
71
+
72
+ # DELETE /posts/1
73
+ # DELETE /posts/1.xml
74
+ def destroy
75
+ @post = Post.find(params[:id])
76
+ @post.destroy
77
+
78
+ respond_to do |format|
79
+ format.html { redirect_to(posts_url) }
80
+ format.xml { head :ok }
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,16 @@
1
+ class ToolbarsController < ApplicationController
2
+
3
+ # GET /toolbars
4
+ # GET /toolbars.xml
5
+ def index
6
+ @toolbars = Toolbar.all
7
+
8
+ respond_to do |format|
9
+ format.html # index.html.erb
10
+ format.xml { render :xml => @toolbars }
11
+ end
12
+ end
13
+
14
+
15
+
16
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module PostsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module ToolbarsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class Post < ActiveRecord::Base
2
+ end
@@ -0,0 +1,2 @@
1
+ class Toolbar < ActiveRecord::Base
2
+ end
@@ -0,0 +1,168 @@
1
+ <% content_for :header do %>
2
+ <h1>Buttons Helper</h1>
3
+ <% end %>
4
+ <h1>Buttons Helper</h1>
5
+
6
+ <h2>Link Buttons</h2>
7
+
8
+ <br />
9
+
10
+ <h4>Button Link</h4>
11
+ <p>data-role = "button" is default</p>
12
+ <%= button_link 'New Post', new_post_path %>
13
+ <p>Set data-theme = "a", data-icon = "plus", data-iconpos = "right"</p>
14
+ <%= button_link 'New Post', new_post_path, {'data-theme' => 'a', 'data-icon' => 'plus', 'data-iconpos' => 'right'} %>
15
+ <br/>
16
+
17
+ <h4>Delete Button Link</h4>
18
+ <p>data-icon ="delete" and data-role = "button" are default</p>
19
+ <%= delete_button_link 'Delete', buttons_path %>
20
+ <p>Set data-theme = "b", data-iconpos = "right"</p>
21
+ <%= delete_button_link 'Delete', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'right'} %>
22
+ <br/>
23
+
24
+ <h4>Left Button Link</h4>
25
+ <p>data-icon ="arrow-l" and data-role = "button" are default</p>
26
+ <%= left_button_link 'Back', buttons_path %>
27
+ <p>Set data-theme = "a", data-iconpos = "right"</p>
28
+ <%= left_button_link 'Back', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'right'} %>
29
+ <br/>
30
+
31
+ <h4>Right Button Link</h4>
32
+ <p>data-icon ="arrow-r" and data-role = "button" are default</p>
33
+ <%= right_button_link 'Proceed', buttons_path %>
34
+ <p>Set data-theme = "d", data-iconpos = "right"</p>
35
+ <%= right_button_link 'Proceed', buttons_path, {'data-theme' => 'd', 'data-iconpos' => 'right'} %>
36
+ <br/>
37
+
38
+ <h4>Up Button Link</h4>
39
+ <p>data-icon ="arrow-u" and data-role = "button" are default</p>
40
+ <%= up_button_link 'UP', buttons_path %>
41
+ <p>Set data-theme = "b", data-iconpos = "top"</p>
42
+ <%= up_button_link 'UP', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'top'} %>
43
+ <br/>
44
+
45
+ <h4>Down Button Link</h4>
46
+ <p>data-icon ="arrow-d" and data-role = "button" are default</p>
47
+ <%= down_button_link 'down', buttons_path %>
48
+ <p>Set data-theme = "b", data-iconpos = "bottom"</p>
49
+ <%= down_button_link 'down', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'bottom'} %>
50
+ <br/>
51
+
52
+ <h4>Plus Button Link</h4>
53
+ <p>data-icon ="plus" and data-role = "button" are default</p>
54
+ <%= plus_button_link 'plus', buttons_path %>
55
+ <p>Set data-theme = "a", data-iconpos = "bottom"</p>
56
+ <%= plus_button_link 'plus', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'bottom'} %>
57
+ <br/>
58
+
59
+ <h4>Minus Button Link</h4>
60
+ <p>data-icon ="minus" and data-role = "button" are default</p>
61
+ <%= minus_button_link 'minus', buttons_path %>
62
+ <p>Set data-theme = "a", data-iconpos = "top"</p>
63
+ <%= minus_button_link 'minus', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'top'} %>
64
+ <br/>
65
+
66
+ <h4>check Button Link</h4>
67
+ <p>data-icon ="check" and data-role = "button" are default</p>
68
+ <%= check_button_link 'check', buttons_path %>
69
+ <p>Set data-theme = "a", data-iconpos = "arrow-r"</p>
70
+ <%= check_button_link 'check', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'right'} %>
71
+ <br/>
72
+
73
+ <h4>Gear Button Link</h4>
74
+ <p>data-icon ="gear" and data-role = "button" are default</p>
75
+ <%= gear_button_link 'gear', buttons_path %>
76
+ <p>Set data-theme = "a", data-iconpos = "notext"</p>
77
+ <%= gear_button_link 'gear', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'notext'} %>
78
+ <br/>
79
+
80
+ <h4>Refresh Button Link</h4>
81
+ <p>data-icon ="refresh" and data-role = "button" are default</p>
82
+ <%= refresh_button_link 'refresh', buttons_path %>
83
+ <p>Set data-theme = "a", data-iconpos = "bottom"</p>
84
+ <%= refresh_button_link 'refresh', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'bottom'} %>
85
+ <br/>
86
+
87
+ <h4>Forward Button Link</h4>
88
+ <p>data-icon ="forward" and data-role = "button" are default</p>
89
+ <%= forward_button_link 'forward', buttons_path %>
90
+ <p>Set data-theme = "a", data-iconpos = "notext"</p>
91
+ <%= forward_button_link 'forward', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'notext'} %>
92
+ <br/>
93
+
94
+ <h4>Back Button Link</h4>
95
+ <p>data-icon ="back" and data-role = "button" are default</p>
96
+ <%= back_button_link 'back', buttons_path %>
97
+ <p>Set data-theme = "a", data-iconpos = "notext"</p>
98
+ <%= back_button_link 'back', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'notext'} %>
99
+ <br/>
100
+
101
+ <h4>Grid Button Link</h4>
102
+ <p>data-icon ="grid" and data-role = "button" are default</p>
103
+ <%= grid_button_link 'grid', buttons_path %>
104
+ <p>Set data-theme = "a", data-iconpos = "top"</p>
105
+ <%= grid_button_link 'grid', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'top'} %>
106
+ <br/>
107
+
108
+ <h4>Star Button Link</h4>
109
+ <p>data-icon ="star" and data-role = "button" are default</p>
110
+ <%= star_button_link 'star', buttons_path %>
111
+ <p>Set data-theme = "a", data-iconpos = "top"</p>
112
+ <%= star_button_link 'star', buttons_path, {'data-theme' => 'a', 'data-iconpos' => 'top'} %>
113
+ <br/>
114
+
115
+ <h4>Alert Button Link</h4>
116
+ <p>data-icon ="alert" and data-role = "button" are default</p>
117
+ <%= alert_button_link 'alert', buttons_path %>
118
+ <p>Set data-theme = "b", data-iconpos = "notext"</p>
119
+ <%= alert_button_link 'alert', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'notext'} %>
120
+ <br/>
121
+
122
+ <h4>Info Button Link</h4>
123
+ <p>data-icon ="info" and data-role = "button" are default</p>
124
+ <%= info_button_link 'info', buttons_path %>
125
+ <p>Set data-theme = "b", data-iconpos = "notext"</p>
126
+ <%= info_button_link 'info', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'notext'} %>
127
+ <br/>
128
+
129
+ <h4>Home Button Link</h4>
130
+ <p>data-icon ="home" and data-role = "button" are default</p>
131
+ <%= home_button_link 'home', buttons_path %>
132
+ <p>Set data-theme = "b", data-iconpos = "bottom"</p>
133
+ <%= home_button_link 'home', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'bottom', 'data-inline' => 'true'} %>
134
+ <br/>
135
+
136
+ <h4>Search Button Link</h4>
137
+ <p>data-icon ="search" and data-role = "button" are default</p>
138
+ <%= search_button_link 'search', buttons_path %>
139
+ <p>Set data-theme = "b", data-iconpos = "notext"</p>
140
+ <%= search_button_link 'search', buttons_path, {'data-theme' => 'b', 'data-iconpos' => 'notext'} %>
141
+ <br/>
142
+
143
+ <h4>Inline Button</h4>
144
+ <p>data-inline="true", data-role="controlgroup", data-type="horizontal" are default</p>
145
+ <%= inline_button("
146
+ #{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
147
+ #{refresh_button_link 'refresh', buttons_path}") %>
148
+ <p>Set data-inline="true" inside each a href</p>
149
+ <%= home_button_link 'home', buttons_path, {'data-inline' => 'true'} %>
150
+ <%= search_button_link 'search', buttons_path, {'data-inline' => 'true'} %>
151
+ <%= alert_button_link 'alert', buttons_path, {'data-inline' => 'true'} %>
152
+ <%= star_button_link 'star', buttons_path, {'data-inline' => 'true'} %>
153
+
154
+ <br/>
155
+
156
+ <h4>Grouped Button</h4>
157
+ <p>data-role ="controlgroup" is default</p>
158
+ <%= group_button("
159
+ #{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
160
+ #{refresh_button_link 'refresh', buttons_path}
161
+ #{info_button_link 'info', buttons_path}") %>
162
+ <p>Set data-type = "horizontal"</p>
163
+ <%= group_button("
164
+ #{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
165
+ #{refresh_button_link 'refresh', buttons_path}
166
+ #{info_button_link 'info', buttons_path}", {'data-type' => 'horizontal'}) %>
167
+ <br/>
168
+