src/js/init.js
changeset 987 7b65bf78873a
parent 986 f9d51dd4a3fe
child 998 9521347ede1d
equal deleted inserted replaced
986:f9d51dd4a3fe 987:7b65bf78873a
   102             }
   102             }
   103         });
   103         });
   104     });
   104     });
   105     this.$.find('.Ldt-Loader').detach();
   105     this.$.find('.Ldt-Loader').detach();
   106     
   106     
   107     var endload = false;
   107     this.widgetsLoaded = false;
   108     
   108     
   109     this.on("widget-loaded", function() {
   109     this.on("widget-loaded", function() {
   110         if (endload) {
   110         if (_this.widgetsLoaded) {
   111             return;
   111             return;
   112         }
   112         }
   113         var isloaded = !IriSP._(_this.widgets).any(function(w) {
   113         var isloaded = !IriSP._(_this.widgets).any(function(w) {
   114             return !(w && w.isLoaded())
   114             return !(w && w.isLoaded())
   115         });
   115         });
   116         if (isloaded) {
   116         if (isloaded) {
   117             endload = true;
   117             _this.widgetsLoaded = true;
   118             _this.trigger("widgets-loaded");
   118             _this.trigger("widgets-loaded");
   119         }
   119         }
   120     });   
   120     });   
   121 }
   121 }
   122 
   122