diff --git a/CONTROL/control b/CONTROL/control
index 7a9efcca..ac3d79c8 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,9 +1,9 @@
Package: webif
Priority: optional
Section: web
-Version: 1.0.7-11
+Version: 1.0.7-12
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
-Depends: webif-channelicons(>=1.1.7),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
+Depends: webif-channelicons(>=1.1.8),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
Suggests:
Description: An evolving web interface for the Humax.
diff --git a/var/mongoose/html/browse/crop/progress.jim b/var/mongoose/html/browse/crop/progress.jim
index 852aa72e..7ddae0bb 100755
--- a/var/mongoose/html/browse/crop/progress.jim
+++ b/var/mongoose/html/browse/crop/progress.jim
@@ -7,7 +7,7 @@ require ts.class
httpheader
set perc [cgi_get perc 100]
-set tsfile [file normalize [cgi_get file]]
+set tsfile [cgi_get file]
set origfile "[file dirname $tsfile]/_original/[file tail $tsfile]"
set newfile [file rootname $tsfile]
diff --git a/var/mongoose/html/pkg/script.js b/var/mongoose/html/pkg/script.js
index 7248dbe6..fa30d2b7 100644
--- a/var/mongoose/html/pkg/script.js
+++ b/var/mongoose/html/pkg/script.js
@@ -3,34 +3,41 @@ var opkg = '/cgi-bin/opkg.jim?cmd=';
$(document).ready(function() {
var busy = false;
- var reload = false;
+ var tswitch = false;
$('#opkgupdate')
.button()
- .click(function() { reload = true; execopkg('update'); })
+ .click(function() { tswitch = 2; execopkg('update'); })
.fadeIn('slow');
$('#opkgupgradeall')
.button()
- .click(function() { reload = true; execopkg('upgrade'); })
+ .click(function() { tswitch = 2; execopkg('upgrade'); })
.fadeIn('slow');
$('#pkgtabs').tabs({
- select: function() {
+ create: function(event, ui) {
+ $(ui.panel).html("" +
+ "Loading data... Please wait...");
+ busy = true;
+ $('#pkgtabs').tabs('disable');
+ },
+ activate: function(event, ui) {
if (busy)
{
alert('Please wait until the current ' +
'operation completes.');
return false;
}
+ $(ui.newPanel).html("" +
+ "Loading data... Please wait...");
busy = true;
- $('#pkgtabs')
- .tabs('option', 'disabled', [0,1,2]);
+ $('#pkgtabs').tabs('disable');
},
load: function() {
busy = false;
setup_buttons();
- $('#pkgtabs').tabs('option', 'disabled', []);
+ $('#pkgtabs').tabs('enable');
},
spinner: ' ' +
'Loading...'
@@ -45,11 +52,17 @@ $(document).ready(function() {
buttons: { "Close":
function() {$(this).dialog('close');}},
close: function(e,u) {
- if (reload)
+ if (tswitch)
{
- $('#refreshing').show('slow');
- $('#pkgtabs').hide('fast');
- window.location.reload(true);
+ var curtab = $('#pkgtabs')
+ .tabs('option', 'active');
+ if (curtab != tswitch)
+ $('#pkgtabs').tabs('option',
+ 'active', tswitch);
+ else
+ $('#pkgtabs').tabs('load', tswitch);
+ tswitch = false;
+ $('button.va').enable();
}
else
{
@@ -64,18 +77,20 @@ $(document).ready(function() {
jQuery.ajaxSetup({progressInterval: 1});
- function loaddata(data, isfinal)
+ function loaddata(data, status)
{
if (window.console)
{
- console.log('loaddata called, final=' + isfinal);
+ console.log('loaddata called, status=' + status);
console.log('Data: ' + data);
}
- if (isfinal)
+ if (status)
{
$('#dresults').text(data);
$('#dspinner').hide('slow');
$('#complete').show('slow');
+ if (status == 'success')
+ $('#dialogue').dialog('close');
}
else
$('#dresults').append(data);
@@ -101,8 +116,8 @@ $(document).ready(function() {
type: "GET",
url: opkg + arg,
progress: loaddata,
- success: function(data) {
- loaddata(data, true);
+ success: function(data, status) {
+ loaddata(data, status);
},
error: function(_, _, e) {
if (window.console)
diff --git a/var/mongoose/lib/pkg.class b/var/mongoose/lib/pkg.class
index 570b0f68..36b3a8a4 100755
--- a/var/mongoose/lib/pkg.class
+++ b/var/mongoose/lib/pkg.class
@@ -101,6 +101,7 @@ proc {pkg fetchmeta} {} {
set f [socket stream hummypkg.org.uk:80]
$f puts -nonewline "GET /hdrfoxt2/pkg.meta HTTP/1.1\r\n"
$f puts -nonewline "Host: hummypkg.org.uk\r\n"
+ $f puts -nonewline "Connection: close\r\n"
$f puts -nonewline "\r\n"
set line [string trim [$f gets]]
@@ -119,6 +120,7 @@ proc {pkg fetchdiagmeta} {} {
set f [socket stream hummypkg.org.uk:80]
$f puts -nonewline "GET /diag/diag.meta HTTP/1.1\r\n"
$f puts -nonewline "Host: hummypkg.org.uk\r\n"
+ $f puts -nonewline "Connection: close\r\n"
$f puts -nonewline "\r\n"
set line [string trim [$f gets]]