diff options
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/block-controller.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/canvas-controller.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/component-controller.js | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/controller-factory.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/element-controller.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/image-controller.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/shapes-controller.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/stage-controller.js | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | js/controllers/elements/video-controller.js | 0 |
9 files changed, 45 insertions, 0 deletions
diff --git a/js/controllers/elements/block-controller.js b/js/controllers/elements/block-controller.js index 395a1a4d..395a1a4d 100644..100755 --- a/js/controllers/elements/block-controller.js +++ b/js/controllers/elements/block-controller.js | |||
diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js index b5df3911..b5df3911 100644..100755 --- a/js/controllers/elements/canvas-controller.js +++ b/js/controllers/elements/canvas-controller.js | |||
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 458e6b46..33b9b79a 100644..100755 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js | |||
@@ -9,4 +9,45 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | exports.ComponentController = Montage.create(ElementController, { | 10 | exports.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 | case "enabled": | ||
19 | return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; | ||
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; | ||
27 | default: | ||
28 | return ElementController.getProperty(el, prop, true); | ||
29 | } | ||
30 | } | ||
31 | }, | ||
32 | |||
33 | setProperty: { | ||
34 | value: function(el, p, value) { | ||
35 | switch(p) { | ||
36 | case "label": | ||
37 | this.application.ninja.currentDocument.getComponentFromElement(el).label = value; | ||
38 | break; | ||
39 | case "enabled": | ||
40 | this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; | ||
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; | ||
48 | default: | ||
49 | ElementController.setProperty(el, p, value); | ||
50 | } | ||
51 | } | ||
52 | } | ||
12 | }); | 53 | }); |
diff --git a/js/controllers/elements/controller-factory.js b/js/controllers/elements/controller-factory.js index a772eb16..a772eb16 100644..100755 --- a/js/controllers/elements/controller-factory.js +++ b/js/controllers/elements/controller-factory.js | |||
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 65d26bdd..65d26bdd 100644..100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
diff --git a/js/controllers/elements/image-controller.js b/js/controllers/elements/image-controller.js index 5abce13e..5abce13e 100644..100755 --- a/js/controllers/elements/image-controller.js +++ b/js/controllers/elements/image-controller.js | |||
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 640119c4..640119c4 100644..100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index af7c4858..a8546662 100644..100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js | |||
@@ -92,7 +92,11 @@ exports.StageController = Montage.create(ElementController, { | |||
92 | 92 | ||
93 | setProperty: { | 93 | setProperty: { |
94 | value: function(el, p, value) { | 94 | value: function(el, p, value) { |
95 | |||
95 | switch(p) { | 96 | switch(p) { |
97 | case "body-background": | ||
98 | el.elementModel.body.style.setProperty("background", value); | ||
99 | break; | ||
96 | case "background": | 100 | case "background": |
97 | el.elementModel.stageBackground.style.setProperty(p, value); | 101 | el.elementModel.stageBackground.style.setProperty(p, value); |
98 | break; | 102 | break; |
diff --git a/js/controllers/elements/video-controller.js b/js/controllers/elements/video-controller.js index c36752f5..c36752f5 100644..100755 --- a/js/controllers/elements/video-controller.js +++ b/js/controllers/elements/video-controller.js | |||