diff options
author | Jose Antonio Marquez | 2012-04-20 10:44:02 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-20 10:44:02 -0700 |
commit | 0b7848540a7ca84b7c67821fedc275cf243eff2f (patch) | |
tree | a26b2986d412a02eb93fc7fa1b0f495cab40e757 /js/panels/history-panel | |
parent | 154d1a8fdbbe050dbfc97cd13baa8981d8fc1e47 (diff) | |
parent | 8a546291a9d0de3bda1a7765ae9008f2ad052bba (diff) | |
download | ninja-0b7848540a7ca84b7c67821fedc275cf243eff2f.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/history-panel')
6 files changed, 227 insertions, 0 deletions
diff --git a/js/panels/history-panel/history-item.reel/history-item.css b/js/panels/history-panel/history-item.reel/history-item.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.css | |||
diff --git a/js/panels/history-panel/history-item.reel/history-item.html b/js/panels/history-panel/history-item.reel/history-item.html new file mode 100644 index 00000000..2db27846 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.html | |||
@@ -0,0 +1,29 @@ | |||
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 lang="en"> | ||
8 | <head> | ||
9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
10 | <link rel="stylesheet" type="text/css" href="history-item.css"> | ||
11 | |||
12 | <script type="text/montage-serialization"> | ||
13 | { | ||
14 | "owner": { | ||
15 | "prototype": "js/panels/history-panel/history-item.reel", | ||
16 | "properties": { | ||
17 | "element": {"#": "history_item"} | ||
18 | } | ||
19 | } | ||
20 | } | ||
21 | </script> | ||
22 | |||
23 | </head> | ||
24 | <body> | ||
25 | |||
26 | <li data-montage-id="history_item"></li> | ||
27 | |||
28 | </body> | ||
29 | </html> \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history-item.reel/history-item.js b/js/panels/history-panel/history-item.reel/history-item.js new file mode 100644 index 00000000..8a6e7654 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.js | |||
@@ -0,0 +1,32 @@ | |||
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 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.HistoryItem = Montage.create(Component, { | ||
11 | _title: { | ||
12 | value: null | ||
13 | }, | ||
14 | |||
15 | title: { | ||
16 | get: function() { | ||
17 | return this._title; | ||
18 | }, | ||
19 | set: function(value) { | ||
20 | if(value !== this._title) { | ||
21 | this._title = value; | ||
22 | this.needsDraw = true; | ||
23 | } | ||
24 | } | ||
25 | }, | ||
26 | |||
27 | draw: { | ||
28 | value: function() { | ||
29 | this.element.innerHTML = this.title; | ||
30 | } | ||
31 | } | ||
32 | }); \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history.reel/history.css b/js/panels/history-panel/history.reel/history.css new file mode 100644 index 00000000..44c4c74b --- /dev/null +++ b/js/panels/history-panel/history.reel/history.css | |||
@@ -0,0 +1,34 @@ | |||
1 | .history_panel { | ||
2 | height: 100%; | ||
3 | overflow: hidden; | ||
4 | } | ||
5 | |||
6 | .scroller { | ||
7 | position: absolute; | ||
8 | top: 0; | ||
9 | left: 0; | ||
10 | right: 0; | ||
11 | bottom: 0; | ||
12 | } | ||
13 | |||
14 | .history_panel ul { | ||
15 | padding: 0; | ||
16 | margin: 0; | ||
17 | } | ||
18 | |||
19 | .history_panel li { | ||
20 | padding: 10px 15px; | ||
21 | list-style: none; | ||
22 | } | ||
23 | |||
24 | .undo_list li { | ||
25 | background-color: hsl(0, 0%, 94%); | ||
26 | border-top: 1px solid hsl(0, 0%, 100%); | ||
27 | border-bottom: 1px solid hsl(0, 0%, 85%); | ||
28 | } | ||
29 | |||
30 | .redo_list li { | ||
31 | background-color: hsl(199, 71%, 79%); | ||
32 | border-top: 1px solid hsl(0, 0%, 100%); | ||
33 | border-bottom: 1px solid hsl(0, 0%, 85%); | ||
34 | } \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history.reel/history.html b/js/panels/history-panel/history.reel/history.html new file mode 100644 index 00000000..f2e3c6ae --- /dev/null +++ b/js/panels/history-panel/history.reel/history.html | |||
@@ -0,0 +1,106 @@ | |||
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 lang="en"> | ||
8 | <head> | ||
9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
10 | <link rel="stylesheet" type="text/css" href="history.css"> | ||
11 | |||
12 | <script type="text/montage-serialization"> | ||
13 | { | ||
14 | "owner": { | ||
15 | "prototype": "js/panels/history-panel/history.reel", | ||
16 | "properties": { | ||
17 | "element": {"#": "history_panel"} | ||
18 | } | ||
19 | }, | ||
20 | |||
21 | "defaultUndoManager": { | ||
22 | "object": "montage/core/undo-manager" | ||
23 | }, | ||
24 | |||
25 | "scroller": { | ||
26 | "prototype": "montage/ui/scroller.reel", | ||
27 | "properties": { | ||
28 | "element": {"#": "scroller"}, | ||
29 | "axis": "vertical" | ||
30 | } | ||
31 | }, | ||
32 | |||
33 | "undoList": { | ||
34 | "prototype": "montage/ui/repetition.reel", | ||
35 | "properties": { | ||
36 | "element": {"#": "undo_list"} | ||
37 | }, | ||
38 | "bindings": { | ||
39 | "objects": { | ||
40 | "boundObject": {"@": "defaultUndoManager"}, | ||
41 | "boundObjectPropertyPath": "undoStack", | ||
42 | "oneway": true | ||
43 | } | ||
44 | } | ||
45 | }, | ||
46 | |||
47 | "undoItem": { | ||
48 | "prototype": "js/panels/history-panel/history-item.reel", | ||
49 | "properties": { | ||
50 | "element": {"#": "undo_item"} | ||
51 | }, | ||
52 | "bindings": { | ||
53 | "title": { | ||
54 | "boundObject": {"@": "undoList"}, | ||
55 | "boundObjectPropertyPath": "objectAtCurrentIteration.label", | ||
56 | "oneway": true | ||
57 | } | ||
58 | } | ||
59 | }, | ||
60 | |||
61 | "redoList": { | ||
62 | "prototype": "montage/ui/repetition.reel", | ||
63 | "properties": { | ||
64 | "element": {"#": "redo_list"} | ||
65 | }, | ||
66 | "bindings": { | ||
67 | "objects": { | ||
68 | "boundObject": {"@": "defaultUndoManager"}, | ||
69 | "boundObjectPropertyPath": "redoStack", | ||
70 | "oneway": true | ||
71 | } | ||
72 | } | ||
73 | }, | ||
74 | |||
75 | "redoItem": { | ||
76 | "prototype": "js/panels/history-panel/history-item.reel", | ||
77 | "properties": { | ||
78 | "element": {"#": "redo_item"} | ||
79 | }, | ||
80 | "bindings": { | ||
81 | "title": { | ||
82 | "boundObject": {"@": "redoList"}, | ||
83 | "boundObjectPropertyPath": "objectAtCurrentIteration.label", | ||
84 | "oneway": true | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | </script> | ||
90 | |||
91 | </head> | ||
92 | <body> | ||
93 | |||
94 | <div data-montage-id="history_panel" class="history_panel"> | ||
95 | <div data-montage-id="scroller" class="scroller"> | ||
96 | <ul data-montage-id="undo_list" class="undo_list"> | ||
97 | <li data-montage-id="undo_item"></li> | ||
98 | </ul> | ||
99 | <ul data-montage-id="redo_list" class="redo_list"> | ||
100 | <li data-montage-id="redo_item"></li> | ||
101 | </ul> | ||
102 | </div> | ||
103 | </div> | ||
104 | |||
105 | </body> |