web/data/cubicweb.widgets.js
branchstable
changeset 6372 4c3e2a92e340
parent 5909 9af8ac182f53
child 6448 8590d82e9b1b
--- a/web/data/cubicweb.widgets.js	Thu Sep 30 15:00:30 2010 +0200
+++ b/web/data/cubicweb.widgets.js	Fri Oct 01 09:25:39 2010 +0200
@@ -20,8 +20,9 @@
 function buildWidget(wdgnode) {
     var wdgclass = Widgets[wdgnode.getAttribute('cubicweb:wdgtype')];
     if (wdgclass) {
-        var wdg = new wdgclass(wdgnode);
+        return new wdgclass(wdgnode);
     }
+    return null;
 }
 
 /**
@@ -312,7 +313,7 @@
             intervalPixels: 100
         };
         var bandInfos = [Timeline.createBandInfo(bandData)];
-        var tl = Timeline.create(tldiv, bandInfos);
+        this.tl = Timeline.create(tldiv, bandInfos);
         var loadurl = wdgnode.getAttribute('cubicweb:loadurl');
         Timeline.loadJSON(loadurl, function(json, url) {
             eventSource.loadJSON(json, url);