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:
parent
7202b7e4f8
commit
884e17b3a7
@ -185,6 +185,7 @@ puts {
|
|||||||
<li><a href=#lock>Toggle Lock</a></li>
|
<li><a href=#lock>Toggle Lock</a></li>
|
||||||
<li><a href=#rename>Rename</a></li>
|
<li><a href=#rename>Rename</a></li>
|
||||||
<li><a href=#title>Change Title</a></li>
|
<li><a href=#title>Change Title</a></li>
|
||||||
|
<li><a href=#download>Download</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id=dialogue></div>
|
<div id=dialogue></div>
|
||||||
@ -226,6 +227,10 @@ function (action, el, pos)
|
|||||||
confirm_action('change the lock on', lock_callback, ts, did);
|
confirm_action('change the lock on', lock_callback, ts, did);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'download':
|
||||||
|
window.location.href = ts;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
alert('Unhandled action: ' + action);
|
alert('Unhandled action: ' + action);
|
||||||
break;
|
break;
|
||||||
@ -292,8 +297,11 @@ function (action, el, pos)
|
|||||||
height: 600, width: 700,
|
height: 600, width: 700,
|
||||||
show: 'scale', hide: 'fade',
|
show: 'scale', hide: 'fade',
|
||||||
draggable: true, resizable: true,
|
draggable: true, resizable: true,
|
||||||
buttons: { "Close":
|
buttons: {
|
||||||
function() {$(this).dialog('close');}},
|
"Close": function() {
|
||||||
|
$(this).dialog('close');
|
||||||
|
}
|
||||||
|
},
|
||||||
close: function(e,u) { $('#dialogue').empty().html(
|
close: function(e,u) { $('#dialogue').empty().html(
|
||||||
'<img src="/img/loading.gif" alt="loading">'); }
|
'<img src="/img/loading.gif" alt="loading">'); }
|
||||||
});
|
});
|
||||||
|
@ -43,9 +43,8 @@ foreach line $lines {
|
|||||||
|
|
||||||
incr seen($name)
|
incr seen($name)
|
||||||
|
|
||||||
lappend output "<img style=\"vertical-align: middle\"
|
lappend output "<img class=va src=/images/$icon><span class=va>
|
||||||
src=/images/$icon><span
|
$mode $name</span><br>"
|
||||||
style=\"vertical-align: middle\">$mode $name</span>"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[llength $output]} {
|
if {[llength $output]} {
|
||||||
|
@ -5,7 +5,7 @@ if {[os.gethostname] eq "hosting"} {
|
|||||||
set used "100GB"
|
set used "100GB"
|
||||||
set perc "10"
|
set perc "10"
|
||||||
} else {
|
} 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] {
|
if [string match *sd*2* $df] {
|
||||||
regsub -all -- {[[:space:]]+} $df " " df
|
regsub -all -- {[[:space:]]+} $df " " df
|
||||||
set fields [split $df]
|
set fields [split $df]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user