diff --git a/CONTROL/control b/CONTROL/control
index f0aa0d4..a65d867 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
-Version: 1.0.0
+Version: 1.0.0-2
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.0.5),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05),ffmpeg,id3v2
diff --git a/CONTROL/postinst b/CONTROL/postinst
index 0141dcc..2a59572 100755
--- a/CONTROL/postinst
+++ b/CONTROL/postinst
@@ -39,5 +39,7 @@ if [ ! -f /mod/webif/.strip-updated ]; then
touch /mod/webif/.strip-updated
fi
+/mod/webif/lib/bin/diskattrs
+
exit 0
diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim
index 84663a1..418842b 100755
--- a/var/mongoose/cgi-bin/settings.jim
+++ b/var/mongoose/cgi-bin/settings.jim
@@ -7,7 +7,8 @@ require settings.class plugin system.class
httpheader
if {[cgi_get act] eq "https"} {
- if {[cgi_get val off] eq "off"} {
+ set val [cgi_get val off]
+ if {$val in {0 off}} {
file delete /mod/etc/mongoose.cert
puts "HTTPS Server will be disabled after next reboot."
} else {
@@ -18,7 +19,8 @@ if {[cgi_get act] eq "https"} {
}
if {[cgi_get act] eq "xtelnet"} {
- if {[cgi_get val off] eq "off"} {
+ set val [cgi_get val off]
+ if {$val in {0 off}} {
file delete /mod/boot/xtelnet
puts "Telnet server expert mode will be disabled after next reboot."
} else {
@@ -37,6 +39,7 @@ set epg_style [$settings epg_style]
set pkgdev [$settings pkgdev]
set notoolbar [$settings notoolbar]
set nomobile [$settings nomobile]
+set nohelplinks [$settings nohelplinks]
set xepghours [$settings xepghours]
if {$xepghours == 0} { set xepghours 4 }
set genrededup [$settings genrededup]
@@ -80,6 +83,7 @@ handle_str_update epg_style $epg_style "EPG Type"
handle_int_update pkgdev $pkgdev "Development Package Display"
handle_int_update notoolbar $notoolbar "Disable toolbar"
handle_int_update nomobile $nomobile "Disable mobile link"
+handle_int_update nohelplinks $nohelplinks "Disable help links"
handle_int_update genrededup $genrededup "Genre search dedup"
handle_int_update autolog $autolog "Auto-processing log level"
@@ -122,6 +126,22 @@ puts {
}
+proc setting_toggle {name attr checked {invert 0} {val 0}} {
+ puts -nonewline "
+
+ $name |
+
+
+ |
+
+ "
+}
+
puts "
-
-"
-
-puts "
-
@@ -432,34 +421,16 @@ puts -nonewline "
-
"
diff --git a/var/mongoose/cgi-bin/settings.js b/var/mongoose/cgi-bin/settings.js
index 933121d..653e30d 100644
--- a/var/mongoose/cgi-bin/settings.js
+++ b/var/mongoose/cgi-bin/settings.js
@@ -41,117 +41,33 @@ $(document).ready(function () {
});
});
- $('#pkgdev').change(function() {
+ $('.setting_toggle').change(function() {
var arg = '0';
+ var urlargs;
if ($(this).attr('checked'))
arg = '1';
- $(this).disable();
+ if ($(this).attr('invert'))
+ arg = arg == "0" ? "1" : "0";
- $('#pkgdev_output')
- .empty()
- .show('slow')
- .load('/cgi-bin/settings.jim?pkgdev=' + arg,
- function() {
- $('#pkgdev').enable();
- $('#pkgdev_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
+ var el = $(this);
+ var attr = $(this).attr('attr');
+ var output = '#' + attr + '_output';
- $('#https_toggle').change(function() {
- var arg = 'off';
- if ($(this).attr('checked'))
- arg = 'on';
+ if ($(this).attr('useval'))
+ urlargs = 'act=' + attr + '&val=' + arg;
+ else
+ urlargs = attr + '=' + arg;
$(this).disable();
- $('#https_output')
- .empty()
- .html('Please Wait...')
- .show('slow')
- .load('/cgi-bin/settings.jim?act=https&val=' + arg,
- function() {
- $('#https_toggle').enable();
- $('#https_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#xtelnet_toggle').change(function() {
- var arg = 'off';
- if ($(this).attr('checked'))
- arg = 'on';
-
- $(this).disable();
-
- $('#xtelnet_output')
- .empty()
- .html('Please Wait...')
- .show('slow')
- .load('/cgi-bin/settings.jim?act=xtelnet&val=' + arg,
- function() {
- $('#xtelnet_toggle').enable();
- $('#xtelnet_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#toolbar_toggle').change(function() {
- var arg = '1';
- if ($(this).attr('checked'))
- arg = '0';
-
- $(this).disable();
-
- $('#toolbar_output')
+ $(output)
.empty()
.show('slow')
- .load('/cgi-bin/settings.jim?notoolbar=' + arg,
+ .load('/cgi-bin/settings.jim?' + urlargs,
function() {
- $('#toolbar_toggle').enable();
- $('#toolbar_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#mobile_toggle').change(function() {
- var arg = '1';
- if ($(this).attr('checked'))
- arg = '0';
-
- $(this).disable();
-
- $('#mobile_output')
- .empty()
- .show('slow')
- .load('/cgi-bin/settings.jim?nomobile=' + arg,
- function() {
- $('#mobile_toggle').enable();
- $('#mobile_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#genrededup_toggle').change(function() {
- var arg = '0';
- if ($(this).attr('checked'))
- arg = '1';
-
- $(this).disable();
-
- $('#genrededup_output')
- .empty()
- .show('slow')
- .load('/cgi-bin/settings.jim?genrededup=' + arg,
- function() {
- $('#genrededup_toggle').enable();
- $('#genrededup_output')
+ $(el).enable();
+ $(output)
.css('font-style', 'italic')
.delay(2000).fadeOut('slow');
});
diff --git a/var/mongoose/include/diskcheck.jim b/var/mongoose/include/diskcheck.jim
index 5bdee59..81d3fde 100755
--- a/var/mongoose/include/diskcheck.jim
+++ b/var/mongoose/include/diskcheck.jim
@@ -1,6 +1,10 @@
#!/mod/bin/jimsh
source /mod/webif/lib/setup
+require system.class
+
+if {[system model] eq "HDR"} {
+
require settings.class
set smartattrs {realloc pending offline}
@@ -58,8 +62,11 @@ this device.
} else {
puts "
- Don't panic; for help and assistance, visit
- hummy.tv
+ Don't panic; for help, visit
+
+ wiki.hummy.tv
+
"
}
puts "
@@ -67,3 +74,5 @@ this device.
"
}
+}
+
diff --git a/var/mongoose/include/menuicons.jim b/var/mongoose/include/menuicons.jim
index 2487fa1..4a573b9 100755
--- a/var/mongoose/include/menuicons.jim
+++ b/var/mongoose/include/menuicons.jim
@@ -34,7 +34,9 @@ proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
"
}
-if {[[settings] epg_style] eq "grid"} {
+set settings [settings]
+
+if {[$settings epg_style] eq "grid"} {
set epglink "/cgi-bin/xepg.jim"
} else {
set epglink "/epg.shtml"
@@ -69,6 +71,8 @@ menuitem "Diagnostics" "/img/diagnostics.png" \
eval_plugins menu
+if {[$settings nohelplinks] == 0} {
+
menuitem "-reset" "" ""
puts {}
@@ -85,4 +89,5 @@ menuitem "Twitter
Feed" "/img/silver-twitter-bird-button.png" \
"http://twitter.com/HummyPkg target=_blank" 0 100 \
"style=\"padding: 1em\""
+}
diff --git a/var/mongoose/lib/settings.class b/var/mongoose/lib/settings.class
index a5968f4..08924ec 100644
--- a/var/mongoose/lib/settings.class
+++ b/var/mongoose/lib/settings.class
@@ -24,6 +24,7 @@ class settings {
pkgdev 0
notoolbar 0
nomobile 0
+ nohelplinks 0
xepghours 4
genrededup 0
autolog 0
@@ -160,6 +161,10 @@ settings method nomobile {{val -1}} {
return [$self _nval_setting nomobile $val]
}
+settings method nohelplinks {{val -1}} {
+ return [$self _nval_setting nohelplinks $val]
+}
+
settings method sortorder {{val -1}} {
return [$self _nval_setting sortorder $val]
}