jqr-helpers 1.0.32 → 1.0.33
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.
- data/Readme.md +2 -2
- data/jqr-helpers.gemspec +2 -2
- data/lib/jqr-helpers/helpers.rb +5 -5
- data/lib/jqr-helpers/version.rb +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
@@ -170,10 +170,10 @@ Tabs (and eventually accordion panes and menus) are rendered using a "panel rend
|
|
170
170
|
This allows you to loop through the tabs in an intuitive and concise way.
|
171
171
|
|
172
172
|
<%= tab_container {:collapsible => true}, {:class => 'my-tabs}' do |r| %>
|
173
|
-
|
173
|
+
<% r.panel 'Tab 1' do %>
|
174
174
|
My tab content here
|
175
175
|
<% end %>
|
176
|
-
|
176
|
+
<% r.panel 'Tab 2', 'http://www.foobar.com/' %>
|
177
177
|
<% end %>
|
178
178
|
|
179
179
|
## jQuery Events ##
|
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.
|
5
|
-
s.date = '2014-02
|
4
|
+
s.version = '1.0.33'
|
5
|
+
s.date = '2014-03-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
|
data/lib/jqr-helpers/helpers.rb
CHANGED
@@ -25,11 +25,11 @@ module JqrHelpers
|
|
25
25
|
def panel(title, url_or_options={}, options={}, &block)
|
26
26
|
if url_or_options.is_a?(String)
|
27
27
|
url = url_or_options
|
28
|
-
content =
|
28
|
+
content = nil
|
29
29
|
id = nil
|
30
30
|
else
|
31
31
|
options = url_or_options
|
32
|
-
content =
|
32
|
+
content = block
|
33
33
|
id = Helpers._random_string
|
34
34
|
url = '#' + id
|
35
35
|
end
|
@@ -245,10 +245,10 @@ module JqrHelpers
|
|
245
245
|
# (with a URL).
|
246
246
|
# @example
|
247
247
|
# <%= tab_container {:collapsible => true}, {:class => 'my-tabs}' do |r| %>
|
248
|
-
#
|
248
|
+
# <% r.panel 'Tab 1' do %>
|
249
249
|
# My tab content here
|
250
250
|
# <% end %>
|
251
|
-
#
|
251
|
+
# <% r.panel 'Tab 2', 'http://www.foobar.com/' %>
|
252
252
|
# <% end %>
|
253
253
|
# @param options [Hash] options to pass to the jQuery tabs() method.
|
254
254
|
# @param html_options [Hash] options to pass to the tab container element
|
@@ -271,7 +271,7 @@ module JqrHelpers
|
|
271
271
|
end
|
272
272
|
s3 = renderer.panels.inject('') do |sum, panel|
|
273
273
|
if panel[:options][:id]
|
274
|
-
sum = sum + content_tag(:div, panel[:
|
274
|
+
sum = sum + content_tag(:div, panel[:options], &panel[:content])
|
275
275
|
end
|
276
276
|
sum
|
277
277
|
end
|
data/lib/jqr-helpers/version.rb
CHANGED
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.
|
5
|
+
version: 1.0.33
|
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-02
|
12
|
+
date: 2014-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|