From 451cdd792046eca1d57dd205940e5b638f8a08ac Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Tue, 13 Mar 2012 15:19:35 -0700
Subject: Renaming folder
---
.../color/colortoolbar.reel/colortoolbar.html | 54 ++++++++
js/panels/color/colortoolbar.reel/colortoolbar.js | 138 +++++++++++++++++++++
js/panels/color/colortoolbar.reel/config.rb | 9 ++
.../color/colortoolbar.reel/css/colortoolbar.css | 45 +++++++
.../color/colortoolbar.reel/css/colortoolbar.scss | 52 ++++++++
5 files changed, 298 insertions(+)
create mode 100755 js/panels/color/colortoolbar.reel/colortoolbar.html
create mode 100755 js/panels/color/colortoolbar.reel/colortoolbar.js
create mode 100755 js/panels/color/colortoolbar.reel/config.rb
create mode 100755 js/panels/color/colortoolbar.reel/css/colortoolbar.css
create mode 100755 js/panels/color/colortoolbar.reel/css/colortoolbar.scss
(limited to 'js/panels/color/colortoolbar.reel')
diff --git a/js/panels/color/colortoolbar.reel/colortoolbar.html b/js/panels/color/colortoolbar.reel/colortoolbar.html
new file mode 100755
index 00000000..9ab54836
--- /dev/null
+++ b/js/panels/color/colortoolbar.reel/colortoolbar.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/panels/color/colortoolbar.reel/colortoolbar.js b/js/panels/color/colortoolbar.reel/colortoolbar.js
new file mode 100755
index 00000000..6b8e476b
--- /dev/null
+++ b/js/panels/color/colortoolbar.reel/colortoolbar.js
@@ -0,0 +1,138 @@
+/*
+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;
+////////////////////////////////////////////////////////////////////////
+//
+exports.ColorToolbar = Montage.create(Component, {
+ ////////////////////////////////////////////////////////////////////
+ //
+ hasTemplate: {
+ value: true
+ },
+ ////////////////////////////////////////////////////////////////////
+ //Storing stroke (stores color in mode use to select color)
+ _stroke: {
+ enumerable: false,
+ value: {colorMode: 'rgb', color: {r: 0, g: 0, b: 0, a: 1, css: 'rgb(0,0,0)', mode:'rgb', wasSetByCode: true, type: 'change'}, webGlColor: [0, 0, 0, 1]}
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ stroke: {
+ enumerable: true,
+ get: function() {
+ return this._stroke;
+ },
+ set: function(value) {
+ if (value !== this._stroke) {
+ this._stroke = value;
+ }
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //Storing fill (stores color in mode use to select color)
+ _fill: {
+ enumerable: false,
+ value: {colorMode: 'rgb', color: {r: 255, g: 255, b: 255, a: 1, css: 'rgb(255,255,255)', mode:'rgb', wasSetByCode: true, type: 'change'}, webGlColor: [1, 1, 1, 1]}
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ fill: {
+ enumerable: true,
+ get: function() {
+ return this._fill;
+ },
+ set: function(value) {
+ if (value !== this._fill) {
+ this._fill = value;
+ }
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ prepareForDraw: {
+ enumerable: false,
+ value: function () {
+ //
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ willDraw: {
+ enumerable: false,
+ value: function() {
+ //
+ var buttons = this.element.getElementsByTagName('button');
+ //
+ this.fill_btn = buttons [1];
+ this.stroke_btn = buttons[0];
+ //
+ this.fill_btn.props = {side: 'left', align: 'top', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: 20};
+ this.stroke_btn.props = {side: 'left', align: 'top', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: 20};
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ draw: {
+ enumerable: false,
+ value: function() {
+ //
+ this.application.ninja.colorController.addButton('chip', this.fill_btn);
+ this.application.ninja.colorController.addButton('chip', this.stroke_btn);
+ //
+ this.fill_btn.color('rgb', {wasSetByCode: true, type: 'change', color: {r: 255, g: 255, b: 255}, css: 'rgb(255,255,255)'});
+ this.stroke_btn.color('rgb', {wasSetByCode: true, type: 'change', color: {r: 0, g: 0, b: 0}, css: 'rgb(0,0,0)'});
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ didDraw: {
+ enumerable: false,
+ value: function() {
+
+ this.fill_btn.addEventListener('change', function (e) {
+ this.fill = e._event;
+ this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color);
+ this.application.ninja.colorController.colorModel.input = 'fill';
+
+ var color = e._event.color;
+ if (e._event.colorMode !== 'nocolor' && color) {
+ color.wasSetByCode = false;
+ color.type = 'change';
+ color.mode = e._event.colorMode;
+ this.application.ninja.colorController.colorModel[e._event.colorMode] = color;
+ } else {
+ this.application.ninja.colorController.colorModel.applyNoColor();
+ }
+ this.application.ninja.colorController.colorModel.input = 'chip';
+ }.bind(this));
+
+ this.stroke_btn.addEventListener('change', function (e) {
+ this.stroke = e._event;
+ this.stroke.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color);
+ this.application.ninja.colorController.colorModel.input = 'stroke';
+
+ var color = e._event.color;
+ if (e._event.colorMode !== 'nocolor' && color) {
+ color.wasSetByCode = false;
+ color.type = 'change';
+ color.mode = e._event.colorMode;
+ this.application.ninja.colorController.colorModel[e._event.colorMode] = color;
+ } else {
+ this.application.ninja.colorController.colorModel.applyNoColor();
+ }
+ this.application.ninja.colorController.colorModel.input = 'chip';
+ }.bind(this));
+ }
+ }
+ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+});
+////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
\ No newline at end of file
diff --git a/js/panels/color/colortoolbar.reel/config.rb b/js/panels/color/colortoolbar.reel/config.rb
new file mode 100755
index 00000000..9b55af19
--- /dev/null
+++ b/js/panels/color/colortoolbar.reel/config.rb
@@ -0,0 +1,9 @@
+# Require any additional compass plugins here.
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = "css"
+sass_dir = "css"
+images_dir = "img"
+javascripts_dir = "../"
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
diff --git a/js/panels/color/colortoolbar.reel/css/colortoolbar.css b/js/panels/color/colortoolbar.reel/css/colortoolbar.css
new file mode 100755
index 00000000..759ef4f8
--- /dev/null
+++ b/js/panels/color/colortoolbar.reel/css/colortoolbar.css
@@ -0,0 +1,45 @@
+@charset "UTF-8";
+/*
+
+ 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.
+
+*/
+/* line 17, colortoolbar.scss */
+.colortoolbar button {
+ float: left;
+ clear: both;
+ width: 27px;
+ height: 27px;
+ background: black;
+ border: 1px solid #000;
+ padding: 0;
+ margin: 0px;
+}
+
+/* line 29, colortoolbar.scss */
+.colortoolbar div {
+ float: left;
+ clear: both;
+ width: 27px;
+ height: 27px;
+ margin: 6px 10px 1px 9px;
+ background: url(../../../../../images/colorpanel/transparent.png) repeat;
+}
+
+/* line 39, colortoolbar.scss */
+.colortoolbar div.cpe_colortoolbar_container {
+ margin: 0px 0px 4px 7px;
+}
+
+/* line 44, colortoolbar.scss */
+.toolbar_hr {
+ height: 1px;
+ border: none;
+ background-color: #565656;
+ border-top: 1px solid #3E3E3E;
+ margin: 8px 6px 0px 4px;
+ width: 32px;
+ display: block;
+}
diff --git a/js/panels/color/colortoolbar.reel/css/colortoolbar.scss b/js/panels/color/colortoolbar.reel/css/colortoolbar.scss
new file mode 100755
index 00000000..79fb37b6
--- /dev/null
+++ b/js/panels/color/colortoolbar.reel/css/colortoolbar.scss
@@ -0,0 +1,52 @@
+@charset "UTF-8";
+
+/*
+
+ 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.
+
+*/
+
+.colortoolbar
+{
+
+}
+
+.colortoolbar button
+{
+ float: left;
+ clear: both;
+ width: 27px;
+ height: 27px;
+ background: black;
+ border: 1px solid #000;
+ padding: 0;
+ margin: 0px;
+}
+
+.colortoolbar div
+{
+ float: left;
+ clear: both;
+ width: 27px;
+ height: 27px;
+ margin: 6px 10px 1px 9px;
+ background: url(../../../../../images/colorpanel/transparent.png) repeat;
+}
+
+.colortoolbar div.cpe_colortoolbar_container
+{
+ margin: 0px 0px 4px 7px;
+}
+
+.toolbar_hr
+{
+ height: 1px;
+ border: none;
+ background-color: #565656;
+ border-top: 1px solid #3E3E3E;
+ margin: 8px 6px 0px 4px;
+ width: 32px;
+ display: block;
+}
--
cgit v1.2.3