tenon 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/tenon/tenon-content/FourColumnImageAndText.png +0 -0
  3. data/app/assets/images/tenon/tenon-content/FourColumnImageAndText_hover.png +0 -0
  4. data/app/assets/images/tenon/tenon-content/ThreeColumnImageAndText.png +0 -0
  5. data/app/assets/images/tenon/tenon-content/ThreeColumnImageAndText_hover.png +0 -0
  6. data/app/assets/images/tenon/tenon-content/TwoColumnImageAndText.png +0 -0
  7. data/app/assets/images/tenon/tenon-content/TwoColumnImageAndText_hover.png +0 -0
  8. data/app/assets/javascripts/tenon/features/tenon_content/image_controls.js.coffee +2 -0
  9. data/app/assets/stylesheets/tenon/ui/tenon-content.css.scss +2 -1
  10. data/app/models/tenon/tenon_content/row_types/four_column_image_and_text.rb +22 -0
  11. data/app/models/tenon/tenon_content/row_types/three_column_image_and_text.rb +20 -0
  12. data/app/models/tenon/tenon_content/row_types/two_column_image_and_text.rb +18 -0
  13. data/app/models/tenon/tenon_content/row_types.rb +13 -10
  14. data/app/views/tenon/tenon_content/row_types/display/_four_column_image_and_text.html.haml +11 -0
  15. data/app/views/tenon/tenon_content/row_types/display/_three_column_image_and_text.html.haml +11 -0
  16. data/app/views/tenon/tenon_content/row_types/display/_two_column_image_and_text.html.haml +11 -0
  17. data/app/views/tenon/tenon_content/row_types/form/_four_column_image_and_text.html.haml +14 -0
  18. data/app/views/tenon/tenon_content/row_types/form/_three_column_image_and_text.html.haml +14 -0
  19. data/app/views/tenon/tenon_content/row_types/form/_two_column_image_and_text.html.haml +14 -0
  20. data/lib/tenon/version.rb +1 -1
  21. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48fb6179ca0d169c509bdb474451aafb9867f4e2
4
- data.tar.gz: 347a5e77d1fa93343900a072d17c9fd0a016d76c
3
+ metadata.gz: b76162a481f3105fddd9b9b1072f73dc5f50bd39
4
+ data.tar.gz: 501ec5832e4b3b7a451666dac83ccff42e3257dd
5
5
  SHA512:
6
- metadata.gz: 5cb957ff891e6bd3ea7b36402383b038bc01faa9a6c3e218170e3d65145c9f89863bfdb375fa9146137f62518b73fcb2257098bbf91d6210fa93cf3d71e24ea7
7
- data.tar.gz: 48597375b5d3286153249e116e15c8ba863c873979789564772e22fa74f5bcd04736b7c9c66b947d73b654683c0dab7a12978568736a90f883e605eb8364e5e3
6
+ metadata.gz: c9c36853571c1cdd00de127930f548e827924290e1f140c6d9eb96f2a48e4615a59dc542e4033c1fbbad42b37559c04cc40428a1bfffdb67e3bf11ef0bde2b4b
7
+ data.tar.gz: dc7249deb91ccee5761fa891b7b60ec7d2cb3d9575dc36d8cd7d3ba86060bb96ef2989e561697f533fa0a9cbc1bdfb9ccaff6cdbbf000e6337cdc3e12ac4550d
@@ -51,6 +51,8 @@ class Tenon.features.tenonContent.ImageControls
51
51
  @$controls.addClass('three-column-image')
52
52
  else if @$image.closest('.four-column-image').length > 0
53
53
  @$controls.addClass('four-column-image')
54
+ else if @$image.closest('.stacked-image-and-text').length > 0
55
+ @$controls.addClass('stacked-image-and-text')
54
56
  else
55
57
  @$controls.addClass('column-image')
56
58
 
@@ -232,7 +232,8 @@
232
232
 
