From f60a5e3b048728240bb4d85dd1fb5e2c9ea6fa2d Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Wed, 12 Aug 2009 17:04:54 +0300 Subject: panel width, content boxing, safe scrolling --- debug_toolbar/media/debug_toolbar/back.png | Bin 0 -> 1078 bytes debug_toolbar/media/debug_toolbar/back_hover.png | Bin 0 -> 1084 bytes debug_toolbar/media/debug_toolbar/toolbar.css | 63 ++++++- debug_toolbar/templates/debug_toolbar/base.html | 6 +- .../templates/debug_toolbar/panels/headers.html | 34 ++-- .../templates/debug_toolbar/panels/logger.html | 51 +++--- .../debug_toolbar/panels/request_vars.html | 187 +++++++++++---------- .../debug_toolbar/panels/settings_vars.html | 34 ++-- .../templates/debug_toolbar/panels/signals.html | 36 ++-- .../templates/debug_toolbar/panels/sql.html | 99 +++++------ .../debug_toolbar/panels/template_source.html | 12 +- .../templates/debug_toolbar/panels/templates.html | 62 ++++--- .../templates/debug_toolbar/panels/timer.html | 42 ++--- 13 files changed, 355 insertions(+), 271 deletions(-) create mode 100644 debug_toolbar/media/debug_toolbar/back.png create mode 100644 debug_toolbar/media/debug_toolbar/back_hover.png (limited to 'debug_toolbar') diff --git a/debug_toolbar/media/debug_toolbar/back.png b/debug_toolbar/media/debug_toolbar/back.png new file mode 100644 index 0000000..fa6a36b Binary files /dev/null and b/debug_toolbar/media/debug_toolbar/back.png differ diff --git a/debug_toolbar/media/debug_toolbar/back_hover.png b/debug_toolbar/media/debug_toolbar/back_hover.png new file mode 100644 index 0000000..774f97c Binary files /dev/null and b/debug_toolbar/media/debug_toolbar/back_hover.png differ diff --git a/debug_toolbar/media/debug_toolbar/toolbar.css b/debug_toolbar/media/debug_toolbar/toolbar.css index de71ad2..faf3b7a 100644 --- a/debug_toolbar/media/debug_toolbar/toolbar.css +++ b/debug_toolbar/media/debug_toolbar/toolbar.css @@ -137,10 +137,11 @@ display: none; position: absolute; margin: 0; + margin-left: 30px; padding: 10px 20px; top: 15px; width: auto; - max-width: 700px; + /*max-width: 800px;*/ min-width: 500px; right: 200px; bottom: 15px; @@ -154,18 +155,41 @@ background: transparent url(panel_bg.png) repeat left top; } -#djDebug .panelContent .panelScroll { - position: relative; +#djDebug .panelContent .panelScrollWrap { overflow: auto; height: 90%; - padding: 0px 10px 10px 0px; + width: 100%; +} + +#djDebug .panelContent .panelScrollContent { + width: auto; + margin-right: 10px; } -#djDebug .panelContent p a, #djDebug .panelContent dl a { +#djDebug .panelContent .boxed { + background-color: #fff; + padding: 5px; + border: 1px solid #c6d6da; +} + + + +#djDebug .panelContent p a, #djDebug .panelContent dt a { color: #000; + padding: 2px 4px; } -#djDebug .panelContent p a:hover, #djDebug .panelContent dl a:hover { - color: #900; +#djDebug .panelContent p a:hover, #djDebug .panelContent dt a:hover { + background-color: #ffc; +} + +#djDebug .panelContent p a, #djDebug .panelContent dd a { + color: #000; + background-color: #eee; + padding: 2px 4px; +} +#djDebug .panelContent p a:hover, #djDebug .panelContent dd a:hover { + color: #111; + background-color: #ffc; } #djDebug .panelContent h3 { @@ -181,6 +205,9 @@ #djDebug .panelContent h4 { font-weight: normal; + margin-top: 0.5em; + font-size: 20px; + line-height: 24px; } #djDebug .panelContent code { @@ -204,17 +231,21 @@ } #djDebug .panelContent table { - width: 100%; + /*width: 90%;*/ clear: both; border: 0; padding: 0; + margin: 0; + border-collapse: collapse; + border-spacing: 0; } #djDebug .panelContent table a { color: #000; + padding: 2px 4px; } #djDebug .panelContent table a:hover { - color: #900; + background-color: #ffc; } #djDebug .panelContent table th { @@ -252,10 +283,24 @@ background-image: url(close_hover.png); } +#djDebug .panelContent .close.back { + background-image: url(back.png); +} + +#djDebug .panelContent .close.back:hover { + background-image: url(back_hover.png); +} + + + #djDebug .panelContent dt, #djDebug .panelContent dd { display: block; } +#djDebug .panelContent dt { + margin-top: 0.75em; +} + #djDebug .panelContent dd { margin-left: 10px; } diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 5f4b7e7..a44d31e 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -54,8 +54,10 @@
Close

