Pārlūkot izejas kodu

Fix admin asset load order and guard CKEditor hook

root 1 nedēļu atpakaļ
vecāks
revīzija
63438d97cd

+ 2 - 2
app/assets/javascripts/application.js

@@ -10,7 +10,7 @@
 // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
 // GO AFTER THE REQUIRES BELOW.
 //
-//= require_tree .
-//= require ckeditor/init
 //= require jquery
 //= require jquery_ujs
+//= require ckeditor/init
+//= require_tree .

+ 1 - 0
app/assets/javascripts/rails_admin/custom/ckeditor_ajax.js.coffee

@@ -1,5 +1,6 @@
 $(document).ready ->
   $(document).on 'mousedown', '.save-action', (e) -> # triggers also when submitting form with enter
+    return true unless window.CKEDITOR?
     for instance of CKEDITOR.instances
       editor = CKEDITOR.instances[instance]
       if editor.checkDirty()