jsmenubuilder 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/jsmenubuilder.rb +13 -5
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a10a162af08191487c9a9a319138a98e8fcdcf140c1515a420735b4183ff23d8
|
4
|
+
data.tar.gz: 4686b4ea0d93b8da54e5bdd5b0dc28aa7fdadede1e31680f86d56d06eccd08a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4e7901de3a313b463cff4561455dd52c90e729508c49b63bc28ee0eb13787969fddc635963166359f2b2bd4585c7d937c599937f4d89ff3f595ad48d593bd76
|
7
|
+
data.tar.gz: a9b502b47aa422a89865c6ee0847063fd60fc00c5091f0bb8ff37326cedfc834ff6ef432d88d51e72af7903ed6f9b64749a78b91fb6335245a3fa6105e950d2c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/jsmenubuilder.rb
CHANGED
@@ -423,7 +423,7 @@ EOF
|
|
423
423
|
puts 'inside build_h'.info if @debug
|
424
424
|
|
425
425
|
h = doc.root.xpath('tag').inject({}) do |r,e|
|
426
|
-
r.merge(e.attributes[:title] => e.children.join.strip)
|
426
|
+
r.merge(e.attributes[:title] => [e.children.join.strip, e.attributes[:class].join(' ')])
|
427
427
|
end
|
428
428
|
|
429
429
|
puts ('build_h: ' + h.inspect).debug if @debug
|
@@ -455,8 +455,9 @@ EOF
|
|
455
455
|
|
456
456
|
a = RexleBuilder.build do |xml|
|
457
457
|
xml.tags({mode: type}) do
|
458
|
-
entries.each do |heading,
|
459
|
-
|
458
|
+
entries.each do |heading, value|
|
459
|
+
content, klass = value
|
460
|
+
xml.tag({title: heading, class: klass}, content )
|
460
461
|
end
|
461
462
|
end
|
462
463
|
end
|
@@ -573,12 +574,19 @@ EOF
|
|
573
574
|
|
574
575
|
xml.h2({class: 'anchor', id: char.downcase}, char)
|
575
576
|
|
576
|
-
rows.each do |heading,
|
577
|
+
rows.each do |heading, value|
|
578
|
+
|
579
|
+
puts 'value: ' + value.inspect if @debug
|
580
|
+
inner_html, attrclass = value
|
581
|
+
|
577
582
|
puts 'inner_html: ' + inner_html.inspect if debug
|
578
583
|
xml.a({class: 'anchor', name: heading.downcase.gsub(/\W/,'-')\
|
579
584
|
.gsub(/-{2,}/,'-').gsub(/^-|-$/,'')})
|
580
585
|
xml.button({class:'accordion'}, heading.to_s)
|
581
|
-
|
586
|
+
|
587
|
+
s = 'panel'
|
588
|
+
s += ' ' + attrclass if attrclass
|
589
|
+
xml.div({class: s}, inner_html)
|
582
590
|
|
583
591
|
end
|
584
592
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsmenubuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
haYJPATx3zs+9jtQoiFg+keM0CPYk/5LgCv9jxxzQcSS20C8O9MWRVvYfIr47ak7
|
36
36
|
yXrDPmRvbJLTNjDv6Tkg3vU6
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-
|
38
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|