{{ panel.title|safe }}

-
- {{ panel.content|safe }} +
+
+ {{ panel.content|safe }} +
{% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/headers.html b/debug_toolbar/templates/debug_toolbar/panels/headers.html index b14a50c..a6b6b59 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/headers.html +++ b/debug_toolbar/templates/debug_toolbar/panels/headers.html @@ -1,16 +1,18 @@ - - - - - - - - - {% for key, value in headers.iteritems %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|escape }}
+
+ + + + + + + + + {% for key, value in headers.iteritems %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|escape }}
+
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html index e6ce945..2bfab05 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/logger.html +++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html @@ -1,25 +1,26 @@ -{% if records %} - - - - - - - - - - - {% for record in records %} - - - - - - - {% endfor %} - -
LevelTimeMessageLocation
{{ record.level }}{{ record.time|date:"h:i:s m/d/Y" }}{{ record.message }}{{ record.file }}:{{ record.line }}
-{% else %} -

No messages logged.

-{% endif %} - +
+ {% if records %} + + + + + + + + + + + {% for record in records %} + + + + + + + {% endfor %} + +
LevelTimeMessageLocation
{{ record.level }}{{ record.time|date:"h:i:s m/d/Y" }}{{ record.message }}{{ record.file }}:{{ record.line }}
+ {% else %} +

No messages logged.

+ {% endif %} +
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html index a65d0a5..d8c81ba 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html +++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html @@ -1,92 +1,103 @@

COOKIES Variables

-{% if cookies %} - - - - - - - - - - - - - {% for key, value in cookies %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|escape }}
-{% else %} -

None

-{% endif %} +
+ {% if cookies %} + + + + + + + + + + + + + {% for key, value in cookies %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|escape }}
+ {% else %} +

None

+ {% endif %} +
+

SESSION Variables

-{% if session %} - - - - - - - - - - - - - {% for key, value in session %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|escape }}
-{% else %} -

None

-{% endif %} +
+ {% if session %} + + + + + + + + + + + + + {% for key, value in session %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|escape }}
+ {% else %} +

None

+ {% endif %} +
+

GET Variables

-{% if get %} - - - - - - - - - {% for key, value in get %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|join:", "|escape }}
-{% else %} -

None

-{% endif %} +
+ {% if get %} + + + + + + + + + {% for key, value in get %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|join:", "|escape }}
+ {% else %} +

None

+ {% endif %} +
+

POST Variables

-{% if post %} - - - - - - - - - {% for key, value in post %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|join:", "|escape }}
-{% else %} -

None

-{% endif %} +
+ {% if post %} + + + + + + + + + {% for key, value in post %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|join:", "|escape }}
+ {% else %} +

None

