From de2035e1e0666428db3838d9afc3e53983e445f1 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Fri, 6 Jun 2014 23:24:32 +0000 Subject: [PATCH] fix bugs git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1944 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/cgi-bin/status.jim | 1 + .../jquery.plugin/confirmAction/jconfirmaction.jquery.js | 4 ++-- webif/lib/system.class | 9 +++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 3acd19a..a22e7be 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.14-3 +Version: 1.0.14-4 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.11),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.19),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),mongoose diff --git a/webif/cgi-bin/status.jim b/webif/cgi-bin/status.jim index ead89b9..0081b5d 100755 --- a/webif/cgi-bin/status.jim +++ b/webif/cgi-bin/status.jim @@ -34,6 +34,7 @@ proc get_data {} { } else { foreach line [split $data "\n"] { regsub -all -- {[[:space:]]+} $line " " line + regsub -- { \([^\)]+\)$} $line "" line set name [file rootname [file tail $line]] if {[dict exists $ret $name]} { set ret($name) -1 diff --git a/webif/html/lib/jquery.plugin/confirmAction/jconfirmaction.jquery.js b/webif/html/lib/jquery.plugin/confirmAction/jconfirmaction.jquery.js index f3c8209..30e63a8 100644 --- a/webif/html/lib/jquery.plugin/confirmAction/jconfirmaction.jquery.js +++ b/webif/html/lib/jquery.plugin/confirmAction/jconfirmaction.jquery.js @@ -29,11 +29,11 @@ o.animate({opacity: 1}, 300); o.find('.jcayes').on('click', function() { - o.animate({opacity: 0}, 300); + o.fadeOut(300, function() { $(this).remove(); }); callback(obj); }); o.find('.jcacancel').on('click', function() { - o.animate({opacity: 0}, 300); + o.fadeOut(300, function() { $(this).remove(); }); }); } diff --git a/webif/lib/system.class b/webif/lib/system.class index 10083e9..ff18f2a 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -181,9 +181,14 @@ proc {system diskspace} {{raw 0}} { set perc $($used * 100 / $size) set fperc $(100 - $perc) - if {[file isdirectory /mnt/hd2/Tsr]} { + switch [system model] { + HDR { set tsrdir "/mnt/hd2/Tsr" } + HD { set tsrdir "/media/drive1/.tsr" } + } + + if {[file isdirectory $tsrdir]} { set tsrbuf 21474836480 - lassign [exec du -ks /mnt/hd2/Tsr] tsrused + lassign [exec du -ks $tsrdir] tsrused set tsrused $($tsrused * 1024) } else { set tsrbuf 0