scrivito_three_column_widget 0.0.60 → 0.65.0

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: 634b4eb4b2731f66c4909b735857e83acebea701
4
- data.tar.gz: daf9b42a8fa36dff1388a858f22ee2f2e4581c52
3
+ metadata.gz: 8ba66af8e8c73245c8b14b7b0e6aa0aad4dbd35b
4
+ data.tar.gz: cf2ed34c69627cd9ff7cbe6023627839971de04e
5
5
  SHA512:
6
- metadata.gz: 64d32f00bb7c0b68759995f63026d7fd371ffd1089b2511ac4319425bea1a01b96383b05f43d0402ca7e9043a07fa26600895cf181af1d597190702400ce5328
7
- data.tar.gz: 2211ba59b1971ab1997d651a98367ec1d3778fb7a39ab5db84d32f1621bfa4d480b0723efa05b98b8b04e643b220f1ba0401a6c1f04015a830bb5fc584620399
6
+ metadata.gz: eee1da454388da833f121eac7a39008efd01ea6ff4865e65f0a6c79825a710dd7cdda6a6de6d49efb90d656dc096fafe302c8a29b7b9f4d33d6d965f9889b10c
7
+ data.tar.gz: 6130684475a07d7014f2de9b58a6fe75c30f5734dc73dff1f134a70d13209b75593961ea3bd6d9c048e02af2befa4628767643c0b18e586e1c9a74ffd2da4704
data/README.md CHANGED
@@ -4,34 +4,10 @@ This Gem adds a three-column grid widget to your Scrivito app. You can fill the
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- Use Bootstrap in your Rails App. (Tested with Bootstrap 3.2)
7
+ Use Bootstrap in your Rails App.
8
8
 
9
9
  ## Installation
10
10
 
11
11
  Add the gem to your Gemfile:
12
12
 
13
13
  gem 'scrivito_three_column_widget'
14
-
15
- Run bundle:
16
-
17
- $ bundle
18
-
19
- (Currently you need to download the gem's files from github and install it locally.)
20
-
21
- Run
22
-
23
- $ rake scrivito:migrate:install
24
- $ rake scrivito:migrate
25
-
26
- Switch to your Workspace 'rtc' and follow below Steps for Usage. If you are happy with the outcome run
27
-
28
- $ rake scrivito:migrate:publish
29
-
30
-
31
- ## Steps for Usage
32
-
33
- - Insert the Widget 'Three Columns' somewhere and put a widget into each column that becomes visible.
34
- - Edit the Widget Properties to modify the column widths.
35
-
36
-
37
-
@@ -1,28 +1,11 @@
1
1
  class ThreeColumnWidget < Widget
2
2
  attribute :column_1, :widgetlist
3
- attribute :column_1_width, :string
4
3
  attribute :column_2, :widgetlist
5
- attribute :column_2_width, :string
6
4
  attribute :column_3, :widgetlist
7
- attribute :column_3_width, :string
8
-
9
- attribute :column_1, :widgetlist
10
- attribute :column_2, :widgetlist
11
- attribute :column_3, :widgetlist
12
- attribute :column_1_width, :string
13
- attribute :column_2_width, :string
14
- attribute :column_3_width, :string
15
-
16
- def column_1_width
17
- self[:column_1_width].presence || '4'
18
- end
19
-
20
- def column_2_width
21
- self[:column_2_width].presence || '4'
22
- end
5
+ attribute :column_1_width, :string, default: '4'
6
+ attribute :column_2_width, :string, default: '4'
23
7
 
24
8
  def column_3_width
25
- self[:column_3_width].presence || '4'
9
+ 12 - self.column_1_width.to_i - self.column_2_width.to_i
26
10
  end
27
-
28
11
  end
@@ -1,19 +1,7 @@
1
- <div class="details-view">
2
- <h4>
3
- Column 1 width
4
- </h4>
1
+ <%= scrivito_details_for 'column 1' do %>
2
+ <%= scrivito_tag(:div, widget, :column_1_width, data: { editor: 'slider', min: 1, max: 12 }) %>
3
+ <% end %>
5
4
 
6
- <%= scrivito_tag(:div, widget, :column_1_width, data: {editor: 'slider', min: 1, max: 12 }) %>
7
-
8
- <h4>
9
- Column 2 width
10
- </h4>
11
-
12
- <%= scrivito_tag(:div, widget, :column_2_width, data: {editor: 'slider', min: 1, max: 12 }) %>
13
-
14
- <h4>
15
- Column 3 width
16
- </h4>
17
-
18
- <%= scrivito_tag(:div, widget, :column_3_width, data: {editor: 'slider', min: 1, max: 12}) %>
19
- </div>
5
+ <%= scrivito_details_for 'column 2' do %>
6
+ <%= scrivito_tag(:div, widget, :column_2_width, data: { editor: 'slider', min: 1, max: 12 }) %>
7
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoThreeColumnWidget
2
- VERSION = "0.0.60"
2
+ VERSION = "0.65.0"
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: 0.0.60
4
+ version: 0.65.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scrivito
@@ -32,12 +32,9 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
- - MIT-LICENSE
36
35
  - README.md
37
36
  - Rakefile
38
37
  - app/assets/images/scrivito_three_column_widget/widget_preview_3cols.png
39
- - app/assets/javascripts/scrivito_three_column_widget/application.js
40
- - app/assets/stylesheets/scrivito_three_column_widget/application.css
41
38
  - app/models/three_column_widget.rb
42
39
  - app/views/layouts/scrivito_three_columns/application.html.erb
43
40
  - app/views/three_column_widget/details.html.erb
@@ -68,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
65
  version: '0'
69
66
  requirements: []
70
67
  rubyforge_project:
71
- rubygems_version: 2.4.2
68
+ rubygems_version: 2.4.5
72
69
  signing_key:
73
70
  specification_version: 4
74
71
  summary: A Scrivito Widget for a three-column layout.
@@ -1,20 +0,0 @@
1
- Copyright 2014 YOURNAME
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */