aboutsummaryrefslogtreecommitdiff
path: root/js/components/checkbox.reel/checkbox.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-23 13:23:12 -0700
committerJose Antonio Marquez2012-03-23 13:23:12 -0700
commit67aaba2e752ea1964356f487269cafc686abb9a7 (patch)
treec3794257facf5992aff796b1ef11ae661b2aa3cb /js/components/checkbox.reel/checkbox.js
parent7e61ce5aba0c8465595804da21e365baf4d8c15d (diff)
parent3ac73ef7f5de7fb3869c4b84537a6dc6ef86b859 (diff)
downloadninja-67aaba2e752ea1964356f487269cafc686abb9a7.tar.gz
Merge branch 'refs/heads/Ninja-Montage-Integration' into FileIO-Montage-Components
Diffstat (limited to 'js/components/checkbox.reel/checkbox.js')
-rwxr-xr-xjs/components/checkbox.reel/checkbox.js21
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;