aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color/colorpanelpopup.reel
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 16:28:39 -0700
committerJohn Mayhew2012-04-02 16:28:39 -0700
commitb4155fb4c33675a8a7cd37473513718043fdf0ba (patch)
tree3d8c802473f2395d53d599ec9d8b70b60a4db50c /js/panels/color/colorpanelpopup.reel
parent5ba9aeac94c86049423fd5d4b37b277263939c13 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-b4155fb4c33675a8a7cd37473513718043fdf0ba.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/helper-classes/RDGE/rdge-compiled.js js/helper-classes/RDGE/runtime/GLRuntime.js js/helper-classes/RDGE/src/core/script/MeshManager.js js/helper-classes/RDGE/src/core/script/engine.js js/helper-classes/RDGE/src/core/script/fx/ssao.js js/helper-classes/RDGE/src/core/script/init_state.js js/helper-classes/RDGE/src/core/script/run_state.js js/helper-classes/RDGE/src/core/script/scenegraphNodes.js js/helper-classes/RDGE/src/core/script/utilities.js js/helper-classes/RDGE/src/tools/compile-rdge-core.bat js/helper-classes/RDGE/src/tools/compile-rdge-core.sh js/helper-classes/RDGE/src/tools/rdge-compiled.js js/lib/drawing/world.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/deform-material.js js/lib/rdge/materials/flat-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/linear-gradient-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-blur-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/relief-tunnel-material.js js/lib/rdge/materials/square-tunnel-material.js js/lib/rdge/materials/star-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/tunnel-material.js js/lib/rdge/materials/twist-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/uber-material.js js/lib/rdge/materials/water-material.js js/lib/rdge/materials/z-invert-material.js js/preloader/Preloader.js
Diffstat (limited to 'js/panels/color/colorpanelpopup.reel')
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/colorpanelpopup.html68
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/colorpanelpopup.js465
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/config.rb9
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/css/colorpanelpopup.css239
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/css/colorpanelpopup.scss240
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/img/icon_bitmap.pngbin0 -> 3072 bytes
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/img/icon_colorwheel.pngbin0 -> 3420 bytes
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/img/icon_gradient.pngbin0 -> 2815 bytes
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/img/icon_nofill.pngbin0 -> 2951 bytes
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/img/knob.pngbin0 -> 1036 bytes
10 files changed, 1021 insertions, 0 deletions
diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html
new file mode 100755
index 00000000..feebb45c
--- /dev/null
+++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html
@@ -0,0 +1,68 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html lang="en">
8 <head>
9
10 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
11
12 <link rel="stylesheet" type="text/css" href="css/colorpanelpopup.css">
13
14 <script type="text/montage-serialization">
15 {
16 "owner": {
17 "module": "js/panels/Color/colorpanelpopup.reel",
18 "name": "ColorPanelPopup",
19 "properties": {
20 "element": {"#": "cpp_popup"}
21 }
22 }
23 }
24 </script>
25
26 </head>
27
28 <body>
29
30 <div id="cpp_popup" class="cpp_popup">
31 <div class="cp_pu_options">
32
33 <div class="cp_pu_history">
34
35 <button class="cp_pu_color_previous">Previous Color</button>
36 <button class="cp_pu_color_current">Current Color</button>
37
38 </div>
39
40 <div class="cp_pu_hex">#<input class="cp_pu_hottext_hex" maxlength="6" /></div>
41
42 <button class="cp_pu_wheel" title="Color Wheel">Color Wheel</button>
43 <button class="cp_pu_images" title="Background Image">Images</button>
44 <button class="cp_pu_gradients" title="Gradient">Gradients</button>
45 <button class="cp_pu_palettes" title="Color Palette">Palettes</button>
46 <button class="cp_pu_nocolor" title="No Color">No Color</button>
47
48 </div>
49
50 <div class="cp_pu_content">
51 <div class="cp_pu_wheel_container cp_pu_content_container"></div>
52 <div class="cp_pu_gradient_container cp_pu_content_container"></div>
53 <div class="cp_pu_palette_container cp_pu_content_container"></div>
54 <div class="cp_pu_image_container cp_pu_content_container"></div>
55 </div>
56
57 <div class="cp_pu_alpha">
58 <div class="cp_pu_a_label">Alpha</div>
59 <div class="cp_pu_a_slider"></div>
60 <input class="cp_pu_a_hottext"/>
61 <div class="cp_pu_a_label2">%</div>
62 </div>
63
64 </div>
65
66 </body>
67
68</html> \ No newline at end of file
diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js
new file mode 100755
index 00000000..dd7e6192
--- /dev/null
+++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js
@@ -0,0 +1,465 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7////////////////////////////////////////////////////////////////////////
8//
9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component,
11 Slider = require("js/components/slider.reel").Slider,
12 HotText = require("js/components/hottext.reel").HotText,
13 ColorWheel = require("js/components/colorwheel.reel").ColorWheel,
14 GradientPicker = require("js/components/gradientpicker.reel").GradientPicker;
15////////////////////////////////////////////////////////////////////////
16//Exporting as ColorPanelPopup
17exports.ColorPanelPopup = Montage.create(Component, {
18 ////////////////////////////////////////////////////////////////////
19 //
20 hasTemplate: {
21 value: true
22 },
23 ////////////////////////////////////////////////////////////////////
24 //Storing color manager
25 _colorManager: {
26 enumerable: false,
27 value: false
28 },
29 ////////////////////////////////////////////////////////////////////
30 //Color manager
31 colorManager: {
32 enumerable: true,
33 get: function() {
34 return this._colorManager;
35 },
36 set: function(value) {
37 if (value !== this._colorManager) {
38 this._colorManager = value;
39 }
40 }
41 },
42 ////////////////////////////////////////////////////////////////////
43 //Storing color panel
44 _colorPanel: {
45 enumerable: false,
46 value: false
47 },
48 ////////////////////////////////////////////////////////////////////
49 //Color panel
50 colorPanel: {
51 enumerable: true,
52 get: function() {
53 return this._colorPanel;
54 },
55 set: function(value) {
56 this._colorPanel = value;
57 }
58 },
59 ////////////////////////////////////////////////////////////////////
60 //
61 setNoColor: {
62 enumerable: true,
63 value: function (e) {
64 this.colorManager.applyNoColor();
65 }
66 },
67 ////////////////////////////////////////////////////////////////////
68 //
69 prepareForDraw: {
70 enumerable: false,
71 value: function () {
72 //
73 this.element._popups = {containers: {wheel: null, palette: null, gradient: null, image: null}};
74 this.element._components = {wheel: null, combo: null};
75 //Storing containers for reference
76 this.element._popups.containers.wheel = this.element.getElementsByClassName('cp_pu_wheel_container')[0];
77 this.element._popups.containers.palette = this.element.getElementsByClassName('cp_pu_palette_container')[0];
78 this.element._popups.containers.gradient = this.element.getElementsByClassName('cp_pu_gradient_container')[0];
79 this.element._popups.containers.image = this.element.getElementsByClassName('cp_pu_image_container')[0];
80 this.element._popups.containers.alpha = this.element.getElementsByClassName('cp_pu_alpha')[0];
81 }
82 },
83 ////////////////////////////////////////////////////////////////////
84 //
85 willDraw: {
86 enumerable: false,
87 value: function() {
88 //
89 this.element.style.opacity = 0;
90 //
91 this.element._components.combo = {};
92 this.element._components.combo.slider = Slider.create();
93 this.element._components.combo.hottext = HotText.create();
94 this.element._components.combo.slider.element = this.element.getElementsByClassName('cp_pu_a_slider')[0];
95 this.element._components.combo.hottext.element = this.element.getElementsByClassName('cp_pu_a_hottext')[0];
96 //
97 Object.defineBinding(this.element._components.combo.hottext, "_value", {
98 boundObject: this.element._components.combo.slider,
99 boundObjectPropertyPath: "value",
100 oneway: false,
101 boundValueMutator: function(value) {
102 return Math.round(value);
103 }
104 });
105 //
106 Object.defineBinding(this.element._components.combo.hottext, "value", {
107 boundObject: this.element._components.combo.slider,
108 boundObjectPropertyPath: "value",
109 oneway: false,
110 boundValueMutator: function(value) {
111 return Math.round(value);
112 }
113 });
114 if (this.application.ninja.colorController.colorView) {
115 Object.defineBinding(this.element._components.combo.slider, "value", {