Source for file console.phtml
Documentation is available at console.phtml
- 1: <?php
- 3: /**
- 4: * Nette Framework - Dump console template.
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 19: *
- 22: */
- 29: {
- 30: return "$m[1]<a href='#' onclick='return !netteToggle(this)'>$m[2]($m[3]) " . ($m[3] < 7 ? '<abbr>▼</abbr> </a><code>' : '<abbr>►</abbr> </a><code class="collapsed">');
- 31: }
- 32: }
- 36: ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- 37: <html lang="en">
- 38: <head>
- 39: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- 40: <meta name="robots" content="noindex,noarchive">
- 41: <meta name="generator" content="Nette Framework">
- 43: <title>Nette Debug Console</title>
- 45: <style type="text/css">
- 46: /* <![CDATA[ */
- 47: body {
- 48: margin: 0;
- 49: padding: 0;
- 50: font: 9pt/1.5 Verdana, sans-serif;
- 51: background: white;
- 52: color: #333;
- 53: }
- 55: h1 {
- 56: font-size: 13pt;
- 57: margin: 0;
- 58: padding: 2px 8px;
- 59: background: black;
- 60: color: white;
- 61: border-bottom: 1px solid black;
- 62: }
- 64: h2 {
- 65: font: 11pt/1.5 sans-serif;
- 66: margin: 0;
- 67: padding: 2px 8px;
- 68: background: #3484d2;
- 69: color: white;
- 70: }
- 72: a {
- 73: text-decoration: none;
- 74: color: #4197E3;
- 75: }
- 77: a abbr {
- 78: font-family: sans-serif;
- 79: color: #999;
- 80: }
- 82: p {
- 83: margin: .8em 0
- 84: }
- 86: pre, code, table {
- 87: font: 9pt/1.5 Consolas, monospace;
- 88: }
- 90: pre, table {
- 91: background: #fffbcc;
- 92: padding: .4em .7em;
- 93: border: 1px dotted silver;
- 94: }
- 96: table pre {
- 97: padding: 0;
- 98: margin: 0;
- 99: border: none;
- 100: }
- 102: pre.dump span {
- 103: color: #c16549;
- 104: }
- 106: pre.dump a {
- 107: color: #333;
- 108: }
- 110: table {
- 111: border-collapse: collapse;
- 112: width: 100%;
- 113: }
- 115: td, th {
- 116: vertical-align: top;
- 117: text-align: left;
- 118: border: 1px solid #eeeebb;
- 119: }
- 121: th {
- 122: width: 10;
- 123: padding: 2px 3px 2px 8px;
- 124: font-weight: bold;
- 125: }
- 127: td {
- 128: padding: 2px 8px 2px 3px;
- 129: }
- 131: .odd, .odd pre {
- 132: background: #faf5c3;
- 133: }
- 135: /* ]]> */
- 136: </style>
- 139: <script type="text/javascript">
- 140: /* <![CDATA[ */
- 141: document.write('<style> .collapsed { display: none; } <\/style>');
- 143: function netteToggle(link, panelId)
- 144: {
- 145: var arrow = link.getElementsByTagName('abbr')[0];
- 146: var panel = panelId ? document.getElementById(panelId) : link.nextSibling;
- 147: while (panel.nodeType !== 1) panel = panel.nextSibling;
- 148: var collapsed = panel.currentStyle ? panel.currentStyle.display == 'none' : getComputedStyle(panel, null).display == 'none';
- 150: arrow.innerHTML = String.fromCharCode(collapsed ? 0x25bc : 0x25ba);
- 151: panel.style.display = collapsed ? (panel.tagName.toLowerCase() === 'code' ? 'inline' : 'block') : 'none';
- 153: return true;
- 154: }
- 155: /* ]]> */
- 156: </script>
- 157: </head>
- 161: <body>
- 162: <h1>Nette Debug Console</h1>
- 163: </body>
- 164: </html>
- 173: <table>
- 178: <td><?php echo preg_replace_callback('#(<pre class="dump">|\s+)?(.*)\((\d+)\) <code>#', '_netteDumpCb2', Debug::dump($val, TRUE)) ?></td>
- 179: </tr>
- 181: </table>
- 185: <script type="text/javascript">
- 186: /* <![CDATA[ */
- 187: if (typeof _netteConsole === 'undefined') {
- 188: _netteConsole = window.open('','_netteConsole','width=700,height=700,resizable,scrollbars=yes');
- 189: _netteConsole.document.write(<?php echo json_encode(preg_replace('#[ \t\r\n]+#', ' ', $document)) ?>);
- 190: _netteConsole.document.close();
- 191: _netteConsole.document.onkeyup = function(e) {
- 192: e = e || _netteConsole.event;
- 193: if (e.keyCode == 27) _netteConsole.close();
- 194: }
- 195: _netteConsole.document.body.focus();
- 196: }
- 197: _netteConsole.document.body.innerHTML = _netteConsole.document.body.innerHTML + <?php echo json_encode($body) ?>;
- 198: /* ]]> */
- 199: </script>