promethee 1.5.3 → 1.5.4

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
  SHA1:
3
- metadata.gz: 804cc3bc455b4945ced5e6151f14771df7a7399e
4
- data.tar.gz: aee3f2d4c2a868c036be9fbdbfa08802274c30f5
3
+ metadata.gz: 344cfab642c4920d60f0c4f01ebc2c458d8c4315
4
+ data.tar.gz: c318a24462dad5f1d862d67da7eed55993619179
5
5
  SHA512:
6
- metadata.gz: 2a8c2d082a13d2a82579f1be69bf8cc6184c4bc0b0e741235d797c57dfc26a99867e313c047efff02d52a50d901b46e2c775f3a92d5ce050c76f699c06c655fa
7
- data.tar.gz: 2ac382cf161657f6329663edbff188c389fe0ff74d99262c4275edf17ac6d414746c3fea4240b74e1bd13d4c5b5ec8e6fb39345677c11dd5a1d9863d6153b416
6
+ metadata.gz: 3915d82040366a905af0e492163dfd4e383345dd652863ac6c83052208ddf029a6c1310085f21099851a136c5a6230d02ff4f8f6406043a9bc78c935a1946981
7
+ data.tar.gz: 064c728027dfd29262cda10402799cabb1db98de24dc3df8e1b28555f81b05a3dc92207393277671394200179a1f96b62337b4a6aaf32b30c536d6296a3d4f67
@@ -143,7 +143,7 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', 'pres
143
143
 
144
144
  <div class="promethee-loader">
145
145
  <div class="promethee-loader__inner">
146
- <%= image_tag('loader.gif') %>
146
+ <%= image_tag 'loader.gif' %>
147
147
  Loading...
148
148
  </div>
149
149
  </div>
@@ -25,6 +25,16 @@ promethee_data = Promethee::Data.new master_data, localization_data: localizatio
25
25
 
26
26
  $scope.summernoteConfig = summernoteConfig;
27
27
 
28
+ $scope.concatenateSearch = function() {
29
+ var search = ''
30
+ angular.forEach($scope.component.children, function(child) {
31
+ if (child.type !== 'page' && child.attributes && child.attributes.search) {
32
+ search += child.attributes.search + ' ';
33
+ }
34
+ });
35
+ return search;
36
+ }
37
+
28
38
  }]);
29
39
  </script>
30
40
 
@@ -26,4 +26,6 @@
26
26
  </div>
27
27
  </div>
28
28
  </div>
29
+
30
+ <pre class="hidden">{{component.attributes.search = ((component.attributes.visible_content | textContentFromHTML) + ' ' + (component.attributes.collapsed_content | textContentFromHTML))}}</pre>
29
31
  </script>
@@ -47,4 +47,7 @@
47
47
  </div>
48
48
  </div>
49
49
  </div>
50
+
51
+ <pre class="hidden">{{component.attributes.search = (component.attributes.title + ' ' + component.attributes.surtitle + ' ' + component.attributes.subtitle)}}</pre>
52
+
50
53
  </script>
@@ -34,4 +34,6 @@
34
34
  </div>
35
35
  </div>
36
36
  </div>
37
+
38
+ <pre class="hidden">{{component.attributes.search = (component.attributes.caption + ' ' + component.attributes.alt)}}</pre>
37
39
  </script>
@@ -28,4 +28,7 @@
28
28
  </div>
29
29
  </div>
30
30
  </div>
31
+
32
+ <pre class="hidden">{{component.attributes.search = concatenateSearch()}}</pre>
33
+
31
34
  </script>
@@ -10,6 +10,7 @@
10
10
  <div class="col-md-6">
11
11
  <b>Text</b>
12
12
  <summernote config="summernoteConfig" ng-model="component.attributes.body"></summernote>
13
+ <pre class="hidden">{{component.attributes.search = (component.attributes.body | textContentFromHTML)}}</pre>
13
14
  </div>
14
15
  </div>
15
16
  </div>
@@ -1,9 +1,17 @@
1
1
  <script>
2
2
  promethee.filter('textContentFromHTML', function() {
3
3
  return function(val) {
4
+ // Inner text has a problem with some whitespace/linebreak missing (at least h1, h2...)
5
+ // We fix it by adding whitespaces before each closing tag.
6
+ var valWithSpaces = val.split('</').join(' </');
7
+ // Create a blank div (supposed to be garbage collected afterwards)
4
8
  var element = document.createElement('div');
5
- element.innerHTML = val;
6
- return element.innerText;
9
+ // Add value as html
10
+ element.innerHTML = valWithSpaces;
11
+ // Use textContent or innerText to convert to plain text
12
+ // http://perfectionkills.com/the-poor-misunderstood-innerText/
13
+ var text = element.textContent || element.innerText
14
+ return text;
7
15
  }
8
16
  });
9
17
  </script>
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.5.3'
3
+ VERSION = '1.5.4'
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.5.3
4
+ version: 1.5.4
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-24 00:00:00.000000000 Z
16
+ date: 2018-05-25 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