|
|
@@ -227,7 +227,7 @@ class Route_Debug extends RouteBase {
|
|
|
'log' => UI::h('div', [], [
|
|
|
UI::h('div', [
|
|
|
'title' => htmlspecialchars( ('sql' == $dbg['type'] && is_string($dbg['log'])) ? $dbg['log'] : var_export($dbg['log'], true) ),
|
|
|
- 'onClick' => "return p5DBG__showLogTrace(this, event)",
|
|
|
+ 'onClick' => "return p5DBG__showLogTrace(this, event, '600px')",
|
|
|
'style' => "cursor:pointer"
|
|
|
], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 100)) . ' ...')
|
|
|
]),
|
|
|
@@ -247,7 +247,8 @@ class Route_Debug extends RouteBase {
|
|
|
),
|
|
|
]);
|
|
|
echo UI::h('script', [], "
|
|
|
- function p5DBG__showLogTrace(n, e) {
|
|
|
+ function p5DBG__showLogTrace(n, e, maxWidth) {
|
|
|
+ var maxWidth = maxWidth || null
|
|
|
if (!e) return false;
|
|
|
if (e.target && 'PRE' == e.target.tagName) return false;
|
|
|
var preNode = n.parentNode.lastChild
|
|
|
@@ -260,7 +261,7 @@ class Route_Debug extends RouteBase {
|
|
|
} else {
|
|
|
var pre = document.createElement('pre')
|
|
|
pre.appendChild( document.createTextNode(n.title) )
|
|
|
- pre.style.maxWidth = '600px'
|
|
|
+ if (maxWidth) pre.style.maxWidth = maxWidth
|
|
|
pre.style.fontSize = 'x-small'
|
|
|
n.parentNode.appendChild(pre)
|
|
|
}
|