add tbstatus

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1014 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-05-20 15:05:48 +00:00
parent db4f7cf122
commit d04dcee369
4 changed files with 41 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.9.8-1
Version: 0.9.8-3
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.0.1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.1)

View File

@ -4,6 +4,8 @@ source /mod/var/mongoose/lib/setup
require system.class findhsvc epg.class
puts "Content-Type: text/html"
puts "Pragma: no-cache"
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
puts ""
if {[catch {set pid [exec pgrep humaxtv]}]} {

View File

@ -358,3 +358,18 @@ span.toolbarcell
padding: 0 1em;
}
.tbhover
{
background: #dfe8ef;
border-top: solid 1px #ccc;
border-left: solid 1px #ccc;
}
#tbstatus
{
width: 100%;
border-top: 1px solid #ccc;
margin: 1em 0;
padding-top: 1em;
}

View File

@ -1,7 +1,7 @@
#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
require plugin settings.class
require plugin settings.class system.class
if {[[settings] epg_style] eq "grid"} {
set epglink "/cgi-bin/xepg.jim"
@ -40,19 +40,40 @@ tb "/img/diagnostics.png" "Diag" "/diag/diag.jim"
eval_plugins toolbar
puts {
<span class=cleft id=tbstatus></span>
</div>
</div>
<script type=text/javascript>
var lastupd = 0;
if (window.location.pathname != '/' &&
window.location.pathname != '/index.shtml')
$('#topbar, #toolbar').hover(
function() {
$('#toolbar').stop(true, true).delay(200).slideDown();
$('#toolbar').stop(true, true).delay(200).slideDown(400,
function() {
if (+new Date() - lastupd > 5000)
{
lastupd = +new Date();
$('#tbstatus')
.empty()
.html('<img src=/img/loading.gif> ' +
'Updating...')
.load('/cgi-bin/status.jim');
}
});
}, function() {
$('#toolbar').stop(true, true).delay(200).slideUp();
}
);
$('span.toolbarcell').hover(
function() {
$(this).addClass('tbhover');
}, function() {
$(this).removeClass('tbhover');
});
</script>
}