From ba5b8238784a41099d0eb76795de2a7e5abde226 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 14 May 2012 13:44:27 -0700 Subject: code cleanup Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 9e4110e2..81a63c90 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -7,8 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; -//var documentManagerModule = ("js/document/documentManager"); - exports.DocumentEntry = Montage.create(Component, { dirty: { value: null }, -- cgit v1.2.3 From 919a0d0ed35c24b1047281723ddde2ac98fc9a3e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 15 May 2012 22:36:44 -0700 Subject: document close handler. initial working draft Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 81a63c90..4d09a362 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -117,7 +117,7 @@ exports.DocumentEntry = Montage.create(Component, { handleClick: { value: function(event) { if(event._event.target.nodeName === "IMG") { - this.application.ninja.documentController.closeDocument(this._uuid); + this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this._document.isActive) { this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); -- cgit v1.2.3 From 2c9ed2068b12884fc026fe3a7b57021e7e591f1c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 16:04:22 -0700 Subject: fixing a null value for the document entry bar Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 4d09a362..ad0236c6 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -33,8 +33,10 @@ exports.DocumentEntry = Montage.create(Component, { } this._document = value; - this._uuid = value.uuid; - //this.needsDraw = true; + + if(value) { + this._uuid = value.uuid; + } } }, -- cgit v1.2.3 From 7a94696e19b14e15261df516e2ba75e693b1313d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 18 May 2012 00:21:56 -0700 Subject: enabling basic document switching Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index ad0236c6..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -121,8 +121,8 @@ exports.DocumentEntry = Montage.create(Component, { if(event._event.target.nodeName === "IMG") { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { - if(!this._document.isActive) { - this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + if(!this.active) { + this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 2cc8e58f6bb9f64a7473e62aecd013fa55167231 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 21 May 2012 16:42:26 -0700 Subject: - added opening multiple code and design view documents - switching between multiple code and design view documents - Note: closing of documents, when multiple documents are open, is not yet implemented Signed-off-by: Ananya Sen --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 50b3624c..24c7737c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -122,7 +122,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this.active) { - this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.documentController.switchDocuments(this.application.ninja.documentController.activeDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 9b6da637d9654727426c6d78f17e3804bbd84ce5 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 22 May 2012 14:42:43 -0700 Subject: fixing a few document switching issues. Signed-off-by: Valerio Virgillito --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout/document-entry.reel') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 24c7737c..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -122,7 +122,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } else { if(!this.active) { - this.application.ninja.documentController.switchDocuments(this.application.ninja.documentController.activeDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3