aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/static
diff options
context:
space:
mode:
authorAymeric Augustin2014-04-25 18:53:00 +0200
committerAymeric Augustin2014-04-25 18:53:00 +0200
commit727b4e05f59c15904f7b08388220b7bfc76d59b2 (patch)
treef2333fac278510e5e68b5c47b1fa741c94693d63 /debug_toolbar/static
parent6ce52b2532afaccca9932b7087533609fd239a9b (diff)
downloaddjango-debug-toolbar-727b4e05f59c15904f7b08388220b7bfc76d59b2.tar.bz2
Make the pain go away.
Fix #581, #544, #541, #535 and a few others.
Diffstat (limited to 'debug_toolbar/static')
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.js13
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.profiling.js11
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.sql.js10
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.template.js10
-rw-r--r--debug_toolbar/static/debug_toolbar/js/toolbar.timer.js10
5 files changed, 10 insertions, 44 deletions
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js
index cb40205..45bea59 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js
@@ -1,12 +1,4 @@
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as anonymous module.
- define(['jquery'], factory);
- } else {
- // Browser globals.
- window.djdt = factory(jQuery);
- }
-}(function ($) {
+(function ($) {
var djdt = {
handleDragged: false,
events: {
@@ -283,5 +275,4 @@
}
};
$(document).ready(djdt.init);
- return djdt;
-}));
+})(djdt.jQuery);
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.profiling.js b/debug_toolbar/static/debug_toolbar/js/toolbar.profiling.js
index 172c2a6..1018e9b 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.profiling.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.profiling.js
@@ -1,10 +1,4 @@
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery'], factory);
- } else {
- factory(jQuery);
- }
-}(function ($) {
+(function ($) {
function getSubcalls(row) {
var id = row.attr('id');
return $('.djDebugProfileRow[id^="'+id+'_"]');
@@ -23,5 +17,4 @@
subcalls.hide();
}
});
-
-}));
+})(djdt.jQuery);
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js b/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js
index c554bce..e470ac8 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.sql.js
@@ -1,13 +1,7 @@
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery'], factory);
- } else {
- factory(jQuery);
- }
-}(function ($) {
+(function ($) {
$('#djDebug a.djDebugToggle').on('click', function(e) {
e.preventDefault();
$(this).parent().find('.djDebugCollapsed').toggle();
$(this).parent().find('.djDebugUncollapsed').toggle();
});
-}));
+})(djdt.jQuery);
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.template.js b/debug_toolbar/static/debug_toolbar/js/toolbar.template.js
index 6240898..01ac8a4 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.template.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.template.js
@@ -1,10 +1,4 @@
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery'], factory);
- } else {
- factory(jQuery);
- }
-}(function ($) {
+(function ($) {
var uarr = String.fromCharCode(0x25b6),
darr = String.fromCharCode(0x25bc);
@@ -14,4 +8,4 @@
$(this).parent().next().toggle();
return false;
});
-}));
+})(djdt.jQuery);
diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.timer.js b/debug_toolbar/static/debug_toolbar/js/toolbar.timer.js
index 514fda7..cc9d6ae 100644
--- a/debug_toolbar/static/debug_toolbar/js/toolbar.timer.js
+++ b/debug_toolbar/static/debug_toolbar/js/toolbar.timer.js
@@ -1,10 +1,4 @@
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery'], factory);
- } else {
- factory(jQuery);
- }
-}(function ($) {
+(function ($) {
// Browser timing remains hidden unless we can successfully access the performance object
var perf = window.performance || window.msPerformance ||
window.webkitPerformance || window.mozPerformance;
@@ -51,4 +45,4 @@
addRow('domContentLoadedEventStart', 'domContentLoadedEventEnd');
addRow('loadEventStart', 'loadEventEnd');
$('#djDebugBrowserTiming').css("display", "block");
-}));
+})(djdt.jQuery);