mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
NEW: Hooks tab in debugbar (#24992)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -72,4 +72,29 @@
|
||||
|
||||
});
|
||||
|
||||
})(PhpDebugBar.$);
|
||||
/**
|
||||
* An extension of KVListWidget where the data represents a list
|
||||
* of variables
|
||||
*
|
||||
* Options:
|
||||
* - data
|
||||
*/
|
||||
var HookListWidget = PhpDebugBar.Widgets.HookListWidget = PhpDebugBar.Widgets.KVListWidget.extend({
|
||||
|
||||
className: csscls('widgets-kvlist widgets-hooklist'),
|
||||
|
||||
itemRenderer: function(dt, dd, key, object) {
|
||||
$('<span />').attr('title', key).text(key).appendTo(dt);
|
||||
|
||||
|
||||
dd.html('<span><strong>File: </strong> ' + object.file
|
||||
+ '</span><span><strong>Line: </strong>' + object.line
|
||||
+ '</span><span><strong>Count: </strong>' + object.count
|
||||
+ '</span><span><strong>Contexts: </strong>' + (object.contexts === null || object.contexts === '' ? 'Not set' : object.contexts)
|
||||
+ '</span>'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})(PhpDebugBar.$);
|
||||
|
||||
Reference in New Issue
Block a user