From 4edab29bfe111495bfc8f471a2090aad0041f0c8 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 23 Nov 2009 19:12:44 +0000 Subject: [PATCH] - Web UI: Make use of MochaUI panels (they are resizable) --- src/webui.qrc | 3 ++ src/webui/css/dynamicTable.css | 14 +++++----- src/webui/css/mocha.css | 8 ++++-- src/webui/css/style.css | 25 +---------------- src/webui/index.html | 51 ++-------------------------------- src/webui/scripts/client.js | 37 +++++++++++++++++++++++- 6 files changed, 55 insertions(+), 83 deletions(-) diff --git a/src/webui.qrc b/src/webui.qrc index 36914feb3..fc3792138 100644 --- a/src/webui.qrc +++ b/src/webui.qrc @@ -5,6 +5,9 @@ webui/upload.html webui/uploadframe.html webui/about.html + webui/filters.html + webui/transferlist.html + webui/properties.html webui/css/mocha.css webui/css/dynamicTable.css webui/css/style.css diff --git a/src/webui/css/dynamicTable.css b/src/webui/css/dynamicTable.css index ccef67487..39b5c6bb1 100644 --- a/src/webui/css/dynamicTable.css +++ b/src/webui/css/dynamicTable.css @@ -7,36 +7,36 @@ **************************************************************/ -table { +#transferList table { border: 1px solid #ccc; width: 100%; } -th { +#transferList th { background-color: #eee; padding: 4px; } -tr { +#transferList tr { background-color: #fff; padding: 4px; } -tr.alt { +#transferList tr.alt { background-color: #eee; padding: 4px; } -td { +#transferList td { padding: 0 2px; } -tr.selected { +#transferList tr.selected { background-color: #354158; color: #fff; } -tr.over { +#transferList tr.over { background-color: #ee6600; color: #fff; cursor: pointer; diff --git a/src/webui/css/mocha.css b/src/webui/css/mocha.css index cf853a6c5..113aafdbc 100644 --- a/src/webui/css/mocha.css +++ b/src/webui/css/mocha.css @@ -370,7 +370,8 @@ li.divider { .pad { position: absolute; top: 0; - left: 0; + left: 0; + right: 0; padding: 8px; overflow: hidden; } @@ -384,11 +385,12 @@ li.divider { background: #f1f1f1 url(../images/bg-panel-header.gif) repeat-x; height: 30px; overflow: hidden; - border-bottom: 1px solid #d3d3d3; + border-bottom: 1px solid #d3d3d3; + display: none; /*FIX by Chris*/ } .panel-headerContent { - padding-top: 2px; + /*padding-top: 2px; FIX By Chris*/ } .panel-headerContent.tabs { diff --git a/src/webui/css/style.css b/src/webui/css/style.css index e8cda03c0..8b3d9f82a 100644 --- a/src/webui/css/style.css +++ b/src/webui/css/style.css @@ -120,13 +120,6 @@ hr { height:100%; } -#Filters { - width: 120px; - border-right: 1px solid #ccc; - color: #000; - vertical-align: top; -} - #Filters ul { list-style-type: none; } @@ -141,29 +134,13 @@ hr { margin-bottom: -4px; } -#Transfers { - vertical-align: top; - height: 100%; -} - -#transferListContainer { - height: 50%; - border-bottom: 1px solid #ccc; - overflow: auto; -} - .selectedFilter { background-color: #354158; color: #000; } -div #PropDiv { - height: 50%; -} - -div.PropPanel { +#properties { background-color: #e5e5e5; - overflow: auto; } a.propButton { diff --git a/src/webui/index.html b/src/webui/index.html index 46880327c..2b9935dec 100644 --- a/src/webui/index.html +++ b/src/webui/index.html @@ -71,54 +71,9 @@ -
- - -
- - -
- - - - - - - - - - - - - - - - - - -
_(Name)#_(Size)_(Done)_(Seeds)_(Peers)_(Down Speed)_(Up Speed)_(ETA)_(Ratio)
-
- -
-
- +
+ +
diff --git a/src/webui/scripts/client.js b/src/webui/scripts/client.js index 095726c0f..d7e567897 100644 --- a/src/webui/scripts/client.js +++ b/src/webui/scripts/client.js @@ -31,8 +31,43 @@ window.addEvent('domready', function(){ 'background': '#fff', 'visibility': 'visible' }); + new MochaUI.Column({ + id: 'filtersColumn', + placement: 'left', + width: 120, + resizeLimit: [100, 300] + }); + new MochaUI.Column({ + id: 'mainColumn', + placement: 'main', + width: null, + resizeLimit: [100, 300] + }); + new MochaUI.Panel({ + id: 'Filters', + title: 'Panel', + loadMethod: 'xhr', + contentURL: 'filters.html', + column: 'filtersColumn', + height: 300 + }); + new MochaUI.Panel({ + id: 'transferList', + title: 'Panel', + loadMethod: 'xhr', + contentURL: 'transferlist.html', + column: 'mainColumn', + height: null + }); + new MochaUI.Panel({ + id: 'properties', + title: 'Panel', + loadMethod: 'xhr', + contentURL: 'properties.html', + column: 'mainColumn', + height: 200 + }); initializeWindows(); - myTable.setup('myTable', 4); var r=0; var waiting=false; var stateToImg = function(state){