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 +4 -4
- data/app/views/promethee/_edit.html.erb +1 -1
- data/app/views/promethee/_localize.html.erb +10 -0
- data/app/views/promethee/components/aside/_localize.html.erb +2 -0
- data/app/views/promethee/components/cover/_localize.html.erb +3 -0
- data/app/views/promethee/components/image/_localize.html.erb +2 -0
- data/app/views/promethee/components/page/_localize.html.erb +3 -0
- data/app/views/promethee/components/text/_localize.html.erb +1 -0
- data/app/views/promethee/utils/_text-content-from-html.html.erb +10 -2
- data/lib/promethee/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 344cfab642c4920d60f0c4f01ebc2c458d8c4315
|
4
|
+
data.tar.gz: c318a24462dad5f1d862d67da7eed55993619179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
@@ -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
|
-
|
6
|
-
|
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>
|
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.
|
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-
|
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.
|
362
|
+
rubygems_version: 2.6.13
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: Bring fire to your page
|