From 946fae3acf8ca9f384b662e40f406506e8b90ea7 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 23 Apr 2012 22:37:34 -0700
Subject: CSSPanel - Resizer
---
js/panels/css-panel/css-panel.reel/css-panel.css | 8 ---
js/panels/css-panel/css-panel.reel/css-panel.html | 1 -
js/panels/css-panel/css-panel.reel/css-panel.js | 32 +-----------
.../style-sheets-view.reel/style-sheets-view.css | 30 +++++++++++
.../style-sheets-view.reel/style-sheets-view.html | 28 ++++++++++-
.../style-sheets-view.reel/style-sheets-view.js | 58 ++++++++++++++++++++++
6 files changed, 115 insertions(+), 42 deletions(-)
(limited to 'js')
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.css b/js/panels/css-panel/css-panel.reel/css-panel.css
index e525c08f..7bcfbc1a 100644
--- a/js/panels/css-panel/css-panel.reel/css-panel.css
+++ b/js/panels/css-panel/css-panel.reel/css-panel.css
@@ -48,12 +48,4 @@
-webkit-box-flex: 0;
}
-/* ------------------
- Resizer
- ------------------ */
-.sub-panel-resizer {
- width: 100%;
- height: 3px;
- background-color: red;
-}
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.html b/js/panels/css-panel/css-panel.reel/css-panel.html
index 4be4d6dd..8ee56086 100644
--- a/js/panels/css-panel/css-panel.reel/css-panel.html
+++ b/js/panels/css-panel/css-panel.reel/css-panel.html
@@ -40,7 +40,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
Style Sheets
-
Styles
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
*/
+
+.style-sheets-view-container {
+ position: relative;
+ overflow: hidden;
+}
+
.style-sheets-view-container ul {
margin: 0;
padding: 0;
+ min-height: 55px;
}
.style-sheets-view-container li {
list-style-type: none;
@@ -16,4 +23,27 @@
}
.style-sheets-view-container li:last-child {
margin-bottom: 5px;
+}
+
+/* ---------------
+ Toolbar
+------------------- */
+
+.style-sheets-toolbar-container {
+ bottom: 0;
+ height: 24px;
+ position: absolute;
+ width: 100%;
+}
+
+/* ------------------
+ Resizer
+ ------------------ */
+
+.sub-panel-resizer {
+ bottom: 0;
+ cursor: row-resize;
+ height: 4px;
+ position: absolute;
+ width: 100%;
}
\ No newline at end of file
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
index 092b189f..09e2e3ce 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -14,7 +14,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
"module" : "js/panels/css-panel/style-sheets-view.reel",
"name" : "StyleSheetsView",
"properties" : {
- "element" : {"#" : "style-sheets-view-container"}
+ "element" : {"#" : "style-sheets-view-container"},
+ "styleSheetList" : {"@" : "styleSheetList"}
}
},
"arrayController" : {
@@ -85,6 +86,28 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
"properties": {
"element": {"#": "style-sheets-toolbar"}
}
+ },
+ "resizer": {
+ "module": "js/panels/resize-composer",
+ "name": "ResizeComposer",
+ "properties": {
+ "element": {"#": "resizeBar"},
+ "component": {"@": "owner"}
+ },
+ "listeners": [
+ {
+ "type": "resizeStart",
+ "listener": {"@": "owner"}
+ },
+ {
+ "type": "resizeMove",
+ "listener": {"@": "owner"}
+ },
+ {
+ "type": "resizeEnd",
+ "listener": {"@": "owner"}
+ }
+ ]
}
}
@@ -95,9 +118,10 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot