From 5ab7efb9949e486395659c383064a08821febdae Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 28 Feb 2012 15:15:27 -0800 Subject: persist selections while switching documents Signed-off-by: Ananya Sen --- js/panels/properties/content.reel/content.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'js/panels/properties') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 8fa33a75..9b9b7108 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -55,6 +55,7 @@ exports.Content = Montage.create(Component, { } this.eventManager.addEventListener("openDocument", this, false); + this.eventManager.addEventListener("switchDocument", this, false); } }, @@ -74,6 +75,15 @@ exports.Content = Montage.create(Component, { } }, + handleSwitchDocument: { + value: function(){ + // For now always assume that the stage is selected by default + if(this.application.ninja.selectedElements.length === 0) { + this.displayStageProperties(); + } + } + }, + /** * Blur and Key up to handle change in the Element ID field. */ -- cgit v1.2.3 From 557c4d3100ccde51b925b71f0650b2c783a4a042 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 28 Feb 2012 16:02:15 -0800 Subject: minor fix for handling selections on switch document Signed-off-by: Ananya Sen --- js/panels/properties/content.reel/content.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/panels/properties') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 9b9b7108..cc9ec96a 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -80,6 +80,12 @@ exports.Content = Montage.create(Component, { // For now always assume that the stage is selected by default if(this.application.ninja.selectedElements.length === 0) { this.displayStageProperties(); + }else { + if(this.application.ninja.selectedElements.length === 1) { + this.displayElementProperties(this.application.ninja.selectedElements[0]._element); + } else { + this.displayGroupProperties(this.application.ninja.selectedElements); + } } } }, -- cgit v1.2.3 From 209e0781e926212bbaaad9e8ca4b61a0c389b30f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 28 Feb 2012 17:19:42 -0800 Subject: We need to remove color buttons from the color model when updating the PI for selection change. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties/content.reel/content.js | 22 ++++++++++++++++++++++ .../color-select.reel/color-select.html | 4 +++- .../custom-rows/color-select.reel/color-select.js | 21 +++++++++++++++++++++ .../properties/sections/custom.reel/custom.js | 5 +++++ 4 files changed, 51 insertions(+), 1 deletion(-) (limited to 'js/panels/properties') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 8fa33a75..58c37db4 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -156,6 +156,17 @@ exports.Content = Montage.create(Component, { this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); if(this.customPi !== stage.elementModel.pi) { + // We need to unregister color chips from the previous selection from the Color Model + var len = this.customSections.length; + for(var n = 0, controls; n < len; n++) { + controls = this.customSections[n].content.controls; + if(controls["colorSelect"]) { + controls["colorSelect"].destroy(); + } else if(controls["stageBackground"]) { + controls["stageBackground"].destroy(); + } + } + this.customPi = stage.elementModel.pi; this.displayCustomProperties(stage, stage.elementModel.pi); } @@ -221,6 +232,17 @@ exports.Content = Montage.create(Component, { // Custom Section if(this.customPi !== el.elementModel.pi) { + // We need to unregister color chips from the previous selection from the Color Model + var len = this.customSections.length; + for(var n = 0, controls; n < len; n++) { + controls = this.customSections[n].content.controls; + if(controls["colorSelect"]) { + controls["colorSelect"].destroy(); + } else if(controls["stageBackground"]) { + controls["stageBackground"].destroy(); + } + } + this.customPi = el.elementModel.pi; this.displayCustomProperties(el, el.elementModel.pi); } 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..96cc4de7 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 @@ -14,7 +14,9 @@ "properties" : { "element" : {"#": "section"}, "Stroke" : {"#": "Stroke"}, - "Fill" : {"#": "Fill"} + "Fill" : {"#": "Fill"}, + "strokeChip" : {"@": "colorChip"}, + "fillChip" : {"@": "colorChip2"} } }, 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..3e81ff67 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 @@ -17,6 +17,14 @@ exports.ColorSelect = Montage.create(Component, { value: null }, + strokeChip: { + value: null + }, + + fillChip: { + value: null + }, + handleChange: { value: function(e) { @@ -57,6 +65,19 @@ exports.ColorSelect = Montage.create(Component, { // } } + }, + + destroy: { + value: function() { + if(this.strokeChip) + { + this.strokeChip.destroy(); + } + if(this.fillChip) + { + this.fillChip.destroy(); + } + } } }); \ No newline at end of file diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js index a2b9b9fa..a537d323 100755 --- a/js/panels/properties/sections/custom.reel/custom.js +++ b/js/panels/properties/sections/custom.reel/custom.js @@ -59,6 +59,8 @@ exports.CustomSection = Montage.create(Component, { if(obj1.visible === false) tmpRow.colorVisible = obj1.visible; if(obj2.visible === false) tmpRow.color2Visible = obj2.visible; + // TODO - Hack for now to reference the color select object to unregister color chips + this.controls["colorSelect"] = tmpRow; } else { @@ -344,6 +346,9 @@ exports.CustomSection = Montage.create(Component, { this.controls[aField.id] = obj; + // TODO - Hack for now to reference the color select object to unregister color chips + this.controls["stageBackground"] = obj; + return obj; } } -- cgit v1.2.3 From 42d78d11764dca5df6c7d01f3221f398bee17152 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 1 Mar 2012 15:00:48 -0800 Subject: Squashed commit of the workspace-bugs - Panels fixes. Signed-off-by: Valerio Virgillito --- js/panels/properties/content.reel/content.css | 299 ---------------- js/panels/properties/content.reel/content.html | 161 --------- js/panels/properties/content.reel/content.js | 394 --------------------- js/panels/properties/properties-panel.js | 15 - js/panels/properties/section.reel/section.html | 50 --- js/panels/properties/section.reel/section.js | 30 -- .../color-select.reel/color-select.html | 53 --- .../custom-rows/color-select.reel/color-select.js | 83 ----- .../custom-rows/dual-row.reel/dual-row.html | 67 ---- .../sections/custom-rows/dual-row.reel/dual-row.js | 53 --- .../custom-rows/single-row.reel/single-row.html | 47 --- .../custom-rows/single-row.reel/single-row.js | 50 --- .../properties/sections/custom.reel/custom.html | 61 ---- .../properties/sections/custom.reel/custom.js | 356 ------------------- .../position-and-size.reel/position-and-size.css | 14 - .../position-and-size.reel/position-and-size.html | 142 -------- .../position-and-size.reel/position-and-size.js | 264 -------------- .../sections/three-d-view.reel/three-d-view.html | 348 ------------------ .../sections/three-d-view.reel/three-d-view.js | 265 -------------- 19 files changed, 2752 deletions(-) delete mode 100755 js/panels/properties/content.reel/content.css delete mode 100755 js/panels/properties/content.reel/content.html delete mode 100755 js/panels/properties/content.reel/content.js delete mode 100755 js/panels/properties/properties-panel.js delete mode 100755 js/panels/properties/section.reel/section.html delete mode 100755 js/panels/properties/section.reel/section.js delete mode 100755 js/panels/properties/sections/custom-rows/color-select.reel/color-select.html delete mode 100755 js/panels/properties/sections/custom-rows/color-select.reel/color-select.js delete mode 100755 js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html delete mode 100755 js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js delete mode 100755 js/panels/properties/sections/custom-rows/single-row.reel/single-row.html delete mode 100755 js/panels/properties/sections/custom-rows/single-row.reel/single-row.js delete mode 100755 js/panels/properties/sections/custom.reel/custom.html delete mode 100755 js/panels/properties/sections/custom.reel/custom.js delete mode 100755 js/panels/properties/sections/position-and-size.reel/position-and-size.css delete mode 100755 js/panels/properties/sections/position-and-size.reel/position-and-size.html delete mode 100755 js/panels/properties/sections/position-and-size.reel/position-and-size.js delete mode 100755 js/panels/properties/sections/three-d-view.reel/three-d-view.html delete mode 100755 js/panels/properties/sections/three-d-view.reel/three-d-view.js (limited to 'js/panels/properties') diff --git a/js/panels/properties/content.reel/content.css b/js/panels/properties/content.reel/content.css deleted file mode 100755 index 2537aea2..00000000 --- a/js/panels/properties/content.reel/content.css +++ /dev/null @@ -1,299 +0,0 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -.propertiesPanel { - color:#FFF; - overflow-x: hidden; -} - -.propertiesPanel .fieldCol { - display: -webkit-box; - -webkit-box-orient:horizontal; - position:relative; -} - -.propertiesPanel .fieldCol > label { - -webkit-box-flex:0; - text-align: right; - width:46px; - display:block; - padding: 4px 2px 4px 5px; - height:16px; - line-height: 16px; -} - -.propertiesPanel .fieldRow label { -padding-right:6px; - width:20px; - display: inline-block; - text-align: right; -} - - -.propertiesPanel .fieldRow { - padding: 4px 10px 4px 5px; - height:16px; - line-height: 16px; - display:block; - -webkit-box-flex:1; -} - -.propertiesPanel .fieldRow.oneCol div, .propertiesPanel .fieldRow.twoCol div,.propertiesPanel .fieldRow.threeCol div { - -webkit-box-sizing: content-box; - float:left; - -} - -.propertiesPanel hr { - border: 0; - border-top: 1px solid #3c3c3c; - border-bottom: 1px solid #555; -} - -.propertiesPanel input[type='text'] { - width:100%; - padding: 1px; -} - -.propertiesPanel .montage-textfield { - padding: 1px; -} - -.propertiesPanel .fieldRow.threeCol div input[type='text'] { - width:34px; - display: inline-block; -} - -.propertiesPanel .hottextunit input { - width:38px; -} - -.propertiesPanel .fieldRow.threeCol div .inputField { - width:34px; -} -.propertiesPanel .fieldRow.twoCol label { - width:74px; - display: inline-block; - -} - -.propertiesPanel .fieldRow.oneCol label { - width:auto; - display: inline-block; - -} - -.propertiesPanel .fieldRow.oneCol div input[type='text'] { - width:34px; - display: inline-block; -} -.propertiesPanel .fieldRow.oneCol div .inputField { - width:34px; -} - - -.propertiesPanel .fieldRow.twoCol div input[type='text'] { - width:38px; - display: inline-block; -} -.propertiesPanel .fieldRow.twoCol div .inputField { - width:38px; -} - -.propertiesPanel input[type='text'][readonly], .propertiesPanel input[type='text'][readonly]:focus { - border: none; - background: none; - -webkit-box-shadow:none; -} - -.propertiesPanel h2 { - background: #3E3E3E; - font-size:11px; - height:16px; - line-height: 17px; - display:-webkit-box; - -webkit-box-orient:horizontal; - margin: 0px; - border-bottom: 1px solid #3A3A3A; -} -.propertiesPanel .subSectionHeader .arrow { - -webkit-box-flex:0; - margin: 0px 10px; -} - -.propertiesPanel .subSectionHeader .arrowIcon { - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5I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wGwA9homKeX7mdFaw3XdA0ApdQT82zB9DwCCtIRuTJsRWAAAAABJRU5ErkJggg==") 0px 0px no-repeat; - -webkit-background-size:cover; - width:15px; - height:15px; -} - -.propertiesPanel .subSectionHeader.collapsed .arrowIcon { - -webkit-transform: rotate(-90deg); -} - -.propertiesPanel .sectional { - padding: 4px; -} - -.propertiesPanel .animated { - -webkit-transition: 0.2s all linear; -} - -.propertiesPanel div.collapsed { - padding: 0px !important; - height:0px !important; - overflow: hidden; -} - -.propertiesPanel .subSectionHeader section { - -webkit-box-flex:1; -} - -.propertiesPanel { - text-shadow: 1px 1px 1px #000; -} - -/* Dropdown layout */ -.propertiesPanel select { - -webkit-appearance: none; - font-size: 10px; - color: white; - background-color: #444; - border: 1px solid #313131; - width: 100%; - -webkit-box-sizing: border-box; - height: 15px; - outline: none; - background-image: url("../../../../images/dropdown-bg.png"); - background-repeat: no-repeat; - background-position: right center; - border-radius: 0px; - padding-left:5px; -} - -/* File Input Field */ -.propertiesPanel .file { - display:-webkit-box; -} -.propertiesPanel .file input { - -webkit-box-flex:1; - width:auto; - display: block; -} -.propertiesPanel .file .source { - border: 1px solid #313131; - background-color: #444; - color:#FFF; - height:16px; - width:20px; - -webkit-box-flex:0; - cursor: pointer; - padding: 0px; -} - -.propertiesPanel .file .source:hover { - background-color:#555; -} - -.propertiesPanel .file .source:active { - background-color: #666; -} - -/* Checkbox layout */ - -.propertiesPanel .fieldRow.checkbox div .inputField { - width:25px; -} - -.propertiesPanel .fieldRow.colorSelect { - height: 20px; -} - -.propertiesPanel .colortoolbar { - width: 105px; - float:left; -} - -.propertiesPanel .colortoolbar div { - margin: 0px 10px 0px 20px; - clear:none; -} - -/* color select */ -.propertiesPanel .colortoolbar button { - width:40px; - height:20px; - clear:none; -} - -.propertiesPanel .LockToolUp, .propertiesPanel .UnLockToolUp { - position: absolute; - left: 105px; - border: none; - background-color: transparent; - top: 2px; - opacity: 0.7; -} - -.propertiesPanel .button:active { - outline: none; -} - -.propertiesPanel .LockToolUp:hover, .propertiesPanel .UnLockToolUp:hover { - opacity: 1; -} - -.propertiesPanel input[type="checkbox"].nj-skinned, .propertiesPanel input[type="radio"].nj-skinned { - position: relative; - overflow: visible; -} - -.propertiesPanel input[type="checkbox"].nj-skinned:checked::after, .propertiesPanel input[type="radio"].nj-skinned:checked::after { - content: ""; -} - -.propertiesPanel input[type="checkbox"].nj-skinned:checked::before { - content: "✔"; -} - -.propertiesPanel input[type="radio"].nj-skinned:checked::before { - content: "•"; -} - -.propertiesPanel input.nj-skinned label { - position: absolute; - top: 0; - left: 15px; - font-size: 10px; - width:55px; - text-align: left; - font-weight: normal; - color:#FFF; -} - -.propertiesPanel input[type='radio'].nj-skinned { - text-indent: 0px; - line-height: 5px; -} - -.propertiesPanel input[type='radio'].nj-skinned label { - left:15px; -} - -input label { - -webkit-user-select: none; -} - -.propertiesPanel .rotation > label { - padding-left:40px; - padding-right:5px; -} - -.propertiesPanel .rotation .fieldRow { - -webkit-box-flex:0; - width:45px; -} \ No newline at end of file diff --git a/js/panels/properties/content.reel/content.html b/js/panels/properties/content.reel/content.html deleted file mode 100755 index ab485323..00000000 --- a/js/panels/properties/content.reel/content.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- - \ No newline at end of file diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js deleted file mode 100755 index 72c02ffd..00000000 --- a/js/panels/properties/content.reel/content.js +++ /dev/null @@ -1,394 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component, - PiData = require("js/data/pi/pi-data").PiData, - CustomSection = require("js/panels/properties/sections/custom.reel").CustomSection; - -var ElementsMediator = require("js/mediators/element-mediator").ElementMediator; - -exports.Content = Montage.create(Component, { - - elementName: { - value: null - }, - - elementID: { - value: null - }, - - elementClassName: { - value: null - }, - - customSections: { - value: [] - }, - - _customPi: { - value: null - }, - - customPi: { - get: function() { - return this._customPi; - }, - set: function(value) { - if(this._customPi !== value) { - this._customPi = value; - } - } - }, - - prepareForDraw: { - value : function() { - - this.eventManager.addEventListener("selectionChange", this, false); - - // This will be a toggle option - if(this.application.ninja.appData.PILiveUpdate) { - this.eventManager.addEventListener( "elementChanging", this, false); - } - - this.eventManager.addEventListener("openDocument", this, false); - this.eventManager.addEventListener("switchDocument", this, false); - } - }, - - // Document is opened - Display the current selection - handleOpenDocument: { - value: function() { - - this.eventManager.addEventListener( "elementChange", this, false); - - // For now always assume that the stage is selected by default - if(this.application.ninja.selectedElements.length === 0) { - this.displayStageProperties(); - } - - this.elementId.element.addEventListener("blur", this, false); - this.elementId.element.addEventListener("keyup", this, false); - } - }, - - handleSwitchDocument: { - value: function(){ - // For now always assume that the stage is selected by default - if(this.application.ninja.selectedElements.length === 0) { - this.displayStageProperties(); - }else { - if(this.application.ninja.selectedElements.length === 1) { - this.displayElementProperties(this.application.ninja.selectedElements[0]._element); - } else { - this.displayGroupProperties(this.application.ninja.selectedElements); - } - } - } - }, - - /** - * Blur and Key up to handle change in the Element ID field. - */ - handleBlur: { - value: function(event) { - if(this.application.ninja.selectedElements.length) { - ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); - } else { - ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); - } - } - }, - - handleKeyup: { - value: function(event) { - if(event.keyCode === 13) { - this.elementId.element.blur(); - } - } - }, - - handleElementChanging: { - value: function(event) { -// this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "left")); -// this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "top")); - } - }, - - handleElementChange: { - value: function(event) { -// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update - if(event.detail.source && event.detail.source !== "pi") { - // TODO - This should only update the properties that were changed. - var el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0]; - this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); - this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); - this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); - this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); - - if(this.threeD.inGlobalMode) - { - this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); - this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); - this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); - this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); - this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); - this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle"); - } - } - } - }, - - handleSelectionChange: { - value: function(event) { - if(event.detail.isDocument) { - this.displayStageProperties(); - } else { - if(this.application.ninja.selectedElements.length === 1) { - this.displayElementProperties(this.application.ninja.selectedElements[0]._element); - } else { - this.displayGroupProperties(this.application.ninja.selectedElements); - } - - } - } - }, - - displayStageProperties: { - value: function() { - var stage = this.application.ninja.currentDocument.documentRoot; - //this is test code please remove - this.elementName = "Stage"; - this.elementId.value = stage.elementModel.id; - this.elementClassName = ""; - - this.positionSize.disablePosition = true; - this.threeD.disableTranslation = true; - - this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height")); - this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); - - if(this.customPi !== stage.elementModel.pi) { - // We need to unregister color chips from the previous selection from the Color Model - var len = this.customSections.length; - for(var n = 0, controls; n < len; n++) { - controls = this.customSections[n].content.controls; - if(controls["colorSelect"]) { - controls["colorSelect"].destroy(); - } else if(controls["stageBackground"]) { - controls["stageBackground"].destroy(); - } - } - - this.customPi = stage.elementModel.pi; - this.displayCustomProperties(stage, stage.elementModel.pi); - } - - // For now hardcode the background since it is the only custom property - // No need to loop through all the properties. - var backgroundChip = this.customSections[0].content.controls["background"]; - backgroundChip.color = ElementsMediator.getProperty(stage, "background"); - - /* - var customPI = PiData[this.customPi]; - // Get all the custom section for the custom PI - for(var i = 0, customSec; customSec = customPI[i]; i++) { - - // Now set the Fields for the custom PI - for(var j = 0, fields; fields = customSec.Section[j]; j++) { - for(var k = 0, control; control = fields[k]; k++) { - - var colorChipEl = this.customSections[i].content.controls[control.id]; - this.foo = colorChipEl; - colorChipEl.addEventListener("firstDraw", this, false); - - } - } - } - */ - } - }, - - handleFirstDraw: { - value: function() { - this.foo.chipBtn.color('rgb', {wasSetByCode: true, type: 'change', color: {r: 255, g: 0, b: 0}, css: 'rgb(255,0,0)'}); - } - }, - - displayElementProperties: { - value: function (el) { - var customPI, - currentValue; - - this.elementName = el.elementModel.selection; - this.elementId.value = el.getAttribute("id") || ""; - this.elementClassName = el.getAttribute("class"); - - this.positionSize.disablePosition = false; - this.threeD.disableTranslation = false; - - this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); - this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); - this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); - this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); - - - if(this.threeD.inGlobalMode) - { - this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); - this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); - this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); - this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); - this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); - this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle"); - } - - // Custom Section - if(this.customPi !== el.elementModel.pi) { - // We need to unregister color chips from the previous selection from the Color Model - var len = this.customSections.length; - for(var n = 0, controls; n < len; n++) { - controls = this.customSections[n].content.controls; - if(controls["colorSelect"]) { - controls["colorSelect"].destroy(); - } else if(controls["stageBackground"]) { - controls["stageBackground"].destroy(); - } - } - - this.customPi = el.elementModel.pi; - this.displayCustomProperties(el, el.elementModel.pi); - } - - customPI = PiData[this.customPi]; - // Get all the custom section for the custom PI - for(var i = 0, customSec; customSec = customPI[i]; i++) { - - // Now set the Fields for the custom PI - for(var j = 0, fields; fields = customSec.Section[j]; j++) { - for(var k = 0, control; control = fields[k]; k++) { - - if(control.type !== "color") { - currentValue = ElementsMediator.getProperty(el, control.prop, control.valueMutator); - if(currentValue === null) - { - currentValue = control.defaultValue; - } - this.customSections[i].content.controls[control.id] = currentValue; - } - else - { - currentValue = ElementsMediator.getColor2(el, control.prop, control.valueMutator); - if(control.prop === "border") - { - this.application.ninja.colorController.colorModel.input = "stroke"; - } - else if(control.prop === "background") - { - this.application.ninja.colorController.colorModel.input = "fill"; - } - - if(currentValue) - { - if(currentValue.color) - { - currentValue.color.wasSetByCode = true; - currentValue.color.type = "change"; - } - - if(currentValue.mode === "gradient") - { - this.application.ninja.colorController.colorModel["gradient"] = - {value: currentValue.color, wasSetByCode: true, type: 'change'}; - } - else - { - if (currentValue.color.a !== undefined) - { - this.application.ninja.colorController.colorModel.alpha = - {value: currentValue.color.a, wasSetByCode: true, type: 'change'}; - } - if(currentValue.color.mode) - { - this.application.ninja.colorController.colorModel[currentValue.color.mode] = currentValue.color; - } - else - { - this.application.ninja.colorController.colorModel["rgb"] = currentValue.color; - } - } - } - else - { - this.application.ninja.colorController.colorModel.alpha = {value: 1, wasSetByCode: true, type: 'change'}; - this.application.ninja.colorController.colorModel.applyNoColor(); - } - } - } - } - } - } - }, - - displayGroupProperties: { - value: function (els) { - this.elementName = "Multiple Elements"; - } - }, - - displayCustomProperties: { - value: function() { - var customPI; - - this.customSections = []; - - customPI = PiData[this.customPi]; - - if(customPI) { - //Get all the custom sections for the custom PI - for(var i = 0, customSec; customSec = customPI[i]; i++) { - var customUI = CustomSection.create(); - customUI.fields = customSec.Section; - this.customSections.push({ - name: customSec.label, - content: customUI - }); - } - } - - for(var j = 0, customSections; customSections = this.customSections[j]; j++) { - customSections.content.addEventListener("propertyChange", this, false); - customSections.content.addEventListener("propertyChanging", this, false); - } - - } - }, - - handlePropertyChange: { - value: function(e) { - if(e.wasSetByCode) return; - - var newValue; - - e.units ? newValue = e.value + e.units : newValue = e.value; - - ElementsMediator.setProperty(this.application.ninja.selectedElements, e.prop, [newValue], "Change", "pi"); - - } - }, - - handlePropertyChanging: { - value: function(e) { - if(e.wasSetByCode) return; - -// ElementsMediator.setProperty(this.application.ninja.selectedElements, "border-style", [this.customSections[0].content.controls.borderStyle], "Changing", "pi"); - ElementsMediator.setProperty(this.application.ninja.selectedElements, e.prop, [e.value + "px"], "Changing", "pi"); - - - } - } - -}); diff --git a/js/panels/properties/properties-panel.js b/js/panels/properties/properties-panel.js deleted file mode 100755 index 31bc4919..00000000 --- a/js/panels/properties/properties-panel.js +++ /dev/null @@ -1,15 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var PanelBase = require("js/panels/PanelBase").PanelBase; -var Content = require("js/panels/properties/content.reel").Content; - -exports.PropertiesPanel = Montage.create(PanelBase, { - panelName : { value: "Properties" }, - minHeight : { value: 200 }, - content : { value: Content } -}); \ No newline at end of file diff --git a/js/panels/properties/section.reel/section.html b/js/panels/properties/section.reel/section.html deleted file mode 100755 index 8a331119..00000000 --- a/js/panels/properties/section.reel/section.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -
-

-
-
-

-
-
- - \ No newline at end of file diff --git a/js/panels/properties/section.reel/section.js b/js/panels/properties/section.reel/section.js deleted file mode 100755 index b246c171..00000000 --- a/js/panels/properties/section.reel/section.js +++ /dev/null @@ -1,30 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.Section = Montage.create(Component, { - - name: { - value: "Panel" - }, - - slot: { - value: null - }, - - content: { - value: null - }, - - prepareForDraw: { - value: function() { - this.element.getElementsByClassName("title")[0].innerHTML = this.name; - this.slot.content = this.content; - } - } -}); \ No newline at end of file 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 deleted file mode 100755 index 96cc4de7..00000000 --- a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -
-
-
-
-
-
-
-
- - \ No newline at end of file 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 deleted file mode 100755 index 3e81ff67..00000000 --- a/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js +++ /dev/null @@ -1,83 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.ColorSelect = Montage.create(Component, { - - Stroke: { - value: null - }, - - Fill: { - value: null - }, - - strokeChip: { - value: null - }, - - fillChip: { - value: null - }, - - handleChange: { - value: function(e) { - - } - }, - - colorVisible: { - value: true - }, - - color2Visible: { - value: true - }, - - divider: { - value: false - }, - - prepareForDraw: { - value: function() { - if (this.divider) { - this.element.appendChild(document.createElement("hr")); - } - if (!this.colorVisible) { - this.Stroke.style.display = "none"; - } - - if (!this.color2Visible) { - this.Fill.style.display = "none"; - } - -// for (var i = 0; i < this.options.length; i ++ ) { -// var tmpOption = new Option(); -// tmpOption.text = this.options[i].name; -// tmpOption.value = this.options[i].value; -// if (i === this.selectedIndex) tmpOption.selected = true -// this.options[i].name = this.element.getElementsByTagName("select")[0].add(tmpOption); -// } - - } - }, - - destroy: { - value: function() { - if(this.strokeChip) - { - this.strokeChip.destroy(); - } - if(this.fillChip) - { - this.fillChip.destroy(); - } - } - } - -}); \ No newline at end of file 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 deleted file mode 100755 index 0398ff4c..00000000 --- a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
-
-
- - \ No newline at end of file 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 deleted file mode 100755 index 72d216ca..00000000 --- a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js +++ /dev/null @@ -1,53 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.DualRow = Montage.create(Component, { - id: { - value: null - }, - - label: { - value: null - }, - - label2:{ - value: null - }, - - content: { - value: null - }, - - content2: { - value: null - }, - - eventDelegate: { - value: null - }, - - divider: { - value: false - }, - - prepareForDraw: { - value: function() { - if (this.divider) this.element.appendChild(document.createElement("hr")); - if(this.label !== null) { - this.element.getElementsByClassName("lbl")[0].innerHTML = this.label + ":"; - } - if(this.label2 !== null) { - this.element.getElementsByClassName("lbl")[1].innerHTML = this.label2 + ":"; - } else { - this.element.getElementsByClassName("lbl")[1].style.display = "none"; - } - } - } - -}); \ No newline at end of file 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 deleted file mode 100755 index 27c02380..00000000 --- a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -
-
- -
-
- -
-
-
-
- - \ No newline at end of file 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 deleted file mode 100755 index b606d6b8..00000000 --- a/js/panels/properties/sections/custom-rows/single-row.reel/single-row.js +++ /dev/null @@ -1,50 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.SingleRow = Montage.create(Component, { - id: { - value: null - }, - - label: { - value: null - }, - - content: { - value: null - }, - - eventDelegate: { - value: null - }, - - - handleChange: { - value: function(event) { - } - }, - - handleChanging: { - value: function(event) { - this.eventDelegate({"type": "changing", "id": this.id, "prop": this.prop, "text": this.label, "value": this.value}); - } - }, - - divider: { - value: false - }, - - prepareForDraw: { - value: function() { - if (this.divider) this.element.appendChild(document.createElement("hr")); - if(this.label !== null) this.element.getElementsByClassName("lbl")[0].innerHTML = this.label + ":"; - } - } - -}); \ No newline at end of file diff --git a/js/panels/properties/sections/custom.reel/custom.html b/js/panels/properties/sections/custom.reel/custom.html deleted file mode 100755 index 6d4cf0cd..00000000 --- a/js/panels/properties/sections/custom.reel/custom.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - -
-
-
-
-
- - \ No newline at end of file diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js deleted file mode 100755 index a537d323..00000000 --- a/js/panels/properties/sections/custom.reel/custom.js +++ /dev/null @@ -1,356 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; -var ElementsMediator = require("js/mediators/element-mediator").ElementMediator; - -//Custom Rows -var SingleRow = require("js/panels/properties/sections/custom-rows/single-row.reel").SingleRow; -var DualRow = require("js/panels/properties/sections/custom-rows/dual-row.reel").DualRow; -var ColorSelect = require("js/panels/properties/sections/custom-rows/color-select.reel").ColorSelect; - -// Components Needed to make this work -var Hottext = require("js/components/hottextunit.reel").HotTextUnit; -var Dropdown = require("js/components/combobox.reel").Combobox; -var TextField = require("js/components/textfield.reel").TextField; -var FileInput = require("js/components/ui/file-input.reel").FileInput; -var Checkbox = require("js/components/checkbox.reel").Checkbox; -var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; - -exports.CustomSection = Montage.create(Component, { - - repeat: { - value: null - }, - - _fields: { - - }, - - fields: { - get: function() { - return this._fields; - }, - set: function(val) { - this.controls = {}; - this.rows = []; - this._fields = val; - for(var i=0; i < this._fields.length; i++) { - var tmpRow, fields; - if(this._fields[i].len