Source for file profiler.phtml

Documentation is available at profiler.phtml

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework - Profiler screen template.
  5. 5:  *
  6. 6:  * @copyright  Copyright (c) 2004, 2010 David Grudl
  7. 7:  * @license    http://nettephp.com/license  Nette license
  8. 8:  * @link       http://nettephp.com
  9. 9:  * @category   Nette
  10. 10:  * @package    Nette
  11. 11:  *
  12. 12:  * @param      array     $colophons 
  13. 13:  * @return     void 
  14. 14:  */
  15. 15:  
  16. 16:  
  17. 17:  
  18. 18: ?>
  19. 19:  
  20. 20: <style type="text/css">#netteProfilerContainer{position:fixed;_position:absolute;right:5px;bottom:5px;z-index:23178}#netteProfiler{font:normal normal 11px/1.4 Consolas,Arial;position:relative;padding:3px;color:black;background:#EEE;border:1px dotted gray;cursor:move;opacity:.70;=filter:alpha(opacity=70)}#netteProfiler *{color:inherit;background:inherit;text-align:inherit}#netteProfilerIcon{position:absolute;right:0;top:0;line-height:1;padding:2px;color:black;text-decoration:none}#netteProfiler:hover{opacity:1;=filter:none}#netteProfiler ul{margin:0;padding:0;width:350px}#netteProfiler li{margin:0;padding:1px;text-align:left;list-style:none}#netteProfiler span[title]{border-bottom:1px dotted gray;cursor:help}#netteProfiler strong{color:red}</style>
  21. 21:  
  22. 22:  
  23. 23: <div id="netteProfilerContainer">
  24. 24: <div id="netteProfiler">
  25. 25:     <a id="netteProfilerIcon" href="#"><abbr>&#x25bc;</abbr></a
  26. 26:     ><ul>
  27. 27:     <?php foreach ($colophons as $callback)?>
  28. 28:     <?php foreach ((array) call_user_func($callback'profiler'as $line)?><li><?php echo $line"\n" ?></li><?php endforeach ?>
  29. 29:     <?php endforeach ?>
  30. 30:     </ul>
  31. 31: </div>
  32. 32: </div>
  33. 33:  
  34. 34:  
  35. 35: <script type="text/javascript">/*<![CDATA[*/document.getElementById("netteProfiler").onmousedown=function(c){c=c||event;this.posX=parseInt(this.style.left+"0");this.posY=parseInt(this.style.top+"0");this.mouseX=c.clientX;this.mouseY=c.clientY;var a=this;document.documentElement.onmousemove=function(b){b=b||event;a.style.left=b.clientX-a.mouseX+a.posX+"px";a.style.top=b.clientY-a.mouseY+a.posY+"px";return false};document.documentElement.onmouseup=function(){document.documentElement.onmousemove=null;document.documentElement.onmouseup=null;document.cookie=
  36. 36: "netteProfilerPosition="+a.style.left+":"+a.style.top+"; path=/";return false}};
  37. 37: document.getElementById("netteProfilerIcon").onclick=function(){var c=this.getElementsByTagName("abbr")[0],a=this.nextSibling,b=a.currentStyle?a.currentStyle.display=="none":getComputedStyle(a,null).display=="none";c.innerHTML=b?String.fromCharCode(9660):"Profiler "+String.fromCharCode(9658);a.style.display=b?"block":"none";c.parentNode.style.position=b?"absolute":"static";document.cookie="netteProfilerVisible="+b*1+"; path=/";return false};document.body.appendChild(document.getElementById("netteProfilerContainer"));
  38. 38: document.cookie.indexOf("netteProfilerVisible=0")>-1&&document.getElementById("netteProfilerIcon").onclick();var _nettePos=document.cookie.match(/netteProfilerPosition=([0-9-]+px):([0-9-]+px)/);if(_nettePos){document.getElementById("netteProfiler").style.left=_nettePos[1];document.getElementById("netteProfiler").style.top=_nettePos[2]};/*]]>*/</script>