tenon 1.0.67 → 1.0.68
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/tenon/tenon-content/TwoColumnWithBackgroundImage.png +0 -0
- data/app/assets/images/tenon/tenon-content/TwoColumnWithBackgroundImage_hover.png +0 -0
- data/app/assets/javascripts/tenon/features/asset_attachment.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/asset_detachment.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/multiple_asset_attachment.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/tenon_content/aesthetics.js.coffee +3 -3
- data/app/assets/javascripts/tenon/features/tenon_content/column_swap.js.coffee +1 -1
- data/app/assets/javascripts/tenon/features/tenon_content/image_controls.js.coffee +2 -2
- data/app/assets/javascripts/tenon/features/tenon_content/post_crop_handler.js.coffee +1 -1
- data/app/assets/stylesheets/tenon/ui/asset-attachment.css.scss +2 -2
- data/app/assets/stylesheets/tenon/ui/asset-cropping.css.scss +6 -15
- data/app/assets/stylesheets/tenon/ui/tenon-content.css.scss +52 -8
- data/app/models/tenon/tenon_content/row_types/two_column_with_background_image.rb +18 -0
- data/app/models/tenon/tenon_content/row_types.rb +17 -16
- data/app/views/tenon/galleries/_form.html.haml +1 -1
- data/app/views/tenon/shared/_asset_field.html.haml +1 -1
- data/app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml +22 -0
- data/app/views/tenon/tenon_content/piece_types/form/_image.html.haml +3 -3
- data/app/views/tenon/tenon_content/row_types/display/_four_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_four_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_four_column_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_full_width_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/display/_left_image_right_text.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/display/_left_text_right_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/display/_left_wrapped_image_with_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_right_wrapped_image_with_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_six_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_six_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_three_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_three_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_three_column_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_two_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_two_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/display/_two_column_with_background_image.html.haml +5 -0
- data/app/views/tenon/tenon_content/row_types/form/_four_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_four_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_full_width_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_left_image_right_text.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_left_text_right_image.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_left_wrapped_image_with_text.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_right_wrapped_image_with_text.html.haml +2 -2
- data/app/views/tenon/tenon_content/row_types/form/_six_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_six_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_three_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_three_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_two_column_image.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_two_column_image_and_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_two_column_text.html.haml +1 -1
- data/app/views/tenon/tenon_content/row_types/form/_two_column_with_background_image.html.haml +12 -0
- data/config/initializers/devise.rb +1 -1
- data/lib/tenon/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bcdeacf12a76cb1e60d096b7bd141c7cf44d985
|
4
|
+
data.tar.gz: d58719f677142abd25adc5b0b24ff2875726a97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ade7f0c577456bd46361a87252c17afa87e4ba8252d48a80eb35116abd99a5231ca07c194ed02850f13b3693e530aff93336af548abcf6783c21789d64ed715f
|
7
|
+
data.tar.gz: dda1e868b51926fce0bf10f498e7ecd93d6812ec9f2c662005f0a29cc497fa274fc7700d96173111b9832a9e4fd0bd3e6f48b73c00aa28406cd263338cd2befb
|
@@ -5,7 +5,7 @@ class Tenon.features.AssetDetachment
|
|
5
5
|
_removeAsset: (e) =>
|
6
6
|
e.preventDefault()
|
7
7
|
e.stopPropagation()
|
8
|
-
@$assetField = $(e.currentTarget).closest('.asset-field')
|
8
|
+
@$assetField = $(e.currentTarget).closest('.tn-tc-asset-field')
|
9
9
|
@$assetField.find('.asset-id-field').removeAttr('value')
|
10
10
|
@$assetField.find('.thumbnail img').attr('src', '/assets/tenon/thumb-doc.png')
|
11
11
|
@$assetField.find('.asset-info').html('No asset selected.')
|
@@ -4,7 +4,7 @@ class Tenon.features.tenonContent.Aesthetics
|
|
4
4
|
@$container.imagesLoaded(@_applyAesthetics)
|
5
5
|
$(window).on('resize', @_applyAesthetics)
|
6
6
|
$(document).on('cocoon:after-insert', '.tenon-content', @_applyAesthetics)
|
7
|
-
@$container.on('tenon.asset_attached', '.asset-field', @_applyAesthetics)
|
7
|
+
@$container.on('tenon.asset_attached', '.tn-tc-asset-field', @_applyAesthetics)
|
8
8
|
@$container.on('tenon.content.column_resized', 'div', @_applyAesthetics)
|
9
9
|
@$wrap.on('tenon.content.popped', @_applyAesthetics)
|
10
10
|
@$wrap.on('tenon.content.resized', @_applyAesthetics)
|
@@ -18,7 +18,7 @@ class Tenon.features.tenonContent.Aesthetics
|
|
18
18
|
@_setMinimumWrappedEditorHeight()
|
19
19
|
|
20
20
|
_setMinimumEditorHeightWithImage: =>
|
21
|
-
$.each @$container.find('.image-and-text, .multi-text'), (i, row) ->
|
21
|
+
$.each @$container.find('.tn-tc-image-and-text, .tn-tc-multi-text'), (i, row) ->
|
22
22
|
$images = $(row).find('.image, .editable-text')
|
23
23
|
$images.css('min-height', '0px')
|
24
24
|
heights = $.map($images, (img, i) -> $(img).outerHeight())
|
@@ -26,6 +26,6 @@ class Tenon.features.tenonContent.Aesthetics
|
|
26
26
|
$(row).find('.editable-text').css('min-height', height)
|
27
27
|
|
28
28
|
_setMinimumWrappedEditorHeight: =>
|
29
|
-
$.each @$container.find('.wrapped-image-with-text'), (i, row) ->
|
29
|
+
$.each @$container.find('.tn-tc-wrapped-image-with-text'), (i, row) ->
|
30
30
|
height = $(row).find('.image').height();
|
31
31
|
$(row).find('.editable-text').css('min-height', height + 20)
|
@@ -13,7 +13,7 @@ class Tenon.features.tenonContent.ColumnSwap
|
|
13
13
|
_swapWrapped: (e) =>
|
14
14
|
e.preventDefault()
|
15
15
|
@$row = @_getRow(e)
|
16
|
-
@$row.find('.asset-field').toggleClass('left').toggleClass('right')
|
16
|
+
@$row.find('.tn-tc-asset-field').toggleClass('left').toggleClass('right')
|
17
17
|
@_saveRowType()
|
18
18
|
|
19
19
|
_swapDOM: =>
|
@@ -40,10 +40,10 @@ class Tenon.features.tenonContent.ImageControls
|
|
40
40
|
# Add some data for use in operations
|
41
41
|
@$controls.data('image', @$image)
|
42
42
|
@$controls.find('.replace-image')
|
43
|
-
.data('asset-field', @$image.closest('.asset-field'))
|
43
|
+
.data('asset-field', @$image.closest('.tn-tc-asset-field'))
|
44
44
|
|
45
45
|
# Add some classes for targeting and styling
|
46
|
-
if @$image.closest('.wrapped-image-with-text').length > 0
|
46
|
+
if @$image.closest('.tn-tc-wrapped-image-with-text').length > 0
|
47
47
|
@$controls.addClass('wrapped-image', true)
|
48
48
|
else if @$image.closest('.full-width-image').length > 0
|
49
49
|
@$controls.addClass('full-width-image')
|
@@ -14,7 +14,7 @@ class Tenon.features.tenonContent.PostCropHandler
|
|
14
14
|
# let's kick it OLD SCHOOL
|
15
15
|
img = new Image()
|
16
16
|
img.onload = =>
|
17
|
-
@$piece.closest('.asset-field').trigger('tenon.asset_attached')
|
17
|
+
@$piece.closest('.tn-tc-asset-field').trigger('tenon.asset_attached')
|
18
18
|
img.src = $img.attr('src')
|
19
19
|
|
20
20
|
_updateFields: =>
|
@@ -1,50 +1,41 @@
|
|
1
1
|
.asset-cropping {
|
2
|
-
|
3
2
|
.preview {
|
4
3
|
@include transform(translate(-50%, 0));
|
5
4
|
position: fixed;
|
5
|
+
z-index: $tn-z-asset-cropping;
|
6
6
|
top: $tn-margin;
|
7
7
|
left: 50%;
|
8
|
-
z-index: $tn-z-asset-cropping;
|
9
8
|
max-width: 90vw;
|
10
9
|
max-height: 90vh;
|
11
10
|
background-color: $tn-light-grey;
|
12
|
-
|
13
11
|
.image-holder {
|
14
12
|
padding: $tn-padding;
|
15
13
|
background-color: $tn-light-grey;
|
16
14
|
}
|
17
|
-
|
18
15
|
.spinner {
|
19
16
|
@include transform(translate(-50%, -50%));
|
20
17
|
position: fixed;
|
18
|
+
z-index: $tn-z-asset-cropping-spinner;
|
21
19
|
top: 50%;
|
22
20
|
left: 50%;
|
23
|
-
z-index: $tn-z-asset-cropping-spinner;
|
24
21
|
display: none;
|
25
|
-
|
26
22
|
i {
|
27
|
-
color: #fff;
|
28
23
|
font-size: 90px;
|
29
|
-
opacity:
|
24
|
+
opacity: .5;
|
25
|
+
color: #fff;
|
30
26
|
}
|
31
27
|
}
|
32
|
-
|
33
28
|
.crop_buttons {
|
34
|
-
|
35
29
|
input {
|
36
30
|
margin: 0;
|
37
31
|
}
|
38
|
-
|
39
32
|
label {
|
40
|
-
margin: 2px 10px 0
|
41
|
-
|
33
|
+
margin: 2px 10px 0 20px;
|
42
34
|
&:before {
|
43
|
-
|
35
|
+
left: 0;
|
44
36
|
}
|
45
37
|
}
|
46
38
|
}
|
47
|
-
|
48
39
|
.edit_asset {
|
49
40
|
@include clearfix;
|
50
41
|
margin: 0;
|
@@ -41,6 +41,8 @@
|
|
41
41
|
.tn-tc-row {
|
42
42
|
@include transition(box-shadow .2s ease-in);
|
43
43
|
@include transition(border .2s ease-in);
|
44
|
+
position: relative;
|
45
|
+
overflow: hidden;
|
44
46
|
min-height: 50px;
|
45
47
|
margin-bottom: 10px;
|
46
48
|
padding: 0;
|
@@ -65,9 +67,6 @@
|
|
65
67
|
display: none;
|
66
68
|
}
|
67
69
|
}
|
68
|
-
.tn-tc-row {
|
69
|
-
position: relative;
|
70
|
-
}
|
71
70
|
.drag-anchor {
|
72
71
|
float: left;
|
73
72
|
}
|
@@ -146,9 +145,9 @@
|
|
146
145
|
padding-top: 0;
|
147
146
|
}
|
148
147
|
.btn {
|
149
|
-
background-color: $tn-primary;
|
150
|
-
color: white;
|
151
148
|
margin: 0 10px;
|
149
|
+
color: white;
|
150
|
+
background-color: $tn-primary;
|
152
151
|
}
|
153
152
|
}
|
154
153
|
a.add-image {
|
@@ -186,7 +185,7 @@
|
|
186
185
|
position: static;
|
187
186
|
display: none;
|
188
187
|
}
|
189
|
-
.asset-field img {
|
188
|
+
.tn-tc-asset-field img {
|
190
189
|
width: 100%;
|
191
190
|
}
|
192
191
|
.image {
|
@@ -226,18 +225,41 @@
|
|
226
225
|
display: none;
|
227
226
|
}
|
228
227
|
|
229
|
-
.wrapped-image-with-text {
|
228
|
+
.tn-tc-wrapped-image-with-text {
|
230
229
|
.editable-text {
|
231
230
|
min-height: 200px;
|
232
231
|
}
|
233
232
|
}
|
234
233
|
|
235
|
-
.image-and-text {
|
234
|
+
.tn-tc-image-and-text {
|
236
235
|
> div {
|
237
236
|
height: 100%;
|
238
237
|
}
|
239
238
|
}
|
240
239
|
|
240
|
+
.tn-tc-with-background-image {
|
241
|
+
padding: 60px 0 40px;
|
242
|
+
.tn-text-overlay {
|
243
|
+
position: relative;
|
244
|
+
z-index: 10;
|
245
|
+
float: left;
|
246
|
+
width: 46%;
|
247
|
+
margin: 0 2%;
|
248
|
+
.editable-text {
|
249
|
+
background-color: rgba(#fff, .8);
|
250
|
+
}
|
251
|
+
}
|
252
|
+
.tn-tc-background-image {
|
253
|
+
position: absolute;
|
254
|
+
top: 40px;
|
255
|
+
a.add-image span {
|
256
|
+
line-height: 60px;
|
257
|
+
height: 140px;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
|
241
263
|
.image-controls {
|
242
264
|
@include transition(none);
|
243
265
|
&.full-width-image, &.three-column-image, &.four-column-image, &.stacked-image-and-text {
|
@@ -286,3 +308,25 @@ a.open-embed-modal {
|
|
286
308
|
.modal .edit-embed-code {
|
287
309
|
display: block;
|
288
310
|
}
|
311
|
+
|
312
|
+
.tn-tc-with-background-image {
|
313
|
+
padding: 60px 0 40px;
|
314
|
+
.tn-text-overlay {
|
315
|
+
position: relative;
|
316
|
+
z-index: 10;
|
317
|
+
float: left;
|
318
|
+
width: 46%;
|
319
|
+
margin: 0 2%;
|
320
|
+
.editable-text {
|
321
|
+
background-color: rgba(#fff, .8);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
.tn-tc-background-image {
|
325
|
+
position: absolute;
|
326
|
+
top: 40px;
|
327
|
+
a.add-image span {
|
328
|
+
line-height: 60px;
|
329
|
+
height: 140px;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Tenon
|
2
|
+
module TenonContent
|
3
|
+
module RowTypes
|
4
|
+
class TwoColumnWithBackgroundImage < 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: 'twelve')
|
9
|
+
|
10
|
+
row.pieces.build(piece_type: 'Text', position: 1, size: 'six')
|
11
|
+
row.pieces.build(piece_type: 'Text', position: 2, size: 'six')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -2,22 +2,23 @@ module Tenon
|
|
2
2
|
module TenonContent
|
3
3
|
module RowTypes
|
4
4
|
LIBRARY_ROW_TYPES = {
|
5
|
-
'One Column of Text'
|
6
|
-
'One Column Image'
|
7
|
-
'Two Columns of Text'
|
8
|
-
'Two Images'
|
9
|
-
'Three Columns of Text'
|
10
|
-
'Three Images'
|
11
|
-
'Four Columns of Text'
|
12
|
-
'Four Images'
|
13
|
-
'Wrapped Image with Text'
|
14
|
-
'Six Images'
|
15
|
-
'Embedded Content'
|
16
|
-
'Image and Text (No Wrap)'
|
17
|
-
'Two Column Image and Text'
|
18
|
-
'Three Column Image and Text'
|
19
|
-
'Four Column Image and Text'
|
20
|
-
'Six Column Image and Text'
|
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
|
+
'Four Columns of Text' => 'FourColumnText',
|
12
|
+
'Four Images' => 'FourColumnImage',
|
13
|
+
'Wrapped Image with Text' => 'LeftWrappedImageWithText',
|
14
|
+
'Six Images' => 'SixColumnImage',
|
15
|
+
'Embedded Content' => 'FullWidthEmbeddedContent',
|
16
|
+
'Image and Text (No Wrap)' => 'LeftImageRightText',
|
17
|
+
'Two Column Image and Text' => 'TwoColumnImageAndText',
|
18
|
+
'Three Column Image and Text' => 'ThreeColumnImageAndText',
|
19
|
+
'Four Column Image and Text' => 'FourColumnImageAndText',
|
20
|
+
'Six Column Image and Text' => 'SixColumnImageAndText',
|
21
|
+
'Two Columns with Background Image' => 'TwoColumnWithBackgroundImage'
|
21
22
|
}
|
22
23
|
end
|
23
24
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
.form-group
|
15
15
|
%p
|
16
16
|
= link_to_add_association "Add another photo", f, :photos, 'data-association-insertion-node' => '#photo-list', 'data-association-insertion-method' => 'append'
|
17
|
-
= link_to 'Add several', new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.asset-fields' }
|
17
|
+
= link_to 'Add several', new_item_asset_path(multiple: true), class: 'btn btn-comp browse', data: {'modal-remote' => true, 'modal-title' => "Select file", 'modal-handler' => 'Tenon.features.MultipleAssetAttachment', target: '.tn-tc-asset-fields' }
|
18
18
|
|
19
19
|
%ul.nested-field-list.sortable#photo-list
|
20
20
|
= f.nested_fields :photo
|
@@ -0,0 +1,22 @@
|
|
1
|
+
= f.hidden_field :image_id, class: 'asset-id-field'
|
2
|
+
= f.hidden_field :position
|
3
|
+
= f.hidden_field :size
|
4
|
+
= f.hidden_field :stretch_to_fill
|
5
|
+
.image{class: 'stretch'}
|
6
|
+
- if f.object.image
|
7
|
+
= backend_piece_image_tag(f.object)
|
8
|
+
- else
|
9
|
+
= link_to(new_item_asset_path, class: 'add-image', data: {'modal-remote' => true, 'modal-title' => 'Select Image', 'modal-handler' => 'Tenon.features.tenonContent.AssetAttachment'}) do
|
10
|
+
%span Add Image
|
11
|
+
|
12
|
+
.medium-editor-toolbar.medium-toolbar-arrow-under.medium-editor-toolbar-active.image-controls{style: 'display: none; margin-top: -65px;'}
|
13
|
+
%ul.medium-editor-toolbar-actions.clearfix
|
14
|
+
%li
|
15
|
+
%button{title: 'Crop', class: 'asset-crop medium-editor-action medium-editor-button-first', data: {'tooltip' => true, 'post-crop-handler' => 'Tenon.features.tenonContent.PostCropHandler', 'asset-id' => f.object.image_id}}
|
16
|
+
%i.fa.fa-crop
|
17
|
+
%li
|
18
|
+
%button{href: new_item_asset_path, title: 'Replace Image', class: 'replace-image medium-editor-action medium-editor-button-last', data: {'modal-remote' => 'true', 'modal-title' => "Select Image", 'modal-handler' => 'Tenon.features.tenonContent.AssetAttachment', 'tooltip' => true}}
|
19
|
+
%i.fa.fa-picture-o
|
20
|
+
|
21
|
+
.medium-editor-toolbar-form-anchor
|
22
|
+
|
@@ -12,11 +12,11 @@
|
|
12
12
|
= f.super_text_area :caption, class: 'caption', placeholder: 'Enter caption here...', style: ("display: none;" unless f.object.show_caption)
|
13
13
|
= f.hidden_field :show_caption
|
14
14
|
|
15
|
-
.medium-editor-toolbar-form-anchor.link-form{style: 'position: absolute; z-index:
|
16
|
-
= f.super_text_field :link_url, placeholder: 'Paste or type a link', style: 'display; inline; width: 316px;';
|
15
|
+
.medium-editor-toolbar-form-anchor.link-form{style: 'position: absolute; z-index: 10;'}
|
17
16
|
= link_to new_item_asset_path(hide_upload: true), 'title' => 'Link to an Asset', 'data-modal-remote' => 'true', 'data-modal-handler' => 'Tenon.features.tenonContent.ImageAssetLink', 'data-modal-title' => 'Link to Asset', 'data-tooltip' => true do
|
18
17
|
%i.fa.fa-file-pdf-o
|
19
|
-
=
|
18
|
+
= f.super_text_field :link_url, placeholder: 'Paste or type a link', style: 'display; inline; width: 316px;';
|
19
|
+
= link_to '', '#', class: 'medium-editor-cancel', title: 'Cancel', data: { tooltip: true }
|
20
20
|
|
21
21
|
.medium-editor-toolbar.medium-toolbar-arrow-under.medium-editor-toolbar-active.image-controls{style: "display: none; margin-top: -65px;"}
|
22
22
|
%ul.medium-editor-toolbar-actions.clearfix
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.four-column-image
|
2
2
|
- row.pieces.each do |piece|
|
3
|
-
.tn-tc-piece.asset-field.three{class: cycle('', '', '', 'omega')}
|
3
|
+
.tn-tc-piece.tn-tc-asset-field.three{class: cycle('', '', '', 'omega')}
|
4
4
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
5
5
|
.spacer
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.three{class: cycle('', '', '', 'omega')}
|
4
4
|
- row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
|
5
5
|
- if piece.piece_type == 'Image'
|
6
|
-
.tn-tc-piece.asset-field
|
6
|
+
.tn-tc-piece.tn-tc-asset-field
|
7
7
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
8
8
|
- else
|
9
9
|
.tn-tc-piece
|
@@ -1,7 +1,7 @@
|
|
1
|
-
.left-image-right-text.image-and-text
|
1
|
+
.tn-tc-left-image-right-text.tn-tc-image-and-text
|
2
2
|
- row.pieces.each do |piece|
|
3
3
|
- if piece.piece_type == "Image"
|
4
|
-
.tn-tc-piece.asset-field{:class => piece.size}
|
4
|
+
.tn-tc-piece.tn-tc-asset-field{:class => piece.size}
|
5
5
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
6
6
|
- elsif piece.piece_type == "Text"
|
7
7
|
.tn-tc-piece.omega{:class => piece.size}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
.left-text-right-image.image-and-text
|
1
|
+
.tn-tc-left-text-right-image.tn-tc-image-and-text
|
2
2
|
- row.pieces.each do |piece|
|
3
3
|
- if piece.piece_type == "Text"
|
4
4
|
.tn-tc-piece{class: piece.size}
|
5
5
|
= render "tenon/tenon_content/piece_types/display/text", piece: piece
|
6
6
|
- if piece.piece_type == "Image"
|
7
|
-
.tn-tc-piece.asset-field.omega{class: piece.size}
|
7
|
+
.tn-tc-piece.tn-tc-asset-field.omega{class: piece.size}
|
8
8
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
9
9
|
.spacer
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- [ [0, 1], [2, 3], [4, 5] ].each_with_index do |columns, i|
|
3
3
|
.tn-tc-piece.four{class: i == 2 ? 'omega' : ''}
|
4
4
|
- columns.each do |position|
|
5
|
-
.tn-tc-piece.asset-field.six{class: cycle('', 'omega')}
|
5
|
+
.tn-tc-piece.tn-tc-asset-field.six{class: cycle('', 'omega')}
|
6
6
|
- row.pieces.select { |p| p.position == position }.each do |piece|
|
7
7
|
= render 'tenon/tenon_content/piece_types/display/image', piece: piece
|
8
8
|
.spacer
|
@@ -5,7 +5,7 @@
|
|
5
5
|
.six{class: cycle('', 'omega')}
|
6
6
|
- row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
|
7
7
|
- if piece.piece_type == 'Image'
|
8
|
-
.tn-tc-piece.asset-field
|
8
|
+
.tn-tc-piece.tn-tc-asset-field
|
9
9
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
10
10
|
- else
|
11
11
|
.tn-tc-piece
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.four{class: cycle('', '', 'omega')}
|
4
4
|
- row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
|
5
5
|
- if piece.piece_type == 'Image'
|
6
|
-
.tn-tc-piece.asset-field
|
6
|
+
.tn-tc-piece.tn-tc-asset-field
|
7
7
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
8
8
|
- else
|
9
9
|
.tn-tc-piece
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.two-column-image
|
2
2
|
- row.pieces.each do |piece|
|
3
|
-
.tn-tc-piece.asset-field{ class: [piece.size, cycle('', 'omega')] }
|
3
|
+
.tn-tc-piece.tn-tc-asset-field{ class: [piece.size, cycle('', 'omega')] }
|
4
4
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
5
5
|
.spacer
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.six{class: cycle('', 'omega')}
|
4
4
|
- row.pieces.select { |p| positions.include?(p.position) }.each do |piece|
|
5
5
|
- if piece.piece_type == 'Image'
|
6
|
-
.tn-tc-piece.asset-field
|
6
|
+
.tn-tc-piece.tn-tc-asset-field
|
7
7
|
= render "tenon/tenon_content/piece_types/display/image", piece: piece
|
8
8
|
- else
|
9
9
|
.tn-tc-piece
|
data/app/views/tenon/tenon_content/row_types/display/_two_column_with_background_image.html.haml
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
.two-column-with-background-image.tn-tc-background-image{style: "background-image: url(#{row.pieces.first.image.url})"}
|
2
|
+
- row.pieces[1..-1].each do |piece|
|
3
|
+
.tn-tc-piece.six{class: cycle('', 'omega')}
|
4
|
+
= render "tenon/tenon_content/piece_types/display/text", piece: piece
|
5
|
+
.spacer
|
@@ -2,6 +2,6 @@
|
|
2
2
|
= f.hidden_field :list_order
|
3
3
|
= f.hidden_field :row_type
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
|
-
.tn-tc-piece.asset-field.three{ class: cycle('', '', '', 'omega') }
|
5
|
+
.tn-tc-piece.tn-tc-asset-field.three{ class: cycle('', '', '', 'omega') }
|
6
6
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, position: piece.object.position
|
7
7
|
.spacer
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
|
7
7
|
= piece.hidden_field :piece_type
|
8
8
|
- if piece.object.piece_type == 'Image'
|
9
|
-
.tn-tc-piece.asset-field
|
9
|
+
.tn-tc-piece.tn-tc-asset-field
|
10
10
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
11
11
|
- else
|
12
12
|
.tn-tc-piece
|
@@ -2,6 +2,6 @@
|
|
2
2
|
= f.hidden_field :list_order
|
3
3
|
= f.hidden_field :row_type
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
|
-
.tn-tc-piece.asset-field.twelve
|
5
|
+
.tn-tc-piece.tn-tc-asset-field.twelve
|
6
6
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, position: 0, style: 'full'
|
7
7
|
.spacer
|
@@ -1,10 +1,10 @@
|
|
1
|
-
.left-image-right-text.image-and-text
|
1
|
+
.tn-tc-left-image-right-text.tn-tc-image-and-text
|
2
2
|
= f.hidden_field :row_type
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
5
|
= piece.hidden_field :piece_type
|
6
6
|
- if piece.object.piece_type == "Image"
|
7
|
-
.tn-tc-piece.asset-field{:class => piece.object.size}
|
7
|
+
.tn-tc-piece.tn-tc-asset-field{:class => piece.object.size}
|
8
8
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
9
9
|
- elsif piece.object.piece_type == "Text"
|
10
10
|
.tn-tc-piece.omega{:class => piece.object.size}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.left-text-right-image.image-and-text
|
1
|
+
.tn-tc-left-text-right-image.tn-tc-image-and-text
|
2
2
|
= f.hidden_field :row_type
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
= f.fields_for :pieces do |piece|
|
@@ -7,6 +7,6 @@
|
|
7
7
|
.tn-tc-piece{class: piece.object.size}
|
8
8
|
= render "tenon/tenon_content/piece_types/form/text", f: piece
|
9
9
|
- if piece.object.piece_type == "Image"
|
10
|
-
.tn-tc-piece.asset-field.omega{class: piece.object.size}
|
10
|
+
. tn-tc-piece.tn-tc-asset-field.omega{class: piece.object.size}
|
11
11
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
12
12
|
.spacer
|
@@ -1,11 +1,11 @@
|
|
1
|
-
.left-wrapped-image-with-text.wrapped-image-with-text
|
1
|
+
.tn-tc-left-wrapped-image-with-text.tn-tc-wrapped-image-with-text
|
2
2
|
= f.hidden_field :row_type
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
.twelve
|
5
5
|
= f.fields_for :pieces do |piece|
|
6
6
|
= piece.hidden_field :piece_type
|
7
7
|
- if piece.object.piece_type == "Image"
|
8
|
-
.wrapped-image.left.asset-field.omega.tn-tc-piece{class: piece.object.size}
|
8
|
+
.wrapped-image.left.tn-tc-asset-field.omega.tn-tc-piece{class: piece.object.size}
|
9
9
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'wrap'
|
10
10
|
- if piece.object.piece_type == "Text"
|
11
11
|
= render "tenon/tenon_content/piece_types/form/text", f: piece
|
@@ -1,11 +1,11 @@
|
|
1
|
-
.right-wrapped-image-with-text.wrapped-image-with-text
|
1
|
+
.tn-tc-right-wrapped-image-with-text.tn-tc-wrapped-image-with-text
|
2
2
|
= f.hidden_field :row_type
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
.twelve
|
5
5
|
= f.fields_for :pieces do |piece|
|
6
6
|
= piece.hidden_field :piece_type
|
7
7
|
- if piece.object.piece_type == "Image"
|
8
|
-
.wrapped-image.right.asset-field.omega.tn-tc-piece{class: piece.object.size}
|
8
|
+
.wrapped-image.right.tn-tc-asset-field.omega.tn-tc-piece{class: piece.object.size}
|
9
9
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'wrap'
|
10
10
|
- if piece.object.piece_type == "Text"
|
11
11
|
= render "tenon/tenon_content/piece_types/form/text", f: piece
|
@@ -4,7 +4,7 @@
|
|
4
4
|
- [ [0, 1], [2, 3], [4, 5] ].each_with_index do |columns, i|
|
5
5
|
.four{class: i == 2 ? 'omega' : ''}
|
6
6
|
- columns.each do |position|
|
7
|
-
.tn-tc-piece.asset-field.six{class: cycle('', 'omega')}
|
7
|
+
.tn-tc-piece.tn-tc-asset-field.six{class: cycle('', 'omega')}
|
8
8
|
= f.fields_for :pieces, f.object.pieces.select{ |p| p.position == position } do |piece|
|
9
9
|
= render 'tenon/tenon_content/piece_types/form/image', f: piece, position: piece.object.position
|
10
10
|
.spacer
|
@@ -8,7 +8,7 @@
|
|
8
8
|
= f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
|
9
9
|
= piece.hidden_field :piece_type
|
10
10
|
- if piece.object.piece_type == 'Image'
|
11
|
-
.tn-tc-piece.asset-field
|
11
|
+
.tn-tc-piece.tn-tc-asset-field
|
12
12
|
= render 'tenon/tenon_content/piece_types/form/image', f: piece, style: 'half'
|
13
13
|
- else
|
14
14
|
.tn-tc-piece
|
@@ -2,6 +2,6 @@
|
|
2
2
|
= f.hidden_field :list_order
|
3
3
|
= f.hidden_field :row_type
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
|
-
.tn-tc-piece.asset-field.four{ class: cycle('', '', 'omega') }
|
5
|
+
.tn-tc-piece.tn-tc-asset-field.four{ class: cycle('', '', 'omega') }
|
6
6
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, position: piece.object.position
|
7
7
|
.spacer
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
|
7
7
|
= piece.hidden_field :piece_type
|
8
8
|
- if piece.object.piece_type == 'Image'
|
9
|
-
.tn-tc-piece.asset-field
|
9
|
+
.tn-tc-piece.tn-tc-asset-field
|
10
10
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
11
11
|
- else
|
12
12
|
.tn-tc-piece
|
@@ -3,6 +3,6 @@
|
|
3
3
|
= f.hidden_field :list_order
|
4
4
|
= f.fields_for :pieces do |piece|
|
5
5
|
= piece.hidden_field :piece_type
|
6
|
-
.tn-tc-piece.asset-field{ class: [piece.object.size, cycle('', 'omega')] }
|
6
|
+
.tn-tc-piece.tn-tc-asset-field{ class: [piece.object.size, cycle('', 'omega')] }
|
7
7
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
8
8
|
.spacer
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= f.fields_for :pieces, f.object.pieces.select { |p| positions.include?(p.position) } do |piece|
|
7
7
|
= piece.hidden_field :piece_type
|
8
8
|
- if piece.object.piece_type == 'Image'
|
9
|
-
.tn-tc-piece.asset-field
|
9
|
+
.tn-tc-piece.tn-tc-asset-field
|
10
10
|
= render "tenon/tenon_content/piece_types/form/image", f: piece, style: 'half'
|
11
11
|
- else
|
12
12
|
.tn-tc-piece
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.two-column-text-with-background-image.tn-tc-with-background-image
|
2
|
+
= f.hidden_field :list_order
|
3
|
+
= f.hidden_field :row_type
|
4
|
+
= f.fields_for :pieces do |piece|
|
5
|
+
- if piece.object.position == 0
|
6
|
+
.tn-tc-piece.tn-tc-background-image.tn-tc-asset-field.twelve
|
7
|
+
= render "tenon/tenon_content/piece_types/form/background_image", f: piece, position: 0, style: 'full'
|
8
|
+
- else
|
9
|
+
.tn-tc-piece.tn-text-overlay{class: cycle('', 'omega')}
|
10
|
+
= render "tenon/tenon_content/piece_types/form/text", f: piece, position: piece.object.position
|
11
|
+
|
12
|
+
.spacer
|
@@ -10,7 +10,7 @@ Devise.setup do |config|
|
|
10
10
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
11
|
# note that it will be overwritten if you use your own mailer class
|
12
12
|
# with default "from" parameter.
|
13
|
-
config.mailer_sender = '
|
13
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
14
14
|
|
15
15
|
# Configure the class responsible to send e-mails.
|
16
16
|
# config.mailer = 'Devise::Mailer'
|
data/lib/tenon/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.68
|
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: 2015-06-
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: better_errors
|
@@ -923,6 +923,8 @@ files:
|
|
923
923
|
- app/assets/images/tenon/tenon-content/TwoColumnImage_hover.png
|
924
924
|
- app/assets/images/tenon/tenon-content/TwoColumnText.png
|
925
925
|
- app/assets/images/tenon/tenon-content/TwoColumnText_hover.png
|
926
|
+
- app/assets/images/tenon/tenon-content/TwoColumnWithBackgroundImage.png
|
927
|
+
- app/assets/images/tenon/tenon-content/TwoColumnWithBackgroundImage_hover.png
|
926
928
|
- app/assets/images/tenon/tenon_icon.png
|
927
929
|
- app/assets/images/tenon/thumb-doc.png
|
928
930
|
- app/assets/images/tenon/thumb-video.png
|
@@ -1146,6 +1148,7 @@ files:
|
|
1146
1148
|
- app/models/tenon/tenon_content/row_types/two_column_image.rb
|
1147
1149
|
- app/models/tenon/tenon_content/row_types/two_column_image_and_text.rb
|
1148
1150
|
- app/models/tenon/tenon_content/row_types/two_column_text.rb
|
1151
|
+
- app/models/tenon/tenon_content/row_types/two_column_with_background_image.rb
|
1149
1152
|
- app/models/tenon/thinger.rb
|
1150
1153
|
- app/models/tenon/user.rb
|
1151
1154
|
- app/services/tenon/redirector.rb
|
@@ -1260,6 +1263,7 @@ files:
|
|
1260
1263
|
- app/views/tenon/tenon_content/piece_types/display/_embedded_content.html.haml
|
1261
1264
|
- app/views/tenon/tenon_content/piece_types/display/_image.html.haml
|
1262
1265
|
- app/views/tenon/tenon_content/piece_types/display/_text.html.haml
|
1266
|
+
- app/views/tenon/tenon_content/piece_types/form/_background_image.html.haml
|
1263
1267
|
- app/views/tenon/tenon_content/piece_types/form/_embedded_content.html.haml
|
1264
1268
|
- app/views/tenon/tenon_content/piece_types/form/_image.html.haml
|
1265
1269
|
- app/views/tenon/tenon_content/piece_types/form/_text.html.haml
|
@@ -1281,6 +1285,7 @@ files:
|
|
1281
1285
|
- app/views/tenon/tenon_content/row_types/display/_two_column_image.html.haml
|
1282
1286
|
- app/views/tenon/tenon_content/row_types/display/_two_column_image_and_text.html.haml
|
1283
1287
|
- app/views/tenon/tenon_content/row_types/display/_two_column_text.html.haml
|
1288
|
+
- app/views/tenon/tenon_content/row_types/display/_two_column_with_background_image.html.haml
|
1284
1289
|
- app/views/tenon/tenon_content/row_types/form/_four_column_image.html.haml
|
1285
1290
|
- app/views/tenon/tenon_content/row_types/form/_four_column_image_and_text.html.haml
|
1286
1291
|
- app/views/tenon/tenon_content/row_types/form/_four_column_text.html.haml
|
@@ -1299,6 +1304,7 @@ files:
|
|
1299
1304
|
- app/views/tenon/tenon_content/row_types/form/_two_column_image.html.haml
|
1300
1305
|
- app/views/tenon/tenon_content/row_types/form/_two_column_image_and_text.html.haml
|
1301
1306
|
- app/views/tenon/tenon_content/row_types/form/_two_column_text.html.haml
|
1307
|
+
- app/views/tenon/tenon_content/row_types/form/_two_column_with_background_image.html.haml
|
1302
1308
|
- app/views/tenon/users/_form.html.haml
|
1303
1309
|
- app/views/tenon/users/edit.html.haml
|
1304
1310
|
- app/views/tenon/users/index.html.haml
|