equal
deleted
inserted
replaced
49 if (typeof(Sortable) != 'undefined') { |
49 if (typeof(Sortable) != 'undefined') { |
50 Sortable.sortTables(node); |
50 Sortable.sortTables(node); |
51 } |
51 } |
52 // find textareas and wrap them if there are some |
52 // find textareas and wrap them if there are some |
53 if (typeof(FCKeditor) != 'undefined') { |
53 if (typeof(FCKeditor) != 'undefined') { |
54 buildWysiwygEditors(node); |
54 buildWysiwygEditors(); |
55 } |
55 } |
56 if (typeof initFacetBoxEvents != 'undefined') { |
56 if (typeof initFacetBoxEvents != 'undefined') { |
57 initFacetBoxEvents(node); |
57 initFacetBoxEvents(node); |
58 } |
58 } |
59 if (typeof buildWidgets != 'undefined') { |
59 if (typeof buildWidgets != 'undefined') { |
349 * |
349 * |
350 * replace all textareas with fckeditors. |
350 * replace all textareas with fckeditors. |
351 */ |
351 */ |
352 function buildWysiwygEditors(parent) { |
352 function buildWysiwygEditors(parent) { |
353 jQuery('textarea').each(function () { |
353 jQuery('textarea').each(function () { |
354 if (this.getAttribute('cubicweb:type', 'wysiwyg')) { |
354 if (this.getAttribute('cubicweb:type') == 'wysiwyg') { |
|
355 // mark editor as instanciated, we may be called a number of times |
|
356 // (see postAjaxLoad) |
|
357 this.setAttribute('cubicweb:type', 'fckeditor'); |
355 if (typeof FCKeditor != "undefined") { |
358 if (typeof FCKeditor != "undefined") { |
356 var fck = new FCKeditor(this.id); |
359 var fck = new FCKeditor(this.id); |
357 fck.Config['CustomConfigurationsPath'] = fckconfigpath; |
360 fck.Config['CustomConfigurationsPath'] = fckconfigpath; |
358 fck.Config['DefaultLanguage'] = fcklang; |
361 fck.Config['DefaultLanguage'] = fcklang; |
359 fck.BasePath = "fckeditor/"; |
362 fck.BasePath = "fckeditor/"; |