aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/sections
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-24 12:08:49 -0800
committerPushkar Joshi2012-02-24 12:08:49 -0800
commit03ca7a5ed13c25faaa9100bb666e062fd15335e6 (patch)
treec51112223ceb9121cd595a60335eb2795215590f /js/panels/properties/sections
parentfcb12cc09eb3cd3b42bd215877ba18f449275b75 (diff)
parent053fc63a2950c7a5ee4ebf98033b64d474a3c46e (diff)
downloadninja-03ca7a5ed13c25faaa9100bb666e062fd15335e6.tar.gz
Merge branch 'pentool' into brushtool
Conflicts: imports/codemirror/mode/scheme/scheme.js js/tools/BrushTool.js
Diffstat (limited to 'js/panels/properties/sections')
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/color-select.reel/color-select.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/color-select.reel/color-select.js0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/single-row.reel/single-row.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom-rows/single-row.reel/single-row.js0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom.reel/custom.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/custom.reel/custom.js51
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/position-and-size.reel/position-and-size.css0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/position-and-size.reel/position-and-size.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/position-and-size.reel/position-and-size.js0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/three-d-view.reel/three-d-view.html0
-rwxr-xr-x[-rw-r--r--]js/panels/properties/sections/three-d-view.reel/three-d-view.js35
13 files changed, 65 insertions, 21 deletions
diff --git a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html
index 9c2588b9..9c2588b9 100644..100755
--- a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html
+++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html
diff --git a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js
index 60f8efef..60f8efef 100644..100755
--- a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js
+++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js
diff --git a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html
index 0398ff4c..0398ff4c 100644..100755
--- a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html
+++ b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html
diff --git a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js
index 72d216ca..72d216ca 100644..100755
--- a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js
+++ b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js
diff --git a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.html b/js/panels/properties/sections/custom-rows/single-row.reel/single-row.html
index 27c02380..27c02380 100644..100755
--- a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.html
+++ b/js/panels/properties/sections/custom-rows/single-row.reel/single-row.html
diff --git a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.js b/js/panels/properties/sections/custom-rows/single-row.reel/single-row.js
index b606d6b8..b606d6b8 100644..100755
--- a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.js
+++ b/js/panels/properties/sections/custom-rows/single-row.reel/single-row.js
diff --git a/js/panels/properties/sections/custom.reel/custom.html b/js/panels/properties/sections/custom.reel/custom.html
index 6d4cf0cd..6d4cf0cd 100644..100755
--- a/js/panels/properties/sections/custom.reel/custom.html
+++ b/js/panels/properties/sections/custom.reel/custom.html
diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js
index 992db8e6..a2b9b9fa 100644..100755
--- a/js/panels/properties/sections/custom.reel/custom.js
+++ b/js/panels/properties/sections/custom.reel/custom.js
@@ -6,6 +6,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9var ElementsMediator = require("js/mediators/element-mediator").ElementMediator;
9 10
10//Custom Rows 11//Custom Rows
11var SingleRow = require("js/panels/properties/sections/custom-rows/single-row.reel").SingleRow; 12var SingleRow = require("js/panels/properties/sections/custom-rows/single-row.reel").SingleRow;
@@ -18,7 +19,7 @@ var Dropdown = require("js/components/combobox.reel").Combobox;
18var TextField = require("js/components/textfield.reel").TextField; 19var TextField = require("js/components/textfield.reel").TextField;
19var FileInput = require("js/components/ui/file-input.reel").FileInput; 20var FileInput = require("js/components/ui/file-input.reel").FileInput;
20var Checkbox = require("js/components/checkbox.reel").Checkbox; 21var Checkbox = require("js/components/checkbox.reel").Checkbox;
21 22var ColorChip = require("js/components/ui/color-chip.reel").ColorChip;
22 23
23exports.CustomSection = Montage.create(Component, { 24exports.CustomSection = Montage.create(Component, {
24 25
@@ -88,10 +89,8 @@ exports.CustomSection = Montage.create(Component, {
88 value:{} 89 value:{}
89 }, 90 },
90 91
91 handleChanging: 92 handleChanging: {
92 { 93 value:function(event) {
93 value:function(event)
94 {
95 var obj = event.currentTarget; 94 var obj = event.currentTarget;
96 this._dispatchPropEvent({"type": "changing", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); 95 this._dispatchPropEvent({"type": "changing", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj});
97 } 96 }
@@ -106,6 +105,27 @@ exports.CustomSection = Montage.create(Component, {
106 } 105 }
107 }, 106 },
108 107
108 /**
109 * Color change handler. Hard coding the stage for now since only the stage PI uses this color chip
110 */
111 handleColorChange: {
112 value: function(event) {
113 // Change the stage color for now
114 //console.log(this, event);
115 ElementsMediator.setProperty([this.application.ninja.currentDocument.documentRoot], this.id, [event._event.color.css], "Change", "pi", '');
116 /*
117 var propEvent = document.createEvent("CustomEvent");
118 propEvent.initEvent("propertyChange", true, true);
119 propEvent.type = "propertyChange";
120
121 propEvent.prop = "background";//event.prop;
122 propEvent.value = event._event.color.css;
123
124 this.dispatchEvent(propEvent);
125 */
126 }
127 },
128
109 _dispatchPropEvent: { 129 _dispatchPropEvent: {
110 value: function(event) { 130 value: function(event) {
111// console.log(event); 131// console.log(event);
@@ -140,6 +160,7 @@ exports.CustomSection = Montage.create(Component, {
140 case "textbox" : return this.createTextField(fields); 160 case "textbox" : return this.createTextField(fields);
141 case "file" : return this.createFileInput(fields); 161 case "file" : return this.createFileInput(fields);
142 case "checkbox" : return this.createCheckbox(fields); 162 case "checkbox" : return this.createCheckbox(fields);
163 case "chip" : return this.createColorChip(fields);
143 } 164 }
144 } 165 }
145 }, 166 },
@@ -305,6 +326,26 @@ exports.CustomSection = Montage.create(Component, {
305 326
306 return obj; 327 return obj;
307 } 328 }
329 },
330
331 createColorChip: {
332 value: function(aField) {
333 var obj = ColorChip.create();
334
335 obj.chip = true;
336 obj.iconType = "fillIcon";
337 obj.mode = "chip";
338 obj.offset = 0;
339
340 if (aField.id) obj.id = aField.id;
341 if (aField.prop) obj.prop = aField.prop;
342
343 obj.changeDelegate = this.handleColorChange;
344
345 this.controls[aField.id] = obj;
346
347 return obj;
348 }
308 } 349 }
309 350
310}); \ No newline at end of file 351}); \ No newline at end of file
diff --git a/js/panels/properties/sections/position-and-size.reel/position-and-size.css b/js/panels/properties/sections/position-and-size.reel/position-and-size.css
index 227a232b..227a232b 100644..100755
--- a/js/panels/properties/sections/position-and-size.reel/position-and-size.css
+++ b/js/panels/properties/sections/position-and-size.reel/position-and-size.css
diff --git a/js/panels/properties/sections/position-and-size.reel/position-and-size.html b/js/panels/properties/sections/position-and-size.reel/position-and-size.html
index 79a55385..79a55385 100644..100755
--- a/js/panels/properties/sections/position-and-size.reel/position-and-size.html
+++ b/js/panels/properties/sections/position-and-size.reel/position-and-size.html
diff --git a/js/panels/properties/sections/position-and-size.reel/position-and-size.js b/js/panels/properties/sections/position-and-size.reel/position-and-size.js
index 49117090..49117090 100644..100755
--- a/js/panels/properties/sections/position-and-size.reel/position-and-size.js
+++ b/js/panels/properties/sections/position-and-size.reel/position-and-size.js
diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.html b/js/panels/properties/sections/three-d-view.reel/three-d-view.html
index 1e24cb55..1e24cb55 100644..100755
--- a/js/panels/properties/sections/three-d-view.reel/three-d-view.html
+++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.html
diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.js b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
index 0c4a9171..35591afa 100644..100755
--- a/js/panels/properties/sections/three-d-view.reel/three-d-view.js
+++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
@@ -207,29 +207,32 @@ exports.ThreeD = Montage.create(Component, {
207 templateDidLoad : { 207 templateDidLoad : {
208 value: function() { 208 value: function() {
209 Object.defineBinding(this, "axisMode", { 209 Object.defineBinding(this, "axisMode", {
210 boundObject: this.axisModeGroupControl, 210 boundObject: this.axisModeGroupControl,
211 boundObjectPropertyPath: "selectedIndex", 211 boundObjectPropertyPath: "selectedIndex",
212 oneway: false 212 oneway: false
213 }); 213 });
214
215 this.eventManager.addEventListener("openDocument", this, false);
216 }
217 },
218
219 handleOpenDocument: {
220 value: function() {
214 221
215 Object.defineBinding(this, "item", { 222 Object.defineBinding(this, "item", {
216 boundObject: this, 223 boundObject: this,
217 boundObjectPropertyPath: "application.ninja.selectedElements", 224 boundObjectPropertyPath: "application.ninja.selectedElements",
218 boundValueMutator: this._getSelectedItem, 225 boundValueMutator: this._getSelectedItem,
219 oneway: true 226 oneway: true
220 }); 227 });
221 } 228 }
222 }, 229 },
223 230
224 _getSelectedItem: { 231 _getSelectedItem: {
225 value: function(els) 232 value: function(els) {
226 { 233 if(els.length) {
227 if(els.length)