233
233
  .image-controls {
234
234
  @include transition(none);
235
- &.full-width-image, &.three-column-image, &.four-column-image {
235
+ &.full-width-image, &.three-column-image, &.four-column-image,
236
+ &.stacked-image-and-text {
236
237
  .grow-image, .shrink-image, .swap-sides {
237
238
  display: none;
238
239
  }
@@ -0,0 +1,22 @@
1
+ module Tenon
2
+ module TenonContent
3
+ module RowTypes
4
+ class FourColumnImageAndText < TenonContent::RowTypes::Base
5
+ class << self
6
+ def add_pieces_to(row)
7
+ if row.pieces.empty?
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'three')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'three')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'three')
11
+ row.pieces.build(piece_type: 'Text', position: 3, size: 'three')
12
+ row.pieces.build(piece_type: 'Image', position: 4, size: 'three')
13
+ row.pieces.build(piece_type: 'Text', position: 5, size: 'three')
14
+ row.pieces.build(piece_type: 'Image', position: 6, size: 'three')
15
+ row.pieces.build(piece_type: 'Text', position: 7, size: 'three')
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,20 @@
1
+ module Tenon
2
+ module TenonContent
3
+ module RowTypes
4
+ class ThreeColumnImageAndText < TenonContent::RowTypes::Base
5
+ class << self
6
+ def add_pieces_to(row)
7
+ if row.pieces.empty?
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'four')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'four')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'four')
11
+ row.pieces.build(piece_type: 'Text', position: 3, size: 'four')
12
+ row.pieces.build(piece_type: 'Image', position: 4, size: 'four')
13
+ row.pieces.build(piece_type: 'Text', position: 5, size: 'four')
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,18 @@
1
+ module Tenon
2
+ module TenonContent
3
+ module RowTypes
4
+ class TwoColumnImageAndText < TenonContent::RowTypes::Base
5
+ class << self
6
+ def add_pieces_to(row)
7
+ if row.pieces.empty?
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'six')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'six')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'six')
11
+ row.pieces.build(piece_type: 'Text', position: 3, size: 'six')
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -2,16 +2,19 @@ module Tenon
2
2
  module TenonContent
3
3
  module RowTypes
4
4
  LIBRARY_ROW_TYPES = {
5
- 'One Column of Text' => 'FullWidthText',
6
- 'One Column Image' => 'FullWidthImage',
7
- 'Two Columns of Text' => 'TwoColumnText',
8
- 'Two Images' => 'TwoColumnImage',
9
- 'Three Columns of Text' => 'ThreeColumnText',
10
- 'Three Images' => 'ThreeColumnImage',
11
- 'Embedded Content' => 'FullWidthEmbeddedContent',
12
- 'Four Images' => 'FourColumnImage',
13
- 'Wrapped Image with Text' => 'LeftWrappedImageWithText',
14
- 'Image and Text (No Wrap)' => 'LeftImageRightText'
5
+ 'One Column of Text' => 'FullWidthText',
6
+ 'One Column Image' => 'FullWidthImage',
7
+ 'Two Columns of Text' => 'TwoColumnText',
8
+ 'Two Images' => 'TwoColumnImage',
9
+ 'Three Columns of Text' => 'ThreeColumnText',
10
+ 'Three Images' => 'ThreeColumnImage',
11
+ 'Embedded Content' => 'FullWidthEmbeddedContent',
12
+ 'Four Images' => 'FourColumnImage',
13
+ 'Wrapped Image with Text' => 'LeftWrappedImageWithText',
14
+ 'Image and Text (No Wrap)' => 'LeftImageRightText',
15
+ 'Two Column Image and Text' => 'TwoColumnImageAndText',
16
+ 'Three Column Image and Text' => 'ThreeColumnImageAndText',
17
+ 'Four Column Image and Text' => 'FourColumnImageAndText'
15
18
  }
16
19
  end
17
20
  end
