update
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1253 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
d5679ead84
commit
4fe5bd1bff
@ -7,8 +7,17 @@ require altrow rsv.class progressbar epg.class system.class
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
set svcmap {}
|
||||
lmap i \
|
||||
[$::channeldb query {select hSvc, usSvcid from TBL_SVC}] \
|
||||
{
|
||||
set svcmap([lindex $i 1]) [lindex $i 3]
|
||||
}
|
||||
|
||||
header
|
||||
|
||||
require epg_popup
|
||||
|
||||
puts {
|
||||
<script type=text/javascript src=/js/jquery.tablesorter.js></script>
|
||||
<link type=text/css href=/css/tsort.css rel=Stylesheet />
|
||||
@ -17,7 +26,7 @@ puts {
|
||||
<script type=text/javascript src=/js/jquery.form.js></script>
|
||||
<script type=text/javascript src=script.js></script>
|
||||
|
||||
<div id=dialogue></div>
|
||||
<div id=sdialogue></div>
|
||||
}
|
||||
|
||||
proc eventheader {{table TBL_RESERVATION} note} {
|
||||
@ -49,6 +58,8 @@ proc eventheader {{table TBL_RESERVATION} note} {
|
||||
}
|
||||
|
||||
proc eventrow {event {table TBL_RESERVATION}} {
|
||||
global svcmap
|
||||
|
||||
set name [$event name]
|
||||
|
||||
set attrs "table=$table sid=[$event get ulslot] \
|
||||
@ -83,6 +94,7 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
} {
|
||||
puts "<br><span class=also> (Folder: [$event folder])</span>"
|
||||
}
|
||||
|
||||
puts "</td>"
|
||||
|
||||
set s [$event get nsttime]
|
||||
@ -97,11 +109,26 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
<span class=footnote>(Last: $ds)</span>"
|
||||
puts "</td><td>--:--:--</td>"
|
||||
} else {
|
||||
set ds "[clock format $s -format "%a %d %b %Y"]<br>
|
||||
[clock format $s -format "%H:%M %Z"]"
|
||||
set elist [$event aul]
|
||||
|
||||
set ds "[clock format $s -format {%a %d %b %Y %H:%M}]"
|
||||
puts "<td nowrap class=\"va"
|
||||
if {$n > $e} { puts " blood" }
|
||||
puts "\">$ds"
|
||||
puts "\">"
|
||||
|
||||
if {[llength $elist] > 0} {
|
||||
lassign [lindex $elist 0] service_id start end event_id
|
||||
if {$start == $s} {
|
||||
puts "<a class=event href=#
|
||||
xs=$svcmap($service_id) xe=$event_id>
|
||||
$ds</a>"
|
||||
} else {
|
||||
puts $ds
|
||||
}
|
||||
} else {
|
||||
puts $ds
|
||||
}
|
||||
|
||||
if {$d > 0 && $n > $s && $n < $e} {
|
||||
puts "<br>"
|
||||
set perc [expr [expr $n - $s] * 100 / $d]
|
||||
@ -109,8 +136,34 @@ proc eventrow {event {table TBL_RESERVATION}} {
|
||||
src=/images/745_1_11_Video_1REC.png>"
|
||||
puts [progressbar $perc]
|
||||
}
|
||||
puts "</td><td>"
|
||||
puts "[clock format [$event get nduration] -format %T]</td>"
|
||||
|
||||
if {[llength $elist] > 1} {
|
||||
puts "<div class=also style=\"margin-top: 0.5em\">"
|
||||
foreach e $elist {
|
||||
lassign $e service_id start end event_id
|
||||
if {$start == $s} continue
|
||||
puts "<a class=event href=#
|
||||
xs=$svcmap($service_id) xe=$event_id>
|
||||
[clock format $start \
|
||||
-format {%a %d %b %Y %H:%M}]</a><br>"
|
||||
}
|
||||
puts "</div>";
|
||||
}
|
||||
|
||||
puts "</td><td align=center>"
|
||||
puts "[clock format [$event get nduration] -format %H:%M]"
|
||||
if {[llength $elist] > 1} {
|
||||
puts "<div class=also style=\"margin-top: 0.5em\">"
|
||||
foreach e $elist {
|
||||
lassign $e service_id start end event_id
|
||||
if {$start == $s} continue
|
||||
puts "[clock format $($end - $start) \
|
||||
-format {%H:%M}]<br>"
|
||||
}
|
||||
puts "</div>";
|
||||
}
|
||||
|
||||
puts "</td>"
|
||||
}
|
||||
|
||||
puts "<td nowrap>[join [$event iconset] ""]</td>"
|
||||
|
@ -37,8 +37,8 @@ $('table.tablesorter thead th').filter('[class!=header]')
|
||||
|
||||
function docancel()
|
||||
{
|
||||
var table = $('#dialogue').attr('table');
|
||||
var slot = $('#dialogue').attr('slot');
|
||||
var table = $('#sdialogue').attr('table');
|
||||
var slot = $('#sdialogue').attr('slot');
|
||||
|
||||
if (confirm('Really remove scheduled event?'))
|
||||
{
|
||||
@ -46,7 +46,7 @@ function docancel()
|
||||
'&table=' + table, function() {
|
||||
window.location.reload(true);
|
||||
});
|
||||
$('#dialogue').dialog('close');
|
||||
$('#sdialogue').dialog('close');
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,14 +57,14 @@ var $buttons2 = $.extend(
|
||||
{"Cancel Event": function() { docancel() }},
|
||||
$buttons1);
|
||||
|
||||
var $dialog = $('#dialogue').dialog({
|
||||
var $dialog = $('#sdialogue').dialog({
|
||||
title: "Schedule Details",
|
||||
modal: false, autoOpen: false,
|
||||
height: 500, width: 700,
|
||||
show: 'scale', hide: 'fade',
|
||||
draggable: true, resizable: true,
|
||||
buttons: $buttons2,
|
||||
close: function(e,u) { $('#dialogue').empty().html(
|
||||
close: function(e,u) { $('#sdialogue').empty().html(
|
||||
'<img src="/img/loading.gif" alt="loading">'); }
|
||||
});
|
||||
|
||||
@ -73,11 +73,11 @@ function schedpopup(e, o)
|
||||
e.preventDefault();
|
||||
var slot = o.attr('slot');
|
||||
var table = o.attr('table');
|
||||
$('#dialogue').attr('slot', slot).attr('table', table);
|
||||
$('#sdialogue').attr('slot', slot).attr('table', table);
|
||||
|
||||
var url = 'info.jim?slot=' + slot +
|
||||
'&table=' + table;
|
||||
$('#dialogue').load(url);
|
||||
$('#sdialogue').load(url);
|
||||
$dialog.dialog('open');
|
||||
}
|
||||
$('a.schedule').click(function(e) { schedpopup(e, $(this)) });
|
||||
|
@ -419,7 +419,7 @@ proc {epg dbfetch} {mode args} {
|
||||
lappend records [epg new $rec]
|
||||
}
|
||||
} msg]} {
|
||||
puts "No cached EPG data, try again later."
|
||||
puts "No cached EPG data, try again later ($msg)."
|
||||
}
|
||||
return $records
|
||||
}
|
||||
|
@ -65,7 +65,10 @@ $(document).ready(function() {
|
||||
.attr('xe', o.attr('xe'));
|
||||
$dialog.dialog('open');
|
||||
}
|
||||
$('a.event').click(function(e) { epgpopup(e, $(this)) });
|
||||
$('a.event').click(function(e) {
|
||||
e.preventDefault();
|
||||
epgpopup(e, $(this))
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ rsv method 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]
|
||||
catch {lappend aul [list $service $start $end $event_id]}
|
||||
}
|
||||
return $aul
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user