jqr-helpers 1.0.28 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
data/doc/method_list.html CHANGED
@@ -15,7 +15,6 @@
15
15
  <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
16
 
17
17
 
18
- <title>Method List</title>
19
18
  <base id="base_target" target="_parent" />
20
19
  </head>
21
20
  <body>
@@ -48,122 +47,154 @@
48
47
 
49
48
 
50
49
  <li class="r1 ">
51
- <span class='object_link'><a href="JqrHelpers/Helpers.html#_random_string-class_method" title="JqrHelpers::Helpers._random_string (method)">_random_string</a></span>
52
- <small>JqrHelpers::Helpers</small>
50
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_ajax-instance_method" title="JqrHelpers::Helpers#button_to_ajax (method)">#button_to_ajax</a></span>
51
+
52
+ <small>JqrHelpers::Helpers</small>
53
+
53
54
  </li>
54
55
 
55
56
 
56
57
  <li class="r2 ">
57
- <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_ajax-instance_method" title="JqrHelpers::Helpers#button_to_ajax (method)">#button_to_ajax</a></span>
58
- <small>JqrHelpers::Helpers</small>
58
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_dialog-instance_method" title="JqrHelpers::Helpers#button_to_dialog (method)">#button_to_dialog</a></span>
59
+
60
+ <small>JqrHelpers::Helpers</small>
61
+
59
62
  </li>
60
63
 
61
64
 
62
65
  <li class="r1 ">
63
- <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_dialog-instance_method" title="JqrHelpers::Helpers#button_to_dialog (method)">#button_to_dialog</a></span>
64
- <small>JqrHelpers::Helpers</small>
66
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_external-instance_method" title="JqrHelpers::Helpers#button_to_external (method)">#button_to_external</a></span>
67
+
68
+ <small>JqrHelpers::Helpers</small>
69
+
65
70
  </li>
66
71
 
67
72
 
68
73
  <li class="r2 ">
69
- <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_external-instance_method" title="JqrHelpers::Helpers#button_to_external (method)">#button_to_external</a></span>
70
- <small>JqrHelpers::Helpers</small>
74
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_remote_dialog-instance_method" title="JqrHelpers::Helpers#button_to_remote_dialog (method)">#button_to_remote_dialog</a></span>
75
+
76
+ <small>JqrHelpers::Helpers</small>
77
+
71
78
  </li>
72
79
 
73
80
 
74
81
  <li class="r1 ">
75
- <span class='object_link'><a href="JqrHelpers/Helpers.html#button_to_remote_dialog-instance_method" title="JqrHelpers::Helpers#button_to_remote_dialog (method)">#button_to_remote_dialog</a></span>
76
- <small>JqrHelpers::Helpers</small>
82
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#buttonset-instance_method" title="JqrHelpers::Helpers#buttonset (method)">#buttonset</a></span>
83
+
84
+ <small>JqrHelpers::Helpers</small>
85
+
77
86
  </li>
78
87
 
79
88
 
80
89
  <li class="r2 ">
81
- <span class='object_link'><a href="JqrHelpers/Helpers.html#buttonset-instance_method" title="JqrHelpers::Helpers#buttonset (method)">#buttonset</a></span>
82
- <small>JqrHelpers::Helpers</small>
90
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#confirm_button-instance_method" title="JqrHelpers::Helpers#confirm_button (method)">#confirm_button</a></span>
91
+
92
+ <small>JqrHelpers::Helpers</small>
93
+
83
94
  </li>
84
95
 
85
96
 
86
97
  <li class="r1 ">
87
- <span class='object_link'><a href="JqrHelpers/Helpers.html#confirm_button-instance_method" title="JqrHelpers::Helpers#confirm_button (method)">#confirm_button</a></span>
88
- <small>JqrHelpers::Helpers</small>
98
+ <span class='object_link'><a href="JqrHelpers/Generators/InstallGenerator.html#copy_files-instance_method" title="JqrHelpers::Generators::InstallGenerator#copy_files (method)">#copy_files</a></span>
99
+
100
+ <small>JqrHelpers::Generators::InstallGenerator</small>
101
+
89
102
  </li>
90
103
 
91
104
 
92
105
  <li class="r2 ">
93
- <span class='object_link'><a href="JqrHelpers/Generators/InstallGenerator.html#copy_files-instance_method" title="JqrHelpers::Generators::InstallGenerator#copy_files (method)">#copy_files</a></span>
94
- <small>JqrHelpers::Generators::InstallGenerator</small>
106
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#date_picker_tag-instance_method" title="JqrHelpers::Helpers#date_picker_tag (method)">#date_picker_tag</a></span>
107
+
108
+ <small>JqrHelpers::Helpers</small>
109
+
95
110
  </li>
96
111
 
97
112
 
98
113
  <li class="r1 ">
99
- <span class='object_link'><a href="JqrHelpers/Helpers.html#date_picker_tag-instance_method" title="JqrHelpers::Helpers#date_picker_tag (method)">#date_picker_tag</a></span>
100
- <small>JqrHelpers::Helpers</small>
114
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#dialog_title-instance_method" title="JqrHelpers::Helpers#dialog_title (method)">#dialog_title</a></span>
115
+
116
+ <small>JqrHelpers::Helpers</small>
117
+
101
118
  </li>
