aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-xjs/panels/properties.reel/properties.css39
-rwxr-xr-xjs/panels/properties.reel/properties.html10
-rwxr-xr-xjs/panels/properties.reel/properties.js184
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html10
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.js3
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js16
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.css (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css)0
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.html (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html)36
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.js (renamed from js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js)14
9 files changed, 124 insertions, 188 deletions
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css
index eee44561..84f52ed4 100755
--- a/js/panels/properties.reel/properties.css
+++ b/js/panels/properties.reel/properties.css
@@ -271,20 +271,21 @@ padding-right:6px;
271 content: "•"; 271 content: "•";
272} 272}
273 273
274.propertiesPanel input.nj-skinned label { 274.propertiesPanel .checkbox-label {
275 position: absolute; 275 position: absolute;
276 top: 0; 276 top: 4px;
277 left: 15px; 277 padding-left: 5px;
278 /*left: 15px;*/
278 font-size: 10px; 279 font-size: 10px;
279 width:55px; 280 width:55px;
280 text-align: left; 281 text-align: left;
281 font-weight: normal; 282 font-weight: normal;
282 color:#FFF; 283 color:#FFF;
283} 284}
284
285.propertiesPanel input[type='radio'].nj-skinned { 285.propertiesPanel input[type='radio'].nj-skinned {
286 text-indent: 0px; 286 text-indent: 0px;
287 line-height: 5px; 287 line-height: 5px;
288 margin: -4px 0 0 0;
288} 289}
289 290
290.propertiesPanel input[type='radio'].nj-skinned label { 291.propertiesPanel input[type='radio'].nj-skinned label {
@@ -303,4 +304,34 @@ input label {
303.propertiesPanel .rotation .fieldRow { 304.propertiesPanel .rotation .fieldRow {
304 -webkit-box-flex:0; 305 -webkit-box-flex:0;
305 width:45px; 306 width:45px;
307}
308
309.propertiesPanel div.montage-button:disabled {
310 opacity: 0.4;
311}
312
313.propertiesPanel div.montage-button {
314 font-size: 9px;
315 cursor: pointer;
316 display: block;
317 margin: -3px 0 0 -12px;
318 padding: 4px;
319 border: 1px #313131 solid;
320 background-color: #474747;
321 background-image: -webkit-linear-gradient(top, #505050 0%, #3c3c3c 100%);
322 border-radius: 4px;
323 color: white;
324 text-transform: uppercase;
325 cursor: pointer;
326 text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
327 width: 18px;
328 height: 14px;
329}
330
331.propertiesPanel div.montage-button:active {
332 background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%);
333}
334
335.propertiesPanel div.montage-button:hover {
336 -webkit-box-shadow: 0px 0px 3px #b4b4b4;
306} \ No newline at end of file 337} \ No newline at end of file
diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html
index 3a1ae880..ac0dab5a 100755
--- a/js/panels/properties.reel/properties.html
+++ b/js/panels/properties.reel/properties.html
@@ -38,13 +38,15 @@
38 "prototype": "js/panels/properties.reel/section.reel", 38 "prototype": "js/panels/properties.reel/section.reel",
39 "properties": { 39 "properties": {
40 "element": {"#": "PosSize"}, 40 "element": {"#": "PosSize"},
41 "content" : {"@": "PosSize"}, 41 "content" : {"@": "positionSize"},
42 "name" : "Position And Size" 42 "name" : "Position And Size"
43 } 43 }
44 }, 44 },
45 "PosSize": { 45
46 "prototype": "js/panels/properties.reel/sections/position-and-size.reel[PosSize]" 46 "positionSize": {
47 "prototype": "js/panels/properties.reel/sections/position-size.reel"
47 }, 48 },
49
48 "threeDSection": { 50 "threeDSection": {
49 "prototype": "js/panels/properties.reel/section.reel", 51 "prototype": "js/panels/properties.reel/section.reel",
50 "properties": { 52 "properties": {
@@ -97,7 +99,7 @@
97 "elementName": {"@": "elementName"}, 99 "elementName": {"@": "elementName"},
98 "elementClass": {"@": "elementClass"}, 100 "elementClass": {"@": "elementClass"},
99 "elementId": {"@": "elementId"}, 101 "elementId": {"@": "elementId"},
100 "positionSize": {"@": "PosSize"}, 102 "positionSize": {"@": "positionSize"},
101 "threeD": {"@": "threeDProperties"} 103 "threeD": {"@": "threeDProperties"}
102 } 104 }
103 } 105 }
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index 8c2daa14..eb362796 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -46,7 +46,7 @@ exports.Properties = Montage.create(Component, {
46 46
47 prepareForDraw: { 47 prepareForDraw: {
48 value : function() { 48 value : function() {
49 49 this.eventManager.addEventListener("openDocument", this, false);
50 this.eventManager.addEventListener("selectionChange", this, false); 50 this.eventManager.addEventListener("selectionChange", this, false);
51 51
52 // This will be a toggle option 52 // This will be a toggle option
@@ -54,9 +54,6 @@ exports.Properties = Montage.create(Component, {
54 this.eventManager.addEventListener( "elementChanging", this, false); 54 this.eventManager.addEventListener( "elementChanging", this, false);
55 } 55 }
56 56
57 this.eventManager.addEventListener("openDocument", this, false);
58 this.eventManager.addEventListener("switchDocument", this, false);
59
60 this.elementId.element.addEventListener("blur", this, false); 57 this.elementId.element.addEventListener("blur", this, false);
61 this.elementId.element.addEventListener("focus", this, false); 58 this.elementId.element.addEventListener("focus", this, false);
62 this.elementId.element.addEventListener("keyup", this, false); 59 this.elementId.element.addEventListener("keyup", this, false);
@@ -67,32 +64,15 @@ exports.Properties = Montage.create(Component, {
67 } 64 }
68 }, 65 },
69 66
70 // Document is opened - Display the current selection
71 handleOpenDocument: { 67 handleOpenDocument: {
72 value: function() { 68 value: function() {
73
74 this.eventManager.addEventListener( "elementChange", this, false); 69 this.eventManager.addEventListener( "elementChange", this, false);
75 70
76 // For now always assume that the stage is selected by default when opening the old template 71 // Save a reference of the pi inside the document view to be able to clear
77 // TODO: Remove marker for old template: NINJA-STAGE-REWORK 72 this.application.ninja.currentDocument.model.views.design.propertiesPanel = this;
78 if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") {
79 this.displayStageProperties();
80 }
81 }
82 },
83 73
84 handleSwitchDocument: { 74 // Display the default document root PI
85 value: function(){ 75 this.displayElementProperties(this.application.ninja.currentDocument.documentRoot);
86 // For now always assume that the stage is selected by default
87 if(this.application.ninja.selectedElements.length === 0) {
88 this.displayStageProperties();
89 } else {
90 if(this.application.ninja.selectedElements.length === 1) {
91 this.displayElementProperties(this.application.ninja.selectedElements[0]);
92 } else {
93 this.displayGroupProperties(this.application.ninja.selectedElements);
94 }
95 }
96 } 76 }
97 }, 77 },
98 78
@@ -174,8 +154,7 @@ exports.Properties = Montage.create(Component, {
174 handleSelectionChange: { 154 handleSelectionChange: {
175 value: function(event) { 155 value: function(event) {
176 if(event.detail.isDocument) { 156 if(event.detail.isDocument) {
177 if(this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() === "body") return; 157 this.displayElementProperties(this.application.ninja.currentDocument.documentRoot);
178 this.displayStageProperties();
179 } else { 158 } else {
180 if(this.application.ninja.selectedElements.length === 1) { 159 if(this.application.ninja.selectedElements.length === 1) {
181 this.displayElementProperties(this.application.ninja.selectedElements[0]); 160 this.displayElementProperties(this.application.ninja.selectedElements[0]);
@@ -187,98 +166,32 @@ exports.Properties = Montage.create(Component, {
187 } 166 }
188 }, 167 },
189 168
190 displayStageProperties: { 169 clear: {
191 value: function() { 170 value: function() {
192 var stage = this.application.ninja.currentDocument.documentRoot; 171 this.elementName.value = "";
193 //this is test code please remove 172 this.elementId.value = "";
194 this.elementName.value = "Stage";
195 this.elementId.value = stage.elementModel.id;
196 this.elementClass.value = ""; 173 this.elementClass.value = "";
197 174 this.customPi = null;
198 this.positionSize.disablePosition = true;
199 this.threeD.disableTranslation = true;
200
201 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height"));
202 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width"));