scrivito_section_widgets 1.0.10 → 1.1.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: 3b41489ac567d8588210bb04734741e5a564f8f7
4
- data.tar.gz: e2972029ae5c1509d4eccd1b54cbecc01554af53
3
+ metadata.gz: 57e1abe6ebc73e9fab7c89da3d2b45ea7d7dddab
4
+ data.tar.gz: 893e508551d9a03544e234786dd2aad64b0a88c5
5
5
  SHA512:
6
- metadata.gz: 38920e7179b079ef99f3948718b5b806593415f6e364e4294f56ff7683114d25a432779f71b8555a6fe6bbfbbfe92039957a5f85e5b82e0c73e44528bc811bbf
7
- data.tar.gz: c6bcdbca3d9b2951f57f89d5f393752b9eb01a6c3378469157812eaf63bdcbc01ccd2b897f9f76465454824465ad9308f925a4dc46b134d2371093637d0475fe
6
+ metadata.gz: 4919002d5e08352b7247673b2906f1dd0a3cbcb3feadb3e96227f43470e86bb441297e26e110a0472d4e408c8e2fa6bc0c5ff2d8fae04d0132cd442f85e68538
7
+ data.tar.gz: 5c793635d5004460d761b3df6b677d082ddd1b04ae25826b02a0e96b8870fda19f6fa490e9288ae4d0c55d5c33d4212e1e30fedef8469c2b6304cad7fc95131d
@@ -8,4 +8,12 @@
8
8
 
9
9
  .scrivito_section_content_widget.section_padding_large {
10
10
  padding: 60px 0;
11
- }
11
+ }
12
+
13
+ .scrivito_section_content_widget.border-top {
14
+ border-top: 1px solid #eaebea;
15
+ }
16
+
17
+ .scrivito_section_content_widget.border-bottom {
18
+ border-bottom: 1px solid #eaebea;
19
+ }
@@ -2,6 +2,7 @@ class SectionContentWidget < Widget
2
2
  attribute :section_content, :widgetlist
3
3
  attribute :background_color, :string
4
4
  attribute :padding_size, :enum, values: ['none', 'small', 'medium', 'large'], default: 'medium'
5
+ attribute :styles, :stringlist
5
6
 
6
7
  def selectable_color_classes
7
8
  if Obj.respond_to?('selectable_color_classes')
@@ -11,6 +12,14 @@ class SectionContentWidget < Widget
11
12
  end
12
13
  end
13
14
 
15
+ def scrivito_selectable_style_classes
16
+ if Obj.respond_to? 'scrivito_selectable_style_classes'
17
+ Obj.scrivito_selectable_style_classes('SectionContentWidget')
18
+ else
19
+ ['border-top','border-bottom']
20
+ end
21
+ end
22
+
14
23
  private
15
24
  def self.fallback_colors
16
25
  %w(transparent black gray light-gray red green blue yellow)
@@ -5,3 +5,7 @@
5
5
  <%= scrivito_details_for t('scrivito_section_content_widget.details.padding_size', default: 'Padding top and bottom') do %>
6
6
  <%= scrivito_tag(:div, widget, :padding_size) %>
7
7
  <% end %>
8
+
9
+ <%= scrivito_details_for t('scrivito_section_content_widget.details.styles', default: 'Styles') do %>
10
+ <%= scrivito_tag :div, widget, :styles, data: {multi_select_list: widget.scrivito_selectable_style_classes} %>
11
+ <% end %>
@@ -1,3 +1,3 @@
1
- <section class="scrivito_section_content_widget <%= widget.background_color %> section_padding_<%= widget.padding_size %>">
1
+ <section class="scrivito_section_content_widget <%= widget.background_color %> section_padding_<%= widget.padding_size %> <%= widget.styles.join(' ') %>">
2
2
  <%= scrivito_tag(:div, widget, :section_content, class: 'container') %>
3
3
  </section>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoSectionWidgets
2
- VERSION = "1.0.10"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_section_widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scrivito