Revision: 67d92e9b9cab
Author:   Pekka Klärck
Date:     Mon Jun 20 04:05:10 2011
Log: Avoid list.splice(i) because it is buggy in IE. Here's hoping that string.slice(i) works....
http://code.google.com/p/robotframework/source/detail?r=67d92e9b9cab

Modified:
 /src/robot/webcontent/model.js

=======================================
--- /src/robot/webcontent/model.js      Mon Jun 20 03:29:18 2011
+++ /src/robot/webcontent/model.js      Mon Jun 20 04:05:10 2011
@@ -339,13 +339,10 @@
     function parseLinks(linksData) {
         if (!linksData)
             return [];
-        var items = linksData.split(':::');
-        var links = [];
-        for (var i=0; i<items.length; i++) {
-            parts = items[i].split(':');
-            links[i] = {title: parts[0], url: parts.splice(1).join(':')};
-        }
-        return links;
+        return util.map(linksData.split(':::'), function (link) {
+                var index = link.indexOf(':');
+ return {title: link.slice(0, index), url: link.slice(index+1)};
+            });
     }

     function calculatePercents(total, passed, failed) {

Reply via email to