aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-21 14:32:17 -0800
committerValerio Virgillito2012-02-21 14:32:17 -0800
commitb1daf0b285a4a96bfd0086709c20e3682d75551a (patch)
treec6e8bcf8b7c0639a1e52009c3d1a89c95d2a91d6 /js/components
parent10c5ca3b1ac764b611051dc590f3092f269b1bf6 (diff)
downloadninja-b1daf0b285a4a96bfd0086709c20e3682d75551a.tar.gz
fixing the dirty flag and removing sass changes
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.html1
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js24
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.html4
3 files changed, 13 insertions, 16 deletions
diff --git a/js/components/layout/document-entry.reel/document-entry.html b/js/components/layout/document-entry.reel/document-entry.html
index ba17449a..1cf01737 100755
--- a/js/components/layout/document-entry.reel/document-entry.html
+++ b/js/components/layout/document-entry.reel/document-entry.html
@@ -26,7 +26,6 @@
26 <body> 26 <body>
27 <li id="documentEntry" class="documentEntry"> 27 <li id="documentEntry" class="documentEntry">
28 <div id="isActive"></div> 28 <div id="isActive"></div>
29 <div id="dirtyFlag"></div>
30 <span id="name"></span> 29 <span id="name"></span>
31 <img src="js/components/layout/document-entry.reel/close_button.gif"> 30 <img src="js/components/layout/document-entry.reel/close_button.gif">
32 </li> 31 </li>
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 },
diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html
index 82ba8782..737dfbcb 100755
--- a/js/components/layout/documents-tab.reel/documents-tab.html
+++ b/js/components/layout/documents-tab.reel/documents-tab.html
@@ -38,9 +38,9 @@
38 "boundObjectPropertyPath": "objectAtCurrentIteration.name", 38 "boundObjectPropertyPath": "objectAtCurrentIteration.name",
39 "oneway": true 39 "oneway": true
40 }, 40 },
41 "dirtyFlag": { 41 "saveFlag": {
42 "boundObject": {"@": "repetition1"}, 42 "boundObject": {"@": "repetition1"},
43 "boundObjectPropertyPath": "objectAtCurrentIteration.dirtyFlag", 43 "boundObjectPropertyPath": "objectAtCurrentIteration.needsSave",
44 "oneway": true 44 "oneway": true
45 }, 45 },
46 "active": { 46 "active": {