promethee 4.1.7 → 4.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/promethee.sass +8 -0
  3. data/app/views/promethee/_localize.html.erb +9 -1
  4. data/app/views/promethee/components/aside/_localize.html.erb +2 -2
  5. data/app/views/promethee/components/aside/_show.html.erb +2 -1
  6. data/app/views/promethee/components/blockquote/_localize.html.erb +2 -2
  7. data/app/views/promethee/components/blockquote/_show.html.erb +2 -1
  8. data/app/views/promethee/components/collection/_show.html.erb +2 -1
  9. data/app/views/promethee/components/collection_item/_localize.html.erb +2 -2
  10. data/app/views/promethee/components/collection_item/_show.html.erb +5 -3
  11. data/app/views/promethee/components/column/_show.html.erb +2 -1
  12. data/app/views/promethee/components/cover/_localize.html.erb +4 -4
  13. data/app/views/promethee/components/cover/_show.html.erb +3 -1
  14. data/app/views/promethee/components/faq/_show.html.erb +2 -1
  15. data/app/views/promethee/components/faq_item/_localize.html.erb +1 -1
  16. data/app/views/promethee/components/faq_item/_show.html.erb +2 -1
  17. data/app/views/promethee/components/image/_localize.html.erb +3 -3
  18. data/app/views/promethee/components/image/_show.html.erb +2 -1
  19. data/app/views/promethee/components/page/_localize.html.erb +1 -1
  20. data/app/views/promethee/components/page/_show.html.erb +2 -1
  21. data/app/views/promethee/components/row/_show.html.erb +1 -0
  22. data/app/views/promethee/components/slider/_show.html.erb +11 -7
  23. data/app/views/promethee/components/slider_item/_localize.html.erb +2 -2
  24. data/app/views/promethee/components/slider_item/_show.html.erb +6 -3
  25. data/app/views/promethee/components/table/_show.html.erb +9 -2
  26. data/app/views/promethee/components/table_cell/_localize.html.erb +8 -10
  27. data/app/views/promethee/components/text/_localize.html.erb +1 -1
  28. data/app/views/promethee/components/text/_show.html.erb +2 -1
  29. data/app/views/promethee/components/video/_localize.html.erb +1 -1
  30. data/app/views/promethee/components/video/_show.html.erb +2 -1
  31. data/lib/promethee/rails/helper.rb +5 -1
  32. data/lib/promethee/rails/version.rb +1 -1
  33. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 273ea8989bee7c01520af11dcedbf568122937eac2c54f57ee493394604f69cf
4
- data.tar.gz: 001cfbf000acf02f23daeba707d03156f2bb45eafe9317c355cc54df463460b1
3
+ metadata.gz: 5c791f3fc87492c74cf0943f04ee9d7c65731ed6769688294dfbe45baee5d663
4
+ data.tar.gz: e584208ada91f6c1d8e38f2f10d10e6605d3e44db13219c2dbb5f9300e235f43
5
5
  SHA512:
6
- metadata.gz: e8d5b0383e16473baf45140e8907275e5831fd994c0b6c02127234fa3cb27b991376ec632b53eb556673b6ac96e8a1a504f7c989be802579cf1e99b6355a6eda
7
- data.tar.gz: 9e43292b6a4d035c6a6b0a54fd17f115eb63bcc245ff3d561744702e0b5cf22353bed3495b7048471679ab41a198b4456fee21180b82c4f92841ce19a5f3d596
6
+ metadata.gz: 3c1de9aed61106c72bc8db3e9dcd3fc2481edc42bddfc5ca8adc3015b5cb6620e84f0b991f61a3b7d58f7bbef4eb34eda76705d2265f1d9ce315aac05462d83a
7
+ data.tar.gz: 0e829aabd72bd3e964cd6d0d8d0ce5872d05f69281e88f114e87d72aaae5268f44e50c4e4206f74331312f07eacf7949be2ff9cc11d70bcda565c9f4e35fb147
@@ -160,6 +160,14 @@ $black: #000000 !default
160
160
  .fontawesome-carousel-control .fa
161
161
  font-size: 30px
