aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-01 14:37:30 -0800
committerValerio Virgillito2012-02-01 14:37:30 -0800
commitd26a13de2aca25c36cb35f85604de1ac2b9befbb (patch)
tree0419eb0ca8aa923e99b549702c79a219c06916ce /js/controllers/elements
parent9d0f0e55167e0cb2f73dd056cb35a2e82b45340e (diff)
downloadninja-d26a13de2aca25c36cb35f85604de1ac2b9befbb.tar.gz
Simple button native widget test. Added a controller, pi and panel code.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rw-r--r--js/controllers/elements/component-controller.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js
index 458e6b46..7a8acb3a 100644
--- a/js/controllers/elements/component-controller.js
+++ b/js/controllers/elements/component-controller.js
@@ -9,4 +9,27 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.ComponentController = Montage.create(ElementController, { 10exports.ComponentController = Montage.create(ElementController, {
11 11
12 getProperty: {
13 value: function(el, prop) {
14 switch(prop) {
15 case "label":
16 return this.application.ninja.currentDocument.getComponentFromElement(el).label;
17 break;
18 default:
19 return ElementController.getProperty(el, prop);
20 }
21 }
22 },
23
24 setProperty: {
25 value: function(el, p, value) {
26 switch(p) {
27 case "label":
28 this.application.ninja.currentDocument.getComponentFromElement(el).label = value;
29 break;
30 default:
31 ElementController.setProperty(el, p, value);
32 }
33 }
34 }
12}); 35});