[LNT] r209071 - Rewrite selectAll using jQuery

Yi Kong Yi.Kong at arm.com
Sat May 17 11:55:23 PDT 2014


Author: kongyi
Date: Sat May 17 13:55:23 2014
New Revision: 209071

URL: http://llvm.org/viewvc/llvm-project?rev=209071&view=rev
Log:
Rewrite selectAll using jQuery

We are using jQuery everywhere else, rewrite using jQuery for consistency.

Modified:
    lnt/trunk/lnt/server/ui/templates/v4_run.html

Modified: lnt/trunk/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_run.html?rev=209071&r1=209070&r2=209071&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Sat May 17 13:55:23 2014
@@ -17,17 +17,8 @@
   <script src="{{ url_for('.static', filename='popup.js') }}"></script>
   <script src="{{ url_for('.static', filename='sorttable.js') }}"></script>
   <script type="text/javascript">
-  function getClosestTable(el) {
-    while (el.nodeName !== "TABLE") {
-      el = el.parentNode;
-    }
-    return el;
-  }
-
   function selectAll(source) {
-    checkboxes = getClosestTable(source).getElementsByTagName('input');
-    for(var i in checkboxes)
-      checkboxes[i].checked = source.checked;
+    $(source).closest("table").find("input:checkbox").prop("checked", source.checked);
   }
   </script>
 {% endblock %}





More information about the llvm-commits mailing list