scrivito_three_column_widget 1.0.2 → 1.0.3

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: 5dc0931be63222649db2b1456ca9bda8534fefe9
4
- data.tar.gz: 0da510e5b9b640184cdf74fcd9992cd6714eba73
3
+ metadata.gz: 8760e02c225a393d4e45c1ddf8973b2793ccee1e
4
+ data.tar.gz: b2bd3c3c08035d7d47dae8856ba72dc035ad3ce2
5
5
  SHA512:
6
- metadata.gz: 67a29e8da7d765080a0aa6d4e8fbaf5ca838744b9844f86e905a88464918849264e5e5ae271899bd99d53d18c6a5b0d298c7fb0b1dbd994c0b475ff27c8cccb8
7
- data.tar.gz: 5abc28d0b9d5d858c758ba0dba2b5b8e458245ce57e83dfcaeb6d131011f85af2c30e6c34bf7deb60872d1b1803acef7360d5c320dbd260cfd8fda7a9b5218f9
6
+ metadata.gz: 673c452accd972b2a4b5feaae2f4a21e5a36a73a466f25c5542b0b256cdc128cab80c6a5dc27f1fa59799bae497ff98e5beb624f9f1c0bf0efd76173326475a3
7
+ data.tar.gz: 4f7402c921d770a5920397923c5a23690033b4f7c6d10e5f928b26be486b360f28bdceb1bfbf1e3c0330b824b6e3920c7ec269bfb53da613c990dc0020a6180d
@@ -36,4 +36,15 @@
36
36
  padding-left: 30px;
37
37
  padding-right: 30px;
38
38
  }
39
+ }
40
+
41
+ .scrivito-image-button img {
42
+ width: 100px;
43
+ height: auto;
44
+ }
45
+
46
+
47
+ .scrivito-image-button-small img {
48
+ width: 60px;
49
+ height: auto;
39
50
  }
@@ -23,4 +23,20 @@ class ThreeColumnWidget < Widget
23
23
  def device_class
24
24
  keep_columns == 'Yes' ? 'xs' : 'md'
25
25
  end
26
+
27
+ def self.gutter_size_button_images
28
+ elems = {}
29
+ ['small','default','large'].each do |elem|
30
+ elems[elem] = ActionController::Base.helpers.image_tag "widgets/three_column_#{elem}_gutter.png"
31
+ end
32
+ return elems
33
+ end
34
+
35
+ def self.column_on_mobile_button_images
36
+ elems = {}
37
+ ['Yes','No'].each do |elem|
38
+ elems[elem] = ActionController::Base.helpers.image_tag "widgets/three_column_on_mobile_#{elem.downcase}.png"
39
+ end
40
+ return elems
41
+ end
26
42
  end
@@ -6,10 +6,10 @@
6
6
  <%= scrivito_tag(:div, widget, :column_2_width) %>
7
7
  <% end %>
8
8
 
9
- <%= scrivito_details_for t('scrivito_three_column_widget.details.grid_size', default: 'Grid Size') do %>
10
- <%= scrivito_tag(:div, widget, :grid_size) %>
9
+ <%= scrivito_details_for t('scrivito_three_column_widget.details.grid_size', default: 'Gutter Size') do %>
10
+ <%= scrivito_tag(:div, widget, :grid_size, class: 'scrivito-image-button-small', data:{ toggle_button_caption: ThreeColumnWidget.gutter_size_button_images }) %>
11
11
  <% end %>
12
12
 
13
13
  <%= scrivito_details_for t('scrivito_three_column_widget.details.keep_columns', default: 'Show columns on mobile') do %>
14
- <%= scrivito_tag(:div, widget, :keep_columns) %>
14
+ <%= scrivito_tag(:div, widget, :keep_columns, class: 'scrivito-image-button', data:{ toggle_button_caption: ThreeColumnWidget.column_on_mobile_button_images }) %>
15
15
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoThreeColumnWidget
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_three_column_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scrivito
@@ -36,6 +36,11 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - app/assets/images/widgets/scrivito_three_column_widget.png
39
+ - app/assets/images/widgets/three_column_default_gutter.png
40
+ - app/assets/images/widgets/three_column_large_gutter.png
41
+ - app/assets/images/widgets/three_column_on_mobile_no.png
42
+ - app/assets/images/widgets/three_column_on_mobile_yes.png
43
+ - app/assets/images/widgets/three_column_small_gutter.png
39
44
  - app/assets/stylesheets/scrivito_three_column_widget.scss
40
45
  - app/models/three_column_widget.rb
41
46
  - app/views/three_column_widget/details.html.erb