From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- .../color-select.reel/color-select.html | 51 ++++++++++++++++++ .../custom-rows/color-select.reel/color-select.js | 62 ++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 js/panels/properties/sections/custom-rows/color-select.reel/color-select.html create mode 100644 js/panels/properties/sections/custom-rows/color-select.reel/color-select.js (limited to 'js/panels/properties/sections/custom-rows/color-select.reel') 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 new file mode 100644 index 00000000..9c2588b9 --- /dev/null +++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.html @@ -0,0 +1,51 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + \ 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 new file mode 100644 index 00000000..60f8efef --- /dev/null +++ b/js/panels/properties/sections/custom-rows/color-select.reel/color-select.js @@ -0,0 +1,62 @@ +/* +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 + }, + + 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); +// } + + } + } + +}); \ No newline at end of file -- cgit v1.2.3