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 --- .../custom-rows/color-select.reel/color-select.js | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js (limited to 'js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js') diff --git a/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js new file mode 100755 index 00000000..3e81ff67 --- /dev/null +++ b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js @@ -0,0 +1,83 @@ +/* +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 -- cgit v1.2.3