aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-07-24 15:09:05 -0700
committerJose Antonio Marquez2012-07-24 15:09:05 -0700
commit3ec902504a7188b6468d93e9ec194bb97af6222f (patch)
tree1c084c0479ecda9cb7b4b8f950aaeedc6c2acccf
parent791e1633e2c08543e236b0d25b5edd9aec2a003b (diff)
downloadninja-3ec902504a7188b6468d93e9ec194bb97af6222f.tar.gz
Update: Copying libraries to disk on switching views
This is a temporary fix to allow the code view to show the actually libraries copied to disk, otherwise there is no current feedback to users to know where these files exists (or would) on disk until the operation is made. This allows the user to edit a file consuming libraries in memory to edit in code view and changes reflect such changes without losing track of libraries.
-rwxr-xr-xjs/document/mediators/template.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js
index c68cfe72..3f7f53b8 100755
--- a/js/document/mediators/template.js
+++ b/js/document/mediators/template.js
@@ -480,7 +480,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
480 //Copy webGL library if needed 480 //Copy webGL library if needed
481 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { 481 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
482 //Checking for RDGE library to be available 482 //Checking for RDGE library to be available
483 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE' && saveExternalData) { 483 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
484 rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); 484 rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase();
485 rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; 485 rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version;
486 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName, function(result) {libsobserver.canvasCopied = result; this.libCopied(libsobserver);}.bind(this)); 486 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, rdgeDirName, function(result) {libsobserver.canvasCopied = result; this.libCopied(libsobserver);}.bind(this));
@@ -564,7 +564,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
564 webgllibtag.setAttribute('data-ninja-canvas-json', this.application.ninja.coreIoApi.rootUrl+'/'+cvsDataFileUrl); 564 webgllibtag.setAttribute('data-ninja-canvas-json', this.application.ninja.coreIoApi.rootUrl+'/'+cvsDataFileUrl);
565 webgllibtag.setAttribute('data-ninja-canvas-libpath', rdgeDirName); 565 webgllibtag.setAttribute('data-ninja-canvas-libpath', rdgeDirName);
566 // 566 //
567 if (saveExternalData && (cvsDataFileCheck.status === 404 || cvsDataFileCheck.status === 204)) { 567 if (cvsDataFileCheck.status === 404 || cvsDataFileCheck.status === 204) {
568 //Saving file 568 //Saving file
569 cvsDataFileOperation = this.application.ninja.ioMediator.fio.saveFile({uri: cvsDataFilePath, contents: json}); 569 cvsDataFileOperation = this.application.ninja.ioMediator.fio.saveFile({uri: cvsDataFilePath, contents: json});
570 } else { 570 } else {
@@ -598,7 +598,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
598 //Copy Montage library if needed 598 //Copy Montage library if needed
599 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { 599 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
600 //Checking for Montage library to be available 600 //Checking for Montage library to be available
601 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage' && saveExternalData) { 601 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage') {
602 mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); 602 mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name + this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase();
603 mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; 603 mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version;
604 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName, function(result) {libsobserver.montageCopied = result; this.libCopied(libsobserver);}.bind(this)); 604 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.file.root, mjsDirName, function(result) {libsobserver.montageCopied = result; this.libCopied(libsobserver);}.bind(this));