[pypy-commit] jitviewer default: first go at working filter

fijal noreply at buildbot.pypy.org
Thu Jul 21 11:43:31 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r152:3b5afee740b3
Date: 2011-07-21 11:43 +0200
http://bitbucket.org/pypy/jitviewer/changeset/3b5afee740b3/

Log:	first go at working filter

diff --git a/_jitviewer/static/script.js b/_jitviewer/static/script.js
--- a/_jitviewer/static/script.js
+++ b/_jitviewer/static/script.js
@@ -38,7 +38,14 @@
     $("#inp-bar").focus();
     $("#inp-bar").bind("click keyup", function() {
         var value = $("#inp-bar")[0].value;
-        
+        $(".loopitem").each(function (i, l) {
+            glob = l;
+            if (l.getAttribute('name').search(value) != -1) {
+                $(l).show();
+            } else {
+                $(l).hide();
+            }
+        });
     });
 }
 
diff --git a/_jitviewer/templates/index.html b/_jitviewer/templates/index.html
--- a/_jitviewer/templates/index.html
+++ b/_jitviewer/templates/index.html
@@ -29,9 +29,9 @@
     <ul>
       {% for is_entry_bridge, index, item in loops %}
       {% if is_entry_bridge %}
-        <li class="loopitem" id="loop-{{index}}" name={{item.repr()}}><span>Entry bridge: <a href="/" onClick="show_loop({{index}}); return false">{{item.repr()}}</a> run {{item.count}} times</span></li>
+        <li class="loopitem" id="loop-{{index}}" name="{{item.repr()}}"><span>Entry bridge: <a href="/" onClick="show_loop({{index}}); return false">{{item.repr()}}</a> run {{item.count}} times</span></li>
       {% else %}
-        <li class="loopitem" id="loop-{{index}}" name={{item.repr()}}><span><a href="/" onClick="show_loop({{index}}); return false">{{item.repr()}}</a> run {{item.count}} times</span></li>
+        <li class="loopitem" id="loop-{{index}}" name="{{item.repr()}}"><span><a href="/" onClick="show_loop({{index}}); return false">{{item.repr()}}</a> run {{item.count}} times</span></li>
       {% endif %}
       {% endfor %}
     </ul>


More information about the pypy-commit mailing list