From 3ec902504a7188b6468d93e9ec194bb97af6222f Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 24 Jul 2012 15:09:05 -0700 Subject: 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. --- js/document/mediators/template.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/document/mediators') 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, { //Copy webGL library if needed for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { //Checking for RDGE library to be available - if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE' && saveExternalData) { + 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, function(result) {libsobserver.canvasCopied = result; this.libCopied(libsobserver);}.bind(this)); @@ -564,7 +564,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { webgllibtag.setAttribute('data-ninja-canvas-json', this.application.ninja.coreIoApi.rootUrl+'/'+cvsDataFileUrl); webgllibtag.setAttribute('data-ninja-canvas-libpath', rdgeDirName); // - if (saveExternalData && (cvsDataFileCheck.status === 404 || cvsDataFileCheck.status === 204)) { + if (cvsDataFileCheck.status === 404 || cvsDataFileCheck.status === 204) { //Saving file cvsDataFileOperation = this.application.ninja.ioMediator.fio.saveFile({uri: cvsDataFilePath, contents: json}); } else { @@ -598,7 +598,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, { //Copy Montage library if needed for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { //Checking for Montage library to be available - if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Montage' && saveExternalData) { + 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, function(result) {libsobserver.montageCopied = result; this.libCopied(libsobserver);}.bind(this)); -- cgit v1.2.3