scrivito_tabs_in_details 0.0.1 → 0.0.2

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: ae70051dd90570231796e64e79b0fd4ea7adac4f
4
- data.tar.gz: cc3886392b9f272b4fcca486e7c966fbcfb5c974
3
+ metadata.gz: 8eca3938d90d0b9389fc6af52dd2b4410c415a7e
4
+ data.tar.gz: bdcbe70a1b148a2f05df063b9b6e45b420a01ec4
5
5
  SHA512:
6
- metadata.gz: 55b56cb2fb0f49aa9abe028e336a9b5dbed84d324dfadc033485b1ba7554a92f977aec4d5edc474a846b41ccf0b7ef93babfeae344274940174348e37f259347
7
- data.tar.gz: 72f3be88192772019e6c0a30bdbe3f3afa3767810a0d46367c15437371d473ebc59d598ec32d3787400a1a2d3db2aeb553b45af3d46e63770513dfda45fc2698
6
+ metadata.gz: b799741420e1a563ef80209e4718128d3c8f302f947890fbea52c44217d41690cf11362c6d3448966a37638fe398d12fbb107ff9d12a841bfed3d5438a01e93a
7
+ data.tar.gz: 3e4d1cc6d19c2209ccb65c7597ffaa2341da6f309ff1dd38c366216188724e42f1d583264b1ac273779739ce2e47778791df3580418fe948b2c8a298c90d92ae
@@ -1,14 +1,13 @@
1
1
  ;(function() {
2
2
  scrivito.on('content', function(content) {
3
- $content = $(content);
3
+ $(content).find('.scrivito_tabs').each(function() {
4
+ var $tabs = $(this);
4
5
 
5
- $content.find('.scrivito_tabs_block').hide();
6
- $content.find('.scrivito_tabs_block:first').show();
6
+ var $titles = $tabs.find('> .scrivito_tabs_titles > .scrivito_tabs_title');
7
+ var $blocks = $tabs.find('> .scrivito_tabs_blocks > .scrivito_tabs_block');
7
8
 
8
- $content.find('.scrivito_tabs').each(function() {
9
- var $tabs = $(this);
10
- var $titles = $tabs.find('.scrivito_tabs_title');
11
- var $blocks = $tabs.find('.scrivito_tabs_block');
9
+ $blocks.hide();
10
+ $blocks.eq(0).show();
12
11
 
13
12
  $titles.each(function() {
14
13
  var $title = $(this);
@@ -35,7 +35,7 @@ module ScrivitoTabsHelper
35
35
  private
36
36
 
37
37
  def render_titles
38
- content_tag(:div) do
38
+ content_tag(:div, class: 'scrivito_tabs_titles') do
39
39
  capture do
40
40
  @titles.each_with_index do |title, index|
41
41
  concat(render_title(title, index))
@@ -54,7 +54,7 @@ module ScrivitoTabsHelper
54
54
  end
55
55
 
56
56
  def render_blocks
57
- content_tag(:div) do
57
+ content_tag(:div, class: 'scrivito_tabs_blocks') do
58
58
  capture do
59
59
  @blocks.each_with_index do |block, index|
60
60
  concat(render_block(block, index))
@@ -1,3 +1,3 @@
1
1
  module ScrivitoTabsInDetails
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_tabs_in_details
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito