From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/components/layout/document-entry.reel/document-entry.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/components/layout/document-entry.reel/document-entry.js (limited to 'js/components/layout/document-entry.reel/document-entry.js') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 553fce7721cacfd13b6013fdcdd0243c90083b5e Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 1 Feb 2012 11:59:11 -0800 Subject: fixed reference to coreioapi cleaning up opening code view tabs Signed-off-by: Ananya Sen --- js/components/layout/document-entry.reel/document-entry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/components/layout/document-entry.reel/document-entry.js') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 6f265c91..1431e76f 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -81,7 +81,7 @@ exports.DocumentEntry = Montage.create(Component, { prepareForDraw: { enumerable: false, value: function() { - //this.element.addEventListener("click", this, false); + this.element.addEventListener("click", this, false); } }, @@ -98,10 +98,10 @@ exports.DocumentEntry = Montage.create(Component, { handleClick: { value: function(event) { if(event._event.target.nodeName === "IMG") { - documentManagerModule.DocumentManager.closeDocument(this._uuid); + this.application.ninja.documentController.closeDocument(this._uuid); } else { if(!this._document.isActive) { - documentManagerModule.DocumentManager.switchDocument(this._uuid); + this.application.ninja.stage.stageView.switchCodeView(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 1daf146c849a0a8dbd2b61b14218c9a39bdee3a7 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 3 Feb 2012 17:22:48 -0800 Subject: added editor tab save while switching code view tabs, integrated new file dialog with io mediator to open the new file in a new tab 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/document-entry.js') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 1431e76f..2a33548a 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -101,7 +101,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeDocument(this._uuid); } else { if(!this._document.isActive) { - this.application.ninja.stage.stageView.switchCodeView(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 272c5f74f4ce76fec9cbe360817bf23639307d3a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Sun, 5 Feb 2012 19:20:37 -0800 Subject: changes to show document dirty indicator on editing code view, and to remove dirty indicator on save. Signed-off-by: Ananya Sen --- .../layout/document-entry.reel/document-entry.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'js/components/layout/document-entry.reel/document-entry.js') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 2a33548a..a1bed79b 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -77,6 +77,23 @@ exports.DocumentEntry = Montage.create(Component, { } }, + _dirtyFlag:{ + enumerable:false, + value:false + }, + dirtyFlag:{ + get: function() { + return this._dirtyFlag; + }, + set: function(value) { + var previousValue = this._dirtyFlag; + this._dirtyFlag = value; + + if (previousValue !== this._dirtyFlag) { + this.needsDraw = true; + } + } + }, prepareForDraw: { enumerable: false, @@ -92,6 +109,12 @@ exports.DocumentEntry = Montage.create(Component, { this.label.innerText = this._name ? this._name : ""; this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab"); + + if(this.dirtyFlag === true){ + if(!this.label.classList.contains("dirty")){this.label.classList.add("dirty");} + }else{ + if(this.label.classList.contains("dirty")){this.label.classList.remove("dirty");} + } } }, -- cgit v1.2.3