aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-entry.reel
diff options
context:
space:
mode:
authorEric Guzman2012-02-16 00:22:43 -0800
committerEric Guzman2012-02-16 00:22:43 -0800
commit82b1a273219f0ae3d119e156c7acccdbe478f441 (patch)
tree74c45e5e3afc6706b2f7a7918807f72c54cdcfc5 /js/components/layout/document-entry.reel
parentaf20ca9b11133dd5cefb9275dbe8fb101c3380d0 (diff)
parent966f0adaf1d4b7f2dd5a6e31643df58bff713884 (diff)
downloadninja-82b1a273219f0ae3d119e156c7acccdbe478f441.tar.gz
Merge branch 'refs/heads/TreeComponents' into PresetsPanel
Diffstat (limited to 'js/components/layout/document-entry.reel')
-rwxr-xr-x[-rw-r--r--]js/components/layout/document-entry.reel/close_button.gifbin139 -> 139 bytes
-rwxr-xr-x[-rw-r--r--]js/components/layout/document-entry.reel/document-entry.css1
-rwxr-xr-x[-rw-r--r--]js/components/layout/document-entry.reel/document-entry.html0
-rwxr-xr-x[-rw-r--r--]js/components/layout/document-entry.reel/document-entry.js29
4 files changed, 27 insertions, 3 deletions
diff --git a/js/components/layout/document-entry.reel/close_button.gif b/js/components/layout/document-entry.reel/close_button.gif
index 00b5904b..00b5904b 100644..100755
--- a/js/components/layout/document-entry.reel/close_button.gif
+++ b/js/components/layout/document-entry.reel/close_button.gif
Binary files differ
diff --git a/js/components/layout/document-entry.reel/document-entry.css b/js/components/layout/document-entry.reel/document-entry.css
index ce173cd6..52d08d72 100644..100755
--- a/js/components/layout/document-entry.reel/document-entry.css
+++ b/js/components/layout/document-entry.reel/document-entry.css
@@ -35,4 +35,5 @@
35 35
36.documentEntry span.dirty:before{ 36.documentEntry span.dirty:before{
37 content: "*"; 37 content: "*";
38 display:inline;
38} 39}
diff --git a/js/components/layout/document-entry.reel/document-entry.html b/js/components/layout/document-entry.reel/document-entry.html
index ba17449a..ba17449a 100644..100755
--- a/js/components/layout/document-entry.reel/document-entry.html
+++ b/js/components/layout/document-entry.reel/document-entry.html
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js
index 6f265c91..a1bed79b 100644..100755
--- a/js/components/layout/document-entry.reel/document-entry.js
+++ b/js/components/layout/document-entry.reel/document-entry.js
@@ -77,11 +77,28 @@ exports.DocumentEntry = Montage.create(Component, {
77 } 77 }
78 }, 78 },
79 79
80 _dirtyFlag:{
81 enumerable:false,
82 value:false
83 },
84 dirtyFlag:{
85 get: function() {
86 return this._dirtyFlag;
87 },
88 set: function(value) {
89 var previousValue = this._dirtyFlag;
90 this._dirtyFlag = value;
91
92 if (previousValue !== this._dirtyFlag) {
93 this.needsDraw = true;
94 }
95 }
96 },
80 97
81 prepareForDraw: { 98 prepareForDraw: {
82 enumerable: false, 99 enumerable: false,
83 value: function() { 100 value: function() {
84 //this.element.addEventListener("click", this, false); 101 this.element.addEventListener("click", this, false);
85 } 102 }
86 }, 103 },
87 104
@@ -92,16 +109,22 @@ exports.DocumentEntry = Montage.create(Component, {
92 this.label.innerText = this._name ? this._name : ""; 109 this.label.innerText = this._name ? this._name : "";
93 110
94 this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab"); 111 this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab");
112
113 if(this.dirtyFlag === true){
114 if(!this.label.classList.contains("dirty")){this.label.classList.add("dirty");}
115 }else{
116 if(this.label.classList.contains("dirty")){this.label.classList.remove("dirty");}
117 }
95 } 118 }
96 }, 119 },
97 120
98 handleClick: { 121 handleClick: {
99 value: function(event) { 122 value: function(event) {
100 if(event._event.target.nodeName === "IMG") { 123 if(event._event.target.nodeName === "IMG") {
101 documentManagerModule.DocumentManager.closeDocument(this._uuid); 124 this.application.ninja.documentController.closeDocument(this._uuid);
102 } else { 125 } else {
103 if(!this._document.isActive) { 126 if(!this._document.isActive) {
104 documentManagerModule.DocumentManager.switchDocument(this._uuid); 127 this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid));
105 } 128 }
106 } 129 }
107 } 130 }