fix bugs, show AR/Pad status
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@572 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
de47e46fe7
commit
593b7dbb89
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.8.7-1
|
||||
Version: 0.8.8
|
||||
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.2),ssmtp,anacron
|
||||
|
@ -17,12 +17,23 @@ set event [rsv slot $table $slot]
|
||||
|
||||
set rsvicon [$event icon]
|
||||
if {$rsvicon ne ""} {
|
||||
set rsvicon "<img src='images/$rsvicon' height=20>
|
||||
set rsvicon "<img src='images/$rsvicon' height=20>"
|
||||
if {[$event get ersvtype] == 3} {
|
||||
if {[$event padded]} {
|
||||
set padding "<- [expr [$event get ulPreOffset] / 60], [expr [$event get ulPostOffset] / 60] ->"
|
||||
append rsvicon \
|
||||
"<img src=/img/pad.png height=20
|
||||
title=\"$padding\" alt=\"$padding\">"
|
||||
} else {
|
||||
append rsvicon \
|
||||
"<img src=/img/ar.png height=20>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set RKIcon [$event RKIcon]
|
||||
if {$RKIcon ne ""} {
|
||||
set RKIcon "<img src='images/$RKIcon' height=20>
|
||||
set RKIcon "<img src='images/$RKIcon' height=20>"
|
||||
}
|
||||
|
||||
if {[$event get ucRecKind] == 4} {
|
||||
@ -115,7 +126,7 @@ foreach ev [split [$event get szEventToRecord] "|"] {
|
||||
}
|
||||
puts "</td></tr>"
|
||||
puts "<tr><th>Accepted</th><td>"
|
||||
if {[$event get aulEventToRecordInfo] != ""} {
|
||||
if {[$event get aulEventToRecordInfo] ne ""} {
|
||||
puts "Yes"
|
||||
}
|
||||
puts "</td></tr>"
|
||||
|
@ -10,6 +10,16 @@ table.tablesorter .header {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
table.tablesorter .headerplain {
|
||||
background-image: url(/img/tsort/bgplain.png);
|
||||
background-repeat: no-repeat;
|
||||
border-left: 1px solid #FFF;
|
||||
border-right: 1px solid #000;
|
||||
border-top: 1px solid #FFF;
|
||||
padding-top: 8px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
table.tablesorter .headerSortUp {
|
||||
background-image: url(/img/tsort/asc.png);
|
||||
background-repeat: no-repeat;
|
||||
|
BIN
var/mongoose/html/img/ar.png
Normal file
BIN
var/mongoose/html/img/ar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
var/mongoose/html/img/pad.png
Normal file
BIN
var/mongoose/html/img/pad.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
var/mongoose/html/img/tsort/bgplain.png
Normal file
BIN
var/mongoose/html/img/tsort/bgplain.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -38,6 +38,8 @@ $(document).ready(function() {
|
||||
7: { sorter: false }
|
||||
}
|
||||
});
|
||||
$('table.tablesorter thead th').filter('[class!=header]')
|
||||
.addClass('headerplain');
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
@ -133,10 +135,21 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
}
|
||||
|
||||
if {$rsvicon ne ""} {
|
||||
set rsvicon "<img src='/images/$rsvicon' height=20>
|
||||
set rsvicon "<img src='/images/$rsvicon' height=20>"
|
||||
if {[$event get ersvtype] == 3} {
|
||||
if {[$event padded]} {
|
||||
set padding "<- [expr [$event get ulPreOffset] / 60], [expr [$event get ulPostOffset] / 60] ->"
|
||||
append rsvicon \
|
||||
"<img src=/img/pad.png height=20
|
||||
title=\"$padding\" alt=\"$padding\">"
|
||||
} else {
|
||||
append rsvicon \
|
||||
"<img src=/img/ar.png height=20>"
|
||||
}
|
||||
}
|
||||
}
|
||||
if {$RKIcon ne ""} {
|
||||
set RKIcon "<img src='/images/$RKIcon' height=20>
|
||||
set RKIcon "<img src='/images/$RKIcon' height=20>"
|
||||
}
|
||||
|
||||
if {$table eq "pending"} {
|
||||
@ -196,14 +209,13 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
puts "[clock format [$event get nduration] -format %T]</td>"
|
||||
}
|
||||
|
||||
puts "<td nowrap>$rsvicon $RKIcon</td>"
|
||||
puts "<td nowrap>$rsvicon $RKIcon</td><td>"
|
||||
if {[$event get aulEventToRecordInfo] != ""} {
|
||||
puts "<td><img src=/img/lightning.png
|
||||
puts "<img src=/img/lightning.png
|
||||
alt=\"Accepted by Humax\"
|
||||
title=\"Accepted by Humax\"></td>"
|
||||
} else {
|
||||
puts "<td> </td>"
|
||||
title=\"Accepted by Humax\">"
|
||||
}
|
||||
puts "</td>";
|
||||
puts "</tr>"
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
source /mod/var/mongoose/lib/setup
|
||||
|
||||
if {![exists -proc class ]} { package require oo }
|
||||
if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
||||
if {![exists -proc class]} { package require oo }
|
||||
if {![exists -proc sqlite3.open]} { package require sqlite3 }
|
||||
require settings.class system.class
|
||||
|
||||
set rsvdb [sqlite3.open /var/lib/humaxtv/rsv.db]
|
||||
@ -54,6 +54,17 @@ class rsv {
|
||||
action 0
|
||||
}
|
||||
|
||||
rsv method aul {} {
|
||||
if {![exists -proc binary]} { package require binary }
|
||||
set aul {}
|
||||
for {set i 0} {$i < [string length $aulEventToRecordInfo]} {incr i 16} {
|
||||
binary scan [string range $aulEventToRecordInfo $i $($i + 15)] \
|
||||
iiii service start end event_id
|
||||
lappend aul [list $service $start $end $event_id]
|
||||
}
|
||||
return $aul
|
||||
}
|
||||
|
||||
rsv method clear_ulslot {} {
|
||||
set ulslot -1
|
||||
}
|
||||
@ -125,6 +136,16 @@ rsv method set_delete {} {
|
||||
set action 1
|
||||
}
|
||||
|
||||
rsv method set_unpad {} {
|
||||
set action 2
|
||||
}
|
||||
|
||||
rsv method set_pad {{pre 60} {post 60}} {
|
||||
set action 3
|
||||
set ulPreOffset $pre
|
||||
set ulPostOffset $post
|
||||
}
|
||||
|
||||
rsv method remove_pending {} {
|
||||
$::rsvdb query "delete from pending where ulslot = $ulslot"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user