aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/elements/component-controller.js53
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js99
-rw-r--r--node_modules/components-data/anchor.json46
-rw-r--r--node_modules/components-data/button.json51
-rw-r--r--node_modules/components-data/checkbox.json51
-rw-r--r--node_modules/components-data/image.json27
-rw-r--r--node_modules/components-data/number-input.json26
-rw-r--r--node_modules/components-data/radio-button.json50
-rw-r--r--node_modules/components-data/range-input.json26
-rw-r--r--node_modules/components-data/select.json21
-rw-r--r--node_modules/components-data/textarea.json32
-rw-r--r--node_modules/components-data/textfield.json112
-rw-r--r--node_modules/components-data/toggle-button.json36
-rwxr-xr-xnode_modules/ninja-components/effect/desaturate-effect.js25
-rwxr-xr-xnode_modules/ninja-components/effect/effect.js15
-rwxr-xr-xnode_modules/ninja-components/effect/invert-effect.js23
-rwxr-xr-xnode_modules/ninja-components/effect/kaliedoscope-effect.js17
-rwxr-xr-xnode_modules/ninja-components/effect/multiply-effect.js23
-rwxr-xr-xnode_modules/ninja-components/effect/sepia-effect.js25
-rw-r--r--node_modules/ninja-components/flow-controller.reel/flow-controller.html275
-rw-r--r--node_modules/ninja-components/flow-controller.reel/flow-controller.js288
-rw-r--r--node_modules/ninja-components/flow-offset.js389
-rw-r--r--node_modules/ninja-components/hottext.reel/hottext.css27
-rw-r--r--node_modules/ninja-components/hottext.reel/hottext.html29
-rw-r--r--node_modules/ninja-components/hottext.reel/hottext.js376
-rw-r--r--node_modules/ninja-components/hottextunit.reel/hottextunit.css41
-rw-r--r--node_modules/ninja-components/hottextunit.reel/hottextunit.html28
-rw-r--r--node_modules/ninja-components/hottextunit.reel/hottextunit.js185
-rw-r--r--node_modules/ninja-components/image2.reel/image2.html31
-rw-r--r--node_modules/ninja-components/image2.reel/image2.js26
-rw-r--r--node_modules/ninja-components/image3d.reel/image3d.html95
-rw-r--r--node_modules/ninja-components/image3d.reel/image3d.js30
-rwxr-xr-xnode_modules/ninja-components/photo-editor.reel/photo-editor.css34
-rwxr-xr-xnode_modules/ninja-components/photo-editor.reel/photo-editor.html50
-rwxr-xr-xnode_modules/ninja-components/photo-editor.reel/photo-editor.js415
-rw-r--r--node_modules/ninja-components/slider-base.js278
-rw-r--r--user-document-templates/montage-application-cloud/main.reel/main.js5
37 files changed, 601 insertions, 2759 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js
index 33b9b79a..83450d0f 100755
--- a/js/controllers/elements/component-controller.js
+++ b/js/controllers/elements/component-controller.js
@@ -12,20 +12,19 @@ exports.ComponentController = Montage.create(ElementController, {
12 getProperty: { 12 getProperty: {
13 value: function(el, prop) { 13 value: function(el, prop) {
14 switch(prop) { 14 switch(prop) {
15 case "label": 15 case "id":
16 return this.application.ninja.currentDocument.getComponentFromElement(el).label; 16 case "class":
17 break; 17 case "left":
18 case "enabled": 18 case "top":
19 return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; 19 case "width":
20 break; 20 case "height":
21 case "disabled": 21 if(el.nodeName === "IMG" && (prop === "width" || prop === "height")) {
22 return this.application.ninja.currentDocument.getComponentFromElement(el).disabled; 22 return this.application.ninja.currentDocument.getComponentFromElement(el)[prop];
23 break; 23 } else {
24 case "value": 24 return ElementController.getProperty(el, prop, true);
25 return this.application.ninja.currentDocument.getComponentFromElement(el).value; 25 }
26 break;
27 default: 26 default:
28 return ElementController.getProperty(el, prop, true); 27 return this.application.ninja.currentDocument.getComponentFromElement(el)[prop];
29 } 28 }
30 } 29 }
31 }, 30 },
@@ -33,20 +32,24 @@ exports.ComponentController = Montage.create(ElementController, {
33 setProperty: { 32 setProperty: {
34 value: function(el, p, value) { 33 value: function(el, p, value) {
35 switch(p) { 34 switch(p) {
36 case "label": 35 case "id":
37 this.application.ninja.currentDocument.getComponentFromElement(el).label = value; 36 case "class":
38 break; 37 case "left":
39 case "enabled": 38 case "top":
40 this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; 39 case "width":
41 break; 40 case "height":
42 case "disabled": 41 if(el.nodeName === "IMG" && (p === "width" || p === "height")) {
43 this.application.ninja.currentDocument.getComponentFromElement(el).disabled = value; 42 this.application.ninja.currentDocument.getComponentFromElement(el)[p] = value;
44 break; 43 } else {
45 case "value": 44 ElementController.setProperty(el, p, value);
46 this.application.ninja.currentDocument.getComponentFromElement(el).value = value; 45 }
47 break; 46 break;
48 default: 47 default:
49 ElementController.setProperty(el, p, value); 48 if(p === "min" || p === "max") value = parseFloat(value);
49
50 this.application.ninja.currentDocument.getComponentFromElement(el)[p] = value;
51 break;
52
50 } 53 }
51 } 54 }
52 } 55 }
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index 7e5a76ee..b4eec771 100755
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -26,14 +26,59 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
26 "text": "Montage Components", 26 "text": "Montage Components",
27 "children": [ 27 "children": [
28 { 28 {
29 "text": "Anchor",
30 "dataFile" : "node_modules/components-data/anchor.json",
31 "component": "anchor"
32 },
33 {
29 "text": "Button", 34 "text": "Button",
30 "dataFile" : "node_modules/components-data/button.json", 35 "dataFile" : "node_modules/components-data/button.json",
31 "component": "button" 36 "component": "button"
32 }, 37 },
33 { 38 {
39 "text": "Checkbox",
40 "dataFile" : "node_modules/components-data/checkbox.json",
41 "component": "checkbox"
42 },
43 {
44 "text": "Image Component",
45 "dataFile" : "node_modules/components-data/image.json",
46 "component": "imageComponent"
47 },
48 {
49 "text": "NumberInput",
50 "dataFile" : "node_modules/components-data/number-input.json",
51 "component": "numberInput"
52 },
53 {
54 "text": "Select Input",
55 "dataFile" : "node_modules/components-data/select.json",
56 "component": "select"
57 },
58 {
59 "text": "Radio Button",
60 "dataFile" : "node_modules/components-data/radio-button.json",
61 "component": "radioButton"
62 },
63 {
64 "text": "Range Input",
65 "dataFile" : "node_modules/components-data/range-input.json",
66 "component": "rangeInput"
67 },
68 {
69 "text": "TextArea",
70 "dataFile" : "node_modules/components-data/textarea.json",
71 "component": "textarea"
72 },
73 {
34 "text": "Textfield", 74 "text": "Textfield",
35 "dataFile" : "node_modules/components-data/textfield.json", 75 "dataFile" : "node_modules/components-data/textfield.json",
36 "component": "textfield" 76 "component": "textfield"
77 },
78 {
79 "text": "Toogle Button",
80 "dataFile" : "node_modules/components-data/toggle-button.json",
81 "component": "toggleButton"
37 } 82 }
38 ] 83 ]
39 } 84 }
@@ -119,6 +164,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
119 row.prop = props.name; 164 row.prop = props.name;
120 row.defaultValue = props["default"]; 165 row.defaultValue = props["default"];
121 row.label = props.name;