Commits

Anonymous committed 02710cc

Protect against missing JS

Comments (0)

Files changed (3)

gnocchi/cms/static/gnocchi/ckeditor_page.js

 django.jQuery(document).ready(function () {
+	if ( document.CKEDITOR === undefined ) { return; }
 	CKEDITOR.replace('id_content', {
 		shiftEnterMode: CKEDITOR.ENTER_BR
 	});

gnocchi/cms/static/gnocchi/codemirror_stylesheet.js

 django.jQuery(document).ready(function () {
+        if( document.CodeMirror === undefined ) { return; }
 	editor = CodeMirror.fromTextArea(document.getElementById('id_content'), {
 		lineNumbers: true,
 		mode: 'text/css'

gnocchi/cms/static/gnocchi/codemirror_template.js

 django.jQuery(document).ready(function () {
+        if( document.CodeMirror === undefined ) { return; }
 	editor = CodeMirror.fromTextArea(document.getElementById('id_content'), {
 		lineNumbers: true,
 		mode: 'text/html'