From 7a879b33c8c2e56938cd7ea48c0dd5665ee3b238 Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Tue, 8 Apr 2008 19:39:09 +0000 Subject: [PATCH] details tabs:add css --- deluge/ui/webui/TODO | 1 - deluge/ui/webui/components.py | 1 - .../templates/advanced/part_tab_button.html | 2 +- .../advanced/torrent_info_inner.html | 2 ++ .../ui/webui/templates/deluge/tab_files.html | 15 ++++----- .../ui/webui/templates/deluge/tab_peers.html | 8 ++--- .../webui/templates/deluge/tab_trackers.html | 7 ++-- .../webui/templates/deluge/torrent_info.html | 5 +-- .../webui/templates/white/template_style.css | 33 +++++++++++++++++-- deluge/ui/webui/torrent_add.py | 3 -- 10 files changed, 50 insertions(+), 27 deletions(-) diff --git a/deluge/ui/webui/TODO b/deluge/ui/webui/TODO index 20eb6ee24..4407c8dfd 100644 --- a/deluge/ui/webui/TODO +++ b/deluge/ui/webui/TODO @@ -1,7 +1,6 @@ 0.6 : *plugin-config + (re)enable webui plugins. *Fix IE7 for advanced/white template. -*details tabs : add css *white template : add auto-refresh (with a nice js-progress-bar) *gettext : update template_strings.py + add all .py files to gettext input files diff --git a/deluge/ui/webui/components.py b/deluge/ui/webui/components.py index 4f877a31b..6b39064fa 100644 --- a/deluge/ui/webui/components.py +++ b/deluge/ui/webui/components.py @@ -74,7 +74,6 @@ class MenuManager(component.Component): def register_toolbar_item(self, id, title, image, flag, method, url, important): self.toolbar_items.append((id, title, image, flag, method, url, important)) - #todo: remove lower hack. def unregister_toolbar_item(self, item_id): for (i, toolbar) in enumerate(admin_pages): diff --git a/deluge/ui/webui/templates/advanced/part_tab_button.html b/deluge/ui/webui/templates/advanced/part_tab_button.html index 00621ec6f..903f332cd 100644 --- a/deluge/ui/webui/templates/advanced/part_tab_button.html +++ b/deluge/ui/webui/templates/advanced/part_tab_button.html @@ -4,5 +4,5 @@ $if (active == id): $title +href="$(self_url(tab=id))">$title diff --git a/deluge/ui/webui/templates/advanced/torrent_info_inner.html b/deluge/ui/webui/templates/advanced/torrent_info_inner.html index a9bb622dc..c60e4983e 100644 --- a/deluge/ui/webui/templates/advanced/torrent_info_inner.html +++ b/deluge/ui/webui/templates/advanced/torrent_info_inner.html @@ -12,9 +12,11 @@ $for id, title, tab in detail_tabs: $:render.part_tab_button(id, title, active_tab) +
$for id, title, tab in detail_tabs: $if active_tab == id: $:render[tab](torrent) +
diff --git a/deluge/ui/webui/templates/deluge/tab_files.html b/deluge/ui/webui/templates/deluge/tab_files.html index 4f9950649..e296c52e8 100644 --- a/deluge/ui/webui/templates/deluge/tab_files.html +++ b/deluge/ui/webui/templates/deluge/tab_files.html @@ -1,16 +1,16 @@ $def with (torrent) -
- +
$altrow(True) - + - - + + + $for i, file in enumerate(torrent.files): - + - +
$_("File")$_("Size")$_("Progress")
$_("Size")$_("Progress")
$(crop_left(file["path"], 60)) $fsize(file["size"])$fsize(file["size"]) $int(torrent.file_progress[i] * 100)%
- diff --git a/deluge/ui/webui/templates/deluge/tab_peers.html b/deluge/ui/webui/templates/deluge/tab_peers.html index ee29f261a..520f6c4b4 100644 --- a/deluge/ui/webui/templates/deluge/tab_peers.html +++ b/deluge/ui/webui/templates/deluge/tab_peers.html @@ -1,18 +1,17 @@ $def with (torrent) -
- +
$altrow(True) - + - + $for peer in torrent.peers: @@ -30,4 +29,3 @@ $for peer in torrent.peers:
$_("Ip") $_("Up Speed") $_("Down Speed") $_("Country") $_("Client") $_("Progress")
$peer['ip']
- diff --git a/deluge/ui/webui/templates/deluge/tab_trackers.html b/deluge/ui/webui/templates/deluge/tab_trackers.html index 2f5fc2559..c67e73afb 100644 --- a/deluge/ui/webui/templates/deluge/tab_trackers.html +++ b/deluge/ui/webui/templates/deluge/tab_trackers.html @@ -1,13 +1,14 @@ $def with (torrent)
- +
$altrow(True) - + + $for tracker in torrent.trackers: - + diff --git a/deluge/ui/webui/templates/deluge/torrent_info.html b/deluge/ui/webui/templates/deluge/torrent_info.html index 5b3f79472..f996d2140 100644 --- a/deluge/ui/webui/templates/deluge/torrent_info.html +++ b/deluge/ui/webui/templates/deluge/torrent_info.html @@ -1,11 +1,12 @@ $def with (torrent) $:(render.header(_(torrent.state) + '/' + torrent.name)) -
+
+
$for id, title, image, flag, method, url, important in toolbar_items: $if (flag > 0) and (id != 'details'): $:render.part_button(method, (url + str(torrent.id)), title, 'tango/' + image) - +
$for id, title, tab in detail_tabs:

$title

$:render[tab](torrent) diff --git a/deluge/ui/webui/templates/white/template_style.css b/deluge/ui/webui/templates/white/template_style.css index 08dadb7c4..6cb769ddc 100644 --- a/deluge/ui/webui/templates/white/template_style.css +++ b/deluge/ui/webui/templates/white/template_style.css @@ -199,7 +199,7 @@ div.progress_bar{ /*-moz-border-radius:5px;*/ /*ff only setting*/ } -/*info panel:*/ +/*info panel(inner):*/ #info_panel_div { width:100%; margin-top:20px; @@ -211,14 +211,41 @@ div.progress_bar{ /*float: right;*/ } -#torrent_info_tabs{ - background-color:#B5EDBC; +#torrent_info tr.head{ + background-color:#C3D9FF; +} +#torrent_info div.progress_bar{ + background-color:#C3D9FF; +} +#torrent_info div.button_bar{ + background-color:#C3D9FF; } td.info_label { width:100px; } +#torrent_tab tr.head { + background-color:#74DD82; +} +#torrent_tab tr.altrow0 { + background-color:#FFFFFF; +} + +#torrent_tab a.tab_button { + margin-right:10px; +} +#torrent_tab a.tab_button_active { + margin-right:10px; +} + +/*/torrent/info*/ +#torrent_info #torrent_tab tr.head { + background-color:#74DD82; +} + + + /*config:*/ #config_chooser { margin-left:20px; diff --git a/deluge/ui/webui/torrent_add.py b/deluge/ui/webui/torrent_add.py index bd132d47c..0b58b8029 100644 --- a/deluge/ui/webui/torrent_add.py +++ b/deluge/ui/webui/torrent_add.py @@ -74,9 +74,6 @@ class AddForm(forms.Form): class torrent_add: def add_page(self,error = None): - #form_data = utils.get_newforms_data(AddForm) - log.debug("add-page") - #TODO: CLEANUP!!! vars = web.input(url = None) form_data = {'url':vars.url}
# $_("Tracker")