promethee 1.11.5 → 1.11.6

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: f08a1e765c3e98b32234c3e28f8c33048cfbad860b3428e74dc69131972d8a0a
4
- data.tar.gz: acf74b168c9beab787de75817a2111318099a36a51ee20426a519d6cf8eb8738
3
+ metadata.gz: de20ba904f6be9f9ef2c43af02c7760feb4508aba35584a57ba1d0abece119ee
4
+ data.tar.gz: 764c7da4fdee4ac2a687d58d0da083462aa2799a2e09dc8167075594e03eaa28
5
5
  SHA512:
6
- metadata.gz: 5f927e90501428aba2e576269e7bbb4d1f6ef499e4edb9315bbcd67b70d5d4caa45fa53f4d0f4e40188b90808b181e7c332c0a166294e819d2c57ed1f7c9b3d8
7
- data.tar.gz: daf4fcb90e7fe2f777ae112e60586408819f28dc1a64fdd610e2ee194c67cbc4bc9d2c069083535ebe476d011be7647cc5133e59b40f99291f02916eee910cbe
6
+ metadata.gz: 2db572a14ca82599099548c10ba20a170a34bd570b8a0e6c572d0fd19f069e6bfbd5caf041d9bde857920faae649e549a467e23e03755122d6e5634a145ab9b9
7
+ data.tar.gz: ac055450785995cacb1a78c679e1bc72df4dc648933341e8b70f91b7bf93378f528433c5407fefee728410a77125fedd1f38fe36b71b3e6ed914c20cce4bb7a0
@@ -89,6 +89,16 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', 'pres
89
89
  $scope.inspect = function(component, event) {
90
90
  if(event.target.closest('.promethee-edit__component') === event.currentTarget) {
91
91
  $scope.promethee.inspected = component;
92
+ $scope.refreshInspect(component.type);
93
+ }
94
+ }
95
+
96
+ $scope.refreshInspect = function (componentType) {
97
+ var inspectContainer = document.querySelector(".promethee-edit__inspect-content--"+componentType);
98
+ var summernoteToolbars = inspectContainer.querySelectorAll('.note-toolbar-wrapper');
99
+ var i;
100
+ for (i = 0 ; i < summernoteToolbars.length ; i += 1) {
101
+ summernoteToolbars[i].removeAttribute('style');
92
102
  }
93
103
  }
94
104
 
@@ -1,17 +1,17 @@
1
1
  <script type="text/ng-template" id="promethee/components/table/edit/inspect">
2
2
  <div class="form-group">
3
3
  <label class="label-control">Head</label><br/>
4
- <div class="btn btn-default btn-light btn-sm"
4
+ <div class="btn btn-default btn-light btn-sm"
5
5
  ng-click="promethee.inspected.attributes.head.push({searchable_text: 'Column'})">
6
6
  Add column
7
7
  </div><br/><br/>
8
- <div ng-repeat="th in promethee.inspected.attributes.head">
8
+ <div ng-repeat="th in promethee.inspected.attributes.head track by $index">
9
9
  <div class="form-row">
10
10
  <div class="col-10">
11
11
  <input type="text" ng-model="th.searchable_text" class="form-control" />
12
12
  </div>
13
13
  <div class="col-2">
14
- <a class="btn btn-default btn-light btn-sm"
14
+ <a class="btn btn-default btn-light btn-sm"
15
15
  ng-click="promethee.inspected.attributes.head.splice($index, 1)">
16
16
  <%= icon('fa', 'close') %>
17
17
  </a>
@@ -25,14 +25,14 @@
25
25
  ng-click="promethee.inspected.attributes.body.push([{searchable_text: 'Text'}])">
26
26
  Add row
27
27
  </div><br/><br/>
28
- <div ng-repeat="tr in promethee.inspected.attributes.body">
28
+ <div ng-repeat="tr in promethee.inspected.attributes.body track by $index">
29
29
  <span class="small"><b>Row {{$index+1}}</b>
30
30
  <a class="btn btn-default btn-light btn-sm float-right"
