From f02b6c98b193cc4cb7755a098b548efddf15c1bb Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sun, 3 Jun 2012 10:05:21 -0700 Subject: Adding blocking logic to copy libs Need to implement logic in parsing method, might require a minor restructuring. --- js/document/mediators/template.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/document/mediators') 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, { //TODO: Make proper webGL/Canvas method // - var matchingtags = [], scripts = template.file.content.document.getElementsByTagName('script'), webgltag, webgllibtag, webglrdgetag, mjstag, mjslibtag; + var webgltag, webgllibtag, webglrdgetag, mjstag, mjslibtag, matchingtags = [], + scripts = template.file.content.document.getElementsByTagName('script'); // for (var i in scripts) { if (scripts[i].getAttribute) { @@ -375,7 +376,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; - this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName); + this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName, function(result) {console.log(result)}); } else { //TODO: Error handle no available library to copy } @@ -501,7 +502,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage') { mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; - this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName); + this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName, function(result) {console.log(result)}); -- cgit v1.2.3