jqr-helpers 1.0.74 → 1.0.75
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.
- checksums.yaml +5 -5
- data/jqr-helpers.gemspec +4 -4
- data/lib/jqr-helpers/helpers.rb +20 -20
- data/lib/jqr-helpers/version.rb +2 -2
- metadata +17 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f0d1163cb9e9b2e9e8bd4788616dc773bd8404b439e5e44a48ce73568dc19851
|
4
|
+
data.tar.gz: bfe025088f56581e9af257bc13549731bcbfb910586e59e761234109d6148b59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd5d0e62316f77ada605bee647b106e43f7fa21f877aa123c87228d93a42ad02f2f4edfd94b956a90d2664e1f1b4218202829ca5c239682e94d7909468bf379
|
7
|
+
data.tar.gz: 6b9de58691bbc6b52b8e3d3ca3184bb136756dd2d7086152009a2b9bd89761955e67e7a7005d2e0ddb2c3cbffa715134350c6520af6ac9195933dc7cc16fef96
|
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 = '
|
4
|
+
s.version = '1.0.75'
|
5
|
+
s.date = '2025-02-26'
|
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
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
the page, dialogs (including remote dialogs), date pickers and tab containers.
|
12
12
|
EOF
|
13
13
|
s.authors = ['Daniel Orner']
|
14
|
-
s.email = 'daniel.orner@
|
14
|
+
s.email = 'daniel.orner@flipp.com'
|
15
15
|
s.files = `git ls-files`.split($/)
|
16
16
|
s.homepage = 'https://github.com/wishabi/jqr-helpers'
|
17
17
|
s.license = 'MIT'
|
@@ -20,4 +20,4 @@ EOF
|
|
20
20
|
s.add_dependency 'rails', '>= 3.0'
|
21
21
|
s.add_development_dependency 'yard'
|
22
22
|
|
23
|
-
end
|
23
|
+
end
|
data/lib/jqr-helpers/helpers.rb
CHANGED
@@ -65,7 +65,7 @@ module JqrHelpers
|
|
65
65
|
end
|
66
66
|
|
67
67
|
html_options[:class] ||= ''
|
68
|
-
html_options[:class]
|
68
|
+
html_options[:class] += ' ujs-dialog'
|
69
69
|
html_options[:'data-dialog-id'] = dialog_id
|
70
70
|
html_options[:'data-close-x'] = dialog_options[:close_x]
|
71
71
|
|
@@ -74,10 +74,10 @@ module JqrHelpers
|
|
74
74
|
|
75
75
|
dialog_options[:dialogClass] ||= ''
|
76
76
|
if dialog_options[:title] == false # not nil or blank
|
77
|
-
dialog_options[:dialogClass]
|
77
|
+
dialog_options[:dialogClass] += ' ujs-dialog-modal no-title'
|
78
78
|
else
|
79
79
|
dialog_options[:title] ||= 'Dialog'
|
80
|
-
dialog_options[:dialogClass]
|
80
|
+
dialog_options[:dialogClass] += ' ujs-dialog-modal'
|
81
81
|
end
|
82
82
|
dialog_options[:modal] = true
|
83
83
|
dialog_options[:width] ||= 'auto'
|
@@ -202,7 +202,7 @@ module JqrHelpers
|
|
202
202
|
# Specifically do not add data-remote
|
203
203
|
options[:'data-method'] = options.delete(:method)
|
204
204
|
options[:class] ||= ''
|
205
|
-
options[:class]
|
205
|
+
options[:class] += ' ujs-ajax-button'
|
206
206
|
options[:type] = 'button'
|
207
207
|
options[:'data-url'] = url
|
208
208
|
if options.key?(:confirm)
|
@@ -242,7 +242,7 @@ module JqrHelpers
|
|
242
242
|
options[:html] ||= {}
|
243
243
|
orig_class = options[:html][:class]
|
244
244
|
options[:html].merge!(_process_ajax_options(options))
|
245
|
-
options[:html][:class]
|
245
|
+
options[:html][:class] += " #{orig_class}"
|
246
246
|
|
247
247
|
form_for record, options, &block
|
248
248
|
|
@@ -265,13 +265,13 @@ module JqrHelpers
|
|
265
265
|
renderer = PanelRenderer.new
|
266
266
|
capture(renderer, &block)
|
267
267
|
html_options[:class] ||= ''
|
268
|
-
html_options[:class]
|
268
|
+
html_options[:class] += ' ujs-tab-container'
|
269
269
|
html_options[:'data-tab-options'] = options.to_json
|
270
270
|
content_tag(:div, html_options) do
|
271
271
|
s = content_tag :ul do
|
272
272
|
s2 = ''
|
273
273
|
renderer.panels.each do |panel|
|
274
|
-
s2
|
274
|
+
s2 += content_tag(:li) do
|
275
275
|
link_to panel[:title], panel[:url]
|
276
276
|
end
|
277
277
|
end
|
@@ -305,7 +305,7 @@ module JqrHelpers
|
|
305
305
|
options[:dateFormat] = _map_date(format)
|
306
306
|
html_options[:'data-date-options'] = options.to_json
|
307
307
|
html_options[:class] ||= ''
|
308
|
-
html_options[:class]
|
308
|
+
html_options[:class] += ' ujs-date-picker'
|
309
309
|
text_field_tag(name, value, html_options)
|
310
310
|
end
|
311
311
|
|
@@ -321,11 +321,11 @@ module JqrHelpers
|
|
321
321
|
# which would cause the buttonset not to work.
|
322
322
|
def buttonset(name, values, selected=nil, html_options={})
|
323
323
|
html_options[:class] ||= ''
|
324
|
-
html_options[:class]
|
324
|
+
html_options[:class] += ' ujs-button-set'
|
325
325
|
given_id = html_options.delete(:input_id)
|
326
326
|
content = values.inject('') do |sum, (value, label)|
|
327
327
|
id = "#{sanitize_to_id(name)}_#{sanitize_to_id(value)}"
|
328
|
-
id
|
328
|
+
id += "_#{given_id}" if given_id
|
329
329
|
sum += radio_button_tag(name, value, selected == value, :id => id) +
|
330
330
|
label_tag(id, label)
|
331
331
|
end
|
@@ -344,18 +344,18 @@ module JqrHelpers
|
|
344
344
|
# the parent div tag.
|
345
345
|
def quick_radio_set(name, values, selected=nil, html_options={})
|
346
346
|
html_options[:class] ||= ''
|
347
|
-
html_options[:class]
|
347
|
+
html_options[:class] += ' ujs-quick-buttonset ui-buttonset'
|
348
348
|
html_options[:autocomplete] = 'off'
|
349
349
|
content = ''
|
350
350
|
last_key = values.keys.length - 1
|
351
351
|
values.each_with_index do |(value, label), i|
|
352
|
-
content
|
352
|
+
content += radio_button_tag(name, value, selected == value,
|
353
353
|
:class => 'ui-helper-hidden-accessible')
|
354
354
|
label_class = 'ui-button ui-widget ui-state-default ui-button-text-only'
|
355
|
-
label_class
|
356
|
-
label_class
|
357
|
-
label_class
|
358
|
-
content
|
355
|
+
label_class += ' ui-state-active' if selected == value
|
356
|
+
label_class += ' ui-corner-left' if i == 0
|
357
|
+
label_class += ' ui-corner-right' if i == last_key
|
358
|
+
content += label_tag("#{name}_#{value}", :class => label_class,
|
359
359
|
:role => 'button',
|
360
360
|
:'aria-disabled' => 'false') do
|
361
361
|
content_tag :span, label, :class => 'ui-button-text'
|
@@ -393,7 +393,7 @@ module JqrHelpers
|
|
393
393
|
options['data-url'] = url
|
394
394
|
options[:'data-target'] = options.delete(:target)
|
395
395
|
options[:class] ||= ''
|
396
|
-
options[:class]
|
396
|
+
options[:class] += ' ujs-external-button'
|
397
397
|
if token_name
|
398
398
|
options['data-token-name'] = token_name
|
399
399
|
options['data-token-value'] = token_value
|
@@ -413,8 +413,8 @@ module JqrHelpers
|
|
413
413
|
def link_to_toggle(body, id, options={})
|
414
414
|
tag_name = options.delete(:tag_name) || :a
|
415
415
|
options[:class] ||= ''
|
416
|
-
options[:class]
|
417
|
-
options[:class]
|
416
|
+
options[:class] += ' ujs-toggle'
|
417
|
+
options[:class] += (options.delete(:start_open) ?
|
418
418
|
' ujs-toggle-open' :
|
419
419
|
' ujs-toggle-closed')
|
420
420
|
content_tag tag_name, body, options.merge(:'data-id' => id)
|
@@ -583,7 +583,7 @@ module JqrHelpers
|
|
583
583
|
def _process_ajax_options(options)
|
584
584
|
new_options = {}
|
585
585
|
new_options[:class] = options[:class] || ''
|
586
|
-
new_options[:class]
|
586
|
+
new_options[:class] += ' ujs-ajax'
|
587
587
|
new_options[:'data-type'] = options[:return_type] || 'html'
|
588
588
|
new_options[:'data-callback'] = options.delete(:callback)
|
589
589
|
new_options[:'data-close-dialog'] = options.delete(:close_dialog)
|
data/lib/jqr-helpers/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jqr-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
|
-
- -
|
17
|
+
- - ">="
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '3.0'
|
19
20
|
type: :runtime
|
20
|
-
name: rails
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: yard
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
|
-
name: yard
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: |2
|
@@ -43,12 +43,12 @@ description: |2
|
|
43
43
|
HTML, which is hooked by an included JavaScript file to provide the
|
44
44
|
functionality. Helpers include links to Ajax requests to update elements on
|
45
45
|
the page, dialogs (including remote dialogs), date pickers and tab containers.
|
46
|
-
email: daniel.orner@
|
46
|
+
email: daniel.orner@flipp.com
|
47
47
|
executables: []
|
48
48
|
extensions: []
|
49
49
|
extra_rdoc_files: []
|
50
50
|
files:
|
51
|
-
- .yardopts
|
51
|
+
- ".yardopts"
|
52
52
|
- Readme.md
|
53
53
|
- app/assets/images/jqr-helpers/close.png
|
54
54
|
- app/assets/images/jqr-helpers/throbber.gif
|
@@ -87,28 +87,26 @@ homepage: https://github.com/wishabi/jqr-helpers
|
|
87
87
|
licenses:
|
88
88
|
- MIT
|
89
89
|
metadata: {}
|
90
|
-
post_install_message:
|
90
|
+
post_install_message:
|
91
91
|
rdoc_options: []
|
92
92
|
require_paths:
|
93
|
-
- .
|
93
|
+
- "."
|
94
94
|
- lib
|
95
95
|
- lib/jqr-helpers
|
96
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements:
|
107
107
|
- Optionally install will_paginate to allow Ajax pagination
|
108
|
-
|
109
|
-
|
110
|
-
signing_key:
|
108
|
+
rubygems_version: 3.4.10
|
109
|
+
signing_key:
|
111
110
|
specification_version: 4
|
112
111
|
summary: Helpers to print unobtrusive jQuery-UI tags.
|
113
112
|
test_files: []
|
114
|
-
has_rdoc:
|