diff options
Diffstat (limited to 'js/components/layout/documents-tab.reel')
3 files changed, 162 insertions, 0 deletions
diff --git a/js/components/layout/documents-tab.reel/documents-tab.css b/js/components/layout/documents-tab.reel/documents-tab.css new file mode 100644 index 00000000..689eb777 --- /dev/null +++ b/js/components/layout/documents-tab.reel/documents-tab.css | |||
@@ -0,0 +1,40 @@ | |||
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 | .documentsTab { | ||
8 | height: 25px; | ||
9 | position: relative; | ||
10 | overflow: hidden; | ||
11 | color: white; | ||
12 | } | ||
13 | |||
14 | .openDocuments { | ||
15 | float: left; | ||
16 | height: 25px; | ||
17 | width: 100%; | ||
18 | font-size: 12px; | ||
19 | list-style: none; | ||
20 | margin: 0; | ||
21 | padding: 0; | ||
22 | position: relative; | ||
23 | text-decoration: none; | ||
24 | } | ||
25 | |||
26 | .openDocuments li { | ||
27 | border-right: 1px solid black; | ||
28 | cursor: pointer; | ||
29 | display: inline; | ||
30 | float: left; | ||
31 | padding: 0.5em 1em; | ||
32 | text-shadow: 1px 1px 1px #000000; | ||
33 | vertical-align: middle; | ||
34 | } | ||
35 | |||
36 | .openDocuments li:hover, | ||
37 | .openDocuments li:active, | ||
38 | .openDocuments li.activeTab { | ||
39 | background-color: #7f7f7f; /* rgb(127, 127, 127); */ | ||
40 | } \ No newline at end of file | ||
diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html new file mode 100644 index 00000000..94b2e46e --- /dev/null +++ b/js/components/layout/documents-tab.reel/documents-tab.html | |||
@@ -0,0 +1,77 @@ | |||
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 | |||
11 | <link rel="stylesheet" type="text/css" href="documents-tab.css"> | ||
12 | |||
13 | <script type="text/montage-serialization"> | ||
14 | { | ||
15 | |||
16 | "owner": { | ||
17 | "module": "js/components/layout/documents-tab.reel", | ||
18 | "name": "DocumentsTab", | ||
19 | "properties": { | ||
20 | "element": {"#": "openDocumentsTabComponent"} | ||
21 | } | ||
22 | }, | ||
23 | |||
24 | "documentEntry": { | ||
25 | "module": "js/components/layout/document-entry.reel", | ||
26 | "name": "DocumentEntry", | ||
27 | "properties": { | ||
28 | "element": {"#": "document"} | ||
29 | }, | ||
30 | "bindings": { | ||
31 | "document": { | ||
32 | "boundObject": {"@": "repetition1"}, | ||
33 | "boundObjectPropertyPath": "objectAtCurrentIteration", | ||
34 | "oneway": true | ||
35 | }, | ||
36 | "name": { | ||
37 | "boundObject": {"@": "repetition1"}, | ||
38 | "boundObjectPropertyPath": "objectAtCurrentIteration.name", | ||
39 | "oneway": true | ||
40 | }, | ||
41 | "active": { | ||
42 | "boundObject": {"@": "repetition1"}, | ||
43 | "boundObjectPropertyPath": "objectAtCurrentIteration.isActive", | ||
44 | "oneway": true | ||
45 | } | ||
46 | } | ||
47 | }, | ||
48 | |||
49 | "repetition1": { | ||
50 | "module": "montage/ui/repetition.reel", | ||
51 | "name": "Repetition", | ||
52 | "properties": { | ||
53 | "element": {"#": "openDocuments"} | ||
54 | }, | ||
55 | "bindings": { | ||
56 | "objects": { | ||
57 | "boundObject": {"@": "owner"}, | ||
58 | "boundObjectPropertyPath": "openDocuments", | ||
59 | "oneway": true | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | |||
64 | } | ||
65 | </script> | ||
66 | |||
67 | </head> | ||
68 | |||
69 | <body> | ||
70 | <div id="openDocumentsTabComponent" class="documentsTab"> | ||
71 | <ul id="openDocuments" class="openDocuments"> | ||
72 | <li id="document"></li> | ||
73 | </ul> | ||
74 | </div> | ||
75 | </body> | ||
76 | |||
77 | </html> | ||
diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js new file mode 100644 index 00000000..e874a73c --- /dev/null +++ b/js/components/layout/documents-tab.reel/documents-tab.js | |||
@@ -0,0 +1,45 @@ | |||
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 | var documentManagerModule = require("js/io/document/document-controller"); | ||
11 | |||
12 | exports.DocumentsTab = Montage.create(Component, { | ||
13 | |||
14 | openDocuments: { | ||
15 | value: [] | ||
16 | }, | ||
17 | |||
18 | prepareForDraw: { | ||
19 | enumerable: false, | ||
20 | value: function() { | ||
21 | // console.log("Change this to be inside the Ninja Reel"); | ||
22 | this.openDocuments = documentManagerModule.DocumentController._documents; | ||
23 | // this.eventManager.addEventListener( "appLoaded", this, false); | ||
24 | } | ||
25 | }, | ||
26 | |||
27 | handleAppLoaded: { | ||
28 | value: function() { | ||
29 | // this.openDocuments = this.application.ninja.currentDocument; | ||
30 | } | ||
31 | }, | ||
32 | |||
33 | draw: { | ||
34 | enumerable: false, | ||
35 | value: function() { | ||
36 | |||
37 | } | ||
38 | }, | ||
39 | |||
40 | handleClick: { | ||
41 | value: function(event) { | ||
42 | |||
43 | } | ||
44 | } | ||
45 | }); \ No newline at end of file | ||