add download option, require busybox 1.18.3-1

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@188 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-06-21 22:38:20 +00:00
parent 7202b7e4f8
commit 884e17b3a7
3 changed files with 13 additions and 6 deletions

View File

@ -185,6 +185,7 @@ puts {
<li><a href=#lock>Toggle Lock</a></li>
<li><a href=#rename>Rename</a></li>
<li><a href=#title>Change Title</a></li>
<li><a href=#download>Download</a></li>
</ul>
<div id=dialogue></div>
@ -226,6 +227,10 @@ function (action, el, pos)
confirm_action('change the lock on', lock_callback, ts, did);
break;
case 'download':
window.location.href = ts;
break;
default:
alert('Unhandled action: ' + action);
break;
@ -292,8 +297,11 @@ function (action, el, pos)
height: 600, width: 700,
show: 'scale', hide: 'fade',
draggable: true, resizable: true,
buttons: { "Close":
function() {$(this).dialog('close');}},
buttons: {
"Close": function() {
$(this).dialog('close');
}
},
close: function(e,u) { $('#dialogue').empty().html(
'<img src="/img/loading.gif" alt="loading">'); }
});

View File

@ -43,9 +43,8 @@ foreach line $lines {
incr seen($name)
lappend output "<img style=\"vertical-align: middle\"
src=/images/$icon><span
style=\"vertical-align: middle\">$mode&nbsp;$name</span>"
lappend output "<img class=va src=/images/$icon><span class=va>
$mode&nbsp;$name</span><br>"
}
if {[llength $output]} {

View File

@ -5,7 +5,7 @@ if {[os.gethostname] eq "hosting"} {
set used "100GB"
set perc "10"
} else {
foreach df [split [exec df -h] "\n\r"] {
foreach df [split [exec df -h 2>>/dev/null] "\n\r"] {
if [string match *sd*2* $df] {
regsub -all -- {[[:space:]]+} $df " " df
set fields [split $df]