aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index e221df68..714d1404 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -195,6 +195,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
195 value:function(doc){ 195 value:function(doc){
196 var response = doc || null;//default just for testing 196 var response = doc || null;//default just for testing
197 if(!!response && response.success && (response.status!== 500) && !!response.uri){ 197 if(!!response && response.success && (response.status!== 500) && !!response.uri){
198 this.creatingNewFile = true;//flag for timeline to identify new file flow
198 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); 199 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this));
199 }else if(!!response && !response.success){ 200 }else if(!!response && !response.success){
200 //Todo: restrict directory path to the sandbox, in the dialog itself 201 //Todo: restrict directory path to the sandbox, in the dialog itself
@@ -222,6 +223,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
222 value:function(response){ 223 value:function(response){
223 //TODO: Add UI to handle error codes, shouldn't be alert windows 224 //TODO: Add UI to handle error codes, shouldn't be alert windows
224 if(!!response && (response.status === 204)) { 225 if(!!response && (response.status === 204)) {
226
227 if((typeof this.creatingNewFile === 'undefined') || (this.creatingNewFile !== true)){//not from new file flow
228 this.creatingNewFile = false;
229 }
230
225 //Sending full response object 231 //Sending full response object
226 this.openDocument(response); 232 this.openDocument(response);
227 } else if (!!response && (response.status === 404)){ 233 } else if (!!response && (response.status === 404)){