diff --git a/app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js b/app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js index a37890f41..912e8f07f 100644 --- a/app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js +++ b/app/assets/javascripts/ckeditor/plugins/delete_content/plugin.js @@ -28,7 +28,9 @@ CKEDITOR.plugins.add('delete_content', { ], onOk:function () { + jQuery(function ($) { $.cms_editor.deleteContent(); + }); } }; }); diff --git a/app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js b/app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js index c5ad09c58..d3d721119 100644 --- a/app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js +++ b/app/assets/javascripts/ckeditor/plugins/edit_content/plugin.js @@ -11,10 +11,14 @@ CKEDITOR.plugins.add('edit_content', { editor.addCommand('editContent', { exec:function (editor) { var goto_edit = function(){ + jQuery(function ($) { window.parent.location = $.cms_editor.selectedConnector().data('edit-path'); + }); }; if (editor.checkDirty()) { + jQuery(function ($) { $.cms_editor.saveChanges(editor, goto_edit); + }); } else { goto_edit.apply(); } diff --git a/app/assets/javascripts/ckeditor/plugins/move_content/plugin.js b/app/assets/javascripts/ckeditor/plugins/move_content/plugin.js index d1c395b5c..cc5c3e971 100644 --- a/app/assets/javascripts/ckeditor/plugins/move_content/plugin.js +++ b/app/assets/javascripts/ckeditor/plugins/move_content/plugin.js @@ -13,12 +13,16 @@ CKEDITOR.plugins.add('move_content', { }); editor.addCommand('moveContentDown', { exec:function (editor) { + jQuery(function ($) { $.cms_editor.moveContent(editor, 'move-down'); + }); } }); editor.addCommand('moveContentUp', { exec:function (editor) { + jQuery(function ($) { $.cms_editor.moveContent(editor, 'move-up'); + }); } }); }