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
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 0.8.7-1
|
Version: 0.8.8
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
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
|
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]
|
set rsvicon [$event icon]
|
||||||
if {$rsvicon ne ""} {
|
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]
|
set RKIcon [$event RKIcon]
|
||||||
if {$RKIcon ne ""} {
|
if {$RKIcon ne ""} {
|
||||||
set RKIcon "<img src='images/$RKIcon' height=20>
|
set RKIcon "<img src='images/$RKIcon' height=20>"
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[$event get ucRecKind] == 4} {
|
if {[$event get ucRecKind] == 4} {
|
||||||
@ -115,7 +126,7 @@ foreach ev [split [$event get szEventToRecord] "|"] {
|
|||||||
}
|
}
|
||||||
puts "</td></tr>"
|
puts "</td></tr>"
|
||||||
puts "<tr><th>Accepted</th><td>"
|
puts "<tr><th>Accepted</th><td>"
|
||||||
if {[$event get aulEventToRecordInfo] != ""} {
|
if {[$event get aulEventToRecordInfo] ne ""} {
|
||||||
puts "Yes"
|
puts "Yes"
|
||||||
}
|
}
|
||||||
puts "</td></tr>"
|
puts "</td></tr>"
|
||||||
|
@ -10,6 +10,16 @@ table.tablesorter .header {
|
|||||||
height: auto;
|
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 {
|
table.tablesorter .headerSortUp {
|
||||||
background-image: url(/img/tsort/asc.png);
|
background-image: url(/img/tsort/asc.png);
|
||||||
background-repeat: no-repeat;
|
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 }
|
7: { sorter: false }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('table.tablesorter thead th').filter('[class!=header]')
|
||||||
|
.addClass('headerplain');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -133,10 +135,21 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$rsvicon ne ""} {
|
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 ""} {
|
if {$RKIcon ne ""} {
|
||||||
set RKIcon "<img src='/images/$RKIcon' height=20>
|
set RKIcon "<img src='/images/$RKIcon' height=20>"
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$table eq "pending"} {
|
if {$table eq "pending"} {
|
||||||
@ -196,14 +209,13 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
|||||||
puts "[clock format [$event get nduration] -format %T]</td>"
|
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] != ""} {
|
if {[$event get aulEventToRecordInfo] != ""} {
|
||||||
puts "<td><img src=/img/lightning.png
|
puts "<img src=/img/lightning.png
|
||||||
alt=\"Accepted by Humax\"
|
alt=\"Accepted by Humax\"
|
||||||
title=\"Accepted by Humax\"></td>"
|
title=\"Accepted by Humax\">"
|
||||||
} else {
|
|
||||||
puts "<td> </td>"
|
|
||||||
}
|
}
|
||||||
|
puts "</td>";
|
||||||
puts "</tr>"
|
puts "</tr>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
source /mod/var/mongoose/lib/setup
|
source /mod/var/mongoose/lib/setup
|
||||||
|
|
||||||
if {![exists -proc class ]} { package require oo }
|
if {![exists -proc class]} { package require oo }
|
||||||
if {![exists -proc sqlite3.open ]} { package require sqlite3 }
|
if {![exists -proc sqlite3.open]} { package require sqlite3 }
|
||||||
require settings.class system.class
|
require settings.class system.class
|
||||||
|
|
||||||
set rsvdb [sqlite3.open /var/lib/humaxtv/rsv.db]
|
set rsvdb [sqlite3.open /var/lib/humaxtv/rsv.db]
|
||||||
@ -54,6 +54,17 @@ class rsv {
|
|||||||
action 0
|
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 {} {
|
rsv method clear_ulslot {} {
|
||||||
set ulslot -1
|
set ulslot -1
|
||||||
}
|
}
|
||||||
@ -125,6 +136,16 @@ rsv method set_delete {} {
|
|||||||
set action 1
|
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 {} {
|
rsv method remove_pending {} {
|
||||||
$::rsvdb query "delete from pending where ulslot = $ulslot"
|
$::rsvdb query "delete from pending where ulslot = $ulslot"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user