162
162
 
163
+ &__table
164
+ tr.empty
165
+ background-color: #EEEEEE
166
+ td
167
+ line-height: 1px
168
+ padding-bottom: 1px
169
+ padding-top: 1px
170
+
163
171
 
164
172
  // component direct in root
165
173
  &__page > &__blockquote,
@@ -53,11 +53,17 @@ promethee_masters_multiple = Promethee::Data::MastersMultiple.new master_data, o
53
53
  $scope.data = <%= promethee_data.to_json.html_safe %>;
54
54
  $scope.masters = mastersMultiple;
55
55
  $scope.masters.set(<%= promethee_masters_multiple.to_json.html_safe %>);
56
+
56
57
  $scope.$watch('data', function(new_val, old_val) {
57
58
  if (old_val != new_val) {
58
59
  window.warnBeforeUnload.lock();
59
60
  }
60
61
  }, true);
62
+
63
+ $scope.freezeData = function (data) {
64
+ return JSON.parse(JSON.stringify(data));
65
+ };
66
+
61
67
  $scope.copyTranslations = function(event) {
62
68
  event.preventDefault();
63
69
  if (confirm('Warning: this will overwrite every translations!')) {
@@ -97,7 +103,9 @@ promethee_masters_multiple = Promethee::Data::MastersMultiple.new master_data, o
97
103
  ng-controller="PrometheeLocalizerController as prometheeLocalizerController">
98
104
 
99
105
  <script type="text/ng-template" id="promethee/localize/component">
100
- <span class="hidden d-none">{{ master = masters.masterForComponent(component) }}</span>
106
+ <span class="hidden d-none" ng-init="frozen_component = freezeData(component)">
107
+ {{ master = masters.masterForComponent(component) }}
108
+ </span>
101
109
  <ng-include src="'promethee/components/' + component.type + '/localize'"></ng-include>
102
110
  </script>
103
111
 
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
- <div class="row" ng-show="master.attributes.collapsed_content.value">
17
+ <div class="row" ng-show="master.attributes.collapsed_content.value || frozen_component.attributes.collapsed_content.value">
18
18
  <div class="col-md-6">
19
19
  <b>Aside collapsed content</b>
20
20
  <div ng-bind-html="master.attributes.collapsed_content.value | htmlSafe"></div>
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  </div>
29
29
 
30
- <div class="row" ng-show="master.attributes.collapsed_content.value">
30
+ <div class="row" ng-show="master.attributes.open_label.value || frozen_component.attributes.open_label.value">
31
31
  <div class="col-md-6">
32
32
  <b>Button label</b>
33
33
  <div ng-bind-html="master.attributes.open_label.value | htmlSafe"></div>
@@ -5,7 +5,8 @@
5
5
  open_label_position = component[:attributes].dig(:open_label_position, :value)&.to_s
6
6
  %>
7
7
 
8
- <aside class="<%= promethee_class_for component %> aside">
8
+ <aside class="<%= promethee_class_for component %> aside"
9
+ id="<%= promethee_id_for component %>">
9
10
  <div class="promethee__component__row">
10
11
  <div class="promethee__component__content">
11
12
  <div class="aside__content">
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/blockquote/localize">
2
- <div ng-show="master.attributes.body.value">
2
+ <div ng-show="master.attributes.body.value || frozen_component.attributes.body.value">
3
3
  <hr>
4
4
  <div class="row">
5
5
  <div class="col-md-6">
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <div class="row" ng-show="master.attributes.author.value">
18
+ <div class="row" ng-show="master.attributes.author.value || frozen_component.attributes.author.value">
19
19
  <div class="col-md-6">
20
20
  <b>Author</b>
21
21
  <p>{{master.attributes.author.value}}</p>
@@ -3,7 +3,8 @@
3
3
  author = component[:attributes].dig(:author, :value)&.to_s
4
4
  %>
5
5
 
6
- <div class="<%= promethee_class_for(component) %>">
6
+ <div class="<%= promethee_class_for(component) %>"
7
+ id="<%= promethee_id_for component %>">
7
8
  <div class="promethee__component__row">
8
9
  <div class="promethee__component__content">
9
10
  <blockquote class="blockquote">
@@ -12,7 +12,8 @@
12
12
  end
13
13
  %>
14
14
 
15
- <div class="row <%= promethee_class_for component %>">
15
+ <div class="row <%= promethee_class_for component %>"
16
+ id="<%= promethee_id_for component %>">
16
17
  <% component[:children].each.with_index do |child, n| %>
17
18
  <div class="<%= col_classes %>">
18
19
  <%= render 'promethee/show/component', component: child %>
@@ -1,8 +1,8 @@
1
1
  <script type="text/ng-template" id="promethee/components/collection_item/localize">
2
- <div ng-show="master.attributes.caption.value !== '' || master.attributes.media_type.value == 'video'">
2
+ <div ng-show="master.attributes.caption.value || frozen_component.attributes.caption.value || master.attributes.media_type.value == 'video'">
3
3
  <hr>
4
4
 
5
- <div class="row" ng-show="master.attributes.caption.value !== ''">
5
+ <div class="row" ng-show="master.attributes.caption.value || frozen_component.attributes.caption.value">
6
6
  <div class="col-md-6">
7
7
  <b>Collection Item Caption</b>
8
8
  <div class="promethee-edit__wrapper" ng-bind-html="master.attributes.caption.value | htmlSafe"></div>
@@ -17,8 +17,8 @@ when 'video'
17
17
  end
18
18
  end
19
19
  %>
20
- <div class="collection-item__content">
21
-
20
+ <div class="<%= promethee_class_for component %> collection-item__content"
21
+ id="<%= promethee_id_for component %>">
22
22
  <% if iframe_src.present? %>
23
23
  <div class="embed-responsive embed-responsive-16by9">
24
24
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
@@ -26,5 +26,7 @@ end
26
26
  <% elsif image_blob.present? %>
27
27
  <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: caption %>
28
28
  <% end %>
29
- <%= caption %>
29
+ <div class="collection-item__content__caption">
30
+ <%= caption %>
31
+ </div>
30
32
  </div>
@@ -41,6 +41,7 @@ if component[:attributes].dig(:mobile, :value, :enabled, :value)
41
41
  classes += " col-xs-#{size} col-xs-offset-#{offset}" # BS3, does nothing for BS4
42
42
  end
43
43
  %>
44
- <div class="<%= classes %> <%= promethee_class_for component %>">
44
+ <div class="<%= classes %> <%= promethee_class_for component %>"
45
+ id="<%= promethee_id_for component %>">
45
46
  <%= render 'promethee/show/components', components: component[:children] %>
46
47
  </div>
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/cover/localize">
2
- <div ng-show="master.attributes.surtitle.value || master.attributes.title.value || master.attributes.subtitle.value">
2
+ <div ng-show="master.attributes.surtitle.value || frozen_component.attributes.surtitle.value || master.attributes.title.value || frozen_component.attributes.title.value || master.attributes.subtitle.value || frozen_component.attributes.subtitle.value">
3
3
  <hr>
4
4
 
5
5
  <div class="row">
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  </div>
10
10
 
11
- <div class="row" ng-show="master.attributes.surtitle.value">
11
+ <div class="row" ng-show="master.attributes.surtitle.value || frozen_component.attributes.surtitle.value">
12
12
  <div class="col-md-6">
13
13
  <b>Surtitle</b>
14
14
  <p>{{master.attributes.surtitle.value}}</p>
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  </div>
23
23
 
24
- <div class="row" ng-show="master.attributes.title.value">
24
+ <div class="row" ng-show="master.attributes.title.value || frozen_component.attributes.title.value">
25
25
  <div class="col-md-6">
26
26
  <b>Title</b>
27
27
  <p>{{master.attributes.title.value}}</p>
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  </div>
36
36
 
37
- <div class="row" ng-show="master.attributes.subtitle.value">
37
+ <div class="row" ng-show="master.attributes.subtitle.value || frozen_component.attributes.subtitle.value">
38
38
  <div class="col-md-6">
39
39
  <b>Subtitle</b>
40
40
  <p>{{master.attributes.subtitle.value}}</p>
@@ -5,7 +5,9 @@ surtitle = component[:attributes].dig(:surtitle, :value)&.to_s
5
5
  title = component[:attributes].dig(:title, :value)&.to_s
6
6
  subtitle = component[:attributes].dig(:subtitle, :value)&.to_s
7
7
  %>
8
- <div id="component-<%= component[:id] %>" class="<%= promethee_class_for(component) %>" style="background-image: url(<%= url_for(blob.variant(resize: '1920>', quality: 95)) if blob %>)">
8
+ <div class="<%= promethee_class_for(component) %>"
9
+ id="<%= promethee_id_for component %>"
10
+ style="background-image: url(<%= url_for(blob.variant(resize: '1920>', quality: 95)) if blob %>)">
9
11
  <div class="container">
10
12
  <div class="promethee__component__row">
11
13
  <div class="promethee__component__content">
@@ -1,4 +1,5 @@
1
- <div class="<%= promethee_class_for component %>">
1
+ <div class="<%= promethee_class_for component %>"
2
+ id="<%= promethee_id_for component %>">
2
3
  <div class="promethee__component__row">
3
4
  <div class="promethee__component__content">
4
5
  <% component[:children].each do |child| %>
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/faq_item/localize">
2
- <div ng-show="master.attributes.title.value">
2
+ <div ng-show="master.attributes.title.value || frozen_component.attributes.title.value">
3
3
  <hr>
4
4
  <div class="row">
5
5
  <div class="col-md-6">
@@ -6,7 +6,8 @@ special_question = component[:attributes].dig(:special_question, :value)
6
6
  image_blob = blob_from_data component[:attributes].dig(:image, :value)
7
7
  %>
8
8
 
9
- <div class="<%= promethee_class_for component %> <%= 'promethee__component__faq_item--special' if special_question %>">
9
+ <div class="<%= promethee_class_for component %> <%= 'promethee__component__faq_item--special' if special_question %>"
10
+ id="<%= promethee_id_for component %>">
10
11
  <h4 data-toggle="collapse"
11
12
  data-target="#collapse-faq-<%= component[:id] %>"
12
13
  aria-expanded="false"
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/image/localize">
2
- <div ng-show="master.attributes.alt.value || master.attributes.caption.value">
2
+ <div ng-show="master.attributes.alt.value || frozen_component.attributes.alt.value || master.attributes.caption.value || frozen_component.attributes.caption.value">
3
3
  <hr>
4
4
 
5
5
  <div class="row">
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
  </div>
13
13
 
14
- <div class="row" ng-show="master.attributes.caption.value">
14
+ <div class="row" ng-show="master.attributes.caption.value || frozen_component.attributes.caption.value">
15
15
  <div class="col-md-6">
16
16
  <b>Caption</b>
17
17
  <p>{{master.attributes.caption.value}}</p>
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  </div>
27
27
 
28
- <div class="row" ng-show="master.attributes.alt.value">
28
+ <div class="row" ng-show="master.attributes.alt.value || frozen_component.attributes.alt.value">
29
29
  <div class="col-md-6">
30
30
  <b>Alt</b>
31
31
  <p>{{master.attributes.alt.value}}</p>
@@ -4,7 +4,8 @@ blob = blob_from_data component[:attributes].dig(:image, :value)
4
4
  alt = component[:attributes].dig(:alt, :value)&.to_s
5
5
  caption = component[:attributes].dig(:caption, :value)&.to_s
6
6
  %>
7
- <figure class="<%= promethee_class_for component %>">
7
+ <figure class="<%= promethee_class_for component %>"
8
+ id="<%= promethee_id_for component %>">
8
9
  <div class="promethee__component__row">
9
10
  <div class="promethee__component__content">
10
11
  <%= render 'promethee/show/image.srcset', blob: blob, alt: alt, caption: caption if blob %>
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <div class="row" ng-show="master.attributes.description.value">
18
+ <div class="row" ng-show="master.attributes.description.value || frozen_component.attributes.description.value">
19
19
  <div class="col-md-6">
20
20
  <div>
21
21
  <b>Page description</b>
@@ -11,6 +11,7 @@
11
11
  <script><%= javascripts %></script>
12
12
  <% end %>
13
13
 
14
- <div class="<%= promethee_class_for component %>">
14
+ <div class="<%= promethee_class_for component %>"
15
+ id="<%= promethee_id_for component %>">
15
16
  <%= render 'promethee/show/components', components: component[:children] %>
16
17
  </div>
@@ -22,6 +22,7 @@ end
22
22
  %>
23
23
 
24
24
  <div class="row <%= promethee_class_for component %><%= ' promethee__component__row--background' if has_background %>"
25
+ id="<%= promethee_id_for component %>"
25
26
  style="background-color: <%= background_color %>; <%= background_images.count > 0 ? "background-repeat: no-repeat; background-image: #{background_images.join(', ')}; background-position: #{background_positions.join(', ')}; background-size: #{background_sizes.join(', ')};" : '' %>">
26
27
  <%= render 'promethee/show/components', components: component[:children] %>
27
28
  </div>
@@ -1,4 +1,6 @@
1
- <div id="slider-<%= component[:id] %>" class="carousel slide <%= promethee_class_for component %>" data-ride="carousel">
1
+ <div class="carousel slide <%= promethee_class_for component %>"
2
+ id="<%= promethee_id_for component %>"
3
+ data-ride="carousel">
2
4
  <div class="carousel-inner">
3
5
  <% component[:children].each.with_index do |item, n| %>
4
6
  <div class="carousel-item item<%= ' active' if n.zero? %>">
@@ -7,10 +9,12 @@
7
9
  <% end %>
8
10
  </div>
9
11
 
10
- <a class="left carousel-control fontawesome-carousel-control carousel-control-prev" href="#slider-<%= component[:id] %>" data-slide="prev">
11
- <%= icon('fa', 'chevron-left') %>
12
- </a>
13
- <a class="right carousel-control fontawesome-carousel-control carousel-control-next" href="#slider-<%= component[:id] %>" data-slide="next">
14
- <%= icon('fa', 'chevron-right') %>
15
- </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 %>
16
20
  </div>
@@ -1,8 +1,8 @@
1
1
  <script type="text/ng-template" id="promethee/components/slider_item/localize">
2
- <div ng-show="master.attributes.caption.value !== '' || master.attributes.media_type.value == 'video'">
2
+ <div ng-show="master.attributes.caption.value || frozen_component.attributes.caption.value || master.attributes.media_type.value == 'video'">
3
3
  <hr>
4
4
 
5
- <div class="row" ng-show="master.attributes.caption.value !== ''">
5
+ <div class="row" ng-show="master.attributes.caption.value || frozen_component.attributes.caption.value">
6
6
  <div class="col-md-6">
7
7
  <b>Slider Item Caption</b>
8
8
  <div class="promethee-edit__wrapper" ng-bind-html="master.attributes.caption.value | htmlSafe"></div>
@@ -17,13 +17,16 @@ when 'video'
17
17
  end
18
18
  end
19
19
  %>
20
- <div class="carousel-item__content">
20
+ <div class="<%= promethee_class_for component %> carousel-item__content"
21
+ id="<%= promethee_id_for component %>">
21
22
  <% if iframe_src.present? %>
22
23
  <div class="embed-responsive embed-responsive-16by9">
23
24
  <iframe frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen" src="<%= iframe_src %>"></iframe>
24
25
  </div>
25
26
  <% elsif image_blob.present? %>
26
- <%= 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 %>
27
28
  <% end %>
28
- <%= caption %>
29
+ <div class="carousel-item__content__caption">
30
+ <%= caption %>
31
+ </div>
29
32
  </div>
@@ -12,7 +12,8 @@
12
12
  headerRow = rows.shift
13
13
  %>
14
14
 
15
- <div id="component-<%= component[:id] %>" class="<%= promethee_class_for(component) %>">
15
+ <div class="<%= promethee_class_for(component) %>"
16
+ id="<%= promethee_id_for component %>">
16
17
  <% unless headerRow.nil? %>
17
18
  <div class="table-responsive">
18
19
  <table class="table">
@@ -25,7 +26,13 @@
25
26
  </thead>
26
27
  <tbody>
27
28
  <% rows.each do |row| %>
28
- <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 %>">
29
36
  <% row.each do |cell| %>
30
37
  <td><%= cell[:text] %></td>
31
38
  <% end %>
@@ -1,14 +1,12 @@
1
1
  <script type="text/ng-template" id="promethee/components/table_cell/localize">
2
- <div ng-show="master.attributes.text.value !== ''">
3
- <div class="row mt-2" ng-show="master.attributes.text.value !== ''">
4
- <div class="col-md-6">
5
- <b>Text</b>
6
- <p>{{ master.attributes.text.value }}</p>
7
- </div>
8
- <div class="col-md-6">
9
- <b>Text</b>
10
- <input class="form-control" ng-model="component.attributes.text.value" type="text">
11
- </div>
2
+ <div class="row mt-2" ng-show="master.attributes.text.value || frozen_component.attributes.text.value">
3
+ <div class="col-md-6">
4
+ <b>Text</b>
5
+ <p>{{ master.attributes.text.value }}</p>
6
+ </div>
7
+ <div class="col-md-6">
8
+ <b>Text</b>
9
+ <input class="form-control" ng-model="component.attributes.text.value" type="text">
12
10
  </div>
13
11
  </div>
14
12
  </script>
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/text/localize">
2
- <div ng-show="master.attributes.body.value">
2
+ <div ng-show="master.attributes.body.value || frozen_component.attributes.body.value">
3
3
  <hr>
4
4
  <div class="row">
5
5
  <div class="col-md-6">
@@ -1,7 +1,8 @@
1
1
  <%
2
2
  body = component[:attributes].dig(:body, :value)&.to_s&.html_safe
3
3
  %>
4
- <div class="<%= promethee_class_for component %>">
4
+ <div class="<%= promethee_class_for component %>"
5
+ id="<%= promethee_id_for component %>">
5
6
  <div class="promethee__component__row">
6
7
  <div class="promethee__component__content">
7
8
  <%= body %>
@@ -1,5 +1,5 @@
1
1
  <script type="text/ng-template" id="promethee/components/video/localize">
2
- <div ng-show="master.attributes.url.value !== ''">
2
+ <div ng-show="master.attributes.url.value || frozen_component.attributes.url.value">
3
3
  <hr>
4
4
  <div class="row">
5
5
  <div class="col-md-6">
@@ -14,7 +14,8 @@ else
14
14
  iframe_src = url
15
15
  end
16
16
  %>
17
- <div class="<%= promethee_class_for component %>">
17
+ <div class="<%= promethee_class_for component %>"
18
+ id="<%= promethee_id_for component %>">
18
19
  <div class="promethee__component__row">
19
20
  <div class="promethee__component__content">
20
21
  <div class="embed-responsive embed-responsive-16by9">
@@ -3,7 +3,7 @@ module Promethee::Rails::Helper
3
3
  render partial: 'promethee/show', locals: { master_data: data, localization_data: options[:l] }
4
4
  end
5
5
 
6
- def promethee_class_for component, *modifiers
6
+ def promethee_class_for(component, *modifiers)
7
7
  base = "promethee__component"
8
8
  component_base = "#{base}__#{component[:type]}"
9
9
 
@@ -14,6 +14,10 @@ module Promethee::Rails::Helper
14
14
  ].flatten.select(&:present?).join ' '
15
15
  end
16
16
 
17
+ def promethee_id_for(component)
18
+ "promethee-component-#{component[:id]}"
19
+ end
20
+
17
21
  def promethee_component_partials
18
22
  promethee_partials_for 'components/*/_edit.*.html.erb'
19
23
  end
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.1.7'
3
+ VERSION = '4.1.12'
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.7
4
+ version: 4.1.12
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-06-25 00:00:00.000000000 Z
17
+ date: 2020-09-03 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.0.3
508
508
  signing_key:
509
509
  specification_version: 4
510
510
  summary: Bring fire to your page