scrivito_two_column_widget 1.0.2 → 1.0.3.1

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: 2764cc619506ea5073c7a9d14872e37163203675
4
- data.tar.gz: 64b71f7f62e2de15acb79d5293f770fdb384e776
3
+ metadata.gz: 9574a0e2ac8361950a3f854a86cf6746cd833cac
4
+ data.tar.gz: b66fff1d7dfdef86f91d28bb8c0fa82887d4e90b
5
5
  SHA512:
6
- metadata.gz: f7564dfc379474e7ff1dd74dee20e2506aa16968b28e7c1189b7b6db477ea72902e5b760aa447d15cc93421a40a906ee82f1fb39fb52f2630f7ab7d712ff6366
7
- data.tar.gz: 15213a0c5a5d241f637d36dd9abc0fc627b059bcde5879cdb1a586b853330e3d78411b7193d5aedf5866517b94b55e4d78171547274cf23953c4240f45bde8d0
6
+ metadata.gz: 3294e2de46814bb847ad413727608c36fc7b7f941fac631f43f806949fe45cd0f5589387b8ad301a057659401d6b6d97439d7cbe8192476eabe52371c8564d00
7
+ data.tar.gz: 0db029bc9ee12afeb43cf09d7d44e02832cfa27be4a1182c04aea90a390cd1666c44f743fd620a2f34055b13dc67f83a55cc3398181e64f3c164800f1b63de16
@@ -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
  }
@@ -21,4 +21,20 @@ class TwoColumnWidget < Widget
21
21
  def device_class
22
22
  keep_columns == 'Yes' ? 'xs' : 'md'
23
23
  end
24
+
25
+ def self.gutter_size_button_images
26
+ elems = {}
27
+ ['small','default','large'].each do |elem|
28
+ elems[elem] = ActionController::Base.helpers.image_tag "widgets/two_column_#{elem}_gutter.png"
29
+ end
30
+ return elems
31
+ end
32
+
33
+ def self.column_on_mobile_button_images
34
+ elems = {}
35
+ ['Yes','No'].each do |elem|
36
+ elems[elem] = ActionController::Base.helpers.image_tag "widgets/two_column_on_mobile_#{elem.downcase}.png"
37
+ end
38
+ return elems
39
+ end
24
40
  end
@@ -1,14 +1,11 @@
1
- <%= scrivito_details_for 'column 1' do %>
2
- <%= scrivito_tag(:div, widget, :column_1_width) %>
3
- <% end %>
4
1
  <%= scrivito_details_for t('scrivito_two_column_widget.details.column_1_width', default: 'Width for column 1') do %>
5
2
  <%= scrivito_tag(:div, widget, :column_1_width) %>
6
3
  <% end %>
7
4
 
8
- <%= scrivito_details_for t('scrivito_two_column_widget.details.grid_size', default: 'Grid Size') do %>
9
- <%= scrivito_tag(:div, widget, :grid_size) %>
5
+ <%= scrivito_details_for t('scrivito_two_column_widget.details.grid_size', default: 'Gutter Size') do %>
6
+ <%= scrivito_tag(:div, widget, :grid_size, class: 'scrivito-image-button-small', data:{ toggle_button_caption: TwoColumnWidget.gutter_size_button_images }) %>
10
7
  <% end %>
11
8
 
12
9
  <%= scrivito_details_for t('scrivito_two_column_widget.details.keep_columns', default: 'Show columns on mobile') do %>
13
- <%= scrivito_tag(:div, widget, :keep_columns) %>
10
+ <%= scrivito_tag(:div, widget, :keep_columns, class: 'scrivito-image-button', data:{ toggle_button_caption: TwoColumnWidget.column_on_mobile_button_images }) %>
14
11
  <% end %>
@@ -1,3 +1,3 @@
1
- <%= scrivito_thumbnail t('scrivito_two_column_widget.thumbnail.title', default: 'Three Coumns'), image_tag("widgets/scrivito_two_column_widget.png") do %>
1
+ <%= scrivito_thumbnail t('scrivito_two_column_widget.thumbnail.title', default: 'Two Columns'), image_tag("widgets/scrivito_two_column_widget.png") do %>
2
2
  <%= t('scrivito_two_column_widget.thumbnail.description', default: 'Two columns that can be filled with widgets') %>
3
3
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoTwoColumnWidget
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_two_column_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3.1
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
@@ -35,7 +35,12 @@ files:
35
35
  - README.md
36
36
  - Rakefile
37
37
  - app/assets/images/widgets/scrivito_two_column_widget.png
38
- - app/assets/stylesheets/scritivo_two_column_widget.scss
38
+ - app/assets/images/widgets/two_column_default_gutter.png
39
+ - app/assets/images/widgets/two_column_large_gutter.png
40
+ - app/assets/images/widgets/two_column_on_mobile_no.png
41
+ - app/assets/images/widgets/two_column_on_mobile_yes.png
42
+ - app/assets/images/widgets/two_column_small_gutter.png
43
+ - app/assets/stylesheets/scrivito_two_column_widget.scss
39
44
  - app/models/two_column_widget.rb
40
45
  - app/views/two_column_widget/details.html.erb
41
46
  - app/views/two_column_widget/show.html.erb