Fix an issue with Debug Bar 0.9 where the content of some PUC panels was not visible. See issue #102.
Cause: Debug Bar 0.9 now includes an admin bar menu that lists the available panels. This means that the special element that PUC uses to identify its panel titles (<span id="puc-debug-menu-link-$uid">) is no longer unique. This breaks the JS that's supposed to work around the fact that Debug Bar incorrectly assumes that every panel will have a unique PHP class name.
This commit is contained in:
parent
ea2bf49144
commit
235a810e90
|
|
@ -46,7 +46,7 @@ if ( !class_exists('Puc_v4p1_DebugBar_Extension', false) ):
|
|||
'puc-debug-bar-js-v4',
|
||||
$this->getLibraryUrl("/js/debug-bar.js"),
|
||||
array('jquery'),
|
||||
'20161219'
|
||||
'20170516'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ if ( !class_exists('Puc_v4p1_DebugBar_Panel', false) && class_exists('Debug_Bar_
|
|||
public function __construct($updateChecker) {
|
||||
$this->updateChecker = $updateChecker;
|
||||
$title = sprintf(
|
||||
'<span id="puc-debug-menu-link-%s">PUC (%s)</span>',
|
||||
'<span class="puc-debug-menu-link-%s">PUC (%s)</span>',
|
||||
esc_attr($this->updateChecker->getUniqueName('uid')),
|
||||
$this->updateChecker->slug
|
||||
);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ jQuery(function($) {
|
|||
target.attr('id', 'debug-menu-target-puc-' + uid);
|
||||
|
||||
//Change the menu link ID as well and point it at the new target ID.
|
||||
$('#puc-debug-menu-link-' + uid)
|
||||
$('#debug-bar-menu').find('.puc-debug-menu-link-' + uid)
|
||||
.closest('.debug-menu-link')
|
||||
.attr('id', 'debug-menu-link-puc-' + uid)
|
||||
.attr('href', '#' + target.attr('id'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue