diff options
author | Valerio Virgillito | 2012-02-29 12:05:48 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-29 12:05:48 -0800 |
commit | 850f3a1f7ab81ec80b6de1c49f2d2bbcbfe87c8e (patch) | |
tree | e7b3b3cf858086589008d4ce8552264249f6e4ed /js/controllers/document-controller.js | |
parent | 1568367213e760463f3ee29a531aa345fda6bd6d (diff) | |
parent | 5f777eb88c6af30f4f22078bc18da2a5ce346b84 (diff) | |
download | ninja-850f3a1f7ab81ec80b6de1c49f2d2bbcbfe87c8e.tar.gz |
Merge pull request #86 from imix23ways/Timeline
Timeline
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 02031922..64ff2c7e 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -195,7 +195,10 @@ 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 | |||
199 | this.isNewFilePath = true;//path identifier flag | ||
198 | this.creatingNewFile = true;//flag for timeline to identify new file flow | 200 | this.creatingNewFile = true;//flag for timeline to identify new file flow |
201 | |||
199 | this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); | 202 | this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); |
200 | }else if(!!response && !response.success){ | 203 | }else if(!!response && !response.success){ |
201 | //Todo: restrict directory path to the sandbox, in the dialog itself | 204 | //Todo: restrict directory path to the sandbox, in the dialog itself |
@@ -224,9 +227,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
224 | //TODO: Add UI to handle error codes, shouldn't be alert windows | 227 | //TODO: Add UI to handle error codes, shouldn't be alert windows |
225 | if(!!response && (response.status === 204)) { | 228 | if(!!response && (response.status === 204)) { |
226 | 229 | ||
227 | if((typeof this.creatingNewFile === 'undefined') || (this.creatingNewFile !== true)){//not from new file flow | 230 | if((typeof this.isNewFilePath === 'undefined') || (this.isNewFilePath !== true)){//not from new file flow |
228 | this.creatingNewFile = false; | 231 | this.creatingNewFile = false; |
229 | } | 232 | } |
233 | this.isNewFilePath = false;//reset path identifier flag | ||
230 | 234 | ||
231 | //Sending full response object | 235 | //Sending full response object |
232 | this.openDocument(response); | 236 | this.openDocument(response); |