aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-27 09:59:01 -0700
committerJose Antonio Marquez2012-06-27 09:59:01 -0700
commitca1e79d4dc36a55c47b6f8cb92069eafc95383b5 (patch)
tree2bf23250a605ca42a33f7bc75698357e0258d624 /js/components/tools-properties
parent245e70117f9605dc5603328c97685b2e5a10f220 (diff)
parent2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff)
downloadninja-ca1e79d4dc36a55c47b6f8cb92069eafc95383b5.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/components/tools-properties')
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.css17
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.html35
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.js25
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.html9
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.js160
5 files changed, 147 insertions, 99 deletions
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..19d2b6c6
--- /dev/null
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.css
@@ -0,0 +1,17 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No 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.bindingSubTools {
8 padding:9px;
9 font-size:12px;
10}
11
12.bindingSubTools label {
13
14}
15.bindingSubTools input[type=checkbox] {
16 margin: 0px 3px;
17} \ 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
new file mode 100755
index 00000000..cd0e0a50
--- /dev/null
+++ b/js/components/tools-properties/binding-properties.reel/binding-properties.html
@@ -0,0 +1,35 @@
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>
8 <head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="binding-properties.css">
11
12 <script type="text/montage-serialization">
13 {
14
15 "owner": {
16 "prototype": "js/components/tools-properties/binding-properties.reel",
17 "properties": {
18 "element": {"#": "bindingProperties"}
19 }
20 }
21 }
22 </script>
23
24 </head>
25
26 <body>
27 <div id="bindingProperties" class="subToolHolderPanel bindingSubTools">
28 <input class="nj-skinned" type="checkbox" />
29 <label>View All Bindings</label>
30 </div>
31 </body>
32
33</html>
34
35 \ 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 @@
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
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10
11exports.BindingProperties = Montage.create(ToolProperties, {
12
13 _subPrepare: {
14 value: function() {
15
16 }
17 },
18
19 handleClick: {
20 value: function(event) {
21
22 }
23 }
24
25}); \ No newline at end of file
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 f47ca0c8..8899ff3c 100755
--- a/js/components/tools-properties/text-properties.reel/text-properties.html
+++ b/js/components/tools-properties/text-properties.reel/text-properties.html
@@ -92,14 +92,9 @@
92 "identifier": "btnBold", 92 "identifier": "btnBold",
93 "pressedLabel": "B", 93 "pressedLabel": "B",
94 "unpressedLabel": "B" 94 "unpressedLabel": "B"
95 }, 95 }
96 "listeners": [
97 {
98 "type": "action",
99 "listener": {"@": "owner"}
100 }
101 ]
102 }, 96 },
97
103 "btnItalic": { 98 "btnItalic": {
104 "prototype": "montage/ui/toggle-button.reel", 99 "prototype": "montage/ui/toggle-button.reel",
105 "properties": { 100 "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 7fe5537c..c5729e98 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, {
72 72
73 handleEditorSelect: { 73 handleEditorSelect: {
74 value: function(e) { 74 value: function(e) {
75 this.application.ninja.stage.textTool.updateStates(); 75 //this.application.ninja.stage.textTool.updateStates();
76// this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname; 76// this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname;
77// 77//
78// for( var i = 0; i < this.fontSize.items.length; i++) { 78// for( var i = 0; i < this.fontSize.items.length; i++) {
@@ -96,30 +96,6 @@ exports.TextProperties = Montage.create(ToolProperties, {
96 96
97 } 97 }
98 }, 98 },
99
100 handleBtnBoldAction: {
101 value: function(e) {
102 this.application.ninja.stage.textTool.doAction("bold");
103 }
104 },
105
106 handleBtnItalicAction: {
107 value: function(e) {
108 this.application.ninja.stage.textTool.doAction("italic");
109 }
110 },
111
112 handleBtnUnderlineAction: {
113 value: function(e) {
114 this.application.ninja.stage.textTool.doAction("underline");
115 }
116 },
117
118 handleBtnStrikethroughAction: {
119 value: function(e) {
120 this.application.ninja.stage.textTool.doAction("strikethrough");
121 }
122 },
123 99
124 handleAlignLeftAction: { 100 handleAlignLeftAction: {
125 value: function(e) { 101 value: function(e) {
@@ -211,87 +187,83 @@ exports.TextProperties = Montage.create(ToolProperties, {
211 187
212 Object.defineBinding(this.btnBold, "pressed", { 188 Object.defineBinding(this.btnBold, "pressed", {
213 boundObject: this.application.ninja.stage.textTool, 189 boundObject: this.application.ninja.stage.textTool,
214 boundObjectPropertyPath: "states.bold", 190 boundObjectPropertyPath: "bold",
215 boundValueMutator: this.validatePressed, 191 oneway: false
216 oneway: true
217 }); 192 });
218 193
219 Object.defineBinding(this.btnItalic, "pressed", { 194 Object.defineBinding(this.btnItalic, "pressed", {
220 boundObject: this.application.ninja.stage.textTool, 195 boundObject: this.application.ninja.stage.textTool,
221 boundObjectPropertyPath: "states.italic", 196 boundObjectPropertyPath: "italic",
222 boundValueMutator: this.validatePressed, 197 oneway: false
223 oneway: true
224 }); 198 });
225 199
226 Object.defineBinding(this.btnUnderline, "pressed", { 200 Object.defineBinding(this.btnUnderline, "pressed", {
227 boundObject: this.application.ninja.stage.textTool, 201 boundObject: this.application.ninja.stage.textTool,
228 boundObjectPropertyPath: "states.underline", 202 boundObjectPropertyPath: "underline",
229 boundValueMutator: this.validatePressed, 203 oneway: false
230 oneway: true
231 }); 204 });
232 205
233 Object.defineBinding(this.btnStrikethrough, "pressed", { 206 Object.defineBinding(this.btnStrikethrough, "pressed", {
234 boundObject: this.application.ninja.stage.textTool, 207 boundObject: this.application.ninja.stage.textTool,