diff options
author | Jose Antonio Marquez | 2012-03-26 15:36:49 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-26 15:36:49 -0700 |
commit | 7bf738bc08f6a24edce30dbc2b101a8cab2d27aa (patch) | |
tree | af3b114d6a83ae62dfcead8bd61bc62efe0c9516 /js/components/checkbox.reel/checkbox.js | |
parent | d87cded11dcc0faf41a4a3e6b587e5549c0da6df (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-7bf738bc08f6a24edce30dbc2b101a8cab2d27aa.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/components/checkbox.reel/checkbox.js')
-rwxr-xr-x | js/components/checkbox.reel/checkbox.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/components/checkbox.reel/checkbox.js b/js/components/checkbox.reel/checkbox.js index f06e5830..be331f4e 100755 --- a/js/components/checkbox.reel/checkbox.js +++ b/js/components/checkbox.reel/checkbox.js | |||
@@ -58,6 +58,26 @@ exports.Checkbox = Montage.create(Component, { | |||
58 | } | 58 | } |
59 | }, | 59 | }, |
60 | 60 | ||
61 | _enabled: { | ||
62 | enumerable: false, | ||
63 | value: true | ||
64 | }, | ||
65 | |||
66 | enabled: { | ||
67 | enumerable: true, | ||
68 | serializable: true, | ||
69 | get: function() { | ||
70 | return this._enabled; | ||
71 | }, | ||
72 | set: function(value) { | ||
73 | if(value !== this._enabled) | ||
74 | { | ||
75 | this._enabled = value; | ||
76 | this.needsDraw = true; | ||
77 | } | ||
78 | } | ||
79 | }, | ||
80 | |||
61 | handleChange: | 81 | handleChange: |
62 | { | 82 | { |
63 | value:function(event) | 83 | value:function(event) |
@@ -76,6 +96,7 @@ exports.Checkbox = Montage.create(Component, { | |||
76 | 96 | ||
77 | draw: { | 97 | draw: { |
78 | value: function() { | 98 | value: function() { |
99 | this.element.disabled = !this._enabled; | ||
79 | if(!this._valueSyncedWithInputField) | 100 | if(!this._valueSyncedWithInputField) |
80 | { | 101 | { |
81 | this.element.checked = this._checked; | 102 | this.element.checked = this._checked; |