CRM-16140 - Hide menubar when CKEditor is fullscreen
authorColeman Watts <coleman@civicrm.org>
Sat, 21 Mar 2015 17:43:39 +0000 (13:43 -0400)
committerColeman Watts <coleman@civicrm.org>
Sat, 21 Mar 2015 17:43:39 +0000 (13:43 -0400)
js/Common.js

index f91072d13cfb829ad1cac4c2e89f9e4707c530e5..b721e01c9de739c8f62022a96c9c3f47b1fb142e 100644 (file)
@@ -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) {