simplec 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/simplec/summernote-config.js +8 -1
- data/lib/simplec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5b8ea5b96bff494112424c200b279792510b182b5f4257532b51c0cbab55456
|
4
|
+
data.tar.gz: b3f51e5e8b47228b7d5c6e20f7ee629623a9928749a75f740a744c2110308336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80537e4ead797944467ebc0f49bc3944637922b532200704f3e60647bebe8a695477f85700094b4f8b8cfdd460cf193e8997ac97575cc2bdafc01a2dfd49da6f
|
7
|
+
data.tar.gz: 8912a37ff6adac737267014c5430cf206ad58ff89aba050e7d03a5e474011a1e80a8e62820feb7f43ce246610d7b256992979af813270e6fcbda3d4a36d11f15
|
@@ -24,6 +24,10 @@ $.summernote.options.toolbar = [
|
|
24
24
|
|
25
25
|
if (!window.simplec) window.simplec = {};
|
26
26
|
|
27
|
+
window.simplec.csrfToken = function() {
|
28
|
+
return $('meta[name=csrf-token]').attr('content');
|
29
|
+
};
|
30
|
+
|
27
31
|
window.simplec.initSummernote = function() {
|
28
32
|
$('.editor-field').each(function(idx, el) {
|
29
33
|
var $el = $(el);
|
@@ -55,7 +59,10 @@ window.simplec.initSummernote = function() {
|
|
55
59
|
url: '/embedded-images',
|
56
60
|
dataType: 'json',
|
57
61
|
contentType: 'application/json',
|
58
|
-
headers: {
|
62
|
+
headers: {
|
63
|
+
'X-Engine': 'simplec',
|
64
|
+
'X-CSRF-Token': simplec.csrfToken()
|
65
|
+
},
|
59
66
|
data: JSON.stringify({
|
60
67
|
asset_url: reader.result,
|
61
68
|
asset_name: file.name
|
data/lib/simplec/version.rb
CHANGED