diff options
author | Eric Guzman | 2012-06-27 10:32:47 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-27 10:32:47 -0700 |
commit | 58f1de4f1cb0f59abd47cec4430a032c073f85e9 (patch) | |
tree | a6c2af9be68e6881311074bd3c8cc461deee7203 /js/components/tools-properties | |
parent | a72b6809e214eb524f866440a55f8366f078c240 (diff) | |
parent | 2ebf3e3ea24d0d580575dfa13d31588dac1de445 (diff) | |
download | ninja-58f1de4f1cb0f59abd47cec4430a032c073f85e9.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into CSSPanel_GIO
Diffstat (limited to 'js/components/tools-properties')
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> | ||
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 | var Montage = require("montage/core/core").Montage; | ||
8 | var Component = require("montage/ui/component").Component; | ||
9 | var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; | ||
10 | |||
11 | exports.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, |
235 | boundObjectPropertyPath: "states.strikethrough", | 208 | boundObjectPropertyPath: "strikeThrough", |