aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-19 14:46:38 -0700
committerValerio Virgillito2012-03-19 14:46:38 -0700
commite9244d5a0f681ddde5896392c17738add2948687 (patch)
tree06d1d6a65c2e9a05dd6063c1974f2174922c37d3 /js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
parente9c3c7d758fc59ad7b731730dd935170844d9538 (diff)
parentdd382088b4990c4e39f77d793c1a6bd7e3c52aca (diff)
downloadninja-e9244d5a0f681ddde5896392c17738add2948687.tar.gz
Merge branch 'master' of github.com:francoisfrisch/ninja-internal into montage-integration
Diffstat (limited to 'js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js')
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index dcb69255..599eeda3 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 },
@@ -287,6 +291,13 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
287 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' 291 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'
288 }; 292 };
289 293
294 var defaultStyles = component.defaultStyles;
295 if(defaultStyles) {
296 for(var n in defaultStyles) {
297 styles[n] = defaultStyles[n];
298 }
299 }
300
290 that.application.ninja.currentDocument.setComponentInstance(instance, element); 301 that.application.ninja.currentDocument.setComponentInstance(instance, element);
291 302
292 NJevent("elementAdding", {"el": element, "data":styles}); 303 NJevent("elementAdding", {"el": element, "data":styles});