rename variables
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Tue, 15 Mar 2016 17:11:59 +0100
changeset 2 bd0cfeca3507
parent 1 df7eb5ac23b5
child 5 dd9529d42509
rename variables fck -> ck
__init__.py
data/initwysiwyg.js
--- a/__init__.py	Tue Mar 15 17:08:31 2016 +0100
+++ b/__init__.py	Tue Mar 15 17:11:59 2016 +0100
@@ -12,12 +12,12 @@
 @monkeypatch(_CubicWebRequestBase)
 @cached  # so it's writed only once
 def fckeditor_config(self):
-    fckeditor_url = '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js'
-    self.add_js(fckeditor_url, localfile=False)
+    ckeditor_url = '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js'
+    self.add_js(ckeditor_url, localfile=False)
     self.add_js('initwysiwyg.js')
     self.add_onload('buildWysiwygEditors()')
-    self.html_headers.define_var('fcklang', self.lang)
-    self.html_headers.define_var('fckconfigpath',
+    self.html_headers.define_var('cklang', self.lang)
+    self.html_headers.define_var('ckconfigpath',
                                  self.data_url('ckeditor-config.js'))
 
 @monkeypatch(WebConfiguration)
--- a/data/initwysiwyg.js	Tue Mar 15 17:08:31 2016 +0100
+++ b/data/initwysiwyg.js	Tue Mar 15 17:11:59 2016 +0100
@@ -7,8 +7,8 @@
             this.setAttribute('cubicweb:type', 'ckeditor');
             if (typeof CKEDITOR != "undefined") {
                 var fck = CKEDITOR.replace(this.id, {
-                    customConfig: fckconfigpath,
-                    defaultLangguage: fcklang
+                    customConfig: ckconfigpath,
+                    defaultLangguage: cklang
                 });
             } else {
                 cw.log('fckeditor could not be found.');