diff options
-rwxr-xr-x | js/controllers/document-controller.js | 6 | ||||
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 2 |
2 files changed, 8 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)){ |
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index ab02661d..91047e51 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js | |||
@@ -146,6 +146,8 @@ exports.StageView = Montage.create(Component, { | |||
146 | // appDelegateModule.MyAppDelegate.onSetActiveDocument(); | 146 | // appDelegateModule.MyAppDelegate.onSetActiveDocument(); |
147 | } | 147 | } |
148 | 148 | ||
149 | NJevent("switchDocument"); | ||
150 | |||
149 | } | 151 | } |
150 | }, | 152 | }, |
151 | 153 | ||