aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-18 15:13:25 -0700
committerValerio Virgillito2012-03-18 15:13:25 -0700
commit3056d540f32bb24927d06bfc516240cc6a0001f8 (patch)
tree668ffabb4c1eeec9bf0f569aad9c913200fb53e4 /js/panels
parentcff7deb476f4095d7d3d76c92360617d3316a96f (diff)
downloadninja-3056d540f32bb24927d06bfc516240cc6a0001f8.tar.gz
looping through both branches of the components tree
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index dcb69255..87c68a52 100755
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -159,15 +159,19 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
159 _loadComponents: { 159 _loadComponents: {
160 value: function() { 160 value: function() {
161 161
162 this.componentsToLoad = this.components.children[0].children.length; 162 for(var cat in this.components.children) {
163 163
164 for(var i = 0, component; component = this.components.children[0].children[i]; i++) { 164 this.componentsToLoad += this.components.children[cat].children.length;
165 var req = new XMLHttpRequest(); 165
166 //req.identifier = "searchRequest"; 166 for(var i = 0, component; component = this.components.children[cat].children[i]; i++) {
167 req.open("GET", component.dataFile); 167 var req = new XMLHttpRequest();
168 req.addEventListener("load", this, false); 168 //req.identifier = "searchRequest";
169 req.addEventListener("error", this, false); 169 req.open("GET", component.dataFile);
170 req.send(); 170 req.addEventListener("load", this, false);
171 req.addEventListener("error", this, false);
172 req.send();
173 }
174
171 } 175 }
172 } 176 }
173 }, 177 },