diff options
author | Jose Antonio Marquez | 2012-06-03 10:05:21 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-03 10:05:21 -0700 |
commit | f02b6c98b193cc4cb7755a098b548efddf15c1bb (patch) | |
tree | 4b2d6e3474dc2e7a17e3b0e70fe6f08642cbfd4d /js/document | |
parent | 0cbe2d177fb6e1fe27ee1a30fff57c3b4283586d (diff) | |
download | ninja-f02b6c98b193cc4cb7755a098b548efddf15c1bb.tar.gz |
Adding blocking logic to copy libs
Need to implement logic in parsing method, might require a minor restructuring.
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/mediators/template.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js index aa23c00f..1aac7e15 100755 --- a/js/document/mediators/template.js +++ b/js/document/mediators/template.js | |||
@@ -331,7 +331,8 @@ exports.TemplateDocumentMediator = Montage.create(Component, { | |||
331 | //TODO: Make proper webGL/Canvas method | 331 | //TODO: Make proper webGL/Canvas method |
332 | 332 | ||
333 | // | 333 | // |
334 | var matchingtags = [], scripts = template.file.content.document.getElementsByTagName('script'), webgltag, webgllibtag, webglrdgetag, mjstag, mjslibtag; | 334 | var webgltag, webgllibtag, webglrdgetag, mjstag, mjslibtag, matchingtags = [], |
335 | scripts = template.file.content.document.getElementsByTagName('script'); | ||
335 | // | 336 | // |
336 | for (var i in scripts) { | 337 | for (var i in scripts) { |
337 | if (scripts[i].getAttribute) { | 338 | if (scripts[i].getAttribute) { |
@@ -375,7 +376,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { | |||
375 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { | 376 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { |
376 | rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); | 377 | rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); |
377 | rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; | 378 | rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; |
378 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName); | 379 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName, function(result) {console.log(result)}); |
379 | } else { | 380 | } else { |
380 | //TODO: Error handle no available library to copy | 381 | //TODO: Error handle no available library to copy |
381 | } | 382 | } |
@@ -501,7 +502,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { | |||
501 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage') { | 502 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage') { |
502 | mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); | 503 | mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); |
503 | mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; | 504 | mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; |
504 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName); | 505 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName, function(result) {console.log(result)}); |
505 | 506 | ||
506 | 507 | ||
507 | 508 | ||