aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/mediators/template.js6
-rwxr-xr-xjs/document/models/base.js8
2 files changed, 9 insertions, 5 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));
diff --git a/js/document/models/base.js b/js/document/models/base.js
index 03c792c9..c44123c3 100755
--- a/js/document/models/base.js
+++ b/js/document/models/base.js
@@ -268,8 +268,10 @@ exports.BaseDocumentModel = Montage.create(Component, {
268 this.libs.canvas = true; 268 this.libs.canvas = true;
269 } 269 }
270 } 270 }
271 } else if (this.currentView === this.views.code) {
272 //TODO: Add save logic for code view
271 } else { 273 } else {
272 //TODO: Add logic to save code view data 274 //TODO: Error handle
273 } 275 }
274 } 276 }
275 }, 277 },
@@ -309,8 +311,10 @@ exports.BaseDocumentModel = Montage.create(Component, {
309 this.libs.canvas = true; 311 this.libs.canvas = true;
310 } 312 }
311 } 313 }
314 } else if (this.currentView === this.views.code) {
315 //TODO: Add save logic for code view
312 } else { 316 } else {
313 //TODO: Add logic to save code view data 317 //TODO: Error handle
314 } 318 }
315 319
316 } 320 }