promethee 1.2.26 → 1.2.27
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 +3 -1
- data/app/views/promethee/components/cover/_edit.inspect.html.erb +1 -18
- data/app/views/promethee/components/cover/_localize.html.erb +1 -21
- data/app/views/promethee/components/image/_edit.inspect.html.erb +1 -18
- data/app/views/promethee/components/image/_localize.html.erb +1 -21
- data/app/views/promethee/components/text/_edit.inspect.html.erb +1 -18
- data/app/views/promethee/components/text/_localize.html.erb +1 -18
- data/app/views/promethee/utils/_summernote-config.html.erb +21 -0
- data/lib/promethee/rails/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02aa4bdf8793899631eb7c39dff884140532569d
|
4
|
+
data.tar.gz: 9c272e9535aa8227efc0939919313471f4b2982d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69fe433cd5052508479ddd5f561abcbb93736b049427f8115a4f56c3bdd0513def4c80c1b67f4cb963727901413e65c2417a8ee023fa1f2f015bdf7801a20654
|
7
|
+
data.tar.gz: b3c89b27a5ef03f1b40937eb7ff5af7c0507304ba11f660c243160dd5891dc4dd92ec7c364a45366f646e45489cfa957aec3231fa9ef1e98436f107c18b1d563
|
@@ -13,7 +13,7 @@ var promethee = angular
|
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<script type="text/javascript">
|
16
|
-
promethee.controller('PrometheeController', ['$scope', function($scope) {
|
16
|
+
promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', function($scope, summernoteConfig) {
|
17
17
|
|
18
18
|
// Data (TODO use Adder and probably page definition to init)
|
19
19
|
if ($scope.data === null || $scope.data === '') {
|
@@ -71,6 +71,8 @@ promethee.controller('PrometheeController', ['$scope', function($scope) {
|
|
71
71
|
$('#promethee').closest('form').submit();
|
72
72
|
};
|
73
73
|
|
74
|
+
$scope.summernoteConfig = summernoteConfig;
|
75
|
+
|
74
76
|
$scope.promethee.data = <%= promethee_data.to_json.html_safe %>;
|
75
77
|
|
76
78
|
$scope.sendPreviewData('thumb-preview');
|
@@ -6,23 +6,6 @@
|
|
6
6
|
|
7
7
|
<div class="form-group">
|
8
8
|
<label class="label-control">Body</label>
|
9
|
-
<summernote config="
|
10
|
-
disableDragAndDrop: true,
|
11
|
-
callbacks: {
|
12
|
-
onPaste: function(event) {
|
13
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
14
|
-
event.preventDefault();
|
15
|
-
setTimeout(function() {
|
16
|
-
document.execCommand('insertText', false, bufferText);
|
17
|
-
}, 10);
|
18
|
-
}
|
19
|
-
},
|
20
|
-
toolbar: [
|
21
|
-
['headline', ['style']],
|
22
|
-
['style', ['bold', 'italic']],
|
23
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
24
|
-
['code', ['codeview']]
|
25
|
-
]
|
26
|
-
}" ng-model="promethee.inspected.attributes.body"></summernote>
|
9
|
+
<summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.body"></summernote>
|
27
10
|
</div>
|
28
11
|
</script>
|
@@ -2,27 +2,7 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-md-6">
|
4
4
|
<b>Local</b>
|
5
|
-
<summernote
|
6
|
-
config="{
|
7
|
-
disableDragAndDrop: true,
|
8
|
-
callbacks: {
|
9
|
-
onPaste: function(event) {
|
10
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
11
|
-
event.preventDefault();
|
12
|
-
setTimeout(function() {
|
13
|
-
document.execCommand('insertText', false, bufferText);
|
14
|
-
}, 10);
|
15
|
-
}
|
16
|
-
},
|
17
|
-
toolbar: [
|
18
|
-
['headline', ['style']],
|
19
|
-
['style', ['bold', 'italic']],
|
20
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
21
|
-
['code', ['codeview']]
|
22
|
-
]
|
23
|
-
}"
|
24
|
-
ng-model="component.attributes.body"
|
25
|
-
></summernote>
|
5
|
+
<summernote config="summernoteConfig" ng-model="component.attributes.body"></summernote>
|
26
6
|
</div>
|
27
7
|
<div class="col-md-6">
|
28
8
|
<b>Master</b>
|
@@ -11,23 +11,6 @@
|
|
11
11
|
|
12
12
|
<div class="form-group">
|
13
13
|
<label class="label-control">Caption</label>
|
14
|
-
<summernote config="
|
15
|
-
disableDragAndDrop: true,
|
16
|
-
callbacks: {
|
17
|
-
onPaste: function(event) {
|
18
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
19
|
-
event.preventDefault();
|
20
|
-
setTimeout(function() {
|
21
|
-
document.execCommand('insertText', false, bufferText);
|
22
|
-
}, 10);
|
23
|
-
}
|
24
|
-
},
|
25
|
-
toolbar: [
|
26
|
-
['headline', ['style']],
|
27
|
-
['style', ['bold', 'italic']],
|
28
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
29
|
-
['code', ['codeview']]
|
30
|
-
]
|
31
|
-
}" ng-model="promethee.inspected.attributes.caption"></summernote>
|
14
|
+
<summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.caption"></summernote>
|
32
15
|
</div>
|
33
16
|
</script>
|
@@ -3,27 +3,7 @@
|
|
3
3
|
<div class="col-md-6">
|
4
4
|
<b>Local</b>
|
5
5
|
<input ng-model="component.attributes.alt" type="text" class="form-control">
|
6
|
-
<summernote
|
7
|
-
config="{
|
8
|
-
disableDragAndDrop: true,
|
9
|
-
callbacks: {
|
10
|
-
onPaste: function(event) {
|
11
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
12
|
-
event.preventDefault();
|
13
|
-
setTimeout(function() {
|
14
|
-
document.execCommand('insertText', false, bufferText);
|
15
|
-
}, 10);
|
16
|
-
}
|
17
|
-
},
|
18
|
-
toolbar: [
|
19
|
-
['headline', ['style']],
|
20
|
-
['style', ['bold', 'italic']],
|
21
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
22
|
-
['code', ['codeview']]
|
23
|
-
]
|
24
|
-
}"
|
25
|
-
ng-model="component.attributes.caption"
|
26
|
-
></summernote>
|
6
|
+
<summernote config="summernoteConfig" ng-model="component.attributes.caption"></summernote>
|
27
7
|
</div>
|
28
8
|
<div class="col-md-6">
|
29
9
|
<b>Master</b>
|
@@ -1,23 +1,6 @@
|
|
1
1
|
<script type="text/ng-template" id="promethee/components/text/edit/inspect">
|
2
2
|
<div class="form-group">
|
3
|
-
<summernote config="
|
4
|
-
disableDragAndDrop: true,
|
5
|
-
callbacks: {
|
6
|
-
onPaste: function(event) {
|
7
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
8
|
-
event.preventDefault();
|
9
|
-
setTimeout(function() {
|
10
|
-
document.execCommand('insertText', false, bufferText);
|
11
|
-
}, 10);
|
12
|
-
}
|
13
|
-
},
|
14
|
-
toolbar: [
|
15
|
-
['headline', ['style']],
|
16
|
-
['style', ['bold', 'italic']],
|
17
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
18
|
-
['code', ['codeview']]
|
19
|
-
]
|
20
|
-
}" ng-model="promethee.inspected.attributes.body"></summernote>
|
3
|
+
<summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.body"></summernote>
|
21
4
|
</div>
|
22
5
|
|
23
6
|
{{promethee.inspected.attributes.body | textContentFromHTML: 'distinctParagraphs' | numberOfWords}} words<br>
|
@@ -2,24 +2,7 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-md-6">
|
4
4
|
<b>Local</b>
|
5
|
-
<summernote config="
|
6
|
-
disableDragAndDrop: true,
|
7
|
-
callbacks: {
|
8
|
-
onPaste: function(event) {
|
9
|
-
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
10
|
-
event.preventDefault();
|
11
|
-
setTimeout(function() {
|
12
|
-
document.execCommand('insertText', false, bufferText);
|
13
|
-
}, 10);
|
14
|
-
}
|
15
|
-
},
|
16
|
-
toolbar: [
|
17
|
-
['headline', ['style']],
|
18
|
-
['style', ['bold', 'italic']],
|
19
|
-
['alignment', ['ul', 'ol', 'paragraph']],
|
20
|
-
['code', ['codeview']]
|
21
|
-
]
|
22
|
-
}" ng-model="component.attributes.body"></summernote>
|
5
|
+
<summernote config="summernoteConfig" ng-model="component.attributes.body"></summernote>
|
23
6
|
</div>
|
24
7
|
<div class="col-md-6">
|
25
8
|
<b>Master</b>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<script>
|
2
|
+
promethee.constant('summernoteConfig', {
|
3
|
+
disableDragAndDrop: true,
|
4
|
+
callbacks: {
|
5
|
+
onPaste: function(event) {
|
6
|
+
// Remove text styles on paste
|
7
|
+
var bufferText = ((event.originalEvent || event).clipboardData || window.clipboardData).getData('Text');
|
8
|
+
event.preventDefault();
|
9
|
+
setTimeout(function() {
|
10
|
+
document.execCommand('insertText', false, bufferText);
|
11
|
+
}, 10);
|
12
|
+
}
|
13
|
+
},
|
14
|
+
toolbar: [
|
15
|
+
['headline', ['style']],
|
16
|
+
['style', ['bold', 'italic']],
|
17
|
+
['alignment', ['ul', 'ol', 'paragraph']],
|
18
|
+
['code', ['codeview']]
|
19
|
+
]
|
20
|
+
});
|
21
|
+
</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.2.
|
4
|
+
version: 1.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Dargelos
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- app/views/promethee/utils/_identifier.html.erb
|
266
266
|
- app/views/promethee/utils/_number-of-characters.html.erb
|
267
267
|
- app/views/promethee/utils/_number-of-words.html.erb
|
268
|
+
- app/views/promethee/utils/_summernote-config.html.erb
|
268
269
|
- app/views/promethee/utils/_text-content-from-html.html.erb
|
269
270
|
- app/views/promethee/utils/_url-safe.html.erb
|
270
271
|
- config/routes.rb
|