diff options
author | Jose Antonio Marquez | 2012-02-13 21:21:11 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-13 21:21:11 -0800 |
commit | 64f54ffcebf09c570972b91ea5fdb7fe7654e622 (patch) | |
tree | da23792067fa2b1e08dea90996f69a1a695b1bcc /js/controllers | |
parent | f3865671aa75277f6eb35c417408dee9e665589a (diff) | |
parent | 50a40c4e21b9a4d53d6d1fb739d838c0319ab09b (diff) | |
download | ninja-64f54ffcebf09c570972b91ea5fdb7fe7654e622.tar.gz |
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index b066a9c2..21445214 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -251,7 +251,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, { | |||
251 | var closeDocumentIndex = this._findIndexByUUID(id); | 251 | var closeDocumentIndex = this._findIndexByUUID(id); |
252 | this._documents.splice(this._findIndexByUUID(id), 1); | 252 | this._documents.splice(this._findIndexByUUID(id), 1); |
253 | 253 | ||
254 | if(this.activeDocument.uuid === id && this._documents.length > 0) { | 254 | if(this.activeDocument.uuid === id && this._documents.length > 0) {//closing the active document tab |
255 | var nextDocumentIndex = -1 ; | 255 | var nextDocumentIndex = -1 ; |
256 | if((this._documents.length > 0) && (closeDocumentIndex === 0)){ | 256 | if((this._documents.length > 0) && (closeDocumentIndex === 0)){ |
257 | nextDocumentIndex = 1; | 257 | nextDocumentIndex = 1; |
@@ -259,7 +259,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, { | |||
259 | nextDocumentIndex = closeDocumentIndex - 1; | 259 | nextDocumentIndex = closeDocumentIndex - 1; |
260 | } | 260 | } |
261 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); | 261 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); |
262 | }else{ | 262 | }else if(this._documents.length === 0){ |
263 | //if there are no documents to switch to then just show the iframeContainer | 263 | //if there are no documents to switch to then just show the iframeContainer |
264 | document.getElementById("iframeContainer").style.display="block"; | 264 | document.getElementById("iframeContainer").style.display="block"; |
265 | } | 265 | } |