aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/log.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/contrib/log.php b/contrib/log.php
index 663d963e4..28730d49c 100644
--- a/contrib/log.php
+++ b/contrib/log.php
@@ -222,7 +222,17 @@ if ($start !== null || $stop !== null) {
222 } 222 }
223 } 223 }
224 224
225 function show (btn, up) 225 function showpeer (peer)
226 {
227 $("#"+peer).toggleClass("active");
228 if ($("#"+peer).hasClass("active")) {
229 $("."+peer).show();
230 } else {
231 $("."+peer).hide();
232 }
233 }
234
235 function load_debug (btn, up)
226 { 236 {
227 var tr = $(btn).parents("tr"); 237 var tr = $(btn).parents("tr");
228 var level = tr.attr("class"); 238 var level = tr.attr("class");
@@ -268,8 +278,8 @@ if ($start !== null || $stop !== null) {
268 } 278 }
269 279
270 $(function() { 280 $(function() {
271 $(".btn-showup").on ("click", function(){ show(this, true) }); 281 $(".btn-showup").on ("click", function(){ load_debug(this, true) });
272 $(".btn-showdown").on ("click", function(){ show(this, false) }); 282 $(".btn-showdown").on ("click", function(){ load_debug(this, false) });
273 $(".btn-showlevel").on ("click", function(){ showlevel(this.id) }); 283 $(".btn-showlevel").on ("click", function(){ showlevel(this.id) });
274 $(".btn-showpeer").on ("click", function(){ showpeer(this.id) }); 284 $(".btn-showpeer").on ("click", function(){ showpeer(this.id) });
275 }); 285 });