aboutsummaryrefslogtreecommitdiff
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
parentc91da8c94b0bcc7740def641c0716f34b65749ed (diff)
downloadgnunet-b05f8c9e5092ffb8937cc0bcf2913dd78a118cae.tar.gz
gnunet-b05f8c9e5092ffb8937cc0bcf2913dd78a118cae.zip
- fix all and none buttons
-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) {
172 <?php foreach($peers as $pid=>$id): ?> 172 <?php foreach($peers as $pid=>$id): ?>
173 <button id="<?php echo $id ?>" class="btn btn-default btn-showpeer active"><?php echo $id ?></button> 173 <button id="<?php echo $id ?>" class="btn btn-default btn-showpeer active"><?php echo $id ?></button>
174 <?php endforeach ?> 174 <?php endforeach ?>
175 <button id="all" class="btn btn-default btn-showpeer">All</button> 175 <button id="btn-showall" class="btn btn-default">All</button>
176 <button id="none" class="btn btn-default btn-showpeer">None</button> 176 <button id="btn-shownone" class="btn btn-default">None</button>
177 </div> 177 </div>
178</div> 178</div>
179<div id="msg" class="alert alert-success"></div> 179<div id="msg" class="alert alert-success"></div>
@@ -222,6 +222,17 @@ if ($start !== null || $stop !== null) {
222 } 222 }
223 } 223 }
224 224
225 function shownone()
226 {
227 $(".btn-showpeer").removeClass("active");
228 $("tbody > tr").hide();
229 }
230
231 function showall()
232 {
233 $(".btn-showpeer:not(.active)").each(function(){showpeer(this.id)});
234 }
235
225 function showpeer (peer) 236 function showpeer (peer)
226 { 237 {
227 $("#"+peer).toggleClass("active"); 238 $("#"+peer).toggleClass("active");
@@ -294,6 +305,8 @@ if ($start !== null || $stop !== null) {
294 $(".btn-showdown").on ("click", function(){ load_debug(this, false) }); 305 $(".btn-showdown").on ("click", function(){ load_debug(this, false) });
295 $(".btn-showlevel").on ("click", function(){ showlevel(this.id) }); 306 $(".btn-showlevel").on ("click", function(){ showlevel(this.id) });
296 $(".btn-showpeer").on ("click", function(){ showpeer(this.id) }); 307 $(".btn-showpeer").on ("click", function(){ showpeer(this.id) });
308 $("#btn-showall").on ("click", function(){ showall() });
309 $("#btn-shownone").on ("click", function(){ shownone() });
297 }); 310 });
298 </script> 311 </script>
299</body> 312</body>