@@ -0,0 +1,11 @@
1
+ .four-column-image-and-text.stacked-image-and-text
2
+ -[[0,1], [2,3], [4,5], [6,7]].each do |positions|
3
+ .three{class: cycle('', '', '', 'omega')}
4
+ - row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
5
+ - if piece.object.piece_type == 'Image'
6
+ .tn-tc-piece
7
+ = render "tenon/tenon_content/piece_types/display/image", piece: piece
8
+ - else
9
+ .tn-tc-piece
10
+ = render 'tenon/tenon_content/piece_types/form/text', piece: piece
11
+ .spacer
@@ -0,0 +1,11 @@
1
+ .three-column-image-and-text.stacked-image-and-text
2
+ -[[0,1], [2,3], [4,5]].each do |positions|
3
+ .four{class: cycle('', '', 'omega')}
4
+ - row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
5
+ - if piece.object.piece_type == 'Image'
6
+ .tn-tc-piece
7
+ = render "tenon/tenon_content/piece_types/display/image", piece: piece
8
+ - else
9
+ .tn-tc-piece
10
+ = render 'tenon/tenon_content/piece_types/form/text', piece: piece
11
+ .spacer
@@ -0,0 +1,11 @@
1
+ .two-column-image-and-text.stacked-image-and-text
2
+ -[[0,1], [2,3]].each do |positions|
3
+ .six{class: cycle('', 'omega')}
4
+ - row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
5
+ - if piece.object.piece_type == 'Image'
6
+ .tn-tc-piece
7
+ = render "tenon/tenon_content/piece_types/display/image", piece: piece
8
+ - else
9
+ .tn-tc-piece
10
+ = render 'tenon/tenon_content/piece_types/form/text', piece: piece
11
+ .spacer
@@ -0,0 +1,14 @@
1
+ .four-column-image-and-text.stacked-image-and-text
2
+ = f.hidden_field :row_type
3
+ = f.hidden_field :list_order
4
+ -[[0,1], [2,3], [4,5], [6,7]].each do |positions|
5
+ .three{class: cycle('', '', '', 'omega')}
6
+ = f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
7
+ = piece.hidden_field :piece_type
8
+ - if piece.object.piece_type == 'Image'
9
+ .tn-tc-piece.asset-field
10
+ = render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
11
+ - else
12
+ .tn-tc-piece
13
+ = render 'tenon/tenon_content/piece_types/form/text', f: piece
14
+ .spacer
@@ -0,0 +1,14 @@
1
+ .three-column-image-and-text.stacked-image-and-text
2
+ = f.hidden_field :row_type
3
+ = f.hidden_field :list_order
4
+ -[[0,1], [2,3], [4,5]].each do |positions|
5
+ .four{class: cycle('', '', 'omega')}
6
+ = f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
7
+ = piece.hidden_field :piece_type
8
+ - if piece.object.piece_type == 'Image'
9
+ .tn-tc-piece.asset-field
10
+ = render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
11
+ - else
12
+ .tn-tc-piece
13
+ = render 'tenon/tenon_content/piece_types/form/text', f: piece
14
+ .spacer
@@ -0,0 +1,14 @@
1
+ .two-column-image-and-text.stacked-image-and-text
2
+ = f.hidden_field :row_type
3
+ = f.hidden_field :list_order
4
+ -[[0,1], [2,3]].each do |positions|
5
+ .six{class: cycle('', 'omega')}
6
+ = f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
7
+ = piece.hidden_field :piece_type
8
+ - if piece.object.piece_type == 'Image'
9
+ .tn-tc-piece.asset-field
10
+ = render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
11
+ - else
12
+ .tn-tc-piece
13
+ = render 'tenon/tenon_content/piece_types/form/text', f: piece
14
+ .spacer
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.10'
2
+ VERSION = '1.0.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - factor[e] design initiative
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-30 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors
@@ -890,6 +890,8 @@ files:
890
890
  - app/assets/images/tenon/select2.png
891
891
  - app/assets/images/tenon/select2x2.png
892
892
  - app/assets/images/tenon/tenon-content/FourColumnImage.png
893
+ - app/assets/images/tenon/tenon-content/FourColumnImageAndText.png
894
+ - app/assets/images/tenon/tenon-content/FourColumnImageAndText_hover.png
893
895
  - app/assets/images/tenon/tenon-content/FourColumnImage_hover.png
894
896
  - app/assets/images/tenon/tenon-content/FullWidthEmbeddedContent.png
895
897
  - app/assets/images/tenon/tenon-content/FullWidthEmbeddedContent_hover.png
@@ -902,10 +904,14 @@ files:
902
904
  - app/assets/images/tenon/tenon-content/LeftWrappedImageWithText.png
903
905
  - app/assets/images/tenon/tenon-content/LeftWrappedImageWithText_hover.png
904
906
  - app/assets/images/tenon/tenon-content/ThreeColumnImage.png
907
+ - app/assets/images/tenon/tenon-content/ThreeColumnImageAndText.png
908
+ - app/assets/images/tenon/tenon-content/ThreeColumnImageAndText_hover.png
905
909
  - app/assets/images/tenon/tenon-content/ThreeColumnImage_hover.png
906
910
  - app/assets/images/tenon/tenon-content/ThreeColumnText.png
907
911
  - app/assets/images/tenon/tenon-content/ThreeColumnText_hover.png
908
912
  - app/assets/images/tenon/tenon-content/TwoColumnImage.png
913
+ - app/assets/images/tenon/tenon-content/TwoColumnImageAndText.png
914
+ - app/assets/images/tenon/tenon-content/TwoColumnImageAndText_hover.png
909
915
  - app/assets/images/tenon/tenon-content/TwoColumnImage_hover.png
910
916
  - app/assets/images/tenon/tenon-content/TwoColumnText.png
911
917
  - app/assets/images/tenon/tenon-content/TwoColumnText_hover.png
@@ -1102,6 +1108,7 @@ files:
1102
1108
  - app/models/tenon/tenon_content/row_types.rb
1103
1109
  - app/models/tenon/tenon_content/row_types/base.rb
