From: Coleman Watts Date: Sat, 21 Mar 2015 17:43:39 +0000 (-0400) Subject: CRM-16140 - Hide menubar when CKEditor is fullscreen X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad9d3592c09d66e9042557933c56debabafad241;p=civicrm-core.git CRM-16140 - Hide menubar when CKEditor is fullscreen --- diff --git a/js/Common.js b/js/Common.js index f91072d13c..b721e01c9d 100644 --- a/js/Common.js +++ b/js/Common.js @@ -1310,6 +1310,15 @@ CRM.strings = CRM.strings || {}; 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) {