fix advanced webui statusbar for shwouchk

This commit is contained in:
Martijn Voncken 2008-02-16 14:20:00 +00:00
parent 89e2e3ae5c
commit 07939d46b2
3 changed files with 22 additions and 16 deletions

View File

@ -282,6 +282,10 @@ class resume_all:
do_redirect() do_redirect()
class refresh: class refresh:
def GET(self, name):
return self.POST(name)
#WRONG, but makes it easyer to link with <a href in the status-bar
@deco.check_session @deco.check_session
def POST(self, name): def POST(self, name):
auto_refresh = {'off': '0', 'on': '1'}[name] auto_refresh = {'off': '0', 'on': '1'}[name]
@ -317,6 +321,10 @@ class about:
return render.about() return render.about()
class logout: class logout:
def GET(self):
return self.POST()
#WRONG, but makes it easyer to link with <a href in the status-bar
@deco.check_session @deco.check_session
def POST(self, name): def POST(self, name):
end_session() end_session()

View File

@ -6,16 +6,16 @@ $def with (stats)
$_('Auto refresh:') $_('Auto refresh:')
$if getcookie('auto_refresh') == '1': $if getcookie('auto_refresh') == '1':
($getcookie('auto_refresh_secs')) $_('seconds') &nbsp; ($getcookie('auto_refresh_secs')) $_('seconds') &nbsp;
$:render.part_button('GET', '/refresh/set', _('Set'), 'tango/preferences-system.png') <a href="/refresh/set">$_('Set')</a>
$:render.part_button('POST', '/refresh/off', _('Disable'), 'tango/process-stop.png') <a href="/refresh/off">$_('Disable')</a><!--WRONG, setting things on a GET-->
$else: $else:
$_('Off') &nbsp; $_('Off') &nbsp;
$:render.part_button('POST', '/refresh/on', _('Enable'), 'tango/view-refresh.png') <a href="/refresh/on">$_('Enable')</a><!--WRONG, setting things on a GET-->
] ]
$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png') <a href="/logout">$_('Logout')</a><!--WRONG, setting things on a GET-->
<a href="/config/">$_('Settings')</a>
$:render.part_button('GET', '/config/', _('Settings'), 'tango/preferences-system.png')
</div> </div>
<div class="panel" id='stats_panel'> <div class="panel" id='stats_panel'>

View File

@ -167,19 +167,17 @@ body.inner {
z-index:999; z-index:999;
} }
#refresh_panel button { #refresh_panel a {
background-color:#304663; color:0000FF;
color:#FFFFFF; text-decoration:none;
border:0;
position:relative;
top:-2px;
height:15px;
background-color:#ddd;
color:#00F;
} }
#refresh_panel button:hover { #refresh_panel a:visited {
text-decoration: underline; color:0000FF;
}
#refresh_panel a:hover {
color:0000FF;
} }
#stats_panel button { #stats_panel button {