scrivito_accordion_widget 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 548cb9c05bff5d5857606fb6331b8c602e6b5648
|
4
|
+
data.tar.gz: f5ea91cd7a45207dcafa705c7d856c5f1a8238e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a90135907b535d37072186d56a7deb4941560eeca3a935bfe116e3fb6fc03005660121063ffdcd57a8adf8276f637862c3e0f6643cf60833ec173aab64c4b39f
|
7
|
+
data.tar.gz: bbe91aafbb1e17f68d6f4d618c68551b201835985315a9a162295ad2247cf943365e86ed9bf289a122d571d4191ae5e56b9e15d17028faeea848bb19a1e72a0f
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
class AccordionWidget < Widget
|
2
2
|
attribute :panels, :widgetlist
|
3
|
+
attribute :expanded, :enum, values: ['Yes','No']
|
3
4
|
|
4
5
|
default_for :panels do |attributes|
|
5
6
|
[
|
@@ -15,4 +16,8 @@ class AccordionWidget < Widget
|
|
15
16
|
def self.description_for_editor
|
16
17
|
'Accordion'
|
17
18
|
end
|
19
|
+
|
20
|
+
def expanded?
|
21
|
+
self.expanded == "Yes"
|
22
|
+
end
|
18
23
|
end
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<div class="panel panel-default">
|
4
4
|
<div class="panel-heading <%= panel.background_color %>" role="tab" id="headingOne">
|
5
5
|
<h4 class="panel-title">
|
6
|
-
<a role="button" data-toggle="collapse" data-parent="#accordion-<%= widget.id %>" href="#collapse-<%= widget.id %>-<%= i %>" aria-expanded="<%= i == 0 ? 'true' : 'false'%>" aria-controls="collapse<%= i %>">
|
6
|
+
<a role="button" data-toggle="collapse" data-parent="#accordion-<%= widget.id %>" href="#collapse-<%= widget.id %>-<%= i %>" aria-expanded="<%= (widget.expanded? && i == 0) ? 'true' : 'false'%>" aria-controls="collapse<%= i %>">
|
7
7
|
<%= scrivito_value panel.title %>
|
8
8
|
</a>
|
9
9
|
</h4>
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<div id="collapse-<%= widget.id %>-<%= i %>" class="panel-collapse collapse <%= i == 0 ? 'in' : '' %>" role="tabpanel">
|
12
|
+
<div id="collapse-<%= widget.id %>-<%= i %>" class="panel-collapse collapse <%= (widget.expanded? && i == 0) ? 'in' : '' %>" role="tabpanel">
|
13
13
|
<div class="panel-body <%= panel.background_color %>">
|
14
14
|
<%= scrivito_tag :div, panel, :content %>
|
15
15
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_accordion_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scrivito
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.5.1
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Scrivito Accordion Widget.
|