From 2cd4837f41ec1aa7c6b802d6877f2e9d0396a884 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sun, 26 Jul 2015 01:08:42 +0200 Subject: [PATCH] fixed display issue with overlapping text in callstack item fixes #4763 --- framework/CHANGELOG.md | 1 + .../views/errorHandler/callStackItem.php | 6 ++-- framework/views/errorHandler/exception.php | 31 +++++++++++-------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index aa009de596..f491140952 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.6 under development ----------------------- +- Bug #4763: Fixed display issue with overlapping call stack item on exception display page (cebe) - Bug #7305: Logging of Exception objects resulted in failure of the logger i.e. no logs being written (cebe) - Bug #7374: Use proper INSERT syntax with default values when no values are specified (nineinchnick) - Bug #7707: client-side `trim` validator now passes the trimmed value to subsequent validators (nkovacs) diff --git a/framework/views/errorHandler/callStackItem.php b/framework/views/errorHandler/callStackItem.php index 51ed203bd5..a988bba6c8 100644 --- a/framework/views/errorHandler/callStackItem.php +++ b/framework/views/errorHandler/callStackItem.php @@ -16,14 +16,16 @@
. htmlEncode($file); ?> + + + + addTypeLinks("$class::$method") : $handler->htmlEncode($method)) . '(' . $handler->argumentsToString($args) . ')' ?> - -
diff --git a/framework/views/errorHandler/exception.php b/framework/views/errorHandler/exception.php index 0ca6fa0788..07123d63ae 100644 --- a/framework/views/errorHandler/exception.php +++ b/framework/views/errorHandler/exception.php @@ -52,8 +52,11 @@ h1,h2,h3,p,img,ul li{ font-family: Arial,sans-serif; color: #505050; } -html,body{ - overflow-x: hidden; +/*corresponds to min-width of 860px for some elements (.header .footer .element ...)*/ +@media screen and (min-width: 960px) { + html,body{ + overflow-x: hidden; + } } /* header */ @@ -152,6 +155,7 @@ html,body{ .call-stack ul li .element-wrap{ cursor: pointer; padding: 15px 0; + background-color: #fdfdfd; } .call-stack ul li.application .element-wrap{ background-color: #fafafa; @@ -164,7 +168,6 @@ html,body{ margin: 0 auto; padding: 0 50px; position: relative; - white-space: nowrap; } .call-stack ul li a{ color: #505050; @@ -183,17 +186,19 @@ html,body{ color: #505050; } .call-stack ul li .at{ - position: absolute; - right: 110px; /* 50px + 60px */ + float: right; + display: inline-block; + width: 7em; + padding-left: 1em; + text-align: left; color: #aaa; } .call-stack ul li.application .at{ color: #505050; } .call-stack ul li .line{ - position: absolute; - right: 50px; - width: 60px; + display: inline-block; + width: 3em; text-align: right; } .call-stack ul li .code-wrap{ @@ -209,7 +214,7 @@ html,body{ position: absolute; width: 100%; z-index: 100; - margin-top: -61px; + margin-top: 0; } .call-stack ul li .hover-line{ background: none; @@ -233,7 +238,7 @@ html,body{ color: #aaa; line-height: 20px; font-size: 12px; - margin-top: -63px; + margin-top: 1px; font-family: Consolas, Courier New, monospace; } .call-stack ul li .code pre{ @@ -443,7 +448,7 @@ window.onload = function() { if (!Sizzle('pre', callStackItem)[0]) { return; } - var top = callStackItem.offsetTop - window.pageYOffset, + var top = Sizzle('.code-wrap', callStackItem)[0].offsetTop - window.pageYOffset + 3, lines = Sizzle('pre', callStackItem)[0].getClientRects(), lineNumbers = Sizzle('.lines-item', callStackItem), errorLine = Sizzle('.error-line', callStackItem)[0], @@ -453,10 +458,10 @@ window.onload = function() { continue; } lineNumbers[i].style.top = parseInt(lines[i].top - top) + 'px'; - hoverLines[i].style.top = parseInt(lines[i].top - top - 3) + 'px'; + hoverLines[i].style.top = parseInt(lines[i].top - top) + 'px'; hoverLines[i].style.height = parseInt(lines[i].bottom - lines[i].top + 6) + 'px'; if (parseInt(callStackItem.getAttribute('data-line')) == i) { - errorLine.style.top = parseInt(lines[i].top - top - 3) + 'px'; + errorLine.style.top = parseInt(lines[i].top - top) + 'px'; errorLine.style.height = parseInt(lines[i].bottom - lines[i].top + 6) + 'px'; } }