aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-entry.reel/document-entry.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-22 11:04:18 -0800
committerNivesh Rajbhandari2012-02-22 11:04:18 -0800
commitecd0dc6ffd21aedfb5ae8f617af36e48a2ba72ce (patch)
treedf63accaeccb899ab1ecc107ab361629a5ca3452 /js/components/layout/document-entry.reel/document-entry.js
parent96a0a8c916533eb5625816192ed38488f639326d (diff)
parent2f24dafec79583547fe663d5a387d8ef15aae3bf (diff)
downloadninja-ecd0dc6ffd21aedfb5ae8f617af36e48a2ba72ce.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Diffstat (limited to 'js/components/layout/document-entry.reel/document-entry.js')
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js24
1 files changed, 11 insertions, 13 deletions
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js
index a1bed79b..9e4110e2 100755
--- a/js/components/layout/document-entry.reel/document-entry.js
+++ b/js/components/layout/document-entry.reel/document-entry.js
@@ -77,19 +77,17 @@ exports.DocumentEntry = Montage.create(Component, {
77 } 77 }
78 }, 78 },
79 79
80 _dirtyFlag:{ 80 _saveFlag: {
81 enumerable:false, 81 value: false
82 value:false
83 }, 82 },
84 dirtyFlag:{ 83
84 saveFlag: {
85 get: function() { 85 get: function() {
86 return this._dirtyFlag; 86 return this._saveFlag;
87 }, 87 },
88 set: function(value) { 88 set: function(value) {
89 var previousValue = this._dirtyFlag; 89 if(this._saveFlag !== value) {
90 this._dirtyFlag = value; 90 this._saveFlag = value;
91
92 if (previousValue !== this._dirtyFlag) {
93 this.needsDraw = true; 91 this.needsDraw = true;
94 } 92 }
95 } 93 }
@@ -110,10 +108,10 @@ exports.DocumentEntry = Montage.create(Component, {
110 108
111 this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab"); 109 this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab");
112 110
113 if(this.dirtyFlag === true){ 111 if(this.saveFlag) {
114 if(!this.label.classList.contains("dirty")){this.label.classList.add("dirty");} 112 this.label.classList.add("dirty");
115 }else{ 113 } else {
116 if(this.label.classList.contains("dirty")){this.label.classList.remove("dirty");} 114 this.label.classList.remove("dirty");
117 } 115 }
118 } 116 }
119 }, 117 },