scrivito_advanced_editors 1.3.0.rc1 → 1.3.0.rc2

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
  SHA1:
3
- metadata.gz: e1e02f0509860f0cc0b3bc8fc9236262b6cfa1e9
4
- data.tar.gz: 86caca8bebfd2068334a044adfb5450862bd1226
3
+ metadata.gz: ed774dbd6c29e194be780ba2aa788e4e630503e2
4
+ data.tar.gz: 7f7b82ca8c21dd6e5ea5787fbba526f65130ad25
5
5
  SHA512:
6
- metadata.gz: ebe0b5e7b16168296b1fb3442adb8a85c8ebd14944f27eeee278500cfe0d2b901e8f0fe13e3078c2e5b6867ec1569c90f84d809cf391eb8d35b8a8a9c096dee9
7
- data.tar.gz: ef3d92c98e756ae599f1335f737ef53620cc8fa8cd882efd69d5965fc49b94816fe0a8483e91e46dbfc261d01af3817311eb1a3781d17b2ef63f3536a7871f1e
6
+ metadata.gz: c8d9f123e1d5e3c244d0bd654596a9af5b84eb13641941b1b021ca2dd760411caac93e3ab1b526478db8873c79e9944dc484727cf1bf46a9d340ab8b4c2ad30f
7
+ data.tar.gz: 1c8900475911ff98bfb3052cca6a236ef65d6415aa66053f57506182ea165b2eb8f5b1bd1b44a5491cd5b5de609b6a2df9a967176a7e42b155c7170e6c4d84f8
@@ -5,13 +5,19 @@
5
5
 
6
6
  scrivito.on('content', function(content) {
7
7
  var tab_list = $(content).find('.tab-list');
8
- var active = tab_list.find('.active');
8
+ var active;
9
9
 
10
- if(!as_accordion()) {
11
- $.each(active, function(i,e) {
12
- $($(e).data('panel-target')).addClass('active');
13
- });
14
- }
10
+ $.each(tab_list, function(i,e) {
11
+ active = $(e).find('.active');
12
+
13
+ if(active.length == 0) {
14
+ // first elem in tab_list if not in small view
15
+ active = as_accordion() ? [] : $($(e).find('li')[0]);
16
+ }
17
+
18
+ $(active).addClass('active');
19
+ $($(active).data('panel-target')).addClass('active');
20
+ });
15
21
 
16
22
  tab_list.on('click', 'li', function() {
17
23
  var target = $(this).data('panel-target');
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAdvancedEditors
2
- VERSION = "1.3.0.rc1"
2
+ VERSION = "1.3.0.rc2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_advanced_editors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.rc1
4
+ version: 1.3.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito