1. Curtis Maloney
  2. gnocchi-cms

Commits

funkybob  committed 02710cc

Protect against missing JS

  • Participants
  • Parent commits 04e7a0a
  • Branches default

Comments (0)

Files changed (3)

File gnocchi/cms/static/gnocchi/ckeditor_page.js

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

File gnocchi/cms/static/gnocchi/codemirror_stylesheet.js

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

File gnocchi/cms/static/gnocchi/codemirror_template.js

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