aboutsummaryrefslogtreecommitdiff
path: root/js/panels/presets/content.reel/content.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/presets/content.reel/content.js')
-rw-r--r--js/panels/presets/content.reel/content.js106
1 files changed, 106 insertions, 0 deletions
diff --git a/js/panels/presets/content.reel/content.js b/js/panels/presets/content.reel/content.js
new file mode 100644
index 00000000..8ddb3757
--- /dev/null
+++ b/js/panels/presets/content.reel/content.js
@@ -0,0 +1,106 @@
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,
8 Component = require("montage/ui/component").Component;
9
10exports.content = Montage.create(Component, {
11 hasTemplate: {
12 value: true
13 },
14 contentPanel : {
15 value: "presets" // get from local storage
16 },
17 templateDidLoad : {
18 value: function() {
19 console.log('deserialized');
20 }
21 },
22 prepareForDraw : {
23 value: function() {
24 this.activeTab = this.tabs[this.activeTabIndex];
25
26 this.tabBar.addEventListener('click', this, false);
27 }
28 },
29 handleClick : {
30 value: function(e) {
31 var tabObject = this.tabs.filter(function(item) {
32 return item.tab === e._event.target;
33 });
34
35 if(tabObject[0]) {
36 this.activeTab = tabObject[0];
37 }
38
39 }
40 },
41 _activeTab : {
42 value: null,
43 enumerable: false
44 },
45 activeTab : {
46 get: function() {
47 return this._activeTab;
48 },
49 set: function(tabObject) {
50 this.contentPanel = tabObject.key;
51
52 if(this.activeTab) {
53 this._activeTab.tab.classList.remove('active-tab');
54 }
55
56 tabObject.tab.classList.add('active-tab');
57 this._activeTab = tabObject;
58 }
59 },
60 treeList : {
61 value : null
62 },
63 data2: {
64 value: {
65 "meta": "Blah",
66 "status": "OK",
67 "text" : "Root",
68 "data" : {
69 "date": "1.1.01",
70 "text": "Root",
71 "children": [{
72 "date": "3.3.01",
73 "text": "Child 1"
74 },
75 {
76 "date": "3.3.01",
77 "text": "Child 2",
78 "children": [{
79 "date": "3.4.01",
80 "text": "Grand Child 1",
81 "children": [{
82 "date": "4.4.01",
83 "text": "Great Grand Child 1"
84 }]
85 }]
86
87 },{
88 "date": "5.5.01",
89 "text": "Child 3"
90 }]
91 }
92 }
93 },
94
95 didDraw: {
96 value : function() {
97 console.log('Presets Panel prepare for draw.');
98// this.treeList.items.push({
99// label : "Box Style",
100// type : 'leaf'
101// });
102 }
103 }
104
105
106});