diff --git a/CONTROL/control b/CONTROL/control
index 2c519df..afc21e3 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,11 +1,9 @@
Package: webif
Priority: optional
Section: web
-Version: 0.8.3-1
+Version: 0.8.4
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
-Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4-1),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.1),ssmtp
-Replaces: af123-webif
-Conflicts: af123-webif
+Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4-1),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.1),ssmtp,anacron
Suggests: ffmpeg,webif-iphone,nicesplice
Description: An evolving web interface for the Humax.
diff --git a/var/mongoose/cgi-bin/browse.jim b/var/mongoose/cgi-bin/browse.jim
index ff8e380..354f4ba 100755
--- a/var/mongoose/cgi-bin/browse.jim
+++ b/var/mongoose/cgi-bin/browse.jim
@@ -33,10 +33,19 @@ proc directory {file bfile} {
puts ""
puts ""
- puts ""
puts "$bfile
- "
+ "
+ puts "
+
+
+
+
+ "
+ puts ""
}
proc entry {file} {{i 0}} {
@@ -181,6 +190,11 @@ if $nicesplice {
puts {
+
+
+
+
diff --git a/var/mongoose/cgi-bin/browse/browse.js b/var/mongoose/cgi-bin/browse/browse.js
index 0bbb4a4..04c64ca 100755
--- a/var/mongoose/cgi-bin/browse/browse.js
+++ b/var/mongoose/cgi-bin/browse/browse.js
@@ -116,6 +116,13 @@ function rename_submit()
function() { window.location.reload(true); });
}
+function drename_submit()
+{
+ var s = $('#drenameform_form').serialize();
+ $.get('/cgi-bin/browse/rename.jim?' + s,
+ function() { window.location.reload(true); });
+}
+
function savestream_submit()
{
var s = $('#savestream_form').serialize();
@@ -274,6 +281,47 @@ var menuclick = function(action, el, pos)
}
};
+var dmenuclick = function(action, el, pos)
+{
+ var direl = $(el).parent().parent();
+ var file = $(el).parent().prevAll('a.dbf').last().attr('file');
+ var bfile = file.replace(/.*\//g, '');
+ bfile = bfile.replace(/[\x00-\x1f]+/g, '');
+ var results = $(el).parent().next('div.results');
+
+ switch (action)
+ {
+ case 'delete':
+ var url = '/cgi-bin/browse/delete.jim?file=' +
+ encodeURIComponent(file) + '&type=dir';
+
+ if (confirm('Are you sure you wish to delete "' + file +
+ '" and all files within it?'))
+ {
+ $(results)
+ .html('
' +
+ 'Deleting, please wait...')
+ .slideDown('slow')
+ .load(url, function() {
+ $(direl).delay(3000).slideUp(300, function() {
+ $(direl).remove();
+ });
+ });
+ }
+ break;
+
+ case 'rename':
+ $('#drename').val(bfile);
+ $('#drenameorig').val(file);
+ $('#drenameform').dialog('open');
+ break;
+
+ default:
+ alert('Unhandled action: ' + action);
+ break;
+ }
+};
+
// Bind context menu to opt+ image
$('img.opt').contextMenu(
{
@@ -284,6 +332,14 @@ var menuclick = function(action, el, pos)
menuclick
);
+ $('img.dopt').contextMenu(
+ {
+ menu: 'doptmenu',
+ leftButton: true,
+ },
+ dmenuclick
+ );
+
// Disable items which are not yet implemented.
$('#optmenu').disableContextMenuItems('#title');
@@ -327,6 +383,19 @@ var menuclick = function(action, el, pos)
close: function() { $('#rename').val(''); }
});
+ $('#drenameform').dialog({
+ autoOpen: false,
+ height: 'auto', width: 'auto',
+ modal: true,
+ buttons: {
+ "Update": drename_submit,
+ "Close": function() {
+ $(this).dialog('close');
+ }
+ },
+ close: function() { $('#drename').val(''); }
+ });
+
$('#savestreamform').dialog({
autoOpen: false,
height: 'auto', width: 'auto',
diff --git a/var/mongoose/cgi-bin/browse/delete.jim b/var/mongoose/cgi-bin/browse/delete.jim
index cd9e145..c5538e4 100755
--- a/var/mongoose/cgi-bin/browse/delete.jim
+++ b/var/mongoose/cgi-bin/browse/delete.jim
@@ -20,9 +20,13 @@ if {$type eq "ts"} {
puts "Problem deleting $file, [$ts get error]"
}
exit
+} elseif {$type eq "dir"} {
+ puts -nonewline "Directory..."
+ puts [exec /mod/bin/busybox/rm -rf $file]
+ puts -nonewline "Done..."
+} else {
+ file delete $file
+ file delete "[file rootname $file].hmi"
+ puts "Successfully deleted $file."
}
-file delete $file
-file delete "[file rootname $file].hmi"
-puts "Successfully deleted $file."
-
diff --git a/var/mongoose/html/img/channels/Channel 5 + 1.png b/var/mongoose/html/img/channels/Channel 5 + 1.png
new file mode 120000
index 0000000..a8c9a4b
--- /dev/null
+++ b/var/mongoose/html/img/channels/Channel 5 + 1.png
@@ -0,0 +1 @@
+Channel 5 +1.png
\ No newline at end of file
diff --git a/var/mongoose/html/img/channels/Channel 5 +1.png b/var/mongoose/html/img/channels/Channel 5 +1.png
new file mode 100644
index 0000000..e0700be
Binary files /dev/null and b/var/mongoose/html/img/channels/Channel 5 +1.png differ
diff --git a/var/mongoose/html/img/channels/Channel 5+1.png b/var/mongoose/html/img/channels/Channel 5+1.png
new file mode 120000
index 0000000..a8c9a4b
--- /dev/null
+++ b/var/mongoose/html/img/channels/Channel 5+1.png
@@ -0,0 +1 @@
+Channel 5 +1.png
\ No newline at end of file
diff --git a/var/mongoose/html/img/channels/The Jewellery Channel.png b/var/mongoose/html/img/channels/Sports.png
similarity index 100%
rename from var/mongoose/html/img/channels/The Jewellery Channel.png
rename to var/mongoose/html/img/channels/Sports.png
diff --git a/var/mongoose/html/img/channels/TOPUP Anytime5.png b/var/mongoose/html/img/channels/TOPUP Anytime5.png
new file mode 120000
index 0000000..96837bd
--- /dev/null
+++ b/var/mongoose/html/img/channels/TOPUP Anytime5.png
@@ -0,0 +1 @@
+blank.png
\ No newline at end of file
diff --git a/var/mongoose/html/img/channels/TOPUP Anytime6.png b/var/mongoose/html/img/channels/TOPUP Anytime6.png
new file mode 120000
index 0000000..96837bd
--- /dev/null
+++ b/var/mongoose/html/img/channels/TOPUP Anytime6.png
@@ -0,0 +1 @@
+blank.png
\ No newline at end of file
diff --git a/var/mongoose/html/img/channels/The Zone.png b/var/mongoose/html/img/channels/The Zone.png
new file mode 100644
index 0000000..0c7acd4
Binary files /dev/null and b/var/mongoose/html/img/channels/The Zone.png differ
diff --git a/var/mongoose/lib/cat b/var/mongoose/lib/cat
index cee1485..ca79dd6 100644
--- a/var/mongoose/lib/cat
+++ b/var/mongoose/lib/cat
@@ -1,7 +1,7 @@
if {[expr ! [exists -proc cat ]]} {
proc cat {file} {
- if {[catch {set fp [open $file r]]}} { return }
+ if {[catch {set fp [open $file r}]} { return }
puts [read $fp]
close $fp
}