diff --git a/CONTROL/control b/CONTROL/control
index 2ea5327..c81296c 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
-Version: 0.9.14-2
+Version: 0.10.0
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2)
diff --git a/var/mongoose/cgi-bin/browse/browse.js b/var/mongoose/cgi-bin/browse/browse.js
index 8884d63..9c2d53e 100755
--- a/var/mongoose/cgi-bin/browse/browse.js
+++ b/var/mongoose/cgi-bin/browse/browse.js
@@ -412,7 +412,8 @@ var menuclick = function(action, el, pos)
case 'download':
window.location.href = '/cgi-bin/browse/download.jim?file=' +
- file;
+ file + '&base=' +
+ encodeURIComponent(document.URL.match(/:\/\/(.[^/]+)/)[1]);
break;
case 'crop':
diff --git a/var/mongoose/cgi-bin/browse/download.jim b/var/mongoose/cgi-bin/browse/download.jim
index 3b74951..c264572 100755
--- a/var/mongoose/cgi-bin/browse/download.jim
+++ b/var/mongoose/cgi-bin/browse/download.jim
@@ -11,6 +11,7 @@ cgi_input
#cgi_dump
set file [cgi_get file]
+set urlbase [cgi_get base ""]
# Default to just downloading the raw file.
set url $file
@@ -22,7 +23,7 @@ if {[string match {*.ts} $file]} {
# If it's encrypted on disk and the DLNA option is available,
# then use the server to perform decryption on the fly.
if {[$ts flag "ODEncrypted"] > 0} {
- set dlna [$ts dlnaloc]
+ set dlna [$ts dlnaloc $urlbase]
if {[llength $dlna]} { lassign $dlna url mime }
#puts "DLNA: $dlna"
diff --git a/var/mongoose/html/m/index.jim b/var/mongoose/html/m/index.jim
index b5ce6e9..47ca696 100755
--- a/var/mongoose/html/m/index.jim
+++ b/var/mongoose/html/m/index.jim
@@ -40,11 +40,11 @@ puts ""
tb "/images/323_1_10_Menu_Video.png" "Browse" "browse.jim"
tb "/images/321_1_00_Menu_CHList.png" "Schedule" "schedule.jim"
-tb "/img/spanner.png" "Services" "#"
+tb "/img/spanner.png" "Services" "services.jim"
tb "/img/packages.png" "Packages" "pkgi_b.jim"
tb "/images/326_1_00_Menu_Settings.png" "Settings" \
"/cgi-bin/settings.jim\" rel=\"external"
-tb "/img/diagnostics.png" "Diag" "#"
+#tb "/img/diagnostics.png" "Diag" "#"
tb "/img/desktop.png" "Desktop Version" "/\" rel=\"external"
#eval_plugins toolbar
diff --git a/var/mongoose/html/m/lib/header.jim b/var/mongoose/html/m/lib/header.jim
index ff73842..c83fc62 100755
--- a/var/mongoose/html/m/lib/header.jim
+++ b/var/mongoose/html/m/lib/header.jim
@@ -25,6 +25,8 @@ puts {
+
[$pkg get latest]
" @@ -61,38 +61,34 @@ proc pkgrow {type pkg} { set btype Remove } -# puts "
Processing...');
+ s('.opkg_popup').popup('open', {transition: 'pop'})
+ s('.opkg_popup_text').load('/cgi-bin/opkg.jim?cmd=' + arg, function() {
+ s('.opkg_op_complete').slideDown('slow');
+ if (opkgreload)
+ window.location.reload(true);
+ else
+ {
+ if (pkg)
+ s('.pkg_' + pkg).slideUp();
+ $.mobile.hidePageLoadingMsg();
+ s('a').enable();
+ }
+ });
+}
+
+$(document).delegate('#pkga,#pkgi,#pkgu', 'pageinit', function() {
+
+ $('a.remove, a.install, a.upgrade')
+ .click(function() {
+ if ($(this).attr('action') == 'remove' &&
+ !confirm('Please confirm removal of the ' +
+ $(this).attr('pkg') + ' package.'))
+ return;
+
+ execopkg(encodeURIComponent($(this).attr('action') +
+ ' ' + $(this).attr('pkg')), $(this).attr('pkg'));
+ });
+
+ $('button.opkg_update').on('click', function() {
+ opkgreload = true;
+ execopkg('update');
+ });
+
+ $('button.opkg_upgrade').on('click', function() {
+ opkgreload = true;
+ execopkg('upgrade');
+ });
+});
+
+$(document).delegate('#servicespage', 'pageinit', function() {
+
+ // Don't allow turning off the web server from within the web server..
+ $('select[service=mongoose]').disable();
+
+ $('select.auto,select.toggle').on('change', function() {
+ var url = '/cgi-bin/service.jim?action=' +
+ escape($(this).attr('act')) +
+ '&service=' +
+ escape($(this).attr('service'));
+ $.get(url);
+ });
+
+});
diff --git a/var/mongoose/html/m/services.jim b/var/mongoose/html/m/services.jim
new file mode 100755
index 0000000..2afa555
--- /dev/null
+++ b/var/mongoose/html/m/services.jim
@@ -0,0 +1,59 @@
+#!/mod/bin/jimsh
+
+package require cgi
+source /mod/webif/lib/setup
+
+mheader
+
+set services [split [exec /mod/bin/service mlist]]
+
+puts "Not installed.
" + puts "