[extensions-web: 40/75] Fastify and fixify review code.



commit b140f9dc6ab444b22e32e1d43126866776287d7f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Sep 17 00:51:52 2011 -0400

    Fastify and fixify review code.

 sweettooth/static/js/review.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/static/js/review.js b/sweettooth/static/js/review.js
index 7ba2cf0..cb390a4 100644
--- a/sweettooth/static/js/review.js
+++ b/sweettooth/static/js/review.js
@@ -10,16 +10,16 @@ define(['jquery'], function($) {
         if (rawLines[0] == "")
             count --;
 
-        var lines = "";
-        lines += "<td class=\"linenumbers\"><pre>";
+        var lines = [];
+        lines.push("<td class=\"linenumbers\"><pre>");
         for (var i = 1; i < (count + 1); i ++) {
-            lines += "<span rel=\"L" + i + "\">" + i + "</span>\n";
+            lines.push("<span rel=\"L" + i + "\">" + i + "</span>\n");
         }
-        lines += "</pre></td>";
+        lines.push("</pre></td>");
 
         var file = "<td width=\"100%\"><div class=\"file\">" + data.html + "</div></td>";
 
-        return $("<table><tr>" + lines + file + "</tr></div>");
+        return $("<table><tr>" + lines.join('') + file + "</tr></table>");
     }
 
     $.fn.reviewify = function(fileurl) {



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