aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-09 16:22:03 -0800
committerValerio Virgillito2012-02-09 16:22:03 -0800
commit47df0aff81c25334b129047bb227ea5015357eda (patch)
tree26bf705a078683e8306de9948b133dba5e83167a /js/controllers/elements
parent1857d4dde728412843c910265ea3bae20780ab54 (diff)
downloadninja-47df0aff81c25334b129047bb227ea5015357eda.tar.gz
Setting defaults and more cleanup
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rw-r--r--js/controllers/elements/component-controller.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js
index 1b0591be..33b9b79a 100644
--- a/js/controllers/elements/component-controller.js
+++ b/js/controllers/elements/component-controller.js
@@ -18,6 +18,12 @@ exports.ComponentController = Montage.create(ElementController, {
18 case "enabled": 18 case "enabled":
19 return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; 19 return this.application.ninja.currentDocument.getComponentFromElement(el).enabled;
20 break; 20 break;
21 case "disabled":
22 return this.application.ninja.currentDocument.getComponentFromElement(el).disabled;
23 break;
24 case "value":
25 return this.application.ninja.currentDocument.getComponentFromElement(el).value;
26 break;
21 default: 27 default:
22 return ElementController.getProperty(el, prop, true); 28 return ElementController.getProperty(el, prop, true);
23 } 29 }
@@ -33,6 +39,12 @@ exports.ComponentController = Montage.create(ElementController, {
33 case "enabled": 39 case "enabled":
34 this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; 40 this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value;
35 break; 41 break;
42 case "disabled":
43 this.application.ninja.currentDocument.getComponentFromElement(el).disabled = value;
44 break;
45 case "value":
46 this.application.ninja.currentDocument.getComponentFromElement(el).value = value;
47 break;
36 default: 48 default:
37 ElementController.setProperty(el, p, value); 49 ElementController.setProperty(el, p, value);
38 } 50 }