scrivito_accordion_widget 1.0.14 → 1.0.16
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: 63afac3c53e7a26692d4cda9d6e7c1b7674aa1c5
|
4
|
+
data.tar.gz: 68129a161bd076e1f230e267393b845cea490cb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2402932aaf247f54345da62588c49b5afa0cf207e8823d36dc35dcf06de6b434eb332c3d161f873f3b3f247af67e981598c12945be1e23a178ae1dba508a1c09
|
7
|
+
data.tar.gz: 93306177dda4c6760138bfb29c1683816634b43ad4122e6aa58583994d4eb7f1423f05268be1b0757a51b3f3c0ee1604b9329050f4544a05b48d085f451ddf94
|
@@ -2,19 +2,17 @@
|
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
$(function() {
|
5
|
-
scrivito.
|
6
|
-
$(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
accordion_group.find('.scrivito-accordion-content').stop(true,false).slideUp(350);
|
5
|
+
$('.scrivito-accordion-group').each(function(i, group) {
|
6
|
+
var accordion_group = $(group);
|
7
|
+
accordion_group.find('.scrivito-accordion-title').each(function(i, accordion_title) {
|
8
|
+
var accordion_title = $(accordion_title);
|
9
|
+
accordion_title.on('click', function() {
|
10
|
+
accordion_group.find('.scrivito-accordion-title').removeClass('scrivito-accordion-active');
|
11
|
+
accordion_group.find('.scrivito-accordion-content').stop(true,false).slideUp(350);
|
13
12
|
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
});
|
14
|
+
accordion_title.addClass('scrivito-accordion-active');
|
15
|
+
accordion_title.next().stop(true,false).slideDown(350);
|
18
16
|
});
|
19
17
|
});
|
20
18
|
});
|
@@ -1,10 +1,19 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="panel-group" id="accordion-<%= widget.id %>" role="tablist" aria-multiselectable="true">
|
2
2
|
<% widget.panels.each_with_index do |panel, i| %>
|
3
|
-
<div class="
|
4
|
-
<div class="
|
5
|
-
|
3
|
+
<div class="panel panel-default">
|
4
|
+
<div class="panel-heading <%= panel.background_color %>" role="tab" id="headingOne">
|
5
|
+
<h4 class="panel-title">
|
6
|
+
<a role="button" data-toggle="collapse" data-parent="#accordion-<%= widget.id %>" href="#collapse<%= i %>" aria-expanded="<%= i == 0 ? 'true' : 'false'%>" aria-controls="collapse<%= i %>">
|
7
|
+
<%= scrivito_value panel.title %>
|
8
|
+
</a>
|
9
|
+
</h4>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div id="collapse<%= i %>" class="panel-collapse collapse <%= i == 0 ? 'in' : '' %>" role="tabpanel">
|
13
|
+
<div class="panel-body <%= panel.background_color %>">
|
14
|
+
<%= scrivito_tag :div, panel, :content %>
|
15
|
+
</div>
|
6
16
|
</div>
|
7
|
-
<%= scrivito_tag :div, panel, :content, class: "scrivito-accordion-content #{panel.background_color} #{'scrivito-accordion-active' if i == 0}" %>
|
8
17
|
</div>
|
9
18
|
<% end %>
|
10
19
|
</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.0.
|
4
|
+
version: 1.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|