src/js/init.js
branchpopcorn-port
changeset 827 1dc2f85c3b89
parent 822 45083178c1d2
child 828 bcf0c2bdcb8e
equal deleted inserted replaced
826:c7ae4f126e51 827:1dc2f85c3b89
   223       // the dependency widget is available in the parent widget context as
   223       // the dependency widget is available in the parent widget context as
   224       // this.WidgetName (for instance, this.TipWidget);
   224       // this.WidgetName (for instance, this.TipWidget);
   225       
   225       
   226       var i = 0;
   226       var i = 0;
   227       for(i = 0; i < widgetConfig.requires.length; i++) {
   227       for(i = 0; i < widgetConfig.requires.length; i++) {
   228         var widgetName = widgetConfig.requires[i]["type"];
   228         var widgetName = widgetConfig.requires[i]["type"],
   229         widget[widgetName] = IriSP.instantiateWidget(popcornInstance, serialFactory, layoutManager, widgetConfig.requires[i], defaultOptions);
   229             _configobj = IriSP.jQuery.extend({}, widgetConfig.requires[i]),
       
   230             _div = document.createElement('div'),
       
   231             _container = IriSP.guid(arr.container + '_' + widgetName + '_');
       
   232         _configobj.container = _container;
       
   233         _div.id = _container;
       
   234         widget.selector.append(_div);
       
   235         console.log(_configobj);
       
   236         widget[widgetName] = IriSP.instantiateWidget(popcornInstance, serialFactory, layoutManager, _configobj, defaultOptions);
   230       }
   237       }
   231     }       
   238     }       
   232      
   239      
   233     serializer.sync(IriSP.wrap(widget, function() { this.draw(); }));
   240     serializer.sync(IriSP.wrap(widget, function() { this.draw(); }));
   234     return widget;
   241     return widget;