promethee 4.1.7 → 4.1.8

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: 273ea8989bee7c01520af11dcedbf568122937eac2c54f57ee493394604f69cf
4
- data.tar.gz: 001cfbf000acf02f23daeba707d03156f2bb45eafe9317c355cc54df463460b1
3
+ metadata.gz: 90a33ce9e6312e37485cedecf012ec40d94192351e6e401167e32422eef6e190
4
+ data.tar.gz: 9dd9dd15ca827d6b5ddca45fe561b97b9bd866160c0e2ae2e159ba12fe0bf71d
5
5
  SHA512:
6
- metadata.gz: e8d5b0383e16473baf45140e8907275e5831fd994c0b6c02127234fa3cb27b991376ec632b53eb556673b6ac96e8a1a504f7c989be802579cf1e99b6355a6eda
7
- data.tar.gz: 9e43292b6a4d035c6a6b0a54fd17f115eb63bcc245ff3d561744702e0b5cf22353bed3495b7048471679ab41a198b4456fee21180b82c4f92841ce19a5f3d596
6
+ metadata.gz: 392c05d4d2adafd32d51056c221d3a8c9f690e2a7c46c1b57ebdae481667dce00cf0790841a9db746ec3bec9c4be2200e81720d592b3aa5ac753480b358c761f
7
+ data.tar.gz: 65c267a80b55d9dd606f49d4980f38ea875c13a2d69e92587407093b40e399d8d87857e01e9ec972ec1db343ad7c4e1891c53e08ed1c3e895fb6588ef0d08045
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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">
@@ -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>
@@ -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>
@@ -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>
@@ -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,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">
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.1.7'
3
+ VERSION = '4.1.8'
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.8
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-08-24 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails