From b02b8e4d0c2e97bb4e82222bd5b05f3df27d2c1c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 16 Apr 2019 16:36:42 -0400 Subject: [PATCH] Simplify hiding CMS elements behind modal dialogs Using css instead of js makes this a lot simpler --- CRM/Utils/System/Joomla.php | 9 --------- css/joomla.css | 5 +++++ css/menubar-wordpress.css | 5 +++++ js/crm.joomla.js | 14 -------------- js/crm.wordpress.js | 10 ---------- 5 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 js/crm.joomla.js diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index f98c794adf..91085841a2 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -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 */ diff --git a/css/joomla.css b/css/joomla.css index d49a764898..3f417d7916 100644 --- a/css/joomla.css +++ b/css/joomla.css @@ -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; +} diff --git a/css/menubar-wordpress.css b/css/menubar-wordpress.css index 33d227418d..792b59e7df 100644 --- a/css/menubar-wordpress.css +++ b/css/menubar-wordpress.css @@ -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 index 4d98804a05..0000000000 --- a/js/crm.joomla.js +++ /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', ''); - } - }); -}); diff --git a/js/crm.wordpress.js b/js/crm.wordpress.js index 740b224650..eb8a0b3997 100644 --- a/js/crm.wordpress.js +++ b/js/crm.wordpress.js @@ -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) { -- 2.25.1