effective_bootstrap 0.11.8 → 0.11.10
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc0e887c1347f08ce3e7e3efb529b87bb0ef4c0c60fa7486a7901f47dce05623
|
|
4
|
+
data.tar.gz: ae0e0d7eb6135d1e6b9c7c21504389e9788588e858e1d310b27991714b73337a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3470fdd9bd0aaf4ccba3db1407454a993a6f0069ef66b2cbf62a99d12ca11924875808c580b43f84bcfea9476ed47f12242d901551805dc779bae54dc1fac582
|
|
7
|
+
data.tar.gz: b685bc77c3a06a18dbe10649ffd10a05b1e8d9640b941ccd7cfd026f9e74c26e46dafe4a30c5c0f48eaaa345b8e65a617405f040c0b0394975c5fe9b999a10fa
|
|
@@ -105,7 +105,7 @@ this.EffectiveForm ||= new class
|
|
|
105
105
|
|
|
106
106
|
# Process remote form
|
|
107
107
|
if $form.length > 0
|
|
108
|
-
EffectiveBootstrap.initialize($form)
|
|
108
|
+
try EffectiveBootstrap.initialize($form)
|
|
109
109
|
$target.replaceWith($form)
|
|
110
110
|
else
|
|
111
111
|
$form = @reset($target) # There is no remote form. So we assume success and reset the submitted one.
|
|
@@ -325,20 +325,42 @@ module EffectiveBootstrapHelper
|
|
|
325
325
|
end
|
|
326
326
|
end
|
|
327
327
|
|
|
328
|
-
def nav_dropdown(label, right: false, link_class: [], list_class: [], &block)
|
|
328
|
+
def nav_dropdown(label, right: false, groups: false, link_class: [], list_class: [], &block)
|
|
329
329
|
raise 'expected a block' unless block_given?
|
|
330
330
|
|
|
331
331
|
id = "dropdown-#{effective_bootstrap_unique_id}"
|
|
332
|
+
div_class = ['dropdown-menu', *('dropdown-menu-right' if right), *('dropdown-groups' if groups)].join(' ')
|
|
332
333
|
|
|
333
334
|
content_tag(:li, class: 'nav-item dropdown') do
|
|
334
335
|
content_tag(:a, class: 'nav-link dropdown-toggle', href: '#', id: id, role: 'button', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) do
|
|
335
336
|
label.html_safe
|
|
336
|
-
end + content_tag(:div, class:
|
|
337
|
+
end + content_tag(:div, class: div_class, 'aria-labelledby': id) do
|
|
337
338
|
@_nav_mode = :dropdown; yield; @_nav_mode = nil
|
|
338
339
|
end
|
|
339
340
|
end
|
|
340
341
|
end
|
|
341
342
|
|
|
343
|
+
def nav_dropdown_group(label, unique: false, header: true, header_class: nil, &block)
|
|
344
|
+
raise 'expected a block' unless block_given?
|
|
345
|
+
|
|
346
|
+
div_class = [
|
|
347
|
+
'dropdown-group',
|
|
348
|
+
("dropdown-group-#{effective_bootstrap_unique_id}" if unique),
|
|
349
|
+
("dropdown-group-first" if label.blank?),
|
|
350
|
+
("dropdown-group-#{label.to_s.parameterize}" if label.present?)
|
|
351
|
+
].compact.join(' ')
|
|
352
|
+
|
|
353
|
+
header_class ||= 'dropdown-header'
|
|
354
|
+
|
|
355
|
+
content_tag(:div, class: div_class) do
|
|
356
|
+
if label.present? && header
|
|
357
|
+
content_tag(:h6, label, class: header_class) + capture(&block)
|
|
358
|
+
else
|
|
359
|
+
capture(&block)
|
|
360
|
+
end
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
342
364
|
def nav_divider
|
|
343
365
|
content_tag(:div, '', class: 'dropdown-divider')
|
|
344
366
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_bootstrap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|