102
119
 
103
120
 
104
121
  <li class="r2 ">
105
- <span class='object_link'><a href="JqrHelpers/Helpers.html#dialog_title-instance_method" title="JqrHelpers::Helpers#dialog_title (method)">#dialog_title</a></span>
106
- <small>JqrHelpers::Helpers</small>
122
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#form_for_ajax-instance_method" title="JqrHelpers::Helpers#form_for_ajax (method)">#form_for_ajax</a></span>
123
+
124
+ <small>JqrHelpers::Helpers</small>
125
+
107
126
  </li>
108
127
 
109
128
 
110
129
  <li class="r1 ">
111
- <span class='object_link'><a href="JqrHelpers/Helpers.html#form_for_ajax-instance_method" title="JqrHelpers::Helpers#form_for_ajax (method)">#form_for_ajax</a></span>
112
- <small>JqrHelpers::Helpers</small>
130
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#form_tag_ajax-instance_method" title="JqrHelpers::Helpers#form_tag_ajax (method)">#form_tag_ajax</a></span>
131
+
132
+ <small>JqrHelpers::Helpers</small>
133
+
113
134
  </li>
114
135
 
115
136
 
116
137
  <li class="r2 ">
117
- <span class='object_link'><a href="JqrHelpers/Helpers.html#form_tag_ajax-instance_method" title="JqrHelpers::Helpers#form_tag_ajax (method)">#form_tag_ajax</a></span>
118
- <small>JqrHelpers::Helpers</small>
138
+ <span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#initialize-instance_method" title="JqrHelpers::Helpers::PanelRenderer#initialize (method)">#initialize</a></span>
139
+
140
+ <small>JqrHelpers::Helpers::PanelRenderer</small>
141
+
119
142
  </li>
120
143
 
121
144
 
122
145
  <li class="r1 ">
123
- <span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#initialize-instance_method" title="JqrHelpers::Helpers::PanelRenderer#initialize (method)">#initialize</a></span>
124
- <small>JqrHelpers::Helpers::PanelRenderer</small>
146
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_ajax-instance_method" title="JqrHelpers::Helpers#link_to_ajax (method)">#link_to_ajax</a></span>
147
+
148
+ <small>JqrHelpers::Helpers</small>
149
+
125
150
  </li>
126
151
 
127
152
 
128
153
  <li class="r2 ">
129
- <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_ajax-instance_method" title="JqrHelpers::Helpers#link_to_ajax (method)">#link_to_ajax</a></span>
130
- <small>JqrHelpers::Helpers</small>
154
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_dialog-instance_method" title="JqrHelpers::Helpers#link_to_dialog (method)">#link_to_dialog</a></span>
155
+
156
+ <small>JqrHelpers::Helpers</small>
157
+
131
158
  </li>
132
159
 
133
160
 
134
161
  <li class="r1 ">
135
- <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_dialog-instance_method" title="JqrHelpers::Helpers#link_to_dialog (method)">#link_to_dialog</a></span>
136
- <small>JqrHelpers::Helpers</small>
162
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_remote_dialog-instance_method" title="JqrHelpers::Helpers#link_to_remote_dialog (method)">#link_to_remote_dialog</a></span>
163
+
164
+ <small>JqrHelpers::Helpers</small>
165
+
137
166
  </li>
138
167
 
139
168
 
140
169
  <li class="r2 ">
141
- <span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_remote_dialog-instance_method" title="JqrHelpers::Helpers#link_to_remote_dialog (method)">#link_to_remote_dialog</a></span>
142
- <small>JqrHelpers::Helpers</small>
170
+ <span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#panel-instance_method" title="JqrHelpers::Helpers::PanelRenderer#panel (method)">#panel</a></span>
171
+
172
+ <small>JqrHelpers::Helpers::PanelRenderer</small>
173
+
143
174
  </li>
144
175
 
145
176
 
146
177
  <li class="r1 ">
147
- <span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#panel-instance_method" title="JqrHelpers::Helpers::PanelRenderer#panel (method)">#panel</a></span>
148
- <small>JqrHelpers::Helpers::PanelRenderer</small>
178
+ <span class='object_link'><a href="JqrHelpers/Helpers.html#quick_radio_set-instance_method" title="JqrHelpers::Helpers#quick_radio_set (method)">#quick_radio_set</a></span>
179
+
180
+ <small>JqrHelpers::Helpers</small>
181
+
149
182
  </li>
150
183
 
151
184
 
152
185
  <li class="r2 ">
153
- <span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#panels-instance_method" title="JqrHelpers::Helpers::PanelRenderer#panels (method)">#panels</a></span>
154
- <small>JqrHelpers::Helpers::PanelRenderer</small>
155
- </li>
156
-
157
-
158
- <li class="r1 ">
159
186
  <span class='object_link'><a href="JqrHelpers/Helpers.html#tab_container-instance_method" title="JqrHelpers::Helpers#tab_container (method)">#tab_container</a></span>
