From 4900f2e6e346df18b1b5a2ac89da5019644ac98a Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Mon, 9 Apr 2012 16:47:35 -0700
Subject: adding a history panel
Signed-off-by: Valerio Virgillito
---
js/data/panels-data.js | 12 +++
js/panels/Panel.reel/Panel.js | 5 +-
js/panels/PanelContainer.reel/PanelContainer.html | 11 ++-
.../history-item.reel/history-item.css | 0
.../history-item.reel/history-item.html | 29 ++++++
.../history-item.reel/history-item.js | 32 +++++++
js/panels/history-panel/history.reel/history.css | 34 +++++++
js/panels/history-panel/history.reel/history.html | 106 +++++++++++++++++++++
js/panels/history-panel/history.reel/history.js | 26 +++++
9 files changed, 253 insertions(+), 2 deletions(-)
create mode 100644 js/panels/history-panel/history-item.reel/history-item.css
create mode 100644 js/panels/history-panel/history-item.reel/history-item.html
create mode 100644 js/panels/history-panel/history-item.reel/history-item.js
create mode 100644 js/panels/history-panel/history.reel/history.css
create mode 100644 js/panels/history-panel/history.reel/history.html
create mode 100644 js/panels/history-panel/history.reel/history.js
(limited to 'js')
diff --git a/js/data/panels-data.js b/js/data/panels-data.js
index 7a2d817a..f613a3be 100644
--- a/js/data/panels-data.js
+++ b/js/data/panels-data.js
@@ -93,6 +93,18 @@ exports.PanelsData = Montage.create(Montage, {
open: true,
modulePath: "js/panels/presets/content.reel",
moduleName: "content"
+ },
+ {
+ name: "History",
+ minHeight: 100,
+ height: 100,
+ maxHeight: null,
+ flexible: true,
+ collapsed: true,
+ scrollable: true,
+ open: true,
+ modulePath: "js/panels/history-panel/history.reel",
+ moduleName: "History"
}
]
}
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js
index 33f9b3a7..613bef4b 100755
--- a/js/panels/Panel.reel/Panel.js
+++ b/js/panels/Panel.reel/Panel.js
@@ -125,7 +125,10 @@ exports.Panel = Montage.create(Component, {
require.async(this.modulePath)
.then(function(panelContent) {
var componentRequire = panelContent[that.moduleName];
- that.panelContent.content = componentRequire.create();
+ var componentInstance = componentRequire.create();
+
+ componentInstance.ownerComponent = that.ownerComponent;
+ that.panelContent.content = componentInstance;
})
.end();
}
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html
index 251e86e4..d3673105 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer.reel/PanelContainer.html
@@ -62,6 +62,13 @@
}
},
+ "panel_6": {
+ "prototype": "js/panels/Panel.reel",
+ "properties": {
+ "element": {"#": "panel_6"}
+ }
+ },
+
"owner": {
"module": "js/panels/PanelContainer.reel",
"name": "PanelContainer",
@@ -74,7 +81,8 @@
"panel_2": {"@": "panel_2"},
"panel_3": {"@": "panel_3"},
"panel_4": {"@": "panel_4"},
- "panel_5": {"@": "panel_5"}
+ "panel_5": {"@": "panel_5"},
+ "panel_6": {"@": "panel_6"}
},
"listeners": [
{
@@ -104,6 +112,7 @@
+
+
+
+
+
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
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 @@
+
+
+
+