promethee 4.1.13 → 4.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/promethee-edit/_layout.sass +3 -1
  3. data/app/assets/stylesheets/promethee-edit/_move.sass +40 -14
  4. data/app/assets/stylesheets/promethee.sass +10 -6
  5. data/app/views/promethee/components/collection_item/_show.html.erb +1 -1
  6. data/app/views/promethee/components/faq_item/_show.html.erb +1 -1
  7. data/app/views/promethee/components/image/_edit.define.html.erb +6 -0
  8. data/app/views/promethee/components/image/_edit.inspect.html.erb +5 -0
  9. data/app/views/promethee/components/image/_localize.html.erb +13 -0
  10. data/app/views/promethee/components/image/_show.html.erb +2 -1
  11. data/app/views/promethee/components/page/_edit.inspect.html.erb +3 -3
  12. data/app/views/promethee/components/page/_localize.html.erb +1 -1
  13. data/app/views/promethee/components/slider_item/_show.html.erb +1 -1
  14. data/app/views/promethee/components/table/_edit.inspect.html.erb +1 -3
  15. data/app/views/promethee/components/table/_edit.move.html.erb +2 -2
  16. data/app/views/promethee/components/table/_show.html.erb +1 -1
  17. data/app/views/promethee/components/table_cell/_edit.define.html.erb +1 -1
  18. data/app/views/promethee/components/table_cell/_edit.inspect.html.erb +1 -0
  19. data/app/views/promethee/components/table_cell/_edit.move.html.erb +1 -0
  20. data/app/views/promethee/components/table_cell/_localize.html.erb +2 -2
  21. data/app/views/promethee/components/table_cell/_show.html.erb +1 -0
  22. data/app/views/promethee/show/_image.srcset.html.erb +9 -4
  23. data/lib/promethee/rails/version.rb +1 -1
  24. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5995134837ab9a1ecff1e378a5cd6c2c773661bba57fb3a5a4a312421b689ac6
4
- data.tar.gz: 3a832f11734ccbcbddd6f725d4842b71ab924a2ea882481028b43d0feec3ff2f
3
+ metadata.gz: c4fec398977caedb678199760eda8f8048a8ad3578a575fe6750ec8ab0829294
4
+ data.tar.gz: a8ead5a99ade251233f48277368067b2b0c283de4a4019dc92dd7f4a21979f21
5
5
  SHA512:
6
- metadata.gz: 79e066c623432ba0eaefab072649c311fa0d6ca72f329f6813b55db52e0b19b44feff6961420c894c14ee656825e926e636b4ad4deed735eec6cca5f4b589d68
7
- data.tar.gz: e392f5c4b4a3c56b0f19d896ab287e0624a24c2db5429d7bfa8d2e117415e94b950846a040fe477a92e53457156604cc8c69735fb72064cd274929c826e1436e
6
+ metadata.gz: 182b0e99d95aee2780171efcd08518d47fbe200dfca49c0d10122b87d2c2987301e890b5848ec04589f6570252c9b69c3fe8b3fc13e7143d7bc2e9c48db9c636
7
+ data.tar.gz: 042ee1425887e10eeb3bd1d3a8ca8d4ab28ac179c19843260863487468021c9445b56685629e298c04cfe214cfd64bbb4f82b81e7c30d1fe372bd5cc0c848520
@@ -140,8 +140,8 @@
140
140
 
141
141
  &__component--blockquote
142
142
  text-align: center
143
-
144
143
  .blockquote
144
+ padding-top: 20px
145
145
  &::before, &::after
146
146
  display: inline-block
147
147
  &::before
@@ -151,6 +151,8 @@
151
151
  p
152
152
  display: inline
153
153
  line-height: 1.4rem
154
+ &:last-child
155
+ margin-bottom: 0
154
156
 
155
157
 
156
158
  @media (min-width: 768px)
@@ -8,7 +8,7 @@
8
8
  border: 1px solid #CCCCCC
9
9
  display: flex
10
10
  flex-direction: column
11
- justify-content: center
11
+ justify-content: flex-start
12
12
  min-height: 70px
13
13
  position: relative
14
14
  p.text-empty
@@ -21,14 +21,38 @@
21
21
  color: white
22
22
  &__remove
23
23
  background: white
24
- font-size: 12px
25
- line-height: 12px
26
- padding: 1px 2px 1px 3px
24
+ font-size: 10px
25
+ line-height: 10px
26
+ padding: 1px 3px
27
27
  position: absolute
28
- right: 4px
28
+ right: 5px
29
29
  top: 4px
30
30
  z-index: 1
31
31
 
32
+ &--row
33
+ .row
34
+ margin-left: -10px
35
+ margin-right: -10px
36
+ .promethee-edit__component--column
37
+ padding-bottom: 5px
38
+ padding-top: 5px
39
+
40
+ &--text
41
+ .promethee-edit__component__inner
42
+ padding: 10px
43
+ h1, h2, h3
44
+ margin-top: 0
45
+ p
46
+ line-height: 1.2
47
+ &:last-of-type
48
+ margin-bottom: 0
49
+
50
+ &--image
51
+ figure
52
+ margin-bottom: 0
53
+ figcaption
54
+ padding: 5px
55
+
32
56
  &--aside
33
57
  .btn
34
58
  &.left
@@ -57,6 +81,9 @@
57
81
  align-items: center
58
82
  display: flex
59
83
  justify-content: center
84
+ p
85
+ &:last-of-type
86
+ margin-bottom: 0
60
87
  .dots
61
88
  margin-top: 5px
62
89
  text-align: center
@@ -118,24 +145,23 @@
118
145
  color: white
119
146
  font-size: 8px
120
147
  margin-bottom: 5px
121
- padding: 4px 5px 5px
148
+ padding: 5px 10px
122
149
  text-transform: uppercase
123
150
  &__component
124
151
  user-select: none
125
152
 
126
153
  &__droppable
127
154
  background: white
128
- border: 1px dashed #253742
155
+ border: 0 dashed #253742
129
156
  box-sizing: border-box
130
- height: 20px
131
- margin: 2px 0
132
157
  opacity: .2
133
158
  position: relative
134
- transition: width .2s, height .2s, opacity .2s
135
- visibility: hidden
136
- width: 100%
159
+ transition: all .5s
160
+ width: calc(100% - 4px)
137
161
  &.ui-droppable-active
138
- visibility: visible
162
+ border-width: 1px
163
+ height: 20px
164
+ margin: 2px
139
165
  &.ui-droppable-hover
140
166
  height: 100px
141
167
  opacity: 1
@@ -157,7 +183,7 @@
157
183
  padding: 30px 20px 15px
158
184
  position: fixed
159
185
  top: 50px
160
- width: calc(50vw - 365px)
186
+ width: calc(50vw - 367px)
161
187
  z-index: 1000
162
188
  &-header
163
189
  font-size: 18px
@@ -161,12 +161,16 @@ $black: #000000 !default
161
161
  font-size: 30px
162
162
 
163
163
  &__table
164
- tr.empty
165
- background-color: #EEEEEE
166
- td
167
- line-height: 1px
168
- padding-bottom: 1px
169
- padding-top: 1px
164
+ tr
165
+ p
166
+ line-height: $line-height-base
167
+ margin-bottom: 0
168
+ &.empty
169
+ background-color: #EEEEEE
170
+ td
171
+ line-height: 1px
172
+ padding-bottom: 1px
173
+ padding-top: 1px
170
174
 
171
175
 
172
176
  // component direct in root
@@ -24,7 +24,7 @@ end
24
24
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
25
25
  </div>
26
26
  <% elsif image_blob.present? %>
27
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: caption %>
27
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', title: '', caption: caption %>
28
28
  <% end %>
29
29
  <div class="collection-item__content__caption">
30
30
  <%= caption %>
@@ -19,7 +19,7 @@ image_blob = blob_from_data component[:attributes].dig(:image, :value)
19
19
  <% if image_blob %>
20
20
  <div class="row ">
21
21
  <div class="col-3 col-xs-3">
22
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: '' %>
22
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', title: '', caption: '' %>
23
23
  </div>
24
24
  <div class="col-9 col-xs-9">
25
25
  <%= body %>
@@ -28,6 +28,12 @@
28
28
  translatable: true,
29
29
  type: 'string',
30
30
  value: ''
31
+ },
32
+ title: {
33
+ searchable: true,
34
+ translatable: true,
35
+ type: 'string',
36
+ value: ''
31
37
  }
32
38
  }
33
39
  }
@@ -12,5 +12,10 @@
12
12
  <label class="label-control">Alt</label>
13
13
  <input class="form-control" ng-model="promethee.inspected.attributes.alt.value">
14
14
  </div>
15
+
16
+ <div class="form-group">
17
+ <label class="label-control">Title</label>
18
+ <input class="form-control" ng-model="promethee.inspected.attributes.title.value">
19
+ </div>
15
20
  </div>
16
21
  </script>
@@ -37,4 +37,17 @@
37
37
  </div>
38
38
  </div>
39
39
  </div>
40
+
41
+ <div class="row" ng-show="master.attributes.title.value || frozen_component.attributes.title.value">
42
+ <div class="col-md-6">
43
+ <b>Title</b>
44
+ <p>{{master.attributes.title.value}}</p>
45
+ </div>
46
+ <div class="col-md-6">
47
+ <div class="form-group">
48
+ <b>Title</b>
49
+ <input class="form-control" ng-model="component.attributes.title.value" type="text">
50
+ </div>
51
+ </div>
52
+ </div>
40
53
  </script>
@@ -2,13 +2,14 @@
2
2
  blob = blob_from_data component[:attributes].dig(:image, :value)
3
3
 
4
4
  alt = component[:attributes].dig(:alt, :value)&.to_s
5
+ title = component[:attributes].dig(:title, :value)&.to_s
5
6
  caption = component[:attributes].dig(:caption, :value)&.to_s
6
7
  %>
7
8
  <figure class="<%= promethee_class_for component %>"
8
9
  id="<%= promethee_id_for component %>">
9
10
  <div class="promethee__component__row">
10
11
  <div class="promethee__component__content">
11
- <%= render 'promethee/show/image.srcset', blob: blob, alt: alt, caption: caption if blob %>
12
+ <%= render 'promethee/show/image.srcset', blob: blob, alt: alt, title: title, caption: caption if blob %>
12
13
  <% unless caption.blank? %>
13
14
  <figcaption>
14
15
  <%= caption %>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div class="form-group">
9
9
  <label class="label-control">Description</label>
10
- <textarea class="form-control" ng-model="promethee.inspected.attributes.description.value"></textarea>
10
+ <textarea rows="6" class="form-control" ng-model="promethee.inspected.attributes.description.value"></textarea>
11
11
  </div>
12
12
  <% end %>
13
13
 
@@ -16,12 +16,12 @@
16
16
 
17
17
  <div class="form-group">
18
18
  <label class="label-control">Stylesheets</label>
19
- <textarea class="form-control" ng-model="promethee.inspected.attributes.stylesheets.value"></textarea>
19
+ <textarea rows="6" class="form-control" ng-model="promethee.inspected.attributes.stylesheets.value"></textarea>
20
20
  </div>
21
21
 
22
22
  <div class="form-group">
23
23
  <label class="label-control">Javascripts</label>
24
- <textarea class="form-control" ng-model="promethee.inspected.attributes.javascripts.value"></textarea>
24
+ <textarea rows="6" class="form-control" ng-model="promethee.inspected.attributes.javascripts.value"></textarea>
25
25
  </div>
26
26
  </div>
27
27
  </script>
@@ -25,7 +25,7 @@
25
25
  <div class="col-md-6">
26
26
  <div class="form-group">
27
27
  <b>Page description</b>
28
- <textarea class="form-control" ng-model="component.attributes.description.value"></textarea>
28
+ <textarea class="form-control" rows="6" ng-model="component.attributes.description.value"></textarea>
29
29
  </div>
30
30
  </div>
31
31
  </div>
@@ -24,7 +24,7 @@ end
24
24
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
25
25
  </div>
26
26
  <% elsif image_blob.present? %>
27
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: caption, image_zoomable: false %>
27
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', title: '', caption: caption, image_zoomable: false %>
28
28
  <% end %>
29
29
  <div class="carousel-item__content__caption">
30
30
  <%= caption %>
@@ -48,9 +48,7 @@
48
48
  {{ getTableCell(getHeaderCellUids()[$index]).attributes.text.value }}
49
49
  </span>
50
50
  <br/>
51
- <input type="text"
52
- ng-model="getTableCell(cellUid).attributes.text.value"
53
- class="form-control" />
51
+ <summernote config="summernoteConfig" ng-model="getTableCell(cellUid).attributes.text.value"></summernote>
54
52
  </div>
55
53
  </div>
56
54
  <hr>
@@ -5,14 +5,14 @@
5
5
  <thead>
