promethee 4.0.0 → 4.0.1

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: 9919911b70d645a32c0cc7cb303e88e358964153829f76747dd62b2acbafc8f8
4
- data.tar.gz: f72bac7ccb51c4c55686bdafe41997d8d6d366f0f00861127ed593786d90938a
3
+ metadata.gz: bdf0355a88bdac8534ae81091adf820c73b7bd12b54f4aa0d858bc9104a3d373
4
+ data.tar.gz: 6cb8ab83ab68e1d759c0ff3fbad4bc8a4d5de692eef336b0042f98a290d2606e
5
5
  SHA512:
6
- metadata.gz: 53817f67399c99bd21ba4f2e01c276fc4ef0dc80c62f9c3f7a17e25bc6f73d6cb7758983e2990457672d35042623ddd7f476394be8be36249b552e39a7e76d5c
7
- data.tar.gz: 6832ef6057efface08ee81ee0db720bf9534df96637b34b3cebd703f849b0c1b3d483b94417ae6ed27c66846e520593e0492e3d6d161e3d087ecd2eb81281bf0
6
+ metadata.gz: 03c65a4902c0bccf6c86e4ac00e35fb875467ce0f6de6e86b86980fd783026cf4667448565ef910598b3e1a841b83c10ea5828f7165e0cb83fb321124fc3cb03
7
+ data.tar.gz: fe3e25a3ad288e706a17f674ef5399caa9b122d849b7ea11c181a6f1e695408f6d50d6ea1320055b5ded7811409f625049da27a757198e0761973decc0437dd5
@@ -10,13 +10,13 @@
10
10
  ng-model="promethee.inspected.attributes.structure.value[0]">
11
11
  <div ng-if="getHeaderCellUids().length > 1" ng-repeat="cellUid in getHeaderCellUids()">
12
12
  <div class="row align-items-center">
13
- <div class="col-1" style="line-height: 38px">
13
+ <div class="col-1 col-xs-1" style="line-height: 38px">
14
14
  <i class="fas fa-bars"></i>
15
15
  </div>
16
- <div class="col-9">
16
+ <div class="col-8 col-xs-8">
17
17
  {{ getTableCell(cellUid).attributes.text.value }}
18
18
  </div>
19
- <div class="col-2">
19
+ <div class="col-2 col-xs-2">
20
20
  <a class="btn btn-default btn-light btn-sm"
21
21
  ng-click="removeColumn($index)">
22
22
  <%= icon('fa', 'close') %>
@@ -38,7 +38,8 @@
38
38
  <b ng-if="$index > 0">Row {{$index}}</b>
39
39
  <span class="small">
40
40
  <a class="btn btn-default btn-light btn-sm float-right"
41
- ng-click="removeRow($index)">
41
+ ng-click="removeRow($index)"
42
+ ng-if="$index > 0">
42
43
  <%= icon('fa', 'close') %>
43
44
  </a>
44
45
  </span><br/>
@@ -55,13 +56,15 @@
55
56
  <hr>
56
57
  <div ng-show="promethee.inspected.attributes.structure.value.length > 1">
57
58
  <label class="label-control">Drag the rows below to reorder them:</label>
58
- <ul ui-sortable
59
+ <ul ui-sortable="sortableRowsOptions"
59
60
  ng-model="promethee.inspected.attributes.structure.value"
60
61
  class="list-unstyled">
61
- <li ng-repeat="_ in promethee.inspected.attributes.structure.value track by $index">
62
- <%= icon('fa', 'bars') %>
63
- <span ng-if="$index === 0">Header</span>
64
- <span ng-if="$index > 0">Row {{$index}}</span>
62
+ <li ng-repeat="_ in promethee.inspected.attributes.structure.value track by $index"
63
+ ng-class="{ 'unsortable': $index === 0 }">
64
+ <div ng-if="$index > 0">
65
+ <%= icon('fa', 'bars') %>
66
+ <span>Row {{$index}}</span>
67
+ </div>
65
68
  </li>
66
69
  </ul>
67
70
  </div>
@@ -81,6 +84,11 @@
81
84
  }.bind($scope)
82
85
  };
83
86
 
87
+ $scope.sortableRowsOptions = {
88
+ cancel: '.unsortable',
89
+ items: '> li:not(.unsortable)'
90
+ };
91
+
84
92
  $scope.getHeaderCellUids = function () {
85
93
  if (this.promethee.inspected.attributes.structure.value.length === 0) {
86
94
  return [];
@@ -139,6 +147,7 @@
139
147
  $scope.addColumn = function () {
140
148
  var tableCell,
141
149
  uid,
150
+ cellValue,
142
151
  i;
143
152
 
144
153
  if ($scope.getRowsCount() === 0) {
@@ -148,6 +157,9 @@
148
157
  for (i = 0; i < this.promethee.inspected.attributes.structure.value.length; i += 1) {
149
158
  tableCell = $scope.createNewCell();
150
159
  this.promethee.inspected.attributes.structure.value[i].push(tableCell.id);
160
+ if (i === 0) {
161
+ tableCell.attributes.text.value = 'Column';
162
+ }
151
163
  }
152
164
  };
153
165
 
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.0.0'
3
+ VERSION = '4.0.1'
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.0.0
4
+ version: 4.0.1
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: 2019-11-21 00:00:00.000000000 Z
17
+ date: 2019-11-22 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails