diff options
Diffstat (limited to 'js/panels/properties/sections/custom-rows/dual-row.reel')
-rw-r--r-- | js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html | 67 | ||||
-rw-r--r-- | js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js | 53 |
2 files changed, 120 insertions, 0 deletions
diff --git a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html new file mode 100644 index 00000000..0398ff4c --- /dev/null +++ b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.html | |||
@@ -0,0 +1,67 @@ | |||
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 lang="en"> | ||
8 | <head> | ||
9 | <script type="text/montage-serialization"> | ||
10 | { | ||
11 | "owner": { | ||
12 | "module" : "js/panels/properties/sections/custom-rows/dual-row.reel", | ||
13 | "name" : "DualRow", | ||
14 | "properties" : { | ||
15 | "element" : {"#": "section"}, | ||
16 | "slot" : {"@": "slot"}, | ||
17 | "slot2" : {"@": "slot2"} | ||
18 | } | ||
19 | }, | ||
20 | "slot": { | ||
21 | "module": "montage/ui/slot.reel", | ||
22 | "name": "Slot", | ||
23 | "properties": { | ||
24 | "element": { "#": "slotElement" } | ||
25 | }, | ||
26 | "bindings": { | ||
27 | "content" : { | ||
28 | "boundObject": {"@": "owner"}, | ||
29 | "boundObjectPropertyPath": "content" | ||
30 | } | ||
31 | } | ||
32 | }, | ||
33 | "slot2": { | ||
34 | "module": "montage/ui/slot.reel", | ||
35 | "name": "Slot", | ||
36 | "properties": { | ||
37 | "element": { "#": "slotElement2" } | ||
38 | }, | ||
39 | "bindings": { | ||
40 | "content" : { | ||
41 | "boundObject": {"@": "owner"}, | ||
42 | "boundObjectPropertyPath": "content2" | ||
43 | } | ||
44 | } | ||
45 | } | ||
46 | } | ||
47 | </script> | ||
48 | </head> | ||
49 | <body> | ||
50 | <div id="section"> | ||
51 | <section class="fieldCol"> | ||
52 | <label class="lbl"></label> | ||
53 | <article class="fieldRow"> | ||
54 | <div id="slotElement" class="inputField"> | ||
55 | |||
56 | </div> | ||
57 | </article> | ||
58 | <label class="lbl"></label> | ||
59 | <article class="fieldRow"> | ||
60 | <div id="slotElement2" class="inputField"> | ||
61 | |||
62 | </div> | ||
63 | </article> | ||
64 | </section> | ||
65 | </div> | ||
66 | </body> | ||
67 | </html> \ No newline at end of file | ||
diff --git a/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js new file mode 100644 index 00000000..72d216ca --- /dev/null +++ b/js/panels/properties/sections/custom-rows/dual-row.reel/dual-row.js | |||
@@ -0,0 +1,53 @@ | |||
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 | |||
10 | exports.DualRow = Montage.create(Component, { | ||
11 | id: { | ||
12 | value: null | ||
13 | }, | ||
14 | |||
15 | label: { | ||
16 | value: null | ||
17 | }, | ||
18 | |||
19 | label2:{ | ||
20 | value: null | ||
21 | }, | ||
22 | |||
23 | content: { | ||
24 | value: null | ||
25 | }, | ||
26 | |||
27 | content2: { | ||
28 | value: null | ||
29 | }, | ||
30 | |||
31 | eventDelegate: { | ||
32 | value: null | ||
33 | }, | ||
34 | |||
35 | divider: { | ||
36 | value: false | ||
37 | }, | ||
38 | |||
39 | prepareForDraw: { | ||
40 | value: function() { | ||
41 | if (this.divider) this.element.appendChild(document.createElement("hr")); | ||
42 | if(this.label !== null) { | ||
43 | this.element.getElementsByClassName("lbl")[0].innerHTML = this.label + ":"; | ||
44 | } | ||
45 | if(this.label2 !== null) { | ||
46 | this.element.getElementsByClassName("lbl")[1].innerHTML = this.label2 + ":"; | ||
47 | } else { | ||
48 | this.element.getElementsByClassName("lbl")[1].style.display = "none"; | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | |||
53 | }); \ No newline at end of file | ||