+ {% 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 c53ee4d..8c65700 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html +++ b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html @@ -1,16 +1,18 @@ - - - - - - - - - {% for var in settings.items|dictsort:"0" %} - - - - - {% endfor %} - -
SettingValue
{{ var.0 }}{{ var.1|pprint }}
+
+ + + + + + + + + {% for var in settings.items|dictsort:"0" %} + + + + + {% endfor %} + +
SettingValue
{{ var.0 }}{{ var.1|pprint }}
+
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/signals.html b/debug_toolbar/templates/debug_toolbar/panels/signals.html index 7875700..c7a7733 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/signals.html +++ b/debug_toolbar/templates/debug_toolbar/panels/signals.html @@ -1,18 +1,20 @@ - - - - - - - - - - {% for name, signal, receivers in signals %} - - - - +
+
SignalProviding ArgsReceivers
{{ name|escape }}{{ signal.providing_args|join:", " }}{{ receivers|join:", " }}
+ + + + + - {% endfor %} - -
SignalProviding ArgsReceivers
+ + + {% for name, signal, receivers in signals %} + + {{ name|escape }} + {{ signal.providing_args|join:", " }} + {{ receivers|join:", " }} + + {% endfor %} + + +
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 717d54d..bb805e6 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -1,48 +1,51 @@ - - - - - - - - - - - {% for query in queries %} - - - - - - - {% endfor %} - -
Time (ms)ActionStacktraceQuery
{{ query.time|floatformat:"2" }} - {% if query.params %} - SELECT - EXPLAIN - {% if is_mysql %} - PROFILE - {% endif %} - {% endif %} - - {% if query.stacktrace %} - - - {% endif %} - {{ query.sql|safe }}
+
+ + + + + + + + + + + {% for query in queries %} + + + + + + + {% endfor %} + +
Time (ms)ActionStacktraceQuery
{{ query.time|floatformat:"2" }} + {% if query.params %} + SELECT + EXPLAIN + {% if is_mysql %} + PROFILE + {% endif %} + {% endif %} + + {% if query.stacktrace %} + + + {% endif %} + {{ query.sql|safe }}
+
+ diff --git a/debug_toolbar/templates/debug_toolbar/panels/template_source.html b/debug_toolbar/templates/debug_toolbar/panels/template_source.html index 572522b..2094a3f 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/template_source.html +++ b/debug_toolbar/templates/debug_toolbar/panels/template_source.html @@ -1,3 +1,9 @@ -« Back -

Template Source: {{ template_name }}

-{{ source }} +Back +

Template Source: {{ template_name }}

+
+
+
+ {{ source }} +
+
+
diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 01240f7..622321f 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,4 +1,5 @@

Template path{{ template_dirs|length|pluralize }}

+
{% if template_dirs %}
    {% for template in template_dirs %} @@ -8,32 +9,39 @@ {% else %}

    None

    {% endif %} +
+

Template{{ templates|length|pluralize }}

-{% if templates %} -
-{% for template in templates %} -
{{ template.template.name|addslashes }}
-
{{ template.template.origin_name|addslashes }}
-
- - -
-{% endfor %} -
-{% else %} -

None

-{% endif %} +
+ {% if templates %} +
+ {% for template in templates %} +
{{ template.template.name|addslashes }}
+
{{ template.template.origin_name|addslashes }}
+
+ + +
+ {% endfor %} +
+ {% else %} +

None

+ {% endif %} +
+

Context processor{{ context_processors|length|pluralize }}

-{% if context_processors %} -
-{% for key, value in context_processors.iteritems %} -
{{ key|escape }}
-
- - -
-{% endfor %} -
-{% else %} -

None

-{% endif %} +
+ {% if context_processors %} +
+ {% for key, value in context_processors.iteritems %} +
{{ key|escape }}
+
+ + +
+ {% endfor %} +
+ {% else %} +

None

+ {% endif %} +
\ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html index 39e9eb1..ba801b2 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/timer.html +++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html @@ -1,20 +1,22 @@ - - - - - - - - - - - - - {% for key, value in rows %} - - - - - {% endfor %} - -
KeyValue
{{ key|escape }}{{ value|escape }}
+
+ + + + + + + + + + + + + {% for key, value in rows %} + + + + + {% endfor %} + +
KeyValue
{{ key|escape }}{{ value|escape }}
+
-- cgit v1.2.3