finish epg popup and cross links. Improve status.

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@168 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-06-09 00:42:26 +00:00
parent 5fb2b59a3a
commit 57d4b60a8d
11 changed files with 759 additions and 1121 deletions

View File

@ -65,6 +65,8 @@ if {[$record get series_crid] != ""} {
<tr>
<th nowrap>Series CRID</th><td>
<a href=/cgi-bin/epg_search.jim?scrid=[$record get series_crid]>
<img border=0
src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$record get channel_crid][$record get series_crid]
</a>
</td>
@ -77,6 +79,8 @@ if {[$record get rec_crid] != ""} {
if {$rec != ""} {
puts "<tr><th>Recommends</th><td>
<a href=/cgi-bin/epg_search.jim?crid=[$rec get event_crid]>
<img border=0
src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$rec get name]
([$rec get channel_crid][$rec get event_crid])
</a>
@ -86,8 +90,8 @@ if {[$record get rec_crid] != ""} {
puts "
<tr>
<td colspan=2>
[$record icon_set]
<td colspan=2 valign=top>
[join [$record icon_set] "&nbsp;"]
</td>
</tr>
</table>

View File

@ -3,6 +3,7 @@
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
puts "Content-Type: text/html"
puts ""
@ -11,6 +12,8 @@ source /mod/var/mongoose/html/lib/header.jim
puts "<script type=text/javascript src=/js/highlight.js></script>"
source /mod/var/mongoose/lib/epg_popup
cgi_input
#cgi_dump
#set _cgi [dict create term "doctor who"]
@ -49,26 +52,34 @@ proc cts {type img text} {
puts {
<br>
<div style="float: left; clear: left; width: 15em">
Content Type Searches:
</div>
<div style="float: left">
<table>
<tr><td rowspan=2>Content Type Searches</td>
<td>
}
cts 1 "Movie" "Film/Drama"
puts "</td><td>"
cts 2 "News" "News/Current affairs"
cts 3 "Show" "Show/Game show"
puts "</td><td>"
cts 4 "Sports" "Sport"
cts 5 "Children" "Children"
cts 10 "Leisure" "Leisure"
puts {
</div>
<div style="float: left; margin-left: 15em">
}
cts 6 "Music" "Music/Ballet/Dance"
cts 7 "Art" "Arts/Culture"
cts 8 "Society" "Social/Political/Economic"
puts "</td><td>"
cts 9 "Education" "Education/Science/Factual"
puts { </div> }
puts "</td><td>"
cts 10 "Leisure" "Leisure"
puts "</td></tr><tr><td>"
cts 7 "Art" "Arts/Culture"
puts "</td><td>"
cts 3 "Show" "Show/Game show"
puts "</td><td>"
cts 5 "Children" "Children"
puts "</td><td>"
cts 8 "Society" "Social/Political/Economic"
puts "</td><td>"
cts 6 "Music" "Music/Ballet/Dance"
puts "</tr></table>"
if {[llength $res] > 0} {
puts {

View File

@ -4,6 +4,7 @@ package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/spinner.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
puts "Content-Type: text/html"
puts ""
@ -19,6 +20,8 @@ source /mod/var/mongoose/html/lib/header.jim
cgi_input
#cgi_dump
source /mod/var/mongoose/lib/epg_popup
set service 0
set service 4351
catch { set service [dict get $_cgi service] }

View File

@ -3,6 +3,10 @@
puts "Content-Type: text/html"
puts ""
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_11_Video_1REC.png><span style=\"vertical-align: middle\">Recording one thing</span>"
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_11_Video_1REC.png><span style=\"vertical-align: middle\">Recording another thing</span>"
#puts "<img style=\"vertical-align: middle\" src=/images/745_1_10_Video_2Live.png><span style=\"vertical-align: middle\">Watching something else</span>"
if {[catch {set pid [exec pgrep humaxtv]}]} { exit }
if {[catch {set data [exec lsof -p $pid | grep Video | fgrep .ts]} ]} {
@ -39,10 +43,12 @@ foreach line $lines {
incr seen($name)
lappend output "<img src=/images/$icon>$mode $name"
lappend output "<img style=\"vertical-align: middle\"
src=/images/$icon><span
style=\"vertical-align: middle\">$mode&nbsp;$name</span>"
}
if {[llength $output]} {
puts [join $output "<br>\n"]
puts [join $output " "]
}

View File

@ -67,11 +67,11 @@
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d19405; background: #fece2f url(/img/ui/ui-bg_gloss-wave_60_fece2f_500x100.png) 50% 50% repeat-x; font-weight: bold; color: #4c3000; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4c3000; text-decoration: none; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1e5bbd; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #a45b13; background: #ffdd57 url(/img/ui/ui-bg_gloss-wave_70_ffdd57_500x100.png) 50% 50% repeat-x; font-weight: bold; color: #381f00; }
.ui-state-hover a, .ui-state-hover a:hover { color: #381f00; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #655e4e; background: #ffffff url(/img/ui/ui-bg_inset-soft_30_ffffff_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #0074c7; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #0074c7; text-decoration: none; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #1e5bbd; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues

File diff suppressed because it is too large Load Diff

View File

@ -9,34 +9,14 @@ Status...
</div>
</div>
<script type=text/javascript src=/js/ajax.js></script>
<script type=text/javascript>
function updateResults()
{
var r = document.getElementById('status');
if (r && request.readyState == 4 && request.status == 200)
{
var t = document.getElementById('status_txt');
if (t.length)
{
r.style.display = 'block';
t.innerHTML = request.responseText;
}
}
}
function go()
{
var url = "/cgi-bin/status.jim";
request.open("GET", url, true);
request.onreadystatechange = updateResults;
request.send(null);
}
go();
$(document).ready(function() {
$('#status_txt').load('/cgi-bin/status.jim',
function(rt,tt,xml) {
if (rt.length)
$('#status').show('slow');
});
});
</script>
<div style="float: left">
@ -49,10 +29,6 @@ go();
<b>Browse Media Files</b>
</a>
<br>
<font class=footnote>
(NOTE: The files are encrypted if they were<br>
recorded off air.)
</font>
</center>
</div>

View File

@ -3,6 +3,7 @@
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/spinner.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
[spinner new {
text "Loading EPG Data..."
@ -10,33 +11,8 @@ source /mod/var/mongoose/lib/altrow
style "margin: 1em;"
}] start
puts {
<div id=dialogue></div>
<script type=text/javascript>
$(document).ready(function() {
var $dialog = $('#dialogue').dialog({
title: "Programme Details",
modal: false,
autoOpen: false,
height: 500,
width: 700,
show: 'scale',
hide: 'fade',
draggable: false,
resizable: false,
buttons: { "Close":
function() {$(this).dialog('close');}},
close: function(e,u) { $('#dialogue').empty().html('<img src="/img/loading.gif" alt="loading">'); }
});
$('a.event').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
$('#dialogue').load(url + '&bare=1');
$dialog.dialog('open');
});
});
</script>
}
#cat /mod/var/mongoose/lib/epg_popup
source /mod/var/mongoose/lib/epg_popup
set start [clock milliseconds]
set records [epg fetch dump -time [clock seconds]]

View File

@ -1,7 +1,7 @@
if {[expr ! [exists -proc cat ]]} {
proc cat {file} {
if {[catch {set fp [open $file r]]} { return }
if {[catch {set fp [open $file r]]}} { return }
puts [read $fp]
close $fp
}

View File

@ -104,21 +104,21 @@ epg method type_icon {} {
epg method icon_set {{height 0}} {
if {$height > 0} { set height "height=$height" } else { set height "" }
set icon [$self type_icon]
set str ""
set set ""
if {$icon != ""} {
append str "<img src=$icon $height
lappend set "<img src=$icon $height
alt=\"[$self get content_type]\"
title=\"[$self get content_type]\">"
}
if {[$self get rec_crid] != ""} {
append str \
lappend set \
"<img src=/images/178_1_26_Icon_Recommend.png $height>"
}
if {[$self get series_crid] != ""} {
append str \
lappend set \
"<img src=/images/178_1_00_Icon_Serise.png $height>"
}
return $str
return $set
}
epg method cell {} {
@ -129,7 +129,7 @@ epg method cell {} {
puts "<td nowrap valign=top title=\"$text\">"
puts [$self icon_set 14]
puts [join [$self icon_set 14] ""]
puts "
<a class=event href=/cgi-bin/epg_info.jim?service=[$self get service_id]&event=[$self get event_id]>

View File

@ -0,0 +1,28 @@
puts {
<div id=dialogue></div>
<script type=text/javascript>
$(document).ready(function() {
var $dialog = $('#dialogue').dialog({
title: "Programme Details",
modal: false,
autoOpen: false,
height: 500,
width: 700,
show: 'scale',
hide: 'fade',
draggable: true,
resizable: true,
buttons: { "Close":
function() {$(this).dialog('close');}},
close: function(e,u) { $('#dialogue').empty().html('<img src="/img/loading.gif" alt="loading">'); }
});
$('a.event').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
$('#dialogue').load(url + '&bare=1');
$dialog.dialog('open');
});
});
</script>
}