aboutsummaryrefslogtreecommitdiff
path: root/js/ui/menu/menu-entry.reel
diff options
context:
space:
mode:
authorEric Guzman2012-07-20 11:24:19 -0700
committerEric Guzman2012-07-20 11:24:19 -0700
commit3cc29231852440508bdeec1964e40ce59f979f99 (patch)
tree2faaf3d49337437e4a84818fe24dc64a60f8c611 /js/ui/menu/menu-entry.reel
parent8fdf2fc8aefee68aec4c7b5891e0375f704cbf26 (diff)
parent9053e2037821a5c8405fabb74db9635deacfe8d5 (diff)
downloadninja-3cc29231852440508bdeec1964e40ce59f979f99.tar.gz
Merge branch 'refs/heads/master' into fixes_7.1
Diffstat (limited to 'js/ui/menu/menu-entry.reel')
-rwxr-xr-xjs/ui/menu/menu-entry.reel/menu-entry.css80
-rwxr-xr-xjs/ui/menu/menu-entry.reel/menu-entry.html102
-rwxr-xr-xjs/ui/menu/menu-entry.reel/menu-entry.js110
3 files changed, 292 insertions, 0 deletions
diff --git a/js/ui/menu/menu-entry.reel/menu-entry.css b/js/ui/menu/menu-entry.reel/menu-entry.css
new file mode 100755
index 00000000..e8ba5fa6
--- /dev/null
+++ b/js/ui/menu/menu-entry.reel/menu-entry.css
@@ -0,0 +1,80 @@
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.topMenuItem {
33 float: left;
34 display: inline;
35 height: 26px;
36}
37
38.headerButton {
39 color: #f7f7f7;
40 font-family: 'Droid Sans', sans-serif;
41 text-shadow: 1px 1px 1px black;
42 display: inline;
43 outline: none;
44 box-sizing: border-box;
45 font-size: 10pt;
46 height: 26px;
47 vertical-align: middle;
48 border: 0;
49 background: none;
50}
51
52.headerButton:focus {
53 -webkit-box-shadow: none;
54}
55
56.topMenuItem.selected {
57 background-color: #222222;
58}
59
60.subEntries{
61 display: none;
62 position: absolute;
63 /*z-index: 100000;*/
64 margin-top: 1px;
65 float:left;
66 font-family: 'Droid Sans', sans-serif !important;
67 color: #ffffff;
68 background: #494949;
69 /*border: 1px solid #292929;*/
70 border-bottom-right-radius: 5px;
71 border-bottom-left-radius: 5px;
72 /*border-radius: 8px;*/
73 padding: 8px 0px 8px 0px;
74 box-shadow: 0px 5px 8px rgba(0, 0, 0, 0.8);
75 white-space:nowrap;
76}
77
78.selected .subEntries {
79 display: block;
80}
diff --git a/js/ui/menu/menu-entry.reel/menu-entry.html b/js/ui/menu/menu-entry.reel/menu-entry.html
new file mode 100755
index 00000000..fd03b951
--- /dev/null
+++ b/js/ui/menu/menu-entry.reel/menu-entry.html
@@ -0,0 +1,102 @@
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-entry.css">
36
37 <script type="text/montage-serialization">
38 {
39 "entriesController": {
40 "prototype": "montage/ui/controller/array-controller",
41 "bindings": {
42 "content": {"<-": "@owner.entries"}
43 }
44 },
45
46 "menuHeaderButton": {
47 "prototype": "montage/ui/native/button.reel",
48 "properties": {
49 "element": {"#": "menuHeaderButton"}
50 },
51 "bindings": {
52 "label": {"<-": "@owner.label"}
53 }
54 },
55
56 "repetition": {
57 "prototype": "montage/ui/repetition.reel",
58 "properties": {
59 "element": {"#": "subEntries"},
60 "contentController": {"@": "entriesController"}
61 }
62 },
63
64 "menuItem": {
65 "prototype": "js/ui/menu/menu-item.reel",
66 "properties": {
67 "element": { "#": "menuEntryItem" }
68 },
69 "bindings": {
70 "enabled": {"<-": "@repetition.objectAtCurrentIteration.enabled"},
71 "checked": {"<-": "@repetition.objectAtCurrentIteration.checked"},
72 "label": {"<-": "@repetition.objectAtCurrentIteration.label"},
73 "submenu": {"<-": "@repetition.objectAtCurrentIteration.submenu"},
74 "entries": {"<-": "@repetition.objectAtCurrentIteration.entries"},
75 "action": {"<-": "@repetition.objectAtCurrentIteration.action"}
76 }
77 },
78
79 "owner": {
80 "prototype": "js/ui/menu/menu-entry.reel",
81 "properties": {
82 "element": {"#": "menuItem"},
83 "menuHeaderButton": {"@": "menuHeaderButton"}
84 }
85 }
86 }
87 </script>
88
89</head>
90<body>
91
92 <li data-montage-id="menuItem" class="topMenuItem">
93 <button data-montage-id="menuHeaderButton" class="headerButton"></button>
94
95 <ul data-montage-id="subEntries" class="subEntries" style="z-index: 9991;">
96 <li data-montage-id="menuEntryItem"></li>
97 </ul>
98
99 </li>
100
101</body>
102</html>
diff --git a/js/ui/menu/menu-entry.reel/menu-entry.js b/js/ui/menu/menu-entry.reel/menu-entry.js
new file mode 100755
index 00000000..ca512895
--- /dev/null
+++ b/js/ui/menu/menu-entry.reel/menu-entry.js
@@ -0,0 +1,110 @@
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> */