summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-02-17 15:26:21 +0000
committerBart Polot <bart@net.in.tum.de>2014-02-17 15:26:21 +0000
commitb05f8c9e5092ffb8937cc0bcf2913dd78a118cae (patch)
tree0be18f79376e4544f427c46e9660fa142abe5373 /contrib
parentc91da8c94b0bcc7740def641c0716f34b65749ed (diff)
- fix all and none buttons
Diffstat (limited to 'contrib')
-rw-r--r--contrib/log.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/contrib/log.php b/contrib/log.php
index 3e2711a45..2ecf1b075 100644
--- a/contrib/log.php
+++ b/contrib/log.php
@@ -172,8 +172,8 @@ if ($start !== null || $stop !== null) {
<?php foreach($peers as $pid=>$id): ?>
<button id="<?php echo $id ?>" class="btn btn-default btn-showpeer active"><?php echo $id ?></button>
<?php endforeach ?>
- <button id="all" class="btn btn-default btn-showpeer">All</button>
- <button id="none" class="btn btn-default btn-showpeer">None</button>
+ <button id="btn-showall" class="btn btn-default">All</button>
+ <button id="btn-shownone" class="btn btn-default">None</button>
</div>
</div>
<div id="msg" class="alert alert-success"></div>
@@ -222,6 +222,17 @@ if ($start !== null || $stop !== null) {
}
}
+ function shownone()
+ {
+ $(".btn-showpeer").removeClass("active");
+ $("tbody > tr").hide();
+ }
+
+ function showall()
+ {
+ $(".btn-showpeer:not(.active)").each(function(){showpeer(this.id)});
+ }
+
function showpeer (peer)
{
$("#"+peer).toggleClass("active");
@@ -294,6 +305,8 @@ if ($start !== null || $stop !== null) {
$(".btn-showdown").on ("click", function(){ load_debug(this, false) });
$(".btn-showlevel").on ("click", function(){ showlevel(this.id) });
$(".btn-showpeer").on ("click", function(){ showpeer(this.id) });
+ $("#btn-showall").on ("click", function(){ showall() });
+ $("#btn-shownone").on ("click", function(){ shownone() });
});
</script>
</body>