Skip to content

Commit 3bfcb1d

Browse files
jezdezrobhudson
authored andcommitted
Fixed django-commons#60 - Added MEDIA_URL config option to be able to override the URL to the static files (good with django-staticfiles). Also moved media files to subdirectories like other apps.
Signed-off-by: Rob Hudson <[email protected]>
1 parent 25e9614 commit 3bfcb1d

File tree

18 files changed

+21
-18
lines changed

18 files changed

+21
-18
lines changed

debug_toolbar/media/debug_toolbar/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
all: compress_js compress_css
33

44
compress_js:
5-
java -jar ~/bin/yuicompressor.jar toolbar.js > toolbar.min.js
5+
java -jar ~/bin/yuicompressor.jar js/toolbar.js > js/toolbar.min.js
66

77
compress_css:
8-
java -jar ~/bin/yuicompressor.jar --type css toolbar.css > toolbar.min.css
8+
java -jar ~/bin/yuicompressor.jar --type css css/toolbar.css > css/toolbar.min.css

debug_toolbar/media/debug_toolbar/toolbar.css renamed to debug_toolbar/media/debug_toolbar/css/toolbar.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
}
7373

7474
#djDebug #djDebugToolbar li.active {
75-
background-image:url(indicator.png);
75+
background-image:url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Eindicator.png);
7676
background-repeat:no-repeat;
7777
background-position:left center;
7878
background-color:#333;
@@ -116,7 +116,7 @@
116116
text-decoration:none;
117117
text-align:center;
118118
text-indent:-999999px;
119-
background:#000 url(djdt_vertical.png) no-repeat left center;
119+
background:#000 url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Edjdt_vertical.png) no-repeat left center;
120120
opacity:0.5;
121121
}
122122

@@ -293,19 +293,19 @@
293293
right:15px;
294294
height:40px;
295295
width:40px;
296-
background:url(close.png) no-repeat center center;
296+
background:url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Eclose.png) no-repeat center center;
297297
}
298298

299299
#djDebug .panelContent .djDebugClose:hover {
300-
background-image:url(close_hover.png);
300+
background-image:url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Eclose_hover.png);
301301
}
302302

303303
#djDebug .panelContent .djDebugClose.djDebugBack {
304-
background-image:url(back.png);
304+
background-image:url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Eback.png);
305305
}
306306

307307
#djDebug .panelContent .djDebugClose.djDebugBack:hover {
308-
background-image:url(back_hover.png);
308+
background-image:url(http://github.com/%3Cspan%20class=%22x%20x-first%22%3E..%3C/span%3E%3Cspan%20class=%22pl-c1%20x%22%3E/%3C/span%3E%3Cspan%20class=%22x%20x-last%22%3Eimg/%3C/span%3Eback_hover.png);
309309
}
310310

311311
#djDebug .panelContent dt, #djDebug .panelContent dd {

debug_toolbar/media/debug_toolbar/css/toolbar.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

debug_toolbar/media/debug_toolbar/toolbar.js renamed to debug_toolbar/media/debug_toolbar/js/toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if (!(j = window.jQuery) || version > j.fn.jquery || callback(j)) {
55
var script = document.createElement("script");
66
script.type = "text/javascript";
7-
script.src = BASEURL + "/__debug__/m/jquery.js";
7+
script.src = DEBUG_TOOLBAR_MEDIA_URL + "js/jquery.js";
88
script.onload = script.onreadystatechange = function() {
99
if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) {
1010
callback((j = window.jQuery).noConflict(1), loaded = true);
@@ -16,7 +16,7 @@
1616
})(window, document, "1.3", function($, jquery_loaded) {
1717

1818
$.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); } var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = $.trim(cookies[i]); if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };
19-
$('head').append('<link rel="stylesheet" href="'+BASEURL+'/__debug__/m/toolbar.min.css" type="text/css" />');
19+
$('head').append('<link rel="stylesheet" href="'+DEBUG_TOOLBAR_MEDIA_URL+'css/toolbar.min.css" type="text/css" />');
2020
var COOKIE_NAME = 'djdt';
2121
var djdt = {
2222
init: function() {

debug_toolbar/media/debug_toolbar/js/toolbar.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

debug_toolbar/media/debug_toolbar/toolbar.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)