diff options
author | Pierre Frisch | 2011-12-22 07:25:50 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-01-27 11:18:17 -0800 |
commit | b89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch) | |
tree | 0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/components/tools-properties/tag-properties.reel | |
parent | 2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff) | |
download | ninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz |
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/components/tools-properties/tag-properties.reel')
3 files changed, 149 insertions, 0 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.css b/js/components/tools-properties/tag-properties.reel/tag-properties.css new file mode 100644 index 00000000..7f1b0f7f --- /dev/null +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.css | |||
@@ -0,0 +1,6 @@ | |||
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 | |||
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html new file mode 100644 index 00000000..c7588b9e --- /dev/null +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html | |||
@@ -0,0 +1,86 @@ | |||
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="tag-properties.css"> | ||
11 | |||
12 | <script type="text/montage-serialization"> | ||
13 | { | ||
14 | |||
15 | "owner": { | ||
16 | "module": "js/components/tools-properties/tag-properties.reel", | ||
17 | "name": "TagProperties", | ||
18 | "properties": { | ||
19 | "element": {"#": "tagProperties"}, | ||
20 | |||
21 | "divElement": {"#": "divTool"}, | ||
22 | "imageElement": {"#": "imageTool"}, | ||
23 | "videoElement": {"#": "videoTool"}, | ||
24 | "canvasElement": {"#": "canvasTool"}, | ||
25 | "customElement": {"#": "customTool"}, | ||
26 | |||
27 | "classField": {"#": "className"}, | ||
28 | |||
29 | "customName": {"#": "customTagCB"}, | ||
30 | "customLabel": {"#": "customContainer"} | ||
31 | } | ||
32 | } | ||
33 | } | ||
34 | </script> | ||
35 | |||
36 | </head> | ||
37 | |||
38 | <body> | ||
39 | <div id="tagProperties" class="subToolHolderPanel"> | ||
40 | <div id="tagToolContainer" class="tagRadioButtons"> | ||
41 | <input type="radio" id="divTool" class="tag-type" title="Div Element" name="TagRadios" checked/> | ||
42 | <input type="radio" id="imageTool" class="tag-type" title="Image Element" name="TagRadios"/> | ||
43 | <input type="radio" id="videoTool" class="tag-type" title="Video Element" name="TagRadios"/> | ||
44 | <input type="radio" id="canvasTool" class="tag-type" title="Canvas Element" name="TagRadios"/> | ||
45 | <input type="radio" id="customTool" class="tag-type" title="Custom Element" name="TagRadios"/> | ||
46 | |||
47 | <div class="nj-divider divider-vertical"> </div> | ||
48 | |||
49 | <div id="classNameContainer" class="leftLabel"> | ||
50 | <label class="label"> Class: | ||
51 | <input id="className" type="text" name="ClassNameTextBox" class="textBox nj-skinned"> | ||
52 | </label> | ||
53 | </div> | ||
54 | |||
55 | <div id="customContainer" class="leftLabel" style="padding-top: 3px;"> | ||
56 | <label class="label"> Tag Name:</label> | ||
57 | |||
58 | <select id="customTagCB" class="nj-skinned"> | ||
59 | <option>Article</option> | ||
60 | <option>Aside</option> | ||
61 | <option>Section</option> | ||
62 | </select> | ||
63 | </div> | ||
64 | |||
65 | |||
66 | |||
67 | <div id="positionContainer" class="leftLabel" style="padding-top: 3px;"> | ||
68 | <label class="label"> Position:</label> | ||
69 | |||
70 | <select id="positionCB" class="nj-skinned"> | ||
71 | <option>Absolute</option> | ||
72 | <option>Relative</option> | ||
73 | <option>Fixed</option> | ||
74 | <option>Static</option> | ||
75 | <option>Inherit</option> | ||
76 | </select> | ||
77 | |||
78 | </div> | ||
79 | |||
80 | |||
81 | </div> | ||
82 | </div> | ||
83 | </body> | ||
84 | |||
85 | </html> | ||
86 | |||
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js new file mode 100644 index 00000000..1caabc35 --- /dev/null +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js | |||
@@ -0,0 +1,57 @@ | |||
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.TagProperties = Montage.create(ToolProperties, { | ||
12 | divElement: { value: null, enumerable: false }, | ||
13 | imageElement: { value: null, enumerable: false }, | ||
14 | videoElement: { value: null, enumerable: false }, | ||
15 | canvasElement: { value: null, enumerable: false }, | ||
16 | customElement: { value: null, enumerable: false }, | ||
17 | classField: { value: null, enumerable: false }, | ||
18 | customName: { value: null, enumerable: false }, | ||
19 | customLabel: { value: null, enumerable: false }, | ||
20 | |||
21 | _subPrepare: { | ||
22 | value: function() { | ||
23 | this.customName.style["display"] = "none"; | ||
24 | this.customLabel.style["display"] = "none"; | ||
25 | |||
26 | this.divElement.addEventListener("click", this, false); | ||
27 | this.imageElement.addEventListener("click", this, false); | ||
28 | this.videoElement.addEventListener("click", this, false); | ||
29 | this.canvasElement.addEventListener("click", this, false); | ||
30 | this.customElement.addEventListener("click", this, false); | ||
31 | } | ||
32 | }, | ||
33 | |||
34 | handleClick: { | ||
35 | value: function(event) { | ||
36 | this.selectedElement = event._event.target.id; | ||
37 | |||
38 | if(this.selectedElement === "customTool") { | ||
39 | this.customName.style["display"] = ""; | ||
40 | this.customLabel.style["display"] = ""; | ||
41 | } else { | ||
42 | this.customName.style["display"] = "none"; | ||
43 | this.customLabel.style["display"] = "none"; | ||
44 | } | ||
45 | } | ||
46 | }, | ||
47 | |||
48 | _selectedElement: { | ||
49 | value: "divTool", enumerable: false | ||
50 | }, | ||
51 | |||
52 | selectedElement: { | ||
53 | get: function() { return this._selectedElement;}, | ||
54 | set: function(value) { this._selectedElement = value; } | ||
55 | } | ||
56 | |||
57 | }); \ No newline at end of file | ||