From dbd3a60478db35b0b12baa2ca54a0712d880951f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 3 Feb 2012 15:50:35 -0800 Subject: button component using json data Signed-off-by: Valerio Virgillito --- js/controllers/elements/component-controller.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/controllers/elements') 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, { case "label": return this.application.ninja.currentDocument.getComponentFromElement(el).label; break; + case "enabled": + return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; + break; default: - return ElementController.getProperty(el, prop); + return ElementController.getProperty(el, prop, true); } } }, @@ -27,6 +30,9 @@ exports.ComponentController = Montage.create(ElementController, { case "label": this.application.ninja.currentDocument.getComponentFromElement(el).label = value; break; + case "enabled": + this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; + break; default: ElementController.setProperty(el, p, value); } -- cgit v1.2.3