aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/tree-basic
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/components/ui/tree-basic
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/components/ui/tree-basic')
-rw-r--r--js/components/ui/tree-basic/tree.reel/tree.css9
-rw-r--r--js/components/ui/tree-basic/tree.reel/tree.html67
-rw-r--r--js/components/ui/tree-basic/tree.reel/tree.js43
-rw-r--r--js/components/ui/tree-basic/treeItem.reel/treeItem.css53
-rw-r--r--js/components/ui/tree-basic/treeItem.reel/treeItem.html35
-rw-r--r--js/components/ui/tree-basic/treeItem.reel/treeItem.js269
6 files changed, 476 insertions, 0 deletions
diff --git a/js/components/ui/tree-basic/tree.reel/tree.css b/js/components/ui/tree-basic/tree.reel/tree.css
new file mode 100644
index 00000000..878068b7
--- /dev/null
+++ b/js/components/ui/tree-basic/tree.reel/tree.css
@@ -0,0 +1,9 @@
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.atree ul{
8 -webkit-padding-start: 20px;
9} \ No newline at end of file
diff --git a/js/components/ui/tree-basic/tree.reel/tree.html b/js/components/ui/tree-basic/tree.reel/tree.html
new file mode 100644
index 00000000..ba594926
--- /dev/null
+++ b/js/components/ui/tree-basic/tree.reel/tree.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>
8<head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="tree.css">
11 <script type="text/montage-serialization">
12 {
13 "treeItem": {
14 "module" : "js/components/ui/tree-basic/treeItem.reel",
15 "name": "TreeItem",
16 "properties": {
17 "element": {"#": "treeItem"}
18 },
19 "bindings": {
20 "treeItemData": {
21 "boundObject": {"@": "repetition1"},
22 "boundObjectPropertyPath": "objectAtCurrentIteration",
23 "oneway": true
24 },
25 "showIcon": {
26 "boundObject": {"@": "owner"},
27 "boundObjectPropertyPath": "showIcons",
28 "oneway": true
29 }
30 }
31 },
32
33 "repetition1" : {
34 "module": "montage/ui/repetition.reel",
35 "name": "Repetition",
36 "properties": {
37 "element": {"#": "treeView"}
38 },
39 "bindings": {
40 "objects": {
41 "boundObject": {"@": "owner"},
42 "boundObjectPropertyPath": "treeViewDataObject",
43 "oneway": true
44 }
45 }
46 },
47
48 "owner":{
49 "module": "js/components/ui/tree-basic/tree.reel",
50 "name": "Tree",
51 "properties" : {
52 "element": {"#": "atree"},
53 "components": [{"@": "repetition1"}]
54 }
55 }
56
57 }
58 </script>
59</head>
60<body>
61<div id="atree" class="atree">
62 <ul id="treeView" style="display:block;">
63 <li id="treeItem"></li>
64 </ul>
65</div>
66</body>
67</html> \ No newline at end of file
diff --git a/js/components/ui/tree-basic/tree.reel/tree.js b/js/components/ui/tree-basic/tree.reel/tree.js
new file mode 100644
index 00000000..67fa20e5
--- /dev/null
+++ b/js/components/ui/tree-basic/tree.reel/tree.js
@@ -0,0 +1,43 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No 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
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10exports.Tree = Montage.create(Component, {
11
12 treeViewDataObject:{
13 writable:true,
14 enumerable:true,
15 value:null
16 },
17
18 showIcons :{
19 writable:true,
20 enumerable:true,
21 value:true
22 },
23
24 willDraw: {
25 enumerable: false,
26 value: function() {
27
28 }
29 },
30 draw: {
31 enumerable: false,
32 value: function() {
33
34 }
35 },
36 didDraw: {
37 enumerable: false,
38 value: function() {
39
40 }
41 }
42
43}); \ No newline at end of file
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.css b/js/components/ui/tree-basic/treeItem.reel/treeItem.css
new file mode 100644
index 00000000..f8e67541
--- /dev/null
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.css
@@ -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.atreeItem{
8 display:block;
9 padding:3px;
10 white-space: nowrap;
11}
12
13.atreeItem .treeArrow{
14 font-size: 8px;
15 cursor:pointer;
16 position:relative;
17}
18
19.atreeItem .hidden{
20 visibility:hidden;
21}
22
23.atreeItem .hideTree{
24 display:none;
25}
26
27.atreeItem .atreeItemImgContainer{
28 display:inline;
29}
30
31.atreeItem .name{
32 white-space: nowrap;
33 text-overflow:ellipsis;
34 line-height:15px;
35 overflow: hidden;
36 cursor:pointer;
37}
38
39.atreeItem .atreeItemImg{
40 width:15px;
41 height:15px;
42 position:relative;
43 top:2px;
44 /*box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8);*/
45}
46
47.atreeItem .treeArrow.expanded{
48 -webkit-transform: rotate(-90deg);
49}
50
51.atreeItem .bold{
52 font-weight: bold;
53} \ No newline at end of file
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.html b/js/components/ui/tree-basic/treeItem.reel/treeItem.html
new file mode 100644
index 00000000..3c5b19a9
--- /dev/null
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.html
@@ -0,0 +1,35 @@
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 <link rel="stylesheet" type="text/css" href="treeItem.css">
11 <script type="text/montage-serialization">
12 {
13 "owner":{
14 "module": "js/components/ui/tree-basic/tree.reel",
15 "name": "TreeItem",
16 "properties": {
17 "element" : {"#": "atreeItem"},
18 "itemName": {"#": "name"},
19 "itemImg": {"#": "atreeItemImg"},
20 "treeArrow": {"#": "treeArrow"}
21 }
22 }
23 }
24 </script>
25</head>
26<body>
27<li id="atreeItem" class="atreeItem">
28 <span id="treeArrow" class="treeArrow hidden">&#9654;</span>
29 <div class="atreeItemContent atreeItemImgContainer" >
30 <img id="atreeItemImg" class="atreeItemImg" src="" />
31 </div>
32 <span id="name" class="atreeItemContent name"></span>