31
31
  ng-click="promethee.inspected.attributes.body.splice($index, 1)">
32
32
  <%= icon('fa', 'close') %>
33
33
  </a>
34
34
  </span><br/>
35
- <div ng-repeat="th in promethee.inspected.attributes.head">
35
+ <div ng-repeat="th in promethee.inspected.attributes.head track by $index">
36
36
  <span class="small">{{th.searchable_text}}</span><br/>
37
37
  <input type="text" ng-model="tr[$index].searchable_text" class="form-control" />
38
38
  </div>
@@ -4,12 +4,12 @@
4
4
  <table class="table">
5
5
  <thead>
6
6
  <tr>
7
- <th ng-repeat="th in component.attributes.head">{{th.searchable_text}}</th>
7
+ <th ng-repeat="th in component.attributes.head track by $index">{{th.searchable_text}}</th>
8
8
  </tr>
9
9
  </thead>
10
10
  <tbody>
11
- <tr ng-repeat="tr in component.attributes.body">
12
- <td ng-repeat="td in tr">{{td.searchable_text}}</td>
11
+ <tr ng-repeat="tr in component.attributes.body track by $index">
12
+ <td ng-repeat="td in tr track by $index">{{td.searchable_text}}</td>
13
13
  </tr>
14
14
  </tbody>
15
15
  </table>
@@ -6,12 +6,12 @@
6
6
  <table class="table">
7
7
  <thead>
8
8
  <tr>
9
- <th ng-repeat="th in master.attributes.head">{{th.searchable_text}}</th>
9
+ <th ng-repeat="th in master.attributes.head track by $index">{{th.searchable_text}}</th>
10
10
  </tr>
11
11
  </thead>
12
12
  <tbody>
13
- <tr ng-repeat="tr in master.attributes.body">
14
- <td ng-repeat="td in tr">{{td.searchable_text}}</td>
13
+ <tr ng-repeat="tr in master.attributes.body track by $index">
14
+ <td ng-repeat="td in tr track by $index">{{td.searchable_text}}</td>
15
15
  </tr>
16
16
  </tbody>
17
17
  </table>
@@ -20,14 +20,14 @@
20
20
  <table class="table">
21
21
  <thead>
22
22
  <tr>
23
- <th ng-repeat="th in component.attributes.head">
23
+ <th ng-repeat="th in component.attributes.head track by $index">
24
24
  <input class="form-control" ng-model="th.searchable_text" type="text">
25
25
  </th>
26
26
  </tr>
27
27
  </thead>
28
28
  <tbody>
29
- <tr ng-repeat="tr in component.attributes.body">
30
- <td ng-repeat="td in tr">
29
+ <tr ng-repeat="tr in component.attributes.body track by $index">
30
+ <td ng-repeat="td in tr track by $index">
31
31
  <input class="form-control" ng-model="td.searchable_text" type="text">
32
32
  </td>
33
33
  </tr>
@@ -109,6 +109,7 @@ promethee
109
109
  droppedToList.splice(droppedToIndex, 0, component);
110
110
 
111
111
  scope.promethee.inspected = component
112
+ scope.refreshInspect(component.type);
112
113
 
113
114
  scope.$apply();
114
115
  }
@@ -159,7 +160,8 @@ promethee
159
160
  <div class="promethee-edit__inspect-content">
160
161
  <div ng-repeat="definition in promethee.definitions | orderBy:'position'">
161
162
  <ng-include src="'promethee/components/' + definition.data.type + '/edit/inspect'"
162
- ng-show="promethee.inspected.type == definition.data.type"></ng-include>
163
+ ng-show="promethee.inspected.type == definition.data.type"
164
+ class="promethee-edit__inspect-content--{{ definition.data.type }}"></ng-include>
163
165
  </div>
164
166
  </div>
165
167
  </div>
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.11.5'
3
+ VERSION = '1.11.6'
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: 1.11.5
4
+ version: 1.11.6
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: 2018-12-05 00:00:00.000000000 Z
17
+ date: 2018-12-06 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails