aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorJon Reid2012-02-24 13:04:13 -0800
committerJon Reid2012-02-24 13:04:13 -0800
commitc615e1d305424f16f64aca16cf38da760a5eec87 (patch)
treeb0b73f3a0f5e0061744dbde42765dea87633afd8 /js/controllers
parentb6dbc1717c07bf817ae208939d88a9fabf603e59 (diff)
parent9dabdd11b7fc8a042e139457748547ffe2232468 (diff)
downloadninja-c615e1d305424f16f64aca16cf38da760a5eec87.tar.gz
Merge remote-tracking branch 'ninja-jduran/Timeline' into Timeline-local
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 1c9d9d59..843db87c 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -169,6 +169,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
169 value:function(doc){ 169 value:function(doc){
170 var response = doc || null;//default just for testing 170 var response = doc || null;//default just for testing
171 if(!!response && response.success && (response.status!== 500) && !!response.uri){ 171 if(!!response && response.success && (response.status!== 500) && !!response.uri){
172 this.creatingNewFile = true;//flag for timeline to identify new file flow
172 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); 173 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this));
173 }else if(!!response && !response.success){ 174 }else if(!!response && !response.success){
174 //Todo: restrict directory path to the sandbox, in the dialog itself 175 //Todo: restrict directory path to the sandbox, in the dialog itself
@@ -196,6 +197,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
196 value:function(response){ 197 value:function(response){
197 //TODO: Add UI to handle error codes, shouldn't be alert windows 198 //TODO: Add UI to handle error codes, shouldn't be alert windows
198 if(!!response && (response.status === 204)) { 199 if(!!response && (response.status === 204)) {
200
201 if((typeof this.creatingNewFile === 'undefined') || (this.creatingNewFile !== true)){//not from new file flow
202 this.creatingNewFile = false;
203 }
204
199 //Sending full response object 205 //Sending full response object
200 this.openDocument(response); 206 this.openDocument(response);
201 } else if (!!response && (response.status === 404)){ 207 } else if (!!response && (response.status === 404)){