diff options
author | Jon Reid | 2012-03-21 11:37:48 -0700 |
---|---|---|
committer | Jon Reid | 2012-03-21 11:37:48 -0700 |
commit | 3669eea4bde3518ce080048e9f53d2dd111fd8be (patch) | |
tree | d88892df558c080342a754351059c0d4a10beba2 /js/components | |
parent | 9d7cd4d067b988a65cdea3059769617487028a22 (diff) | |
download | ninja-3669eea4bde3518ce080048e9f53d2dd111fd8be.tar.gz |
Timeline: Bug fix: style collapsers not staying in synch. Also, removed console.log calls in hintable component.
Diffstat (limited to 'js/components')
-rw-r--r-- | js/components/editable.reel/editable.js | 8 | ||||
-rw-r--r-- | js/components/hintable.reel/hintable.js | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 9c8946c4..7a31e7fd 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js | |||
@@ -120,7 +120,7 @@ exports.Editable = Montage.create(Component, { | |||
120 | } | 120 | } |
121 | 121 | ||
122 | if(this.stopOnBlur) { | 122 | if(this.stopOnBlur) { |
123 | console.log('adding mousedown event listener'); | 123 | //console.log('adding mousedown event listener'); |
124 | ///// Simulate blur on editable node by listening to the doc | 124 | ///// Simulate blur on editable node by listening to the doc |
125 | document.addEventListener('mouseup', this, false); | 125 | document.addEventListener('mouseup', this, false); |
126 | } | 126 | } |
@@ -189,7 +189,7 @@ exports.Editable = Montage.create(Component, { | |||
189 | handleKeydown : { | 189 | handleKeydown : { |
190 | value : function(e) { | 190 | value : function(e) { |
191 | var k = e.keyCode; | 191 | var k = e.keyCode; |
192 | console.log('keyCode: ' + k); | 192 | //console.log('keyCode: ' + k); |
193 | } | 193 | } |
194 | }, | 194 | }, |
195 | ///// Text input has changed values | 195 | ///// Text input has changed values |
@@ -204,7 +204,7 @@ exports.Editable = Montage.create(Component, { | |||
204 | }, | 204 | }, |
205 | handleMouseup : { | 205 | handleMouseup : { |
206 | value : function(e) { | 206 | value : function(e) { |
207 | console.log('handle mouse down'); | 207 | //console.log('handle mouse down'); |
208 | ///// Listen for simulated blur event | 208 | ///// Listen for simulated blur event |
209 | if(this.stopOnBlur && e._event.target !== this._element) { | 209 | if(this.stopOnBlur && e._event.target !== this._element) { |
210 | this.blur(); | 210 | this.blur(); |
@@ -213,7 +213,7 @@ exports.Editable = Montage.create(Component, { | |||
213 | }, | 213 | }, |
214 | handleEvent : { | 214 | handleEvent : { |
215 | value : function(e) { | 215 | value : function(e) { |
216 | console.log("event type : " + e._event.type); | 216 | //console.log("event type : " + e._event.type); |
217 | ///// If configured, start on specified event | 217 | ///// If configured, start on specified event |
218 | if(e._event.type === this.startOnEvent) { | 218 | if(e._event.type === this.startOnEvent) { |
219 | this.start(); | 219 | this.start(); |
diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index 5ed46b3c..cbfe2d9b 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js | |||
@@ -90,10 +90,10 @@ exports.Hintable = Montage.create(Editable, { | |||
90 | hintNext : { | 90 | hintNext : { |
91 | value : function(e) { | 91 | value : function(e) { |
92 | if(e) { e.preventDefault(); } | 92 | if(e) { e.preventDefault(); } |
93 | console.log('next1'); | 93 | //console.log('next1'); |
94 | 94 | ||
95 | if(this._matchIndex < this.matches.length - 1) { | 95 | if(this._matchIndex < this.matches.length - 1) { |
96 | console.log('next'); | 96 | //console.log('next'); |
97 | ++this._matchIndex; | 97 | ++this._matchIndex; |
98 | this.hint = this._getHintDifference(); | 98 | this.hint = this._getHintDifference(); |
99 | } | 99 | } |
@@ -102,9 +102,9 @@ exports.Hintable = Montage.create(Editable, { | |||
102 | hintPrev : { | 102 | hintPrev : { |
103 | value : function(e) { | 103 | value : function(e) { |
104 | if(e) { e.preventDefault(); } | 104 | if(e) { e.preventDefault(); } |
105 | console.log('prev1'); | 105 | //console.log('prev1'); |
106 | if(this._matchIndex !== 0) { | 106 | if(this._matchIndex !== 0) { |
107 | console.log('prev'); | 107 | //console.log('prev'); |
108 | --this._matchIndex; | 108 | --this._matchIndex; |
109 | this.hint = this._getHintDifference(); | 109 | this.hint = this._getHintDifference(); |
110 | } | 110 | } |
@@ -135,7 +135,7 @@ exports.Hintable = Montage.create(Editable, { | |||
135 | /// revert to old value | 135 | /// revert to old value |
136 | this.value = (this._preEditValue); | 136 | this.value = (this._preEditValue); |
137 | this._sendEvent('revert'); | 137 | this._sendEvent('revert'); |
138 | console.log('reverting'); | 138 | //console.log('reverting'); |
139 | 139 | ||
140 | } | 140 | } |
141 | } | 141 | } |
@@ -180,7 +180,7 @@ exports.Hintable = Montage.create(Editable, { | |||
180 | 180 | ||
181 | var val = this.value, | 181 | var val = this.value, |
182 | matches, hint; | 182 | matches, hint; |
183 | console.log('val = "' + val + '"'); | 183 | //console.log('val = "' + val + '"'); |
184 | //// Handle auto-suggest if configured | 184 | //// Handle auto-suggest if configured |
185 | if(this.hints instanceof Array) { | 185 | if(this.hints instanceof Array) { |
186 | 186 | ||