aboutsummaryrefslogtreecommitdiff
path: root/js/ui/menu/menu-item.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/ui/menu/menu-item.reel')
-rwxr-xr-xjs/ui/menu/menu-item.reel/menu-item.css150
-rwxr-xr-xjs/ui/menu/menu-item.reel/menu-item.html120
-rwxr-xr-xjs/ui/menu/menu-item.reel/menu-item.js208
3 files changed, 478 insertions, 0 deletions
diff --git a/js/ui/menu/menu-item.reel/menu-item.css b/js/ui/menu/menu-item.reel/menu-item.css
new file mode 100755
index 00000000..cb495b43
--- /dev/null
+++ b/js/ui/menu/menu-item.reel/menu-item.css
@@ -0,0 +1,150 @@
1/* <copyright>
2Copyright (c) 2012, Motorola Mobility LLC.
3All Rights Reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10
11* Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
14
15* Neither the name of Motorola Mobility LLC nor the names of its
16 contributors may be used to endorse or promote products derived from this
17 software without specific prior written permission.
18
19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY OF SUCH DAMAGE.
30</copyright> */
31
32.menuItem {
33 font-size: 9pt;
34 padding: 4px 8px;
35 display: block;
36 position: relative;
37 background: #474747;
38 color: white;
39}
40
41.menuItem:hover {
42 cursor:pointer;
43}
44
45.disabled {
46 opacity: 0.5;
47}
48
49.disabled:hover {
50 background-color: #474747;
51}
52
53.menuItemButton {
54 color: #f7f7f7;
55 font-family: 'Droid Sans', sans-serif;
56 text-shadow: 1px 1px 1px black;
57 display: inline;
58 outline: none;
59 box-sizing: border-box;
60 font-size: 10pt;
61 height: 18px;
62 vertical-align: middle;
63 border: 0;
64 background: none;
65 /*margin: 0 2px;*/
66 /*padding: 0 1em;*/
67 /*padding: 23px 12px 0px 8px;*/
68 cursor: pointer;
69
70 padding-right: 18px;
71}
72
73.menuItemButton:focus {
74 -webkit-box-shadow: none;
75
76}
77
78.separatorContainer {
79 padding-left: 0px;
80 padding-right: 0px;
81 width: 99%;
82}
83
84.separatorContainer:hover {
85 background-color: #474747;
86}
87
88.separator{
89 width:100%;
90 height:2px;
91 position: relative;
92 border: 1px groove #474747 ;
93 border-radius: 2px;
94 background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#474747), to(#cccccc));
95 opacity: 0.5;
96}
97
98.menuItem .check {
99 float:left;
100 margin-top: 2px;
101 background-image: url(../../../../images/menu/checkmark.png);
102 background-repeat: no-repeat;
103 background-position: center;
104 width: 10px;
105 height: 15px;
106 opacity: 0;
107}
108
109.menuItem .checked {
110 opacity: 1;
111}
112
113.submenu .rightArrow {
114 float: right;
115 background-image:url('../../../../images/menu/arrow.png');
116 background-repeat: no-repeat;
117 background-position: center;
118 width: 10px;
119 height: 15px;
120 position: absolute;
121 right:4px;
122 top: 5px;
123 margin-left: 8px;
124}
125
126.submenuEntries{
127 display: none;
128 position: absolute;
129 top: 0%;
130 left: 100%;
131 margin-top: 1px;
132 /*margin-left: 1px;*/
133 float:left;
134 font-family: 'Droid Sans', sans-serif !important;
135 color: #ffffff;
136 background: #494949;
137 /*border: 1px solid #292929;*/
138 border-top-right-radius: 5px;
139 border-bottom-right-radius: 5px;
140 border-bottom-left-radius: 5px;
141 /*border-radius: 8px;*/
142 padding: 8px 0px 8px 0px;
143 box-shadow: 0px 5px 8px rgba(0, 0, 0, 0.8);
144 white-space:nowrap;
145}
146
147.submenu .show {
148 display: block;
149}
150
diff --git a/js/ui/menu/menu-item.reel/menu-item.html b/js/ui/menu/menu-item.reel/menu-item.html
new file mode 100755
index 00000000..6c306c3b
--- /dev/null
+++ b/js/ui/menu/menu-item.reel/menu-item.html
@@ -0,0 +1,120 @@
1<!DOCTYPE html>
2<!-- <copyright>
3Copyright (c) 2012, Motorola Mobility LLC.
4All Rights Reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8
9* Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
11
12* Redistributions in binary form must reproduce the above copyright notice,
13 this list of conditions and the following disclaimer in the documentation
14 and/or other materials provided with the distribution.
15
16* Neither the name of Motorola Mobility LLC nor the names of its
17 contributors may be used to endorse or promote products derived from this
18 software without specific prior written permission.
19
20THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30POSSIBILITY OF SUCH DAMAGE.
31</copyright> -->
32<html>
33<head>
34 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
35 <link rel="stylesheet" type="text/css" href="menu-item.css">
36
37 <script type="text/montage-serialization">
38 {
39
40 "menuItemButton": {
41 "prototype": "montage/ui/native/button.reel",
42 "properties": {
43 "element": {"#": "menuItemButton"}
44 },
45 "bindings": {
46 "label": {"<-": "@owner.label"}
47 }
48 },
49
50 "submenuConditional": {
51 "prototype": "montage/ui/condition.reel",
52 "properties": {
53 "element": {"#": "submenu"}
54 },
55 "bindings": {
56 "condition": {"<-": "@owner.entries.count()"}
57 }
58 },
59
60 "entriesController": {
61 "prototype": "montage/ui/controller/array-controller",
62 "bindings": {
63 "content": {"<-": "@owner.entries"}
64 }
65 },
66
67 "repetition": {
68 "prototype": "montage/ui/repetition.reel",
69 "properties": {
70 "element": {"#": "submenuEntries"},
71 "contentController": {"@": "entriesController"}
72 }
73 },
74
75 "submenuItem": {
76 "prototype": "js/ui/menu/menu-item.reel",
77 "properties": {
78 "element": {"#": "submenuEntryItem"}
79 },