promethee 1.4.29 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6acd7193c518d7ffb2f59c65acce5ecec98d9ea
4
- data.tar.gz: ee77b0df03b7c839886055f2905fbbc50adec488
3
+ metadata.gz: cde9040a419b0a61b9a340c507d1d82b66ddb7f1
4
+ data.tar.gz: af9235ff2d67f952446e461d770519c2f8b20b7a
5
5
  SHA512:
6
- metadata.gz: 7a6c9d26fd28f30738ce6dd0e854ff355f5d542e740522e70a42eca30cd6426a65e07295800005c7df75c330f226a6a2b956e42bd781980ab3fa0b2e4e4cdb94
7
- data.tar.gz: a85459e9b1ed652ddccfbcb321f432510e2ae00f526ae9abc7547f8d7cdc04881b3786c9ce3d8af5e67c3699ac38013c59ca9229f416d61a3cd3e6f5642b1f4b
6
+ metadata.gz: 2cc5a00654ecc1fba55747c887b198886f611aed1d65e84b3adc3798b005a628b678977353dc0a09b08ffc8ba65b2e5a24306c81f0952a3d90bac0e2382fad96
7
+ data.tar.gz: dd0472af621d3ceca13191c12ef953f426d08236cf6424fe2eb58d2be937e0d6d94b26c14da384ea362e04a61c348c8b4a70bb958c5c91dc773596b600986e55
@@ -126,6 +126,16 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', 'pres
126
126
  $('#promethee').closest('form').submit();
127
127
  };
128
128
 
129
+ $scope.concatenateChildrenSearch = function(component) {
130
+ var search = ''
131
+ angular.forEach(component.children, function(child) {
132
+ if (child.attributes && child.attributes.search) {
133
+ search += child.attributes.search + ' ';
134
+ }
135
+ });
136
+ return search;
137
+ }
138
+
129
139
  $scope.summernoteConfig = summernoteConfig;
130
140
  $scope.sendPreviewData('thumb-preview');
131
141
  }]);
@@ -7,6 +7,8 @@
7
7
  </aside>
8
8
 
9
9
  <aside ng-hide="component.attributes.collapsed_content" ng-bind-html="component.attributes.visible_content | htmlSafe"></aside>
10
+
11
+ <pre class="hidden">{{component.attributes.search = ((component.attributes.visible_content | textContentFromHTML) + ' ' + (component.attributes.collapsed_content | textContentFromHTML))}}</pre>
10
12
  </div>
11
13
  </div>
12
14
  </script>
@@ -6,6 +6,7 @@
6
6
  <ng-include src="'promethee/move/component'"></ng-include>
7
7
  </div>
8
8
  <div class="clearfix" ng-if="$index%itemsPerLine === itemsPerLine - 1" ng-repeat-end></div>
9
+ <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
9
10
  </div>
10
11
  </div>
11
12
  </div>
@@ -9,6 +9,7 @@
9
9
  <%= render 'promethee/edit/move.remove' %>
10
10
  <div class="header">Column</div>
11
11
  <ng-include src="'promethee/move/components'"></ng-include>
12
+ <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
12
13
  <div
13
14
  droppable
14
15
  class=" <%= promethee_bem_classes 'promethee-edit__move__droppable', '--row', '--inside-column' %>"
@@ -10,6 +10,7 @@
10
10
  <h1>{{component.attributes.title}}</h1>
11
11
  <h2 class="subtitle">{{component.attributes.subtitle}}</h2>
12
12
  </hgroup>
13
+ <pre class="hidden">{{component.attributes.search = (component.attributes.title + ' ' + component.attributes.surtitle + ' ' + component.attributes.subtitle)}}</pre>
13
14
  </div>
14
15
  </div>
15
16
  </div>
@@ -13,6 +13,7 @@
13
13
  ngf-pattern="'.jpg,.jpeg,.png,.gif'"
14
14
  class="text-center text-empty">Click or drop file to set the image</p>
15
15
  </div>
16
+ <pre class="hidden">{{component.attributes.search = (component.attributes.caption + ' ' + component.attributes.alt)}}</pre>
16
17
  </div>
17
18
  </div>
18
19
  </script>
@@ -12,6 +12,8 @@
12
12
  <% end %>
13
13
  </div>
14
14
  </div>
15
+
16
+ <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
15
17
 
16
18
  <ng-include src="'promethee/move/components'"></ng-include>
17
19
  </div>
@@ -3,6 +3,7 @@
3
3
  <div class="header">Row</div>
4
4
  <div class="row">
5
5
  <ng-include src="'promethee/move/components'"></ng-include>
6
+ <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
6
7
  </div>
7
8
  </div>
8
9
  </div>
@@ -6,6 +6,7 @@
6
6
  <ng-include src="'promethee/move/component'"></ng-include>
7
7
  </div>
8
8
  <div class="clearfix" ng-if="$index%6 === 5" ng-repeat-end></div>
9
+ <pre class="hidden">{{component.attributes.search = concatenateChildrenSearch(component)}}</pre>
9
10
  </div>
10
11
  </div>
11
12
  </div>
@@ -3,6 +3,6 @@
3
3
  <summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.body"></summernote>
4
4
  </div>
5
5
 
6
- {{promethee.inspected.attributes.body | textContentFromHTML: 'distinctParagraphs' | numberOfWords}} words<br>
6
+ {{promethee.inspected.attributes.body | textContentFromHTML | numberOfWords}} words<br>
7
7
  {{promethee.inspected.attributes.body | textContentFromHTML | numberOfCharacters}} characters
8
8
  </script>
@@ -1,6 +1,7 @@
1
1
  <script type="text/ng-template" id="promethee/components/text/edit/move">
2
2
  <%= render 'promethee/edit/move.header', type: 'text' %>
3
3
  <div ng-bind-html="component.attributes.body | htmlSafe"></div>
4
+ <pre class="hidden">{{component.attributes.search = (component.attributes.body | textContentFromHTML)}}</pre>
4
5
  </div>
5
6
  </div>
6
7
  </script>
@@ -1,15 +1,9 @@
1
1
  <script>
2
2
  promethee.filter('textContentFromHTML', function() {
3
- return function(val, distinctParagraphs) {
3
+ return function(val) {
4
4
  var element = document.createElement('div');
5
5
  element.innerHTML = val;
6
-
7
- if(distinctParagraphs === 'distinctParagraphs') {
8
- var paragraphs = element.querySelectorAll('p');
9
- for(var i = 0; i < paragraphs.length; i++) paragraphs[i].textContent += ' ';
10
- }
11
-
12
- return element.textContent;
6
+ return element.innerText;
13
7
  }
14
8
  });
15
9
  </script>
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.4.29'
3
+ VERSION = '1.5.0'
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.4.29
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Dargelos
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-05-22 00:00:00.000000000 Z
16
+ date: 2018-05-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  version: '0'
360
360
  requirements: []
361
361
  rubyforge_project:
362
- rubygems_version: 2.6.11
362
+ rubygems_version: 2.6.13
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Bring fire to your page