6
6
  <tr>
7
7
  <th ng-repeat="cellUid in component.attributes.structure.value[0]">
8
- {{getTableCell(cellUid).attributes.text.value}}
8
+ <div ng-bind-html="getTableCell(cellUid).attributes.text.value | htmlSafe"></div>
9
9
  </th>
10
10
  </tr>
11
11
  </thead>
12
12
  <tbody>
13
13
  <tr ng-repeat="row in component.attributes.structure.value" ng-if="$index > 0">
14
14
  <td ng-repeat="cellUid in row">
15
- {{getTableCell(cellUid).attributes.text.value}}
15
+ <div ng-bind-html="getTableCell(cellUid).attributes.text.value | htmlSafe"></div>
16
16
  </td>
17
17
  </tr>
18
18
  </tbody>
@@ -4,7 +4,7 @@
4
4
  row.map { |cellUid|
5
5
  {
6
6
  uid: cellUid,
7
- text: cells.find { |cell| cell[:id] == cellUid }.dig(:attributes, :text, :value)
7
+ text: cells.find { |cell| cell[:id] == cellUid }.dig(:attributes, :text, :value)&.html_safe
8
8
  }
9
9
  }
10
10
  }
@@ -11,7 +11,7 @@
11
11
  text: {
12
12
  searchable: true,
13
13
  translatable: true,
14
- type: 'string',
14
+ type: 'text',
15
15
  value: ''
16
16
  }
17
17
  }
@@ -0,0 +1 @@
1
+ <%# Defined in components/table/_edit.inspect.html.erb %>
@@ -0,0 +1 @@
1
+ <%# Defined in components/table/_edit.move.html.erb %>
@@ -2,11 +2,11 @@
2
2
  <div class="row mt-2" ng-show="master.attributes.text.value || frozen_component.attributes.text.value">
3
3
  <div class="col-md-6">
4
4
  <b>Text</b>
5
- <p>{{ master.attributes.text.value }}</p>
5
+ <div ng-bind-html="master.attributes.text.value | htmlSafe"></div>
6
6
  </div>
7
7
  <div class="col-md-6">
8
8
  <b>Text</b>
9
- <input class="form-control" ng-model="component.attributes.text.value" type="text">
9
+ <summernote config="summernoteConfig" ng-model="component.attributes.text.value"></summernote>
10
10
  </div>
11
11
  </div>
12
12
  </script>
@@ -0,0 +1 @@
1
+ <%# Defined in components/table/_show.html.erb %>
@@ -1,6 +1,10 @@
1
- <% image_zoomable = true if image_zoomable.nil? # do not use ||= as image_zoomable may be "false" %>
2
- <% fullsize_url = url_for(blob) %>
3
- <% image_width = blob.metadata.has_key?(:width) ? blob.metadata[:width] : ActiveStorage::Analyzer::ImageAnalyzer.new(blob).metadata[:width] %>
1
+ <%
2
+ image_zoomable = true if image_zoomable.nil? # do not use ||= as image_zoomable may be "false"
3
+ fullsize_url = url_for(blob)
4
+ image_width = blob.metadata.has_key?(:width) ? blob.metadata[:width] : ActiveStorage::Analyzer::ImageAnalyzer.new(blob).metadata[:width]
5
+ alt ||= ''
6
+ title ||= ''
7
+ %>
4
8
 
5
9
  <% if image_zoomable %>
6
10
  <a data-fancybox="gallery" title="<%= strip_tags(caption) %>" href="<%= fullsize_url %>">
@@ -14,7 +18,8 @@
14
18
  "
15
19
  width="<%= image_width %>"
16
20
  sizes="100vw"
17
- alt="<%= alt.html_safe %>"
21
+ alt="<%= j alt %>"
22
+ title="<%= j title %>"
18
23
  class="img-fluid img-responsive"
19
24
  >
20
25
 
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.1.13'
3
+ VERSION = '4.1.18'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.13
4
+ version: 4.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Gaya
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2020-09-10 00:00:00.000000000 Z
17
+ date: 2020-11-13 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails
@@ -504,7 +504,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
504
504
  - !ruby/object:Gem::Version
505
505
  version: '0'
506
506
  requirements: []
507
- rubygems_version: 3.1.2
507
+ rubygems_version: 3.1.4
508
508
  signing_key:
509
509
  specification_version: 4
510
510
  summary: Bring fire to your page