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: 9e46d9037b4d57d27e8bccdb45275b284eeaeaea
4
- data.tar.gz: b986d4f9a832442810e48e39da87b35b4bdb0c3a
3
+ metadata.gz: 63afac3c53e7a26692d4cda9d6e7c1b7674aa1c5
4
+ data.tar.gz: 68129a161bd076e1f230e267393b845cea490cb7
5
5
  SHA512:
6
- metadata.gz: 685d26d0fb57933c8c590303ea7be37ae7c7da7dd41e29f6fb6acc686787085e3b0262e099e599397d7b122e3c44864cea6348d75c8e37b5bfc6cda2e3e58012
7
- data.tar.gz: 0287834c19cba6b59f9f9247b3dfa9627fb0c5cb96f79fde268b23a87b77be5eae579bcdde892c877c13812958ec71602f8e778494cc242057e9c70fd95a312f
6
+ metadata.gz: 2402932aaf247f54345da62588c49b5afa0cf207e8823d36dc35dcf06de6b434eb332c3d161f873f3b3f247af67e981598c12945be1e23a178ae1dba508a1c09
7
+ data.tar.gz: 93306177dda4c6760138bfb29c1683816634b43ad4122e6aa58583994d4eb7f1423f05268be1b0757a51b3f3c0ee1604b9329050f4544a05b48d085f451ddf94
@@ -2,19 +2,17 @@
2
2
  'use strict';
3
3
 
4
4
  $(function() {
5
- scrivito.on('content', function(content) {
6
- $(content).find('.scrivito-accordion-group').each(function(i, group) {
7
- var accordion_group = $(group);
8
- accordion_group.find('.scrivito-accordion-title').each(function(i, accordion_title) {
9
- var accordion_title = $(accordion_title);
10
- accordion_title.click(function() {
11
- accordion_group.find('.scrivito-accordion-title').removeClass('scrivito-accordion-active');
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
- accordion_title.addClass('scrivito-accordion-active');
16
- accordion_title.next().stop(true,false).slideDown(350);
17
- });
14
+ accordion_title.addClass('scrivito-accordion-active');
15
+ accordion_title.next().stop(true,false).slideDown(350);
18
16
  });
19
17
  });
20
18
  });
@@ -17,6 +17,7 @@
17
17
  .scrivito-accordion-content {
18
18
  display: none;
19
19
  padding: 10px 15px;
20
+ position: static;
20
21
  }
21
22
  .scrivito-accordion-content.scrivito-accordion-active {
22
23
  display: block;
@@ -1,10 +1,19 @@
1
- <div class="scrivito-accordion-group">
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="scrivito-accordion-panel">
4
- <div class="scrivito-accordion-title <%= 'scrivito-accordion-active' if i == 0 %> <%= panel.background_color %>">
5
- <%= scrivito_value panel.title %>
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>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAccordionWidget
2
- VERSION = "1.0.14"
2
+ VERSION = "1.0.16"
3
3
  end
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.14
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-14 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler