details tabs:add css

This commit is contained in:
Martijn Voncken 2008-04-08 19:39:09 +00:00
parent 85d17af933
commit 7a879b33c8
10 changed files with 50 additions and 27 deletions

View File

@ -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

View File

@ -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):

View File

@ -4,5 +4,5 @@ $if (active == id):
<a class="tab_button_active"
$else:
<a class="tab_button"
href="$(self_url(tab=id))">$title </a>
href="$(self_url(tab=id))">$title</a>

View File

@ -12,9 +12,11 @@ $for id, title, tab in detail_tabs:
$:render.part_tab_button(id, title, active_tab)
</div>
<div id="torrent_tab">
$for id, title, tab in detail_tabs:
$if active_tab == id:
$:render[tab](torrent)
</div>
</body>
</html>

View File

@ -1,16 +1,16 @@
$def with (torrent)
<form method="POST" action="$base/torrent/files/$torrent.id">
<input type="hidden" name="redir" value="$self_url()">
<table width="95%">
<table width="100%">
$altrow(True)
<tr class="tab_$altrow()">
<tr class="head">
<th width="100%">$_("File")</th>
<th width="50px">$_("Size")</th>
<th width="50px">$_("Progress")</th></tr>
<th width="130px">$_("Size")</th>
<th width="50px">$_("Progress")</th>
</tr>
$for i, file in enumerate(torrent.files):
<tr class="tab_$altrow()" >
<tr class="$altrow()" >
<td title="$file['path']">
<input type="checkbox" name="file_priorities" id="file_priorities" value="$i"
$if (torrent.file_priorities[i]):
@ -18,10 +18,9 @@ $for i, file in enumerate(torrent.files):
>
$(crop_left(file["path"], 60))
</td>
<td>$fsize(file["size"])</td>
<td style="white-space:nowrap">$fsize(file["size"])</td>
<td align="right">$int(torrent.file_progress[i] * 100)%</td>
</tr>
</table>
<input type="submit" value="$_('Update')" name="submit_files">
</form>

View File

@ -1,18 +1,17 @@
$def with (torrent)
<form method="POST" action="$base/torrent/files/$torrent.id">
<input type="hidden" name="redir" value="$self_url()">
<table width="95%">
<table width="100%">
$altrow(True)
<tr class="tab_$altrow()">
<tr class="head">
<th>$_("Ip")</th>
<th>$_("Up Speed")</th>
<th>$_("Down Speed")</th>
<th>$_("Country")</th>
<th>$_("Client")</th>
<th>$_("Progress")</th>
</tr>
$for peer in torrent.peers:
<tr class="tab_$altrow()" >
<td>$peer['ip']</td>
@ -30,4 +29,3 @@ $for peer in torrent.peers:
</tr>
</table>
</form>

View File

@ -1,13 +1,14 @@
$def with (torrent)
<form method="POST" action="$base/torrent/trackers/$torrent.id">
<input type="hidden" name="redir" value="$self_url()">
<table width="95%">
<table width="100%">
$altrow(True)
<tr class="tab_$altrow()">
<tr class="head">
<th width="10px">#</th>
<th width="100%">$_("Tracker")</th>
</tr>
$for tracker in torrent.trackers:
<tr class="tab_$altrow()" >
<tr class="$altrow()" >
<td >
<input type="text" name="tier" value="$tracker['tier']" style="width:20px"/>
</td>

View File

@ -1,11 +1,12 @@
$def with (torrent)
$:(render.header(_(torrent.state) + '/' + torrent.name))
<div class="panel">
<div class="panel" id="torrent_info">
<div class="button_bar">
$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)
</div>
$for id, title, tab in detail_tabs:
<h3>$title</h3>
$:render[tab](torrent)

View File

@ -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;

View File

@ -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}