diff options
| author | Rob Hudson | 2010-01-15 07:29:14 -0800 |
|---|---|---|
| committer | Rob Hudson | 2010-01-15 07:29:14 -0800 |
| commit | 930669f902a583560cbb3040940f3f5979c05239 (patch) | |
| tree | 5554e6d50450c64f348d653c583acc3a33a392c4 /debug_toolbar/templates | |
| parent | 4baa51e0be674428a2314e08efe43628184bc42a (diff) | |
| download | django-debug-toolbar-930669f902a583560cbb3040940f3f5979c05239.tar.bz2 | |
Debug toolbar markup is now XHTML compliant.
Diffstat (limited to 'debug_toolbar/templates')
4 files changed, 17 insertions, 13 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 260f857..5b40249 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,5 +1,6 @@ {% load i18n %} <script type="text/javascript" charset="utf-8"> +/* <![CDATA[ */ // When jQuery is sourced, it's going to overwrite whatever might be in the // '$' variable, so store a reference of it in a temporary variable... var _$ = window.$; @@ -7,15 +8,18 @@ var jquery_url = '{{ BASE_URL }}/__debug__/m/jquery.js'; document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E')); } +/* ]]> */ </script> <script type="text/javascript" src="{{ BASE_URL }}/__debug__/m/toolbar.min.js"></script> <script type="text/javascript" charset="utf-8"> +/* <![CDATA[ */ // Now that jQuery is done loading, put the '$' variable back to what it was... var $ = _$; + $(document).ready(function() { + $('head').append('<link rel="stylesheet" href="{{ BASE_URL }}/__debug__/m/toolbar.min.css" type="text/css" />'); + }); +/* ]]> */ </script> -<style type="text/css"> - @import url({{ BASE_URL }}/__debug__/m/toolbar.min.css); -</style> <div id="djDebug"> <div style="display:none;" id="djDebugToolbar"> <ul id="djDebugPanelList"> @@ -33,7 +37,7 @@ {% endif %} {{ panel.nav_title }} {% with panel.nav_subtitle as subtitle %} - {% if subtitle %}<br><small>{{ subtitle }}</small>{% endif %} + {% if subtitle %}<br /><small>{{ subtitle }}</small>{% endif %} {% endwith %} {% if panel.has_content %} </a> diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 331306b..c606d27 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -15,11 +15,11 @@ <td> {% if query.params %} {% if query.is_select %} - <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a><br> + <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a><br /> {% endif %} - <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a><br> + <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a><br /> {% if is_mysql %} - <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}¶ms={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a><br> + <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&duration={{ query.duration|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a><br /> {% endif %} {% endif %} </td> @@ -42,8 +42,8 @@ {% for file, line, method in query.stacktrace %} <tr> <td>{{ line }}</td> - <td><pre>{{ method|escape }}<pre></td> - <td><pre>{{ file|escape }}</pre></td> + <td><code>{{ method|escape }}</code></td> + <td><code>{{ file|escape }}</code></td> </tr> {% endfor %} </table> @@ -52,7 +52,7 @@ {% for line in query.template_info.context %} <tr> <td>{{ line.num }}</td> - <td><pre style="font-family: monospace;{% if line.highlight %}background-color: lightgrey{% endif %}">{{ line.content }}</pre></td> + <td><code style="font-family: monospace;{% if line.highlight %}background-color: lightgrey{% endif %}">{{ line.content }}</code></td> </tr> {% endfor %} </table> diff --git a/debug_toolbar/templates/debug_toolbar/panels/template_source.html b/debug_toolbar/templates/debug_toolbar/panels/template_source.html index 1fc0b68..7dedde3 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/template_source.html +++ b/debug_toolbar/templates/debug_toolbar/panels/template_source.html @@ -6,7 +6,7 @@ <div class="djDebugPanelContent"> <div class="scroll"> {% if not source.pygmentized %} - <pre>{{ source }}</pre> + <code>{{ source }}</code> {% else %} {{ source }} {% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index ef1b34d..9a1a16d 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -19,7 +19,7 @@ {% if template.context %} <dd> <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">▶</span> {% trans 'Toggle Context' %}</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ template.context }}</pre></div> + <div class="djTemplateHideContextDiv" style="display:none;"><code>{{ template.context }}</code></div> </dd> {% endif %} {% endfor %} @@ -35,7 +35,7 @@ <dt><strong>{{ key|escape }}</strong></dt> <dd> <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">▶</span> {% trans 'Toggle Context' %}</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div> + <div class="djTemplateHideContextDiv" style="display:none;"><code>{{ value|escape }}</code></div> </dd> {% endfor %} </dl> |
