diff options
| author | Rob Hudson | 2009-03-21 08:16:46 -0700 | 
|---|---|---|
| committer | Rob Hudson | 2009-03-21 08:16:46 -0700 | 
| commit | e808a3ddb946d16ab49e8553e64b65f1238f27db (patch) | |
| tree | 8d831e6a1b0d49a28a8863b80db0e4c53515e742 /debug_toolbar/media | |
| parent | c3bcecfd13d8c82c9ac0a88a578bdeb4ad7cfc9d (diff) | |
| download | django-debug-toolbar-e808a3ddb946d16ab49e8553e64b65f1238f27db.tar.bz2 | |
Patch from kmike84 to fix conflict if project uses mootools.
Diffstat (limited to 'debug_toolbar/media')
| -rw-r--r-- | debug_toolbar/media/toolbar.js | 76 | ||||
| -rw-r--r-- | debug_toolbar/media/toolbar.min.js | 2 | 
2 files changed, 39 insertions, 39 deletions
diff --git a/debug_toolbar/media/toolbar.js b/debug_toolbar/media/toolbar.js index b6baa2c..5baed78 100644 --- a/debug_toolbar/media/toolbar.js +++ b/debug_toolbar/media/toolbar.js @@ -1,57 +1,57 @@  var _$ = window.$; -jQuery.noConflict(); -jQuery(function($) { +$j = jQuery.noConflict(); +jQuery(function() {  	var COOKIE_NAME = 'dj_debug_panel'; -	$.djDebug = function(data, klass) { -		$.djDebug.init(); +	$j.djDebug = function(data, klass) { +		$j.djDebug.init();  	} -	$.extend($.djDebug, { +	$j.extend($j.djDebug, {  		init: function() {  			var current = null; -			$('#djDebugPanelList li a').click(function() { -				current = $('#djDebug #' + this.className); +			$j('#djDebugPanelList li a').click(function() { +				current = $j('#djDebug #' + this.className);  				if (current.is(':visible')) { -					$(document).trigger('close.djDebug'); +					$j(document).trigger('close.djDebug');  				} else { -					$('.panelContent').hide(); +					$j('.panelContent').hide();  					current.show(); -					$.djDebug.open(); +					$j.djDebug.open();  				}  				return false;  			}); -			$('#djDebug a.close').click(function() { -				$(document).trigger('close.djDebug'); +			$j('#djDebug a.close').click(function() { +				$j(document).trigger('close.djDebug');  				return false;  			}); -			$('#djDebug a.remoteCall').click(function() { -				$('#djDebugWindow').load(this.href, {}, function() { -					$('#djDebugWindow a.back').click(function() { -						$(this).parent().hide(); +			$j('#djDebug a.remoteCall').click(function() { +				$j('#djDebugWindow').load(this.href, {}, function() { +					$j('#djDebugWindow a.back').click(function() { +						$j(this).parent().hide();  						return false;  					});  				}); -				$('#djDebugWindow').show(); +				$j('#djDebugWindow').show();  				return false;  			}); -			$('#djDebugTemplatePanel a.djTemplateShowContext').click(function() { -				$.djDebug.toggle_content($(this).parent().next()); +			$j('#djDebugTemplatePanel a.djTemplateShowContext').click(function() { +				$j.djDebug.toggle_content($j(this).parent().next());  			}); -			$('#djHideToolBarButton').click(function() { -				$.djDebug.hide_toolbar(true); +			$j('#djHideToolBarButton').click(function() { +				$j.djDebug.hide_toolbar(true);  			}); -			$('#djShowToolBarButton').click(function() { -				$.djDebug.show_toolbar(); +			$j('#djShowToolBarButton').click(function() { +				$j.djDebug.show_toolbar();  			}); -			if ($.cookie(COOKIE_NAME)) { -				$.djDebug.hide_toolbar(false); +			if ($j.cookie(COOKIE_NAME)) { +				$j.djDebug.hide_toolbar(false);  			} else { -				$('#djDebugToolbar').show(); +				$j('#djDebugToolbar').show();  			}  		},  		open: function() { -			$(document).bind('keydown.djDebug', function(e) { +			$j(document).bind('keydown.djDebug', function(e) {  				if (e.keyCode == 27) { -					$.djDebug.close(); +					$j.djDebug.close();  				}  			});  		}, @@ -63,31 +63,31 @@ jQuery(function($) {  			}  		},  		close: function() { -			$(document).trigger('close.djDebug'); +			$j(document).trigger('close.djDebug');  			return false;  		},  		hide_toolbar: function(setCookie) { -			$('#djDebugToolbar').hide("fast"); -			$('#djDebugToolbarHandle').show(); +			$j('#djDebugToolbar').hide("fast"); +			$j('#djDebugToolbarHandle').show();  			if (setCookie) { -				$.cookie(COOKIE_NAME, 'hide', { +				$j.cookie(COOKIE_NAME, 'hide', {  					path: '/',  					expires: 10  				});  			}  		},  		show_toolbar: function() { -			$('#djDebugToolbarHandle').hide(); -			$('#djDebugToolbar').show("fast"); -			$.cookie(COOKIE_NAME, null, { +			$j('#djDebugToolbarHandle').hide(); +			$j('#djDebugToolbar').show("fast"); +			$j.cookie(COOKIE_NAME, null, {  				path: '/',  				expires: -1  			});  		}  	}); -	$(document).bind('close.djDebug', function() { -		$(document).unbind('keydown.djDebug'); -		$('.panelContent').hide(); +	$j(document).bind('close.djDebug', function() { +		$j(document).unbind('keydown.djDebug'); +		$j('.panelContent').hide();  	});  });  jQuery(function() { diff --git a/debug_toolbar/media/toolbar.min.js b/debug_toolbar/media/toolbar.min.js index 43bfead..587ac65 100644 --- a/debug_toolbar/media/toolbar.min.js +++ b/debug_toolbar/media/toolbar.min.js @@ -1 +1 @@ -var _$=window.$;jQuery.noConflict();jQuery(function(a){var b="dj_debug_panel";a.djDebug=function(d,c){a.djDebug.init()};a.extend(a.djDebug,{init:function(){var c=null;a("#djDebugPanelList li a").click(function(){c=a("#djDebug #"+this.className);if(c.is(":visible")){a(document).trigger("close.djDebug")}else{a(".panelContent").hide();c.show();a.djDebug.open()}return false});a("#djDebug a.close").click(function(){a(document).trigger("close.djDebug");return false});a("#djDebug a.remoteCall").click(function(){a("#djDebugWindow").load(this.href,{},function(){a("#djDebugWindow a.back").click(function(){a(this).parent().hide();return false})});a("#djDebugWindow").show();return false});a("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){a.djDebug.toggle_content(a(this).parent().next())});a("#djHideToolBarButton").click(function(){a.djDebug.hide_toolbar(true)});a("#djShowToolBarButton").click(function(){a.djDebug.show_toolbar()});if(a.cookie(b)){a.djDebug.hide_toolbar(false)}else{a("#djDebugToolbar").show()}},open:function(){a(document).bind("keydown.djDebug",function(c){if(c.keyCode==27){a.djDebug.close()}})},toggle_content:function(c){if(c.is(":visible")){c.hide()}else{c.show()}},close:function(){a(document).trigger("close.djDebug");return false},hide_toolbar:function(c){a("#djDebugToolbar").hide("fast");a("#djDebugToolbarHandle").show();if(c){a.cookie(b,"hide",{path:"/",expires:10})}},show_toolbar:function(){a("#djDebugToolbarHandle").hide();a("#djDebugToolbar").show("fast");a.cookie(b,null,{path:"/",expires:-1})}});a(document).bind("close.djDebug",function(){a(document).unbind("keydown.djDebug");a(".panelContent").hide()})});jQuery(function(){jQuery.djDebug()});$=_$;jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
\ No newline at end of file +var _$=window.$;$j=jQuery.noConflict();jQuery(function(){var a="dj_debug_panel";$j.djDebug=function(c,b){$j.djDebug.init()};$j.extend($j.djDebug,{init:function(){var b=null;$j("#djDebugPanelList li a").click(function(){b=$j("#djDebug #"+this.className);if(b.is(":visible")){$j(document).trigger("close.djDebug")}else{$j(".panelContent").hide();b.show();$j.djDebug.open()}return false});$j("#djDebug a.close").click(function(){$j(document).trigger("close.djDebug");return false});$j("#djDebug a.remoteCall").click(function(){$j("#djDebugWindow").load(this.href,{},function(){$j("#djDebugWindow a.back").click(function(){$j(this).parent().hide();return false})});$j("#djDebugWindow").show();return false});$j("#djDebugTemplatePanel a.djTemplateShowContext").click(function(){$j.djDebug.toggle_content($j(this).parent().next())});$j("#djHideToolBarButton").click(function(){$j.djDebug.hide_toolbar(true)});$j("#djShowToolBarButton").click(function(){$j.djDebug.show_toolbar()});if($j.cookie(a)){$j.djDebug.hide_toolbar(false)}else{$j("#djDebugToolbar").show()}},open:function(){$j(document).bind("keydown.djDebug",function(b){if(b.keyCode==27){$j.djDebug.close()}})},toggle_content:function(b){if(b.is(":visible")){b.hide()}else{b.show()}},close:function(){$j(document).trigger("close.djDebug");return false},hide_toolbar:function(b){$j("#djDebugToolbar").hide("fast");$j("#djDebugToolbarHandle").show();if(b){$j.cookie(a,"hide",{path:"/",expires:10})}},show_toolbar:function(){$j("#djDebugToolbarHandle").hide();$j("#djDebugToolbar").show("fast");$j.cookie(a,null,{path:"/",expires:-1})}});$j(document).bind("close.djDebug",function(){$j(document).unbind("keydown.djDebug");$j(".panelContent").hide()})});jQuery(function(){jQuery.djDebug()});$=_$;jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
\ No newline at end of file  | 
