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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99391b9dbd887ee530fa1e724f1ae033a0d6948f
4
- data.tar.gz: 6d51210246f430bd9e51d8fd8a0944057a50e12c
3
+ metadata.gz: 0c7d523fedee01e7f41f6ea81a2dcb9d96df8d69
4
+ data.tar.gz: 1ec96000ae16aaf420cfdecc5cc4a572c60b90c9
5
5
  SHA512:
6
- metadata.gz: 6206ebb58501a6da33071aeba6ef7980601661fe22638414e2313a8ce313fcfafdc44f781ff28879a10a4fd00d7af473435e0b06a1d2f15f37f4e4c59bd8c536
7
- data.tar.gz: 3f8b3aa3344004c74e0c359edbaf29d691b5fe2feb63436b3258374a82d5fe996c34939a9a4b29c2b637dfd5001e318bb02766e5f85436b56fc5acf452774c47
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.addEventListener('click', function() {
67
- var value = promptWithInit('Adresse de la page Facebook :');
68
- quill.format('icon', [value, 'sb-facebook']);
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.addEventListener('click', function() {
72
- var value = promptWithInit('Adresse du compte Twitter :');
73
- quill.format('icon', [value, 'sb-twitter']);
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.addEventListener('click', function() {
77
- var value = promptWithInit('Adresse du compte Instagram :');
78
- quill.format('icon', [value, 'sb-instagram']);
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.addEventListener('click', function() {
82
- var value = promptWithInit('Adresse du compte Pinterest :');
83
- quill.format('icon', [value, 'sb-pinterest']);
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
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.5.5'
2
+ VERSION = '0.5.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain