From a6948e635389768fc316f1fb86df2524b482b47c Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 13 Feb 2012 18:48:18 -0800 Subject: added logical drive selection to file picker Signed-off-by: Ananya Sen --- js/controllers/document-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/controllers') 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, { var closeDocumentIndex = this._findIndexByUUID(id); this._documents.splice(this._findIndexByUUID(id), 1); - if(this.activeDocument.uuid === id && this._documents.length > 0) { + if(this.activeDocument.uuid === id && this._documents.length > 0) {//closing the active document tab var nextDocumentIndex = -1 ; if((this._documents.length > 0) && (closeDocumentIndex === 0)){ nextDocumentIndex = 1; @@ -259,7 +259,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, { nextDocumentIndex = closeDocumentIndex - 1; } this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); - }else{ + }else if(this._documents.length === 0){ //if there are no documents to switch to then just show the iframeContainer document.getElementById("iframeContainer").style.display="block"; } -- cgit v1.2.3