improved profiler div (auto-scrolling, close-link) (merged from branches/2.2.0@45907, r45541)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46107 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-12-02 21:33:36 +00:00
parent b2ef5af8c1
commit 9c6f7345b0

View File

@ -64,8 +64,8 @@ class Profiler {
static function show($showTrace = false) {
if(!self::$inst) self::$inst = new Profiler(true,true);
echo "<div onclick=\"this.style.display = 'none'\" style=\"position: absolute; z-index: 100000; top: 20px; left: 20px; background-color: white; padding: 20px; border: 1px #AAA solid\">";
echo "<p>(Click to close)</p>";
echo "<div style=\"position: absolute; z-index: 100000; top: 20px; left: 20px; background-color: white; padding: 20px; border: 1px #AAA solid; height: 80%; overflow: auto;\">";
echo "<p><a href=\"#\" onclick=\"this.parentNode.style.display = 'none'\">(Click to close)</a></p>";
self::$inst->printTimers();
if($showTrace) self::$inst->printTrace();
echo "</div>";