src/js/init.js
branchpopcorn-port
changeset 461 a9c5eeca190c
parent 456 7fcdb501effd
child 500 a784e70993b3
equal deleted inserted replaced
460:7071ccbc315a 461:a9c5eeca190c
    95   };
    95   };
    96 
    96 
    97   return ret_widgets;
    97   return ret_widgets;
    98 };
    98 };
    99 
    99 
       
   100 IriSP.configureModules = function (popcornInstance, modulesList) {
       
   101  
       
   102   var serialFactory = new IriSP.SerializerFactory(IriSP.__dataloader);
       
   103   var ret_modules = [];
       
   104   var index;
       
   105   
       
   106   for (index = 0; index < modulesList.length; index++) {    
       
   107     var moduleConfig = modulesList[index];
       
   108     
       
   109     var serializer = serialFactory.getSerializer(moduleConfig.metadata);
       
   110     var module = new IriSP[moduleConfig.type](popcornInstance, moduleConfig, serializer);    
       
   111     ret_modules.push(module);
       
   112   };
       
   113 
       
   114   return ret_modules;
       
   115 };
       
   116 
   100 IriSP.instantiateWidget = function(popcornInstance, serialFactory, layoutManager, widgetConfig) {
   117 IriSP.instantiateWidget = function(popcornInstance, serialFactory, layoutManager, widgetConfig) {
   101     /* create div returns us a container for the widget and a spacer */
   118     /* create div returns us a container for the widget and a spacer */
   102     var ret = layoutManager.createDiv(widgetConfig.type);        
   119     var ret = layoutManager.createDiv(widgetConfig.type);        
   103     var container = ret[0];
   120     var container = ret[0];
   104     var spacer = ret[1];
   121     var spacer = ret[1];