2009/dap/ReSpec.js/js respec.js,1.136,1.137

Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv655

Modified Files:
	respec.js 
Log Message:
performance fix (and simplification) for best practices


Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- respec.js	17 Sep 2010 22:31:43 -0000	1.136
+++ respec.js	21 Sep 2010 12:46:49 -0000	1.137
@@ -1280,14 +1280,12 @@
 
     doBestPractices: function () {
         this.practiceNum = 1;
-        var spans = document.querySelectorAll("span");
+        var spans = document.querySelectorAll("span.practicelab");
         for (var i = 0; i < spans.length; i++) {
             var span = spans[i];
-            if (sn.hasClass(span, "practicelab")) {
-                var label = span.innerHTML;
-                span.innerHTML = "Best Practice " + this.practiceNum + ": " +  label;
-                this.practiceNum++;
-            }
+            var label = span.innerHTML;
+            span.innerHTML = "Best Practice " + this.practiceNum + ": " +  label;
+            this.practiceNum++;
         }
     },
 

Received on Tuesday, 21 September 2010 12:46:58 UTC