From 5d7e470351fd150d5e70a97332fa2f2553797499 Mon Sep 17 00:00:00 2001
From: Armen Kesablyan
Date: Mon, 7 May 2012 11:09:45 -0700
Subject: Initial Setup of the binding Tool

Signed-off-by: Armen Kesablyan <armen@motorola.com>
---
 .../binding-properties.reel/binding-properties.css |  6 ++++
 .../binding-properties.html                        | 35 ++++++++++++++++++++++
 .../binding-properties.reel/binding-properties.js  | 25 ++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.css
 create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.html
 create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.js

(limited to 'js/components/tools-properties')

diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.css b/js/components/tools-properties/binding-properties.reel/binding-properties.css
new file mode 100755
index 00000000..7f1b0f7f
--- /dev/null
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.css
@@ -0,0 +1,6 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.html b/js/components/tools-properties/binding-properties.reel/binding-properties.html
new file mode 100755
index 00000000..5a55d0a4
--- /dev/null
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<!-- <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> -->
+<html>
+    <head>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <link rel="stylesheet" type="text/css" href="binding-properties.css">
+
+        <script type="text/montage-serialization">
+        {
+
+            "owner": {
+                "prototype": "js/components/tools-properties/binding-properties.reel",
+                "properties": {
+                    "element": {"#": "bindingProperties"}
+                }
+            }
+    	}
+	    </script>
+      
+    </head>
+
+    <body>
+        <div id="bindingProperties" class="subToolHolderPanel">
+            <label>View All Bindings</label>
+            <input type="checkbox" />
+        </div>
+    </body>
+
+</html>
+
+        
\ No newline at end of file
diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.js b/js/components/tools-properties/binding-properties.reel/binding-properties.js
new file mode 100755
index 00000000..8d30d855
--- /dev/null
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.js
@@ -0,0 +1,25 @@
+/* <copyright>
+This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+(c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+</copyright> */
+
+var Montage = require("montage/core/core").Montage;
+var Component = require("montage/ui/component").Component;
+var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
+
+exports.BindingProperties = Montage.create(ToolProperties, {
+
+    _subPrepare: {
+        value: function() {
+
+        }
+    },
+
+    handleClick: {
+        value: function(event) {
+
+        }
+    }
+
+});
\ No newline at end of file
-- 
cgit v1.2.3


From 9fc3b70bf57e10846e71808c6041fbc339a435d1 Mon Sep 17 00:00:00 2001
From: Armen Kesablyan
Date: Mon, 14 May 2012 11:43:40 -0700
Subject: Changes

Signed-off-by: Armen Kesablyan <armen@motorola.com>
---
 .../binding-properties.reel/binding-properties.css            | 11 +++++++++++
 .../binding-properties.reel/binding-properties.html           |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

(limited to 'js/components/tools-properties')

diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.css b/js/components/tools-properties/binding-properties.reel/binding-properties.css
index 7f1b0f7f..19d2b6c6 100755
--- a/js/components/tools-properties/binding-properties.reel/binding-properties.css
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.css
@@ -4,3 +4,14 @@
  (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
  </copyright> */
 
+.bindingSubTools {
+    padding:9px;
+    font-size:12px;
+}
+
+.bindingSubTools label {
+
+}
+.bindingSubTools input[type=checkbox] {
+    margin: 0px 3px;
+}
\ No newline at end of file
diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.html b/js/components/tools-properties/binding-properties.reel/binding-properties.html
index 5a55d0a4..cd0e0a50 100755
--- a/js/components/tools-properties/binding-properties.reel/binding-properties.html
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.html
@@ -24,9 +24,9 @@
     </head>
 
     <body>
-        <div id="bindingProperties" class="subToolHolderPanel">
+        <div id="bindingProperties" class="subToolHolderPanel bindingSubTools">
+            <input class="nj-skinned" type="checkbox" />
             <label>View All Bindings</label>
-            <input type="checkbox" />
         </div>
     </body>
 
-- 
cgit v1.2.3


From 7d3bdf39e6d1534de1848ca2744aed66dfeb5d2a Mon Sep 17 00:00:00 2001
From: Armen Kesablyan
Date: Tue, 5 Jun 2012 23:13:03 -0700
Subject: Initial Text Tool Changes

Signed-off-by: Armen Kesablyan <armen@motorola.com>
---
 .../text-properties.reel/text-properties.html      |   9 +-
 .../text-properties.reel/text-properties.js        | 154 +++++++++------------
 2 files changed, 65 insertions(+), 98 deletions(-)

(limited to 'js/components/tools-properties')

diff --git a/js/components/tools-properties/text-properties.reel/text-properties.html b/js/components/tools-properties/text-properties.reel/text-properties.html
index 725e1d22..a3477e99 100755
--- a/js/components/tools-properties/text-properties.reel/text-properties.html
+++ b/js/components/tools-properties/text-properties.reel/text-properties.html
@@ -93,14 +93,9 @@
                     "identifier": "btnBold",
                     "pressedLabel": "B",
                     "unpressedLabel": "B"
-                },
-                "listeners": [
-                    {
-                        "type": "action",
-                        "listener": {"@": "owner"}
-                    }
-                ]
+                }
             },
