promethee 4.1.10 → 4.1.15

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
  SHA256:
3
- metadata.gz: 0beecf6dd37d65be3957b1610ebc4c938388e787b8e8c6991c0a5d467ffd665b
4
- data.tar.gz: b897dd103018126be4ef58c662f59acf90ff43302db2c3d35ffa8627dcf25670
3
+ metadata.gz: 1e57882a0cb77abd8067687f897b6e06db45a0cb91daebfb46418fa225c72a36
4
+ data.tar.gz: 0050dcff099a4a343b347cc1e89c327bbf18c9ad6ec4cfbc7ddfa52507e11903
5
5
  SHA512:
6
- metadata.gz: 9bb4b71ab5b06e25c62ae3ed09147f909bdf6cd65d6869242e55b9a05c723d75289958f4e84ddf89b0fc6886215aed0730219e5e4f7688e773ad63d330873955
7
- data.tar.gz: 8ec5b9f95b687ec5d658df2260e896c30ef09fb7a962ec7ecf694e4762a16e5afd9cc86df57de4e8c82a7008bdefe6b82a3aae47b990d3fe2978481bae3a6a50
6
+ metadata.gz: d30d4542b80ae01b5291f476d8288ac95530562b88869723d9561f3785a2d63561e69327d2931c0f237ee369422b351964d24f13f69ffb06bcdd8dc81fe85edf
7
+ data.tar.gz: 121d035c280c9d759ba01340df50839135e6562a73950c1c57ee39c440fd6c5e1070e4279bb1e0700b89c3bc7bea688c5f1c6f67ea16d755c92ca050bc0f1bd5
@@ -160,6 +160,18 @@ $black: #000000 !default
160
160
  .fontawesome-carousel-control .fa
161
161
  font-size: 30px
162
162
 
163
+ &__table
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
174
+
163
175
 
164
176
  // component direct in root
165
177
  &__page > &__blockquote,
@@ -9,10 +9,12 @@
9
9
  <% end %>
10
10
  </div>
11
11
 
12
- <a class="left carousel-control fontawesome-carousel-control carousel-control-prev" href="#slider-<%= component[:id] %>" data-slide="prev">
13
- <%= icon('fa', 'chevron-left') %>
14
- </a>
15
- <a class="right carousel-control fontawesome-carousel-control carousel-control-next" href="#slider-<%= component[:id] %>" data-slide="next">
16
- <%= icon('fa', 'chevron-right') %>
17
- </a>
12
+ <% if component[:children].many? %>
13
+ <a class="left carousel-control fontawesome-carousel-control carousel-control-prev" href="#<%= promethee_id_for component %>" data-slide="prev">
14
+ <%= icon('fa', 'chevron-left') %>
15
+ </a>
16
+ <a class="right carousel-control fontawesome-carousel-control carousel-control-next" href="#<%= promethee_id_for component %>" data-slide="next">
17
+ <%= icon('fa', 'chevron-right') %>
18
+ </a>
19
+ <% end %>
18
20
  </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 %>
27
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', 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
  }
@@ -26,7 +26,13 @@
26
26
  </thead>
27
27
  <tbody>
28
28
  <% rows.each do |row| %>
29
- <tr>
29
+ <%
30
+ row_class = 'empty'
31
+ row.each do |cell|
32
+ row_class = '' unless cell[:text].blank?
33
+ end
34
+ %>
35
+ <tr class="<%= row_class %>">
30
36
  <% row.each do |cell| %>
31
37
  <td><%= cell[:text] %></td>
32
38
  <% end %>
@@ -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,7 +1,7 @@
1
1
  <script>
2
2
  angular.injector(['ng', 'Promethee']).get('presets').push({
3
3
  name: 'Image with text',
4
- icon: <%= render('promethee/presets/icon.image-with-text').to_json.html_safe %>,
4
+ icon: <%= promethee_preset_render_icon 'image-with-text' %>,
5
5
  position: 1,
6
6
  components: [
7
7
  {
@@ -9,7 +9,8 @@ module ActionView
9
9
  @options[:master_data] = object.send @method_name unless object.nil?
10
10
  @options[:master_data] = @options[:value] if @options.key?(:value)
11
11
  @options[:disable_page_attributes] ||= false
12
- ApplicationController.renderer.render partial: 'promethee/edit', locals: @options
12
+
13
+ @template_object.render partial: 'promethee/edit', locals: @options
13
14
  end
14
15
  end
15
16
 
@@ -18,15 +19,16 @@ module ActionView
18
19
  localization_data = object.send @method_name unless object.nil?
19
20
  localization_data = @options[:value] if @options.include? :value
20
21
  @options[:disable_page_attributes] ||= false
21
- ApplicationController.renderer.render partial: 'promethee/localize',
22
- locals: {
23
- object_name: @object_name,
24
- method_name: @method_name,
25
- localization_data: localization_data,
26
- master_data: @options[:master],
27
- other_data: @options[:other],
28
- disable_page_attributes: @options[:disable_page_attributes]
29
- }
22
+
23
+ @template_object.render partial: 'promethee/localize',
24
+ locals: {
25
+ object_name: @object_name,
26
+ method_name: @method_name,
27
+ localization_data: localization_data,
28
+ master_data: @options[:master],
29
+ other_data: @options[:other],
30
+ disable_page_attributes: @options[:disable_page_attributes]
31
+ }
30
32
  end
31
33
  end
32
34
  end
@@ -26,6 +26,10 @@ module Promethee::Rails::Helper
26
26
  render("promethee/components/#{icon}/icon.svg").to_json.html_safe
27
27
  end
28
28
 
29
+ def promethee_preset_render_icon(icon)
30
+ render("promethee/presets/icon.#{icon}.svg").to_json.html_safe
31
+ end
32
+
29
33
  def promethee_util_partials
30
34
  promethee_partials_for 'utils/_*.html.erb'
31
35
  end
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.1.10'
3
+ VERSION = '4.1.15'
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.10
4
+ version: 4.1.15
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-02 00:00:00.000000000 Z
17
+ date: 2020-10-02 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails