mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-12 12:31:26 +01:00
Upgrade lib for phpdebugbar
This commit is contained in:
@@ -70,6 +70,8 @@ class JavascriptRenderer
|
||||
|
||||
protected $ajaxHandlerClass = 'PhpDebugBar.AjaxHandler';
|
||||
|
||||
protected $ajaxHandlerBindToFetch = false;
|
||||
|
||||
protected $ajaxHandlerBindToJquery = true;
|
||||
|
||||
protected $ajaxHandlerBindToXHR = false;
|
||||
@@ -477,6 +479,27 @@ class JavascriptRenderer
|
||||
return $this->ajaxHandlerClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to call bindToFetch() on the ajax handler
|
||||
*
|
||||
* @param boolean $bind
|
||||
*/
|
||||
public function setBindAjaxHandlerToFetch($bind = true)
|
||||
{
|
||||
$this->ajaxHandlerBindToFetch = $bind;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether bindToFetch() will be called on the ajax handler
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAjaxHandlerBoundToFetch()
|
||||
{
|
||||
return $this->ajaxHandlerBindToFetch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to call bindToJquery() on the ajax handler
|
||||
*
|
||||
@@ -1022,6 +1045,9 @@ class JavascriptRenderer
|
||||
$this->variableName,
|
||||
$this->ajaxHandlerAutoShow ? 'true' : 'false'
|
||||
);
|
||||
if ($this->ajaxHandlerBindToFetch) {
|
||||
$js .= sprintf("%s.ajaxHandler.bindToFetch();\n", $this->variableName);
|
||||
}
|
||||
if ($this->ajaxHandlerBindToXHR) {
|
||||
$js .= sprintf("%s.ajaxHandler.bindToXHR();\n", $this->variableName);
|
||||
} elseif ($this->ajaxHandlerBindToJquery) {
|
||||
|
||||
Reference in New Issue
Block a user