gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32372 - gnunet/contrib


From: gnunet
Subject: [GNUnet-SVN] r32372 - gnunet/contrib
Date: Mon, 17 Feb 2014 16:26:21 +0100

Author: bartpolot
Date: 2014-02-17 16:26:21 +0100 (Mon, 17 Feb 2014)
New Revision: 32372

Modified:
   gnunet/contrib/log.php
Log:
- fix all and none buttons

Modified: gnunet/contrib/log.php
===================================================================
--- gnunet/contrib/log.php      2014-02-17 15:26:20 UTC (rev 32371)
+++ gnunet/contrib/log.php      2014-02-17 15:26:21 UTC (rev 32372)
@@ -172,8 +172,8 @@
     <?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 @@
       }
     }
 
+    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 @@
       $(".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>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]