From 9cc08ac20b303567ced78dd1c7a2ef82eb0f7b3e Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 17 Aug 2015 21:42:54 -0400 Subject: [PATCH] Move CKEDITOR related code to crm.ckeditor.js --- js/Common.js | 9 --------- js/wysiwyg/crm.ckeditor.js | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/js/Common.js b/js/Common.js index 6a49f0629a..d84b3fecd7 100644 --- a/js/Common.js +++ b/js/Common.js @@ -1315,15 +1315,6 @@ if (!CRM.vars) CRM.vars = {}; messagesFromMarkup.call($('#crm-container')); } - // Hide CiviCRM menubar when editor is fullscreen - if (window.CKEDITOR) { - CKEDITOR.on('instanceCreated', function (e) { - e.editor.on('maximize', function (e) { - $('#civicrm-menu').toggle(e.data === 2); - }); - }); - } - $('body') // bind the event for image popup .on('click', 'a.crm-image-popup', function(e) { diff --git a/js/wysiwyg/crm.ckeditor.js b/js/wysiwyg/crm.ckeditor.js index 5d418e57b3..18677de696 100644 --- a/js/wysiwyg/crm.ckeditor.js +++ b/js/wysiwyg/crm.ckeditor.js @@ -41,6 +41,10 @@ editor.on('pasteState', function() { $(item).trigger("paste"); }); + // Hide CiviCRM menubar when editor is fullscreen + editor.on('maximize', function (e) { + $('#civicrm-menu').toggle(e.data === 2); + }); } }; CRM.wysiwyg.destroy = function(item) { -- 2.25.1