diff options
author | Valerio Virgillito | 2012-05-23 15:24:25 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-23 15:26:54 -0700 |
commit | d5b36812ba84e49aa8b597eea9f75bf36ddcb571 (patch) | |
tree | 4d5807d9723452f860b46f7413adff1828c68820 /js/controllers/document-controller.js | |
parent | 1a7e347810401e6262d9d7bad1c3583e6773993b (diff) | |
download | ninja-d5b36812ba84e49aa8b597eea9f75bf36ddcb571.tar.gz |
fixing the styles manager to open code view files and closing the last document.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 3e15511d..aa037bd4 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -399,10 +399,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
399 | 399 | ||
400 | if(this._documents.length > 0) { | 400 | if(this._documents.length > 0) { |
401 | previousFocusedDocument = this._documents[this._documents.length - 1]; | 401 | previousFocusedDocument = this._documents[this._documents.length - 1]; |
402 | this._activeDocument = previousFocusedDocument; | 402 | this.activeDocument = previousFocusedDocument; |
403 | this.switchDocuments(this.activeDocument, previousFocusedDocument, true); | 403 | this.switchDocuments(this.activeDocument, previousFocusedDocument, false); |
404 | } else { | 404 | } else { |
405 | this._activeDocument = null; | 405 | this.activeDocument = null; |
406 | this.application.ninja.stage.hideRulers(); | 406 | this.application.ninja.stage.hideRulers(); |
407 | 407 | ||
408 | this.application.ninja.stage.hideCanvas(true); | 408 | this.application.ninja.stage.hideCanvas(true); |
@@ -524,13 +524,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
524 | this.application.ninja.stage.restoreAllPanels(); | 524 | this.application.ninja.stage.restoreAllPanels(); |
525 | this.application.ninja.stage.hideCanvas(false); | 525 | this.application.ninja.stage.hideCanvas(false); |
526 | this.application.ninja.stage.showRulers(); | 526 | this.application.ninja.stage.showRulers(); |
527 | } else if(currentDocument.currentView === "design" && newDocument.currentView === "code") { | ||
528 | this.application.ninja.stage.showCodeViewBar(true); | ||
529 | this.application.ninja.stage.collapseAllPanels(); | ||
530 | this.application.ninja.stage.hideCanvas(true); | ||
531 | this.application.ninja.stage.hideRulers(); | ||
532 | } | 527 | } |
533 | }else if(!currentDocument && newDocument.currentView === "code"){ | 528 | } |
529 | |||
530 | if(newDocument.currentView === "code") { | ||
534 | this.application.ninja.stage.showCodeViewBar(true); | 531 | this.application.ninja.stage.showCodeViewBar(true); |
535 | this.application.ninja.stage.collapseAllPanels(); | 532 | this.application.ninja.stage.collapseAllPanels(); |
536 | this.application.ninja.stage.hideCanvas(true); | 533 | this.application.ninja.stage.hideCanvas(true); |