sibu 0.5.5 → 0.5.6
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/sibu/sibu.js.erb +26 -18
- data/lib/sibu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c7d523fedee01e7f41f6ea81a2dcb9d96df8d69
|
4
|
+
data.tar.gz: 1ec96000ae16aaf420cfdecc5cc4a572c60b90c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebf94090c127a16203bf3125f8a3587f1f7d895c431618472ebd0d58252b21421a411e244450d066720e4a19fd18f1b1f575fff9bb396ab1e10e8131a344b357
|
7
|
+
data.tar.gz: c7b825f62ad04f5ed70f9ad91946567d6ae3f692e115cdded8078a5b2064e328a440a0d6b0f6bccde9bb496ad41ed5d93935fc53979ce6aef0fcfdbae3fbf87b
|
@@ -34,8 +34,8 @@ Quill.register(Quill.import('attributors/style/align'), true);
|
|
34
34
|
function initQuillEditor(container) {
|
35
35
|
var quillModules;
|
36
36
|
var modulesCallback = "sibuEditorModules";
|
37
|
-
if(typeof modulesCallback === "function") {
|
38
|
-
quillModules = modulesCallback();
|
37
|
+
if(typeof window[modulesCallback] === "function") {
|
38
|
+
quillModules = window[modulesCallback]();
|
39
39
|
} else {
|
40
40
|
quillModules = {
|
41
41
|
toolbar: [
|
@@ -63,25 +63,33 @@ function initQuillEditor(container) {
|
|
63
63
|
}
|
64
64
|
|
65
65
|
var fbButton = document.querySelector('.ql-facebook');
|
66
|
-
fbButton
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
if(fbButton) {
|
67
|
+
fbButton.addEventListener('click', function() {
|
68
|
+
var value = promptWithInit('Adresse de la page Facebook :');
|
69
|
+
quill.format('icon', [value, 'sb-facebook']);
|
70
|
+
});
|
71
|
+
}
|
70
72
|
var twButton = document.querySelector('.ql-twitter');
|
71
|
-
twButton
|
72
|
-
|
73
|
-
|
74
|
-
|
73
|
+
if(twButton) {
|
74
|
+
twButton.addEventListener('click', function() {
|
75
|
+
var value = promptWithInit('Adresse du compte Twitter :');
|
76
|
+
quill.format('icon', [value, 'sb-twitter']);
|
77
|
+
});
|
78
|
+
}
|
75
79
|
var igButton = document.querySelector('.ql-instagram');
|
76
|
-
igButton
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
+
if(igButton) {
|
81
|
+
igButton.addEventListener('click', function() {
|
82
|
+
var value = promptWithInit('Adresse du compte Instagram :');
|
83
|
+
quill.format('icon', [value, 'sb-instagram']);
|
84
|
+
});
|
85
|
+
}
|
80
86
|
var piButton = document.querySelector('.ql-pinterest');
|
81
|
-
piButton
|
82
|
-
|
83
|
-
|
84
|
-
|
87
|
+
if(piButton) {
|
88
|
+
piButton.addEventListener('click', function() {
|
89
|
+
var value = promptWithInit('Adresse du compte Pinterest :');
|
90
|
+
quill.format('icon', [value, 'sb-pinterest']);
|
91
|
+
});
|
92
|
+
}
|
85
93
|
|
86
94
|
return quill;
|
87
95
|
}
|
data/lib/sibu/version.rb
CHANGED