diff options
author | Eric Guzman | 2012-07-20 11:24:19 -0700 |
---|---|---|
committer | Eric Guzman | 2012-07-20 11:24:19 -0700 |
commit | 3cc29231852440508bdeec1964e40ce59f979f99 (patch) | |
tree | 2faaf3d49337437e4a84818fe24dc64a60f8c611 /js/components/menu/menu.reel | |
parent | 8fdf2fc8aefee68aec4c7b5891e0375f704cbf26 (diff) | |
parent | 9053e2037821a5c8405fabb74db9635deacfe8d5 (diff) | |
download | ninja-3cc29231852440508bdeec1964e40ce59f979f99.tar.gz |
Merge branch 'refs/heads/master' into fixes_7.1
Diffstat (limited to 'js/components/menu/menu.reel')
-rwxr-xr-x | js/components/menu/menu.reel/menu.css | 39 | ||||
-rwxr-xr-x | js/components/menu/menu.reel/menu.html | 97 | ||||
-rwxr-xr-x | js/components/menu/menu.reel/menu.js | 143 |
3 files changed, 0 insertions, 279 deletions
diff --git a/js/components/menu/menu.reel/menu.css b/js/components/menu/menu.reel/menu.css deleted file mode 100755 index 903832ed..00000000 --- a/js/components/menu/menu.reel/menu.css +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. | ||
3 | All Rights Reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, 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 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> */ | ||
31 | |||
32 | .horizontal-menu { | ||
33 | list-style: none; | ||
34 | margin: 0px; | ||
35 | padding: 5px; | ||
36 | float: left; | ||
37 | cursor: default; | ||
38 | display: block; | ||
39 | } | ||
diff --git a/js/components/menu/menu.reel/menu.html b/js/components/menu/menu.reel/menu.html deleted file mode 100755 index edbb8522..00000000 --- a/js/components/menu/menu.reel/menu.html +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | Copyright (c) 2012, Motorola Mobility LLC. | ||
4 | All Rights Reserved. | ||
5 | |||
6 | Redistribution and use in source and binary forms, with or without | ||
7 | modification, 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 | |||
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
30 | POSSIBILITY 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.css"> | ||
36 | |||
37 | <script type="text/montage-serialization"> | ||
38 | { | ||
39 | "menudata": { | ||
40 | "prototype": "js/data/menu-data", | ||
41 | "bindings": { | ||
42 | "currentDocument": {"<-": "@owner.currentDocument"} | ||
43 | } | ||
44 | }, | ||
45 | |||
46 | "menuController": { | ||
47 | "prototype": "montage/ui/controller/array-controller", | ||
48 | "properties": { | ||
49 | "automaticallyOrganizeObjects": false | ||
50 | }, | ||
51 | "bindings": { | ||
52 | "content": {"<-": "@menudata.topLevelMenu"} | ||
53 | } | ||
54 | }, | ||
55 | |||
56 | "repetition": { | ||
57 | "prototype": "montage/ui/repetition.reel", | ||
58 | "properties": { | ||
59 | "element": { "#": "topMenu" } | ||
60 | }, | ||
61 | "bindings": { | ||
62 | "objects": {"<-": "@menudata.topLevelMenu"} | ||
63 | } | ||
64 | }, | ||
65 | |||
66 | "menuEntry": { | ||
67 | "prototype": "js/components/menu/menu-entry.reel", | ||
68 | "properties": { | ||
69 | "element": { "#": "menuItem" } | ||
70 | }, | ||
71 | "bindings": { | ||
72 | "data": {"<-": "@repetition.objectAtCurrentIteration"}, | ||
73 | "menuIsActive": {"<-": "@owner.active"} | ||
74 | } | ||
75 | }, | ||
76 | |||
77 | "owner": { | ||
78 | "prototype": "js/components/menu/menu.reel", | ||
79 | "properties": { | ||
80 | "element": {"#": "mainMenuBar"} | ||
81 | } | ||
82 | } | ||
83 | } | ||
84 | </script> | ||
85 | |||
86 | </head> | ||
87 | <body> | ||
88 | |||
89 | <nav data-montage-id="mainMenuBar" class="mainMenuBar unselectable"> | ||
90 | <ul data-montage-id="topMenu" class="horizontal-menu"> | ||
91 | <li data-montage-id="menuItem"></li> | ||
92 | </ul> | ||
93 | </nav> | ||
94 | |||
95 | |||
96 | </body> | ||
97 | </html> | ||
diff --git a/js/components/menu/menu.reel/menu.js b/js/components/menu/menu.reel/menu.js deleted file mode 100755 index bf554b37..00000000 --- a/js/components/menu/menu.reel/menu.js +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility LLC. | ||
3 | All Rights Reserved. | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without | ||
6 | modification, 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 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> */ | ||
31 | |||
32 | var Montage = require("montage/core/core").Montage, | ||
33 | Component = require("montage/ui/component").Component; | ||
34 | |||
35 | exports.Menu = Montage.create(Component, { | ||
36 | |||
37 | _currentDocument: { | ||
38 | value : null | ||
39 | }, | ||
40 | |||
41 | currentDocument : { | ||
42 | get : function() { | ||
43 | return this._currentDocument; | ||
44 | }, | ||
45 | set : function(value) { | ||
46 | if (value === this._currentDocument) { | ||
47 | return; | ||
48 | } | ||
49 | |||
50 | this._currentDocument = value; | ||
51 | } | ||
52 | }, | ||
53 | |||
54 | _active: { | ||
55 | value: false | ||
56 | }, | ||
57 | |||
58 | active: { | ||
59 | get: function() { | ||
60 | return this._active; | ||
61 | }, | ||
62 | set: function(value) { | ||
63 | this._active = value; | ||
64 | } | ||
65 | }, | ||
66 | |||
67 | _activeEntry: { | ||
68 | value: null | ||
69 | }, | ||
70 | |||
71 | activeEntry: { | ||
72 | get: function() { | ||
73 | return this._activeEntry; | ||
74 | }, | ||
75 | set: function(value) { | ||
76 | if(this.active) { | ||
77 | |||
78 | if(this._activeEntry) this._activeEntry.deselect(); | ||
79 | |||
80 | this._activeEntry = value; | ||
81 | |||
82 | this._activeEntry.select(); |