diff options
author | Valerio Virgillito | 2012-02-03 15:50:35 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-03 15:50:35 -0800 |
commit | dbd3a60478db35b0b12baa2ca54a0712d880951f (patch) | |
tree | 68d970c3399e5c0efddd4ad81921098b8daecdda /js/controllers/elements | |
parent | e6e539f345f5e1ac36a595db5d1a1c3700715e88 (diff) | |
download | ninja-dbd3a60478db35b0b12baa2ca54a0712d880951f.tar.gz |
button component using json data
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rw-r--r-- | js/controllers/elements/component-controller.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 7a8acb3a..1b0591be 100644 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js | |||
@@ -15,8 +15,11 @@ exports.ComponentController = Montage.create(ElementController, { | |||
15 | case "label": | 15 | case "label": |
16 | return this.application.ninja.currentDocument.getComponentFromElement(el).label; | 16 | return this.application.ninja.currentDocument.getComponentFromElement(el).label; |
17 | break; | 17 | break; |
18 | case "enabled": | ||
19 | return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; | ||
20 | break; | ||
18 | default: | 21 | default: |
19 | return ElementController.getProperty(el, prop); | 22 | return ElementController.getProperty(el, prop, true); |
20 | } | 23 | } |
21 | } | 24 | } |
22 | }, | 25 | }, |
@@ -27,6 +30,9 @@ exports.ComponentController = Montage.create(ElementController, { | |||
27 | case "label": | 30 | case "label": |
28 | this.application.ninja.currentDocument.getComponentFromElement(el).label = value; | 31 | this.application.ninja.currentDocument.getComponentFromElement(el).label = value; |
29 | break; | 32 | break; |
33 | case "enabled": | ||
34 | this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; | ||
35 | break; | ||
30 | default: | 36 | default: |
31 | ElementController.setProperty(el, p, value); | 37 | ElementController.setProperty(el, p, value); |
32 | } | 38 | } |