1104
1110
  - app/models/tenon/tenon_content/row_types/four_column_image.rb
1111
+ - app/models/tenon/tenon_content/row_types/four_column_image_and_text.rb
1105
1112
  - app/models/tenon/tenon_content/row_types/full_width_embedded_content.rb
1106
1113
  - app/models/tenon/tenon_content/row_types/full_width_image.rb
1107
1114
  - app/models/tenon/tenon_content/row_types/full_width_text.rb
@@ -1110,8 +1117,10 @@ files:
1110
1117
  - app/models/tenon/tenon_content/row_types/left_wrapped_image_with_text.rb
1111
1118
  - app/models/tenon/tenon_content/row_types/right_wrapped_image_with_text.rb
1112
1119
  - app/models/tenon/tenon_content/row_types/three_column_image.rb
1120
+ - app/models/tenon/tenon_content/row_types/three_column_image_and_text.rb
1113
1121
  - app/models/tenon/tenon_content/row_types/three_column_text.rb
1114
1122
  - app/models/tenon/tenon_content/row_types/two_column_image.rb
1123
+ - app/models/tenon/tenon_content/row_types/two_column_image_and_text.rb
1115
1124
  - app/models/tenon/tenon_content/row_types/two_column_text.rb
1116
1125
  - app/models/tenon/thinger.rb
1117
1126
  - app/models/tenon/user.rb
@@ -1224,6 +1233,7 @@ files:
1224
1233
  - app/views/tenon/tenon_content/piece_types/form/_image.html.haml
1225
1234
  - app/views/tenon/tenon_content/piece_types/form/_text.html.haml
1226
1235
  - app/views/tenon/tenon_content/row_types/display/_four_column_image.html.haml
1236
+ - app/views/tenon/tenon_content/row_types/display/_four_column_image_and_text.html.haml
1227
1237
  - app/views/tenon/tenon_content/row_types/display/_full_width_embedded_content.html.haml
1228
1238
  - app/views/tenon/tenon_content/row_types/display/_full_width_image.html.haml
1229
1239
  - app/views/tenon/tenon_content/row_types/display/_full_width_text.html.haml
@@ -1232,10 +1242,13 @@ files:
1232
1242
  - app/views/tenon/tenon_content/row_types/display/_left_wrapped_image_with_text.html.haml
1233
1243
  - app/views/tenon/tenon_content/row_types/display/_right_wrapped_image_with_text.html.haml
1234
1244
  - app/views/tenon/tenon_content/row_types/display/_three_column_image.html.haml
1245
+ - app/views/tenon/tenon_content/row_types/display/_three_column_image_and_text.html.haml
1235
1246
  - app/views/tenon/tenon_content/row_types/display/_three_column_text.html.haml
1236
1247
  - app/views/tenon/tenon_content/row_types/display/_two_column_image.html.haml
1248
+ - app/views/tenon/tenon_content/row_types/display/_two_column_image_and_text.html.haml
1237
1249
  - app/views/tenon/tenon_content/row_types/display/_two_column_text.html.haml
1238
1250
  - app/views/tenon/tenon_content/row_types/form/_four_column_image.html.haml
1251
+ - app/views/tenon/tenon_content/row_types/form/_four_column_image_and_text.html.haml
1239
1252
  - app/views/tenon/tenon_content/row_types/form/_full_width_embedded_content.html.haml
1240
1253
  - app/views/tenon/tenon_content/row_types/form/_full_width_image.html.haml
1241
1254
  - app/views/tenon/tenon_content/row_types/form/_full_width_text.html.haml
@@ -1244,8 +1257,10 @@ files:
1244
1257
  - app/views/tenon/tenon_content/row_types/form/_left_wrapped_image_with_text.html.haml
1245
1258
  - app/views/tenon/tenon_content/row_types/form/_right_wrapped_image_with_text.html.haml
1246
1259
  - app/views/tenon/tenon_content/row_types/form/_three_column_image.html.haml
1260
+ - app/views/tenon/tenon_content/row_types/form/_three_column_image_and_text.html.haml
1247
1261
  - app/views/tenon/tenon_content/row_types/form/_three_column_text.html.haml
1248
1262
  - app/views/tenon/tenon_content/row_types/form/_two_column_image.html.haml
1263
+ - app/views/tenon/tenon_content/row_types/form/_two_column_image_and_text.html.haml
1249
1264
  - app/views/tenon/tenon_content/row_types/form/_two_column_text.html.haml
1250
1265
  - app/views/tenon/users/_form.html.haml
1251
1266
  - app/views/tenon/users/edit.html.haml