add grid EPG hours option

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1314 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-01-05 22:27:00 +00:00
parent d6df19dd32
commit 41047e8668
4 changed files with 40 additions and 3 deletions

View File

@ -1,9 +1,9 @@
Package: webif
Priority: optional
Section: web
Version: 0.10.1-7
Version: 0.10.1-8
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-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9),hmt(>=1.1.7),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04)
Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9-1),hmt(>=1.1.7),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.04)
Suggests: ffmpeg
Description: An evolving web interface for the Humax.

View File

@ -41,6 +41,8 @@ set epg_style [$settings epg_style]
set pkgdev [$settings pkgdev]
set notoolbar [$settings notoolbar]
set nomobile [$settings nomobile]
set xepghours [$settings xepghours]
if {$xepghours == 0} { set xepghours 4 }
# Handle updates
@ -75,6 +77,7 @@ proc handle_str_update {var old {text "Value"}} {
handle_str_update hostname $hostname Hostname
_handle_update ascii smtp_server $smtp_server "SMTP Server"
handle_int_update channel_group $channel_group "Channel Group"
handle_int_update xepghours $xepghours "Grid EPG Hours"
handle_str_update epg_style $epg_style "EPG Type"
handle_int_update pkgdev $pkgdev "Development Package Display"
handle_int_update notoolbar $notoolbar "Disable toolbar"
@ -230,6 +233,33 @@ puts "
</tr>
"
puts "
<tr>
<form class=auto id=xepghours method=get action=$env(REQUEST_URI)>
<th class=key>Grid-style EPG Hours</th>
<td><select id=xepghours name=xepghours
class=\"text ui-widget-content ui-corner-all\">
"
foreach xehopt {2 3 4 5 6} {
puts -nonewline "<option value=$xehopt"
if {$xehopt == $xepghours} {
puts -nonewline " selected"
}
puts ">$xehopt hours"
}
puts "
</select>
<small>
<input name=xepghours value=\"set\" type=submit>
</small>
<div id=xepghours_output></div>
</td>
</form>
</tr>
"
puts "
</table>
</fieldset>

View File

@ -35,7 +35,8 @@ if {$stt <= $now} {
set favgroup [[settings] channel_group]
set hours 4.0
set hours [expr 1.0 * [[settings] xepghours]]
if {$hours == 0} { set hours 4.0 }
set seconds $($hours * 3600)
set ostt $stt
@ -78,6 +79,7 @@ proc but {label time {active 1}} {
puts " active=$active>$label</button>"
}
puts "<!-- Hours $hours ($seconds) -->"
puts "<div id=buttons style=\"width: $eventpx; margin-left: ${chanpx}px;\">"
but "&lt&lt; -1 Week" $($stt - 3600 * 24 * 7) \

View File

@ -24,6 +24,7 @@ class settings {
pkgdev 0
notoolbar 0
nomobile 0
xepghours 4
}
settings method hostname {{name ""}} {
@ -102,6 +103,10 @@ settings method channel_group {{group -1}} {
return [$self _nval_setting channel_group $group]
}
settings method xepghours {{hours -1}} {
return [$self _nval_setting xepghours $hours]
}
settings method epg_style {{style -1}} {
if {$style != -1} {
if {$style eq "grid"} { set style 1 } else { set style 0}