aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-13 21:21:11 -0800
committerJose Antonio Marquez2012-02-13 21:21:11 -0800
commit64f54ffcebf09c570972b91ea5fdb7fe7654e622 (patch)
treeda23792067fa2b1e08dea90996f69a1a695b1bcc /js/controllers/document-controller.js
parentf3865671aa75277f6eb35c417408dee9e665589a (diff)
parent50a40c4e21b9a4d53d6d1fb739d838c0319ab09b (diff)
downloadninja-64f54ffcebf09c570972b91ea5fdb7fe7654e622.tar.gz
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js4
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 }