fix bookmarks, add serial number

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@2012 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-07-06 20:11:59 +00:00
parent 59006ff474
commit 1c00e63f48
7 changed files with 42 additions and 20 deletions

View File

@ -1,10 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.15-5
Version: 1.0.15-6
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(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),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
Depends: webif-channelicons(>=1.1.12-1),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(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),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
Suggests:
Description: An evolving web interface for the Humax.
Tags: http://hummy.tv/forum/threads/5031/

View File

@ -10,7 +10,8 @@ header
set rfile [cgi_get file]
set ts [ts fetch $rfile]
set dir [file dirname $rfile]
set dir [string map {' \\'} [file dirname $rfile]]
set erfile [string map {' \\'} $rfile]
set len [$ts duration 1]
@ -18,7 +19,7 @@ puts "
<script type=text/javascript>
var initbookmarks = '[$ts bookmarks]';
var len = [$ts duration 1];
var file = '$rfile';
var file = '$erfile';
var dir = '$dir';
</script>
<fieldset class=cleft>

View File

@ -2,7 +2,7 @@
package require cgi
source /mod/webif/lib/setup
require settings.class plugin system.class
require settings.class plugin system.class spinner.class
httpheader
@ -130,6 +130,12 @@ jqplugin form iphone-style-checkboxes touchpunch
jscss settings.js
header
[spinner new {
text "Loading Settings..."
size "1.2em"
style "margin: 1em;"
}] start
puts {
<div id=accordion>
}

View File

@ -21,11 +21,6 @@
$(document).ready(function () {
$(":submit").button();
//$('[type="checkbox"] :not(.yesno)').iphoneStyle();
$('[type="checkbox"]').iphoneStyle({
checkedLabel: 'YES',
uncheckedLabel: 'NO'
});
$('form.auto').each(function(i, el) {
var id = $(this).attr('id');
var output = '#' + id + '_output';
@ -74,11 +69,24 @@ $(document).ready(function () {
});
});
// Use window.name to remember the active accordion index
if (window.name == "")
window.name = "0";
accordionindex = ~~window.name;
$('#accordion').accordion({
active: accordionindex,
header: 'h4',
collapsible: true,
active: 0,
heightStyle: 'content'
heightStyle: 'content',
activate: function(event, ui) {
window.name = $('#accordion').accordion('option', 'active');
}
}).show();
$('[type="checkbox"]').iphoneStyle({
checkedLabel: 'YES',
uncheckedLabel: 'NO'
});
// For now - until plugins are updated.

View File

@ -9,18 +9,13 @@ if {$modbuild > 0} {
append modver " (build $modbuild)"
}
if {[dict exists $env SERVER_SOFTWARE]} {
set wstype "Lighttpd"
} else {
set wstype "Mongoose"
}
puts "<span class=blood style=\"font-size: 0.9em; float: right; clear: right\">
Web interface version: [system pkgver webif] ($wstype)<br>
Web interface version: [system pkgver webif]<br>
Custom firmware version: $modver
"
catch {set fhtcpversion [system fhtcpversion]}
catch {set kernelver [system kernelver]}
puts "<br>Humax Version: $fhtcpversion (kernel $kernelver)"
puts "<br>Serial Number: [system serialno]"
puts "</span>"

View File

@ -7,7 +7,7 @@ proc hexdump data {
set bytes [string byterange $data $n $($n+15)]
binary scan $bytes H* hex
set hex [regexp -all -inline .. $hex]
regsub -all -- {[^a-z]} $bytes . ascii
regsub -all -- {[^a-z0-9]} $bytes . ascii
append dump [format "%04X: %-48s %-16s\n" $n $hex $ascii]
incr n 16
}

View File

@ -66,6 +66,18 @@ proc {system fhtcpversion} {} {
return $ver
}
# 822272+6 - MAC address
# 833536 - Serial number
proc {system serialno} {} {
set fd [open /dev/mtd3 r]
$fd seek 833536
set bytes [$fd read 14]
$fd close
return "[string range $bytes 0 1] [string range $bytes 2 8] [
string range $bytes 9 end]"
}
proc {system kernelver} {} {
#1 SMP Sun Mar 25 18:30:38 KST 2012
set ver [string range [exec uname -v] 11 end]