160
- <small>JqrHelpers::Helpers</small>
187
+
188
+ <small>JqrHelpers::Helpers</small>
189
+
161
190
  </li>
162
191
 
163
192
 
164
- <li class="r2 ">
193
+ <li class="r1 ">
165
194
  <span class='object_link'><a href="JqrHelpers/Helpers.html#will_paginate_ajax-instance_method" title="JqrHelpers::Helpers#will_paginate_ajax (method)">#will_paginate_ajax</a></span>
166
- <small>JqrHelpers::Helpers</small>
195
+
196
+ <small>JqrHelpers::Helpers</small>
197
+
167
198
  </li>
168
199
 
169
200
 
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; Documentation by YARD 0.8.5.2
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -103,9 +103,9 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Thu Jan 30 16:04:13 2014 by
106
+ Generated on Sun Feb 2 15:18:53 2014 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.7.3 (ruby-1.9.3).
108
+ 0.8.5.2 (ruby-1.9.3).
109
109
  </div>
110
110
 
111
111
  </body>
data/jqr-helpers.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jqr-helpers'
3
3
  s.require_paths = %w(. lib lib/jqr-helpers)
4
- s.version = '1.0.28'
5
- s.date = '2014-01-30'
4
+ s.version = '1.0.29'
5
+ s.date = '2014-02-02'
6
6
  s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
7
7
  s.description = <<-EOF
8
8
  This gem adds helper methods to create unobtrusive jQuery code. It outputs
@@ -7,6 +7,7 @@ module JqrHelpers
7
7
  class PanelRenderer
8
8
 
9
9
  # @return [Array<Hash>]
10
+ # @private
10
11
  attr_accessor :panels
11
12
 
12
13
  def initialize
@@ -314,6 +315,38 @@ module JqrHelpers
314
315
  content_tag(:div, raw(content), html_options)
315
316
  end
316
317
 
318
+ # Prints a button set which *pretends* to be a jQuery buttonset() and is
319
+ # specifically for radio buttons. The main difference is that this will
320
+ # load much faster in DOM-heavy pages (e.g. in tables where you may have
321
+ # hundreds of buttons) and it does not have most of the frills of jQuery
322
+ # button(), such as allowing disabling.
323
+ # @param name [String] the name of the form element.
324
+ # @param values [Hash<String, String>] a hash of value => label.
325
+ # @param selected [String] the selected value, if any.
326
+ # @param html_options [Hash] a set of options that will be passed into
327
+ # the parent div tag.
328
+ def quick_radio_set(name, values, selected=nil, html_options={})
329
+ html_options[:class] ||= ''
330
+ html_options[:class] << ' ujs-quick-buttonset ui-buttonset'
331
+ content = ''
332
+ last_key = values.keys.length - 1
333
+ values.each_with_index do |(value, label), i|
334
+ content << radio_button_tag(name, value, selected == value,
335
+ :class => 'ui-helper-hidden-accessible')
336
+ label_class = 'ui-button ui-widget ui-state-default ui-button-text-only'
337
+ label_class << ' ui-state-active' if selected == value
338
+ label_class << ' ui-corner-left' if i == 0
339
+ label_class << ' ui-corner-right' if i == last_key
340
+ content << label_tag("#{name}_#{value}", :class => label_class,
341
+ :role => 'button',
342
+ :'aria-disabled' => 'false') do
343
+ content_tag :span, label, :class => 'ui-button-text'
344
+ end
345
+ end
346
+ content_tag(:div, raw(content), html_options)
347
+
348
+ end
349
+
317
350
  # This is identical to the built-in Rails button_to() in every way except
318
351
  # that it will work inside an existing form. Instead, it appends a form
319
352
  # to the body, and uses a click handler to submit it.
@@ -350,6 +383,7 @@ module JqrHelpers
350
383
 
351
384
  # Generate a random string for IDs.
352
385
  # @return [String]
386
+ # @private
353
387
  def self._random_string
354
388
  SecureRandom.hex(16)
355
389
  end
@@ -2,6 +2,7 @@ require 'rails'
2
2
  require 'rails/generators'
3
3
 
4
4
  module JqrHelpers
5
+ # @private
5
6
  module Generators
6
7
  class InstallGenerator < ::Rails::Generators::Base
7
8
 
@@ -1,6 +1,7 @@
1
1
  require 'helpers'
2
2
 
3
3
  module JqrHelpers
4
+ # @private
4
5
  class Railtie < Rails::Railtie
5
6
  initializer 'jqr-helpers.helpers' do
6
7
  ActionView::Base.send :include, Helpers
@@ -1,5 +1,6 @@
1
1
  module JqrHelpers
2
+ # @private
2
3
  module Rails
3
- VERSION = '1.0.28'
4
+ VERSION = '1.0.29'
4
5
  end
5
6
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: jqr-helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.28
5
+ version: 1.0.29
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-30 00:00:00.000000000 Z
12
+ date: 2014-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails