diff --git a/CONTROL/control b/CONTROL/control
index 0b90d24..9763c34 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -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
diff --git a/var/mongoose/cgi-bin/sched_info.jim b/var/mongoose/cgi-bin/sched_info.jim
index 958254a..8b7eba7 100755
--- a/var/mongoose/cgi-bin/sched_info.jim
+++ b/var/mongoose/cgi-bin/sched_info.jim
@@ -17,12 +17,23 @@ set event [rsv slot $table $slot]
set rsvicon [$event icon]
if {$rsvicon ne ""} {
- set rsvicon "
+ set rsvicon ""
+ if {[$event get ersvtype] == 3} {
+ if {[$event padded]} {
+ set padding "<- [expr [$event get ulPreOffset] / 60], [expr [$event get ulPostOffset] / 60] ->"
+ append rsvicon \
+ ""
+ } else {
+ append rsvicon \
+ ""
+ }
+ }
}
set RKIcon [$event RKIcon]
if {$RKIcon ne ""} {
- set RKIcon "
+ set RKIcon ""
}
if {[$event get ucRecKind] == 4} {
@@ -115,7 +126,7 @@ foreach ev [split [$event get szEventToRecord] "|"] {
}
puts ""
puts "
Accepted | "
-if {[$event get aulEventToRecordInfo] != ""} {
+if {[$event get aulEventToRecordInfo] ne ""} {
puts "Yes"
}
puts " |
"
diff --git a/var/mongoose/html/css/tsort.css b/var/mongoose/html/css/tsort.css
index 3a842a9..5c8b011 100644
--- a/var/mongoose/html/css/tsort.css
+++ b/var/mongoose/html/css/tsort.css
@@ -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;
diff --git a/var/mongoose/html/img/ar.png b/var/mongoose/html/img/ar.png
new file mode 100644
index 0000000..95f594a
Binary files /dev/null and b/var/mongoose/html/img/ar.png differ
diff --git a/var/mongoose/html/img/pad.png b/var/mongoose/html/img/pad.png
new file mode 100644
index 0000000..b93180f
Binary files /dev/null and b/var/mongoose/html/img/pad.png differ
diff --git a/var/mongoose/html/img/tsort/bgplain.png b/var/mongoose/html/img/tsort/bgplain.png
new file mode 100644
index 0000000..8130661
Binary files /dev/null and b/var/mongoose/html/img/tsort/bgplain.png differ
diff --git a/var/mongoose/include/sched.jim b/var/mongoose/include/sched.jim
index e911199..8d85685 100755
--- a/var/mongoose/include/sched.jim
+++ b/var/mongoose/include/sched.jim
@@ -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 "
+ set rsvicon ""
+ if {[$event get ersvtype] == 3} {
+ if {[$event padded]} {
+ set padding "<- [expr [$event get ulPreOffset] / 60], [expr [$event get ulPostOffset] / 60] ->"
+ append rsvicon \
+ ""
+ } else {
+ append rsvicon \
+ ""
+ }
+ }
}
if {$RKIcon ne ""} {
- set RKIcon "
+ set RKIcon ""
}
if {$table eq "pending"} {
@@ -196,14 +209,13 @@ proc eventrow {event {table TBL_RESERVATION}} {
puts "[clock format [$event get nduration] -format %T]"
}
- puts "$rsvicon $RKIcon | "
+ puts "$rsvicon $RKIcon | "
if {[$event get aulEventToRecordInfo] != ""} {
- puts " | | "
- } else {
- puts " | "
+ title=\"Accepted by Humax\">"
}
+ puts "";
puts ""
}
diff --git a/var/mongoose/lib/rsv.class b/var/mongoose/lib/rsv.class
index 48e8bb7..fb09a2d 100755
--- a/var/mongoose/lib/rsv.class
+++ b/var/mongoose/lib/rsv.class
@@ -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"
}