+
             "btnItalic": {
                 "prototype": "montage/ui/toggle-button.reel",
                 "properties": {
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js
index fa2ec066..35d46cc7 100755
--- a/js/components/tools-properties/text-properties.reel/text-properties.js
+++ b/js/components/tools-properties/text-properties.reel/text-properties.js
@@ -72,7 +72,7 @@ exports.TextProperties = Montage.create(ToolProperties, {
 
     handleEditorSelect: {
         value: function(e) {
-            this.application.ninja.stage.textTool.updateStates();
+            //this.application.ninja.stage.textTool.updateStates();
 //            this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname;
 //
 //            for( var i = 0; i < this.fontSize.items.length; i++) {
@@ -96,30 +96,6 @@ exports.TextProperties = Montage.create(ToolProperties, {
 
         }
     },
-
-    handleBtnBoldAction: {
-        value: function(e) {
-            this.application.ninja.stage.textTool.doAction("bold");
-        }
-    },
-
-    handleBtnItalicAction: {
-        value: function(e) {
-            this.application.ninja.stage.textTool.doAction("italic");
-        }
-    },
-
-    handleBtnUnderlineAction: {
-        value: function(e) {
-            this.application.ninja.stage.textTool.doAction("underline");
-        }
-    },
-
-    handleBtnStrikethroughAction: {
-        value: function(e) {
-            this.application.ninja.stage.textTool.doAction("strikethrough");
-        }
-    },
     
     handleAlignLeftAction: {
         value: function(e) {
@@ -211,87 +187,83 @@ exports.TextProperties = Montage.create(ToolProperties, {
 
                 Object.defineBinding(this.btnBold, "pressed", {
                   boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.bold",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
+                  boundObjectPropertyPath: "bold",
+                  oneway: false
                 });
 
                 Object.defineBinding(this.btnItalic, "pressed", {
                   boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.italic",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
+                  boundObjectPropertyPath: "italic",
+                  oneway: false
                 });
 
                 Object.defineBinding(this.btnUnderline, "pressed", {
                   boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.underline",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
+                  boundObjectPropertyPath: "underline",
+                  oneway: false
                 });
 
                 Object.defineBinding(this.btnStrikethrough, "pressed", {
                   boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.strikethrough",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
+                  boundObjectPropertyPath: "strikeThrough",
+                  oneway: false
                 });
 
                 Object.defineBinding(this.alignLeft, "pressed", {
                   boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.justifyleft",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.alignCenter, "pressed", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.justifycenter",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.alignRight, "pressed", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.justifyright",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.alignJustify, "pressed", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.justifyfull",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.numberedList, "pressed", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.insertorderedlist",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.bulletedList, "pressed", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.insertunorderedlist",
-                  boundValueMutator: this.validatePressed,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.fontSelection, "value", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.fontname",
-                  boundValueMutator: this.validateFont,
-                  oneway: true
-                });
-
-                Object.defineBinding(this.fontSize, "value", {
-                  boundObject: this.application.ninja.stage.textTool,
-                  boundObjectPropertyPath: "states.fontsize",
-                  boundValueMutator: this.validateFontSize.bind(this),
-                  oneway: true
+                  boundObjectPropertyPath: "justify",
+                  boundValueMutator: this.validateJustify,
+                  oneway: false
                 });
+//
+//                Object.defineBinding(this.alignCenter, "pressed", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "justifycenter",
+//                  boundValueMutator: this.validatePressed,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.alignRight, "pressed", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "justifyright",
+//                  boundValueMutator: this.validatePressed,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.alignJustify, "pressed", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "justifyfull",
+//                  boundValueMutator: this.validatePressed,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.numberedList, "pressed", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "insertorderedlist",
+//                  boundValueMutator: this.validatePressed,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.bulletedList, "pressed", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "insertunorderedlist",
+//                  boundValueMutator: this.validatePressed,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.fontSelection, "value", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "fontname",
+//                  boundValueMutator: this.validateFont,
+//                  oneway: true
+//                });
+//
+//                Object.defineBinding(this.fontSize, "value", {
+//                  boundObject: this.application.ninja.stage.textTool,
+//                  boundObjectPropertyPath: "states.fontsize",
+//                  boundValueMutator: this.validateFontSize.bind(this),
+//                  oneway: true
+//                });
 
                 this.initialized = true;
             }
@@ -331,8 +303,8 @@ exports.TextProperties = Montage.create(ToolProperties, {
 
     handleFontColorChange: {
         value: function(e) {
-            this.application.ninja.stage.textTool.element.firstChild.style.color = e._event.color.css;
-            this.application.ninja.stage.textTool.element.firstChild.focus();
+            this.application.ninja.stage.textTool.element.style.color = e._event.color.css;
+            this.application.ninja.stage.textTool.element.focus();
             //this.application.ninja.stage.textTool.doAction("forecolor",e._event.color.css);
 
         }
-- 
cgit v1.2.3


From 23aec4144f9d4352ba6d10367288f51d57ba990f Mon Sep 17 00:00:00 2001
From: Armen Kesablyan
Date: Sat, 23 Jun 2012 13:44:49 -0700
Subject: Text Tool Fix - Can Not Switch Document when Text Tool Initialized

Signed-off-by: Armen Kesablyan <armen@motorola.com>
---
 .../tools-properties/text-properties.reel/text-properties.js      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'js/components/tools-properties')

diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js
index 72a6f034..c5729e98 100755
--- a/js/components/tools-properties/text-properties.reel/text-properties.js
+++ b/js/components/tools-properties/text-properties.reel/text-properties.js
@@ -296,14 +296,18 @@ exports.TextProperties = Montage.create(ToolProperties, {
 
     handleFontSelectionChange: {
         value: function(e) {
-            this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value);
             this.application.ninja.stage.textTool.element.focus();
+            this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value);
+
+            //Note: Set Font Color on selection to ColorChip Component;
+            //this.this.application.ninja.stage.textTool.foreColor
+
         }
     },
 
     handleFontColorChange: {
         value: function(e) {
-            this.application.ninja.stage.textTool.element.style.color = e._event.color.css;
+            this.application.ninja.stage.textTool.foreColor = e._event.color.css;
             this.application.ninja.stage.textTool.element.focus();
             //this.application.ninja.stage.textTool.doAction("forecolor",e._event.color.css);
 
-- 
cgit v1.2.3