Commits

Alessandro Molina committed 2d5ab03

Fix issue with slow queries that caused click event not to be bound

Comments (0)

Files changed (1)

tgext/debugbar/templates/debugbar.html

 <script type="text/javascript" src="${tg.url('/_debugbar/statics/jquery.js')}"></script>
 <script type="text/javascript">
 $(function($) {
-	var bar = $('#tgdb_debugbar');
-	$('.tgdb_detail_box', bar).hide();
-	$('#tgdb_button', bar).click(function() {
-		$('#tgdb_barcontent').animate({width: 'toggle'});
-	});
-	$('.tgdb_title', bar).click(function() {
-		var title = $(this);
-		var content = title.siblings();
-		$('.tgdb_title', bar).not(title).removeClass('highlight');
-		$('.tgdb_content', bar).not(content).hide();
-		title.toggleClass('highlight');
-		content.slideToggle();
-	});
-	$('.tgdb_query a', bar).click(function() {
-		var master = $(this).closest('.tgdb_content_box');
-		var detail = master.next();
-		detail.load($(this).attr('href'));
-		master.hide();
-		detail.fadeIn(function() {
-			$('.tgdb_back a', detail).one('click',
-				function() {
-					detail.hide();
-					master.fadeIn();
-					return false;
-				});
-		});
-		return false;
-	});
+    var bar = $('#tgdb_debugbar');
+    $('.tgdb_detail_box', bar).hide();
+    $('#tgdb_button', bar).click(function() {
+        $('#tgdb_barcontent').animate({width: 'toggle'});
+    });
+    $('.tgdb_title', bar).click(function() {
+        var title = $(this);
+        var content = title.siblings();
+        $('.tgdb_title', bar).not(title).removeClass('highlight');
+        $('.tgdb_content', bar).not(content).hide();
+        title.toggleClass('highlight');
+        content.slideToggle();
+    });
+    $('.tgdb_query a', bar).click(function() {
+        var master = $(this).closest('.tgdb_content_box');
+        var detail = master.next();
+        detail.load($(this).attr('href'), function() {
+            detail.fadeIn(function() {
+                $('.tgdb_back a', detail).one('click',
+                        function() {
+                            detail.hide();
+                            master.fadeIn();
+                            return false;
+                        });
+            });
+        });
+        master.hide();
+        return false;
+    });
 });
 $.noConflict();
 </script>