diff options
author | Kruti Shah | 2012-06-26 09:46:59 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-26 09:46:59 -0700 |
commit | 4b4a95140d52e191e5e637371dfc369e50e7f9c8 (patch) | |
tree | 274b55f66527a9925032c5d6da4baa6f12be8ada /js/components | |
parent | 4bf8e4cdc179c3b388fc06f26008808aa4b77eb0 (diff) | |
parent | f0d4d89d856b99da1ca8dd3366c48bb76ba6b1f6 (diff) | |
download | ninja-4b4a95140d52e191e5e637371dfc369e50e7f9c8.tar.gz |
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/components')
-rwxr-xr-x | js/components/textfield.reel/textfield.js | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/js/components/textfield.reel/textfield.js b/js/components/textfield.reel/textfield.js index 5e22fcc7..e16dd786 100755 --- a/js/components/textfield.reel/textfield.js +++ b/js/components/textfield.reel/textfield.js | |||
@@ -27,6 +27,7 @@ exports.TextField = Montage.create(Component, { | |||
27 | }, | 27 | }, |
28 | set: function(value) { | 28 | set: function(value) { |
29 | this._value = value; | 29 | this._value = value; |
30 | this._valueSyncedWithInputField = false; | ||
30 | this.needsDraw = true; | 31 | this.needsDraw = true; |
31 | } | 32 | } |
32 | }, | 33 | }, |
@@ -41,7 +42,7 @@ exports.TextField = Montage.create(Component, { | |||
41 | 42 | ||
42 | handleBlur: { | 43 | handleBlur: { |
43 | value: function(event) { | 44 | value: function(event) { |
44 | this._value = this.element.value; | 45 | this.value = this.element.value; |
45 | this._valueSyncedWithInputField = true; | 46 | this._valueSyncedWithInputField = true; |
46 | 47 | ||
47 | var e = document.createEvent("CustomEvent"); | 48 | var e = document.createEvent("CustomEvent"); |
@@ -51,27 +52,10 @@ exports.TextField = Montage.create(Component, { | |||
51 | this.dispatchEvent(e); | 52 | this.dispatchEvent(e); |
52 | } | 53 | } |
53 | }, | 54 | }, |
54 | /* | ||
55 | handleChange: | ||
56 | { | ||
57 | value:function(event) | ||
58 | { | ||
59 | this._value = this.element.value; | ||
60 | this._valueSyncedWithInputField = true; | ||
61 | |||
62 | var e = document.createEvent("CustomEvent"); | ||
63 | e.initEvent("change", true, true); | ||
64 | e.type = "change"; | ||
65 | e.value = this._value; | ||
66 | this.dispatchEvent(e); | ||
67 | } | ||
68 | }, | ||
69 | */ | ||
70 | 55 | ||
71 | draw: { | 56 | draw: { |
72 | value: function() { | 57 | value: function() { |
73 | if(!this._valueSyncedWithInputField) | 58 | if(!this._valueSyncedWithInputField) { |
74 | { | ||
75 | this.element.value = this._value; | 59 | this.element.value = this._value; |
76 | this._valueSyncedWithInputField = true; | 60 | this._valueSyncedWithInputField = true; |
77 | } | 61 | } |
@@ -80,7 +64,6 @@ exports.TextField = Montage.create(Component, { | |||
80 | 64 | ||
81 | prepareForDraw: { | 65 | prepareForDraw: { |
82 | value: function() { | 66 | value: function() { |
83 | //this.element.addEventListener("change", this, false); | ||
84 | this.element.addEventListener("blur", this, false); | 67 | this.element.addEventListener("blur", this, false); |
85 | this.element.addEventListener("keyup", this, false); | 68 | this.element.addEventListener("keyup", this, false); |
86 | } | 69 | } |