Simplify hiding CMS elements behind modal dialogs
authorColeman Watts <coleman@civicrm.org>
Tue, 16 Apr 2019 20:36:42 +0000 (16:36 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 18 Apr 2019 13:54:15 +0000 (09:54 -0400)
Using css instead of js makes this a lot simpler

CRM/Utils/System/Joomla.php
css/joomla.css
css/menubar-wordpress.css
js/crm.joomla.js [deleted file]
js/crm.wordpress.js

index f98c794adfeb67ba1da04d1f9d80a16366fc2eb0..91085841a2626380d158dcbd54e30c0600ab233d 100644 (file)
@@ -844,15 +844,6 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
     }
   }
 
-  /**
-   * Append Joomla js to coreResourcesList.
-   *
-   * @param array $list
-   */
-  public function appendCoreResources(&$list) {
-    $list[] = 'js/crm.joomla.js';
-  }
-
   /**
    * @inheritDoc
    */
index d49a764898243566d1713debc017d32c8fae5e83..3f417d79160049a8b21ec4610d871d82767fa201 100644 (file)
@@ -392,3 +392,8 @@ body.admin.com_civicrm #crm-nav-menu-container {
 body.admin.com_civicrm #content-right {
        padding: 12px;
 }
+
+/* Make footer admin bar hide behind popup windows (CRM-15723) */
+body.ui-dialog-open #status {
+  z-index: 100 !important;
+}
index 33d227418da89293fd0d5f871bf4013c21ad265d..792b59e7dfbee94b5ffa55597ba8ba4945e6d0e2 100644 (file)
@@ -57,3 +57,8 @@
   }
 
 }
+
+/* Make admin bar hide behind popup windows */
+body.ui-dialog-open #adminmenuwrap {
+  z-index: 100 !important;
+}
diff --git a/js/crm.joomla.js b/js/crm.joomla.js
deleted file mode 100644 (file)
index 4d98804..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// http://civicrm.org/licensing
-CRM.$(function($) {
-  $(document)
-    .on('dialogopen', function(e) {
-      // J3 - Make footer admin bar hide behind popup windows (CRM-15723)
-      $('#status').css('z-index', '100');
-    })
-    .on('dialogclose', function(e) {
-      if ($('.ui-dialog-content:visible').not(e.target).length < 1) {
-        // J3 - restore footer admin bar position (CRM-15723)
-        $('#status').css('z-index', '');
-      }
-    });
-});
index 740b2246500cbf68979d4dad16a13103383678c0..eb8a0b3997907ec208682a7a80ca9badb9c9f120 100644 (file)
@@ -1,16 +1,6 @@
 // http://civicrm.org/licensing
 CRM.$(function($) {
   $(document)
-    .on('dialogopen', function(e) {
-      // Make admin bar hide behind popup windows
-      $('#adminmenuwrap').css('z-index', '100');
-    })
-    .on('dialogclose', function(e) {
-      if ($('.ui-dialog-content:visible').not(e.target).length < 1) {
-        // Restore admin bar position
-        $('#adminmenuwrap').css('z-index', '');
-      }
-    })
     .on('crmWysiwygCreate', function(e, type, editor) {
       if (type === 'ckeditor') {
         editor.on('maximize', function(e) {