diff options
11 files changed, 251 insertions, 280 deletions
diff --git a/debug_toolbar/media/debug_toolbar/toolbar.css b/debug_toolbar/media/debug_toolbar/toolbar.css index 44a9074..bf4648a 100644 --- a/debug_toolbar/media/debug_toolbar/toolbar.css +++ b/debug_toolbar/media/debug_toolbar/toolbar.css @@ -179,7 +179,7 @@ padding:10px 20px; } -#djDebug .djDebugPanelContent .boxed { +#djDebug .djDebugPanelContent .scroll { height:100%; overflow:auto; display:block; diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index b80daef..dc8ccf9 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -56,7 +56,9 @@ <h3>{{ panel.title|safe }}</h3> </div> <div class="djDebugPanelContent"> - {{ panel.content|safe }} + <div class="scroll"> + {{ panel.content|safe }} + </div> </div> </div> {% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/headers.html b/debug_toolbar/templates/debug_toolbar/panels/headers.html index 957a021..f251056 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/headers.html +++ b/debug_toolbar/templates/debug_toolbar/panels/headers.html @@ -1,19 +1,17 @@ {% load i18n %} -<div class="boxed"> - <table> - <thead> - <tr> - <th>{% trans "Key" %}</th> - <th>{% trans "Value" %}</th> +<table> + <thead> + <tr> + <th>{% trans "Key" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in headers.iteritems %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in headers.iteritems %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html index 515742c..5e8b652 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/logger.html +++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html @@ -1,27 +1,26 @@ {% load i18n %} -<div class="boxed"> - {% if records %} - <table> - <thead> - <tr> - <th>{% trans "Level" %}</th> - <th>{% trans "Time" %}</th> - <th>{% trans "Message" %}</th> - <th>{% trans "Location" %}</th> +{% if records %} + <table> + <thead> + <tr> + <th>{% trans "Level" %}</th> + <th>{% trans "Time" %}</th> + <th>{% trans "Message" %}</th> + <th>{% trans "Location" %}</th> + </tr> + </thead> + <tbody> + {% for record in records %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ record.level }}</td> + <td>{{ record.time|date:"h:i:s m/d/Y" }}</td> + <td>{{ record.message }}</td> + <td>{{ record.file }}:{{ record.line }}</td> </tr> - </thead> - <tbody> - {% for record in records %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ record.level }}</td> - <td>{{ record.time|date:"h:i:s m/d/Y" }}</td> - <td>{{ record.message }}</td> - <td>{{ record.file }}:{{ record.line }}</td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "No messages logged" %}.</p> - {% endif %} -</div> + {% endfor %} + </tbody> + </table> +{% else %} + <p>{% trans "No messages logged" %}.</p> +{% endif %} + diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html index b1d7233..3fdbf74 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html +++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html @@ -1,104 +1,96 @@ {% load i18n %} <h4>COOKIES Variables</h4> -<div class="boxed"> - {% if cookies %} - <table> - <colgroup> - <col style="width:20%"/> - <col/> - </colgroup> - <thead> - <tr> - <th>{% trans "Variable" %}</th> - <th>{% trans "Value" %}</th> +{% if cookies %} + <table> + <colgroup> + <col style="width:20%"/> + <col/> + </colgroup> + <thead> + <tr> + <th>{% trans "Variable" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in cookies %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in cookies %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "No COOKIE data" %}</p> - {% endif %} -</div> + {% endfor %} + </tbody> + </table> +{% else %} + <p>{% trans "No COOKIE data" %}</p> +{% endif %} <h4>SESSION Variables</h4> -<div class="boxed"> - {% if session %} - <table> - <colgroup> - <col style="width:20%"/> - <col/> - </colgroup> - <thead> - <tr> - <th>{% trans "Variable" %}</th> - <th>{% trans "Value" %}</th> +{% if session %} + <table> + <colgroup> + <col style="width:20%"/> + <col/> + </colgroup> + <thead> + <tr> + <th>{% trans "Variable" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in session %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in session %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "No SESSION data" %}</p> - {% endif %} -</div> + {% endfor %} + </tbody> + </table> +{% else %} + <p>{% trans "No SESSION data" %}</p> +{% endif %} <h4>GET Variables</h4> -<div class="boxed"> - {% if get %} - <table> - <thead> - <tr> - <th>{% trans "Variable" %}</th> - <th>{% trans "Value" %}</th> +{% if get %} + <table> + <thead> + <tr> + <th>{% trans "Variable" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in get %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|join:", "|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in get %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|join:", "|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "No GET data" %}</p> - {% endif %} -</div> + {% endfor %} + </tbody> + </table> +{% else %} + <p>{% trans "No GET data" %}</p> +{% endif %} <h4>POST Variables</h4> -<div class="boxed"> - {% if post %} - <table> - <thead> - <tr> - <th>{% trans "Variable" %}</th> - <th>{% trans "Value" %}</th> +{% if post %} + <table> + <thead> + <tr> + <th>{% trans "Variable" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in post %} + <tr class="{% cycle 'row1' 'row2' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|join:", "|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in post %} - <tr class="{% cycle 'row1' 'row2' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|join:", "|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> - {% else %} - <p>{% trans "No POST data" %}</p> - {% endif %} -</div> + {% endfor %} + </tbody> + </table> +{% else %} + <p>{% trans "No POST data" %}</p> +{% endif %}
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html index 1591966..99c43b6 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html +++ b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html @@ -1,19 +1,17 @@ {% load i18n %} -<div class="boxed"> - <table> - <thead> - <tr> - <th>{% trans "Setting" %}</th> - <th>{% trans "Value" %}</th> +<table> + <thead> + <tr> + <th>{% trans "Setting" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for var in settings.items|dictsort:"0" %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ var.0 }}</td> + <td><code>{{ var.1|pprint }}</code></td> </tr> - </thead> - <tbody> - {% for var in settings.items|dictsort:"0" %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ var.0 }}</td> - <td><code>{{ var.1|pprint }}</code></td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> diff --git a/debug_toolbar/templates/debug_toolbar/panels/signals.html b/debug_toolbar/templates/debug_toolbar/panels/signals.html index 94414ea..d6d681c 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/signals.html +++ b/debug_toolbar/templates/debug_toolbar/panels/signals.html @@ -1,21 +1,19 @@ {% load i18n %} -<div class="boxed"> - <table> - <thead> - <tr> - <th>{% trans "Signal" %}</th> - <th>Providing Args</th> - <th>Receivers</th> +<table> + <thead> + <tr> + <th>{% trans "Signal" %}</th> + <th>Providing Args</th> + <th>Receivers</th> + </tr> + </thead> + <tbody> + {% for name, signal, receivers in signals %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ name|escape }}</td> + <td>{{ signal.providing_args|join:", " }}</td> + <td>{{ receivers|join:", " }}</td> </tr> - </thead> - <tbody> - {% for name, signal, receivers in signals %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ name|escape }}</td> - <td>{{ signal.providing_args|join:", " }}</td> - <td>{{ receivers|join:", " }}</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index aecfad6..7aa4c2d 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -1,51 +1,49 @@ {% load i18n %} -<div class="boxed"> - <table> - <thead> - <tr> - <th>{% trans "Time" %} (ms)</th> - <th>{% trans "Action" %}</th> - <th>Stacktrace</th> - <th>Query</th> - </tr> - </thead> - <tbody> - {% for query in queries %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ query.time|floatformat:"2" }}</td> - <td> - {% if query.params %} - <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a> - <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a> - {% if is_mysql %} - <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a> - {% endif %} +<table> + <thead> + <tr> + <th>{% trans "Time" %} (ms)</th> + <th>{% trans "Action" %}</th> + <th>Stacktrace</th> + <th>Query</th> + </tr> + </thead> + <tbody> + {% for query in queries %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ query.time|floatformat:"2" }}</td> + <td> + {% if query.params %} + <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a> + <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a> + {% if is_mysql %} + <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a> {% endif %} - </td> - <td> - {% if query.stacktrace %} - <div class="djSQLShowStacktraceDiv"><a class="djSQLShowStacktrace" href="#">Toggle Stacktrace</a></div> - <div class="djSQLHideStacktraceDiv" style="display:none;"> - <table> + {% endif %} + </td> + <td> + {% if query.stacktrace %} + <div class="djSQLShowStacktraceDiv"><a class="djSQLShowStacktrace" href="#">Toggle Stacktrace</a></div> + <div class="djSQLHideStacktraceDiv" style="display:none;"> + <table> + <tr> + <th>{% trans "Line" %}</th> + <th>{% trans "Method" %}</th> + <th>{% trans "File" %}</th> + </tr> + {% for file, line, method in query.stacktrace %} <tr> - <th>{% trans "Line" %}</th> - <th>{% trans "Method" %}</th> - <th>{% trans "File" %}</th> + <td>{{ line }}</td> + <td><pre>{{ method|escape }}<pre></td> + <td><pre>{{ file|escape }}</pre></td> </tr> - {% for file, line, method in query.stacktrace %} - <tr> - <td>{{ line }}</td> - <td><pre>{{ method|escape }}<pre></td> - <td><pre>{{ file|escape }}</pre></td> - </tr> - {% endfor %} - </table> - </div> - {% endif %} - </td> - <td class="syntax">{{ query.sql|safe }}</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </table> + </div> + {% endif %} + </td> + <td class="syntax">{{ query.sql|safe }}</td> + </tr> + {% endfor %} + </tbody> +</table> diff --git a/debug_toolbar/templates/debug_toolbar/panels/template_source.html b/debug_toolbar/templates/debug_toolbar/panels/template_source.html index 8e8253d..192d1af 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/template_source.html +++ b/debug_toolbar/templates/debug_toolbar/panels/template_source.html @@ -4,11 +4,5 @@ <h3>Template Source: <code>{{ template_name }}</code></h3> </div> <div class="djDebugPanelContent"> - <div class="panelScrollWrap"> - <div class="panelScrollContent"> - <div class="boxed"> - {{ source }} - </div> - </div> - </div> + {{ source }} </div> diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index d4e18b5..872a5f5 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,6 +1,5 @@ {% load i18n %} <h4>Template path{{ template_dirs|length|pluralize }}</h4> -<div class="boxed"> {% if template_dirs %} <ol> {% for template in template_dirs %} @@ -10,39 +9,34 @@ {% else %} <p>None</p> {% endif %} -</div> <h4>{% trans "Template" %}{{ templates|length|pluralize }}</h4> -<div class="boxed"> - {% if templates %} - <dl> - {% for template in templates %} - <dt><strong><a class="remoteCall" href="/__debug__/template_source/?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt> - <dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd> - <dd> - <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ template.context }}</pre></div> - </dd> - {% endfor %} - </dl> - {% else %} - <p>None</p> - {% endif %} -</div> +{% if templates %} +<dl> +{% for template in templates %} + <dt><strong><a class="remoteCall" href="/__debug__/template_source/?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt> + <dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd> + <dd> + <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> + <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ template.context }}</pre></div> + </dd> +{% endfor %} +</dl> +{% else %} + <p>None</p> +{% endif %} <h4>Context processor{{ context_processors|length|pluralize }}</h4> -<div class="boxed"> - {% if context_processors %} - <dl> - {% for key, value in context_processors.iteritems %} - <dt><strong>{{ key|escape }}</strong></dt> - <dd> - <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div> - </dd> - {% endfor %} - </dl> - {% else %} - <p>None</p> - {% endif %} -</div> +{% if context_processors %} +<dl> +{% for key, value in context_processors.iteritems %} + <dt><strong>{{ key|escape }}</strong></dt> + <dd> + <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> + <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div> + </dd> +{% endfor %} +</dl> +{% else %} + <p>None</p> +{% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html index 9fd479f..f267de1 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/timer.html +++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html @@ -1,23 +1,21 @@ {% load i18n %} -<div class="boxed"> - <table> - <colgroup> - <col style="width:20%"/> - <col/> - </colgroup> - <thead> - <tr> - <th>{% trans "Resource" %}</th> - <th>{% trans "Value" %}</th> +<table> + <colgroup> + <col style="width:20%"/> + <col/> + </colgroup> + <thead> + <tr> + <th>{% trans "Resource" %}</th> + <th>{% trans "Value" %}</th> + </tr> + </thead> + <tbody> + {% for key, value in rows %} + <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> + <td>{{ key|escape }}</td> + <td>{{ value|escape }}</td> </tr> - </thead> - <tbody> - {% for key, value in rows %} - <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> - <td>{{ key|escape }}</td> - <td>{{ value|escape }}</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> |
