aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorRob Hudson2008-09-16 07:00:29 -0700
committerRob Hudson2008-09-16 07:00:29 -0700
commit96ca83db5686f5b8983e7b008a698307130e58c9 (patch)
tree7dcce0b3865e3599e5e58599a8bef799b2370e3f /debug_toolbar/templates
parent4591e34f0140c43e68e4ecd97eae7f3ea05878f6 (diff)
parent5fd534e68dbd191c5d6062a39ae512b109cccbdb (diff)
downloaddjango-debug-toolbar-96ca83db5686f5b8983e7b008a698307130e58c9.tar.bz2
Merge branch 'master' into explain and updating a few bits to work with the new
urls and views.
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/base.html42
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html2
2 files changed, 6 insertions, 38 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html
index 637e04d..8ee29d2 100644
--- a/debug_toolbar/templates/debug_toolbar/base.html
+++ b/debug_toolbar/templates/debug_toolbar/base.html
@@ -1,39 +1,7 @@
-<script type="text/javascript">
- var djDebugLastObj = null;
- function djDebugToggle(obj) {
- if (djDebugLastObj) djDebugLastObj.style.display = 'none';
- var obj = document.getElementById(obj);
- if (!obj) return;
- if (djDebugLastObj == obj) {
- djDebugLastObj = null;
- return;
- }
- if (obj.style.display != 'block') {
- obj.style.display = 'block';
- djDebugLastObj = obj;
- }
- }
- function djDebugClose() {
- if (!djDebugLastObj) return;
- djDebugLastObj.style.display = 'none';
- djDebugLastObj = null;
- }
-</script>
+<script src="/__debug__/m/jquery.js" type="text/javascript" charset="utf-8"></script>
+<script src="/__debug__/m/toolbar.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
- #djDebugToolbar {height:30px; background:orange; color:#000; z-index:100000000; border:1px solid #06171D; border-width:1px 0;}
- #djDebugToolbar ul {margin:0; padding:0 10px; list-style:none;}
- #djDebugToolbar li {display:inline; width:auto; position:relative; float:none; margin:0 10px 0 0; padding:0; height:20px; line-height:30px; padding:8px 10px 8px 0; border-right: 1px solid #06171D;}
- #djDebugToolbar #djDebugButton {color:red; font-weight:bold;}
- #djDebug * {margin:0; padding:0; float:none; position:static; }
- #djDebug .panelContent {display:none; position:absolute; margin:0; padding:5px; top:35px; width:auto; left:5px; right:5px; bottom:5px; background:white; color:black; border:1px solid black; z-index:1000000; overflow:auto;}
- #djDebug .panelContent p {padding: 0 5px;}
- #djDebug .panelContent p, #djDebug .panelContent table, #djDebug .panelContent ul, #djDebug .panelContent dl {margin:5px 0;}
- #djDebug .close {float:right; font-weight:bold;}
- #djDebug .panelContent dt, #djDebug .panelContent dd {display: block;}
- #djDebug .panelContent dd {margin-left:10px;}
- #djDebug th, #djDebug td {padding: 5px;}
- #djDebug .row1 td {background:#fff;}
- #djDebug .row2 td {background:#ddd;}
+ @import url(/__debug__/m/toolbar.css);
</style>
<div id="djDebug">
<div id="djDebugToolbar">
@@ -42,7 +10,7 @@
{% for panel in panels %}
<li>
{% if panel.has_content %}
- <a href="{{ panel.url|default:"#" }}" onclick="djDebugToggle('{{ panel.dom_id }}')" title="{{ panel.title }}" class="{{ panel.dom_id }}">{{ panel.title }}</a>
+ <a href="{{ panel.url|default:"#" }}" title="{{ panel.title }}" class="{{ panel.dom_id }}">{{ panel.title }}</a>
{% else %}
{{ panel.title }}
{% endif %}
@@ -54,7 +22,7 @@
{% if panel.has_content %}
<div id="{{ panel.dom_id }}" class="panelContent">
<div class="title">
- <a href="" onclick="djDebugClose()" class="close">Close</a>
+ <a href="" class="close">Close</a>
</div>
{{ panel.content|safe }}
</div>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 9a6638b..246fa74 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -12,7 +12,7 @@
<tr class="{% cycle 'row1' 'row2' %}">
<td>{{ query.time|floatformat:"4" }}</td>
<td><pre>{{ query.sql|wordwrap:80|escape }}</pre></td>
- <td><a href="{% url explain_sql %}?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}">EXPLAIN</a></td>
+ <td><a href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}">EXPLAIN</a></td>
</tr>
{% endfor %}
</tbody>