From fff8c61ad1ff3bf8ac7bf807ee9171cf062f05ef Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 21 Mar 2015 13:23:24 +0100 Subject: [PATCH] Fix empty ad location fieldset being displayed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … if Burnign Board is not installed --- wcfsetup/install/files/acp/js/WCF.ACP.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index fb479d1c49..a1224ef240 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -2696,11 +2696,24 @@ WCF.ACP.Ad.LocationHandler = Class.extend({ this._pageConditions = $('#pageConditions'); this._pageControllers = $('#pageControllers'); + var $dl = this._pageControllers.parents('dl:eq(0)'); + // hide the page controller element - this._pageControllers.parents('dl:eq(0)').hide(); + $dl.hide(); + + var $fieldset = $dl.parent('fieldset'); + if (!$fieldset.children('dl:visible').length) { + $fieldset.hide(); + } + + var $nextFieldset = $fieldset.next('fieldset'); + if ($nextFieldset) { + $nextFieldset.data('margin-top', $nextFieldset.css('margin-top')); + $nextFieldset.css('margin-top', 0); + } // fix the margin of a potentially next page condition element - this._pageControllers.parents('dl:eq(0)').next('dl').css('margin-top', 0); + $dl.next('dl').css('margin-top', 0); $('#objectTypeID').on('change', $.proxy(this._setPageController, this)); -- 2.20.1