restructure epg, fix log newlines

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@730 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-02-07 22:48:54 +00:00
parent 7a66306f78
commit 1a7cb41a16
15 changed files with 28 additions and 22 deletions

View File

@ -1,7 +1,7 @@
Package: webif Package: webif
Priority: optional Priority: optional
Section: web Section: web
Version: 0.9.1-2 Version: 0.9.1-3
Architecture: mipsel Architecture: mipsel
Maintainer: af123@hummypkg.org.uk Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.4),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2 Depends: mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.4),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2

View File

@ -1,5 +1,6 @@
var handle; var handle;
var currentpart = 0; var currentpart = 0;
var stime = 0;
function xprogress() function xprogress()
{ {
@ -25,18 +26,18 @@ function xpart(part)
if (part++ < parts) if (part++ < parts)
{ {
if (window.console)
console.log('Extracting part: ' + part);
currentpart = part; currentpart = part;
$('#progressstat' + part) $('#progressstat' + part)
.text('extracting...') .text('extracting...')
.addClass('blood'); .addClass('blood');
stime = new Date().getTime();
$.get('extract.jim?parts=' + parts + $.get('extract.jim?parts=' + parts +
'&part=' + part + '&part=' + part +
'&file=' + file, '&file=' + file,
function(data) { function(data) {
var taken = (new Date().getTime() - stime) / 1000;
$('#progressstat' + part) $('#progressstat' + part)
.text('done...') .text('done... (' + taken + ' seconds)')
.removeClass('blood'); .removeClass('blood');
currentpart = 0; currentpart = 0;
$('#progresspart' + part) $('#progresspart' + part)

View File

@ -79,7 +79,7 @@ if {[$record get event_crid] != ""} {
puts " puts "
<tr> <tr>
<th>CRID</th><td> <th>CRID</th><td>
<a href=/cgi-bin/epg_search.jim?crid=[$record get event_crid]> <a href=/cgi-bin/epg/search.jim?crid=[$record get event_crid]>
<img border=0 height=14 <img border=0 height=14
src=/images/421_1_00_CH_Title_2R_Arrow.png> src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$record get channel_crid][$record get event_crid] [$record get channel_crid][$record get event_crid]
@ -93,7 +93,7 @@ if {[$record get series_crid] != ""} {
puts " puts "
<tr> <tr>
<th nowrap>Series CRID</th><td> <th nowrap>Series CRID</th><td>
<a href=/cgi-bin/epg_search.jim?scrid=[$record get series_crid]> <a href=/cgi-bin/epg/search.jim?scrid=[$record get series_crid]>
<img border=0 height=14 <img border=0 height=14
src=/images/421_1_00_CH_Title_2R_Arrow.png> src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$record get channel_crid][$record get series_crid] [$record get channel_crid][$record get series_crid]
@ -107,7 +107,7 @@ if {[$record get rec_crid] != ""} {
set rec [$record recommended] set rec [$record recommended]
if {$rec != ""} { if {$rec != ""} {
puts "<tr><th>Recommends</th><td> puts "<tr><th>Recommends</th><td>
<a href=/cgi-bin/epg_search.jim?crid=[$rec get event_crid]> <a href=/cgi-bin/epg/search.jim?crid=[$rec get event_crid]>
<img border=0 height=14 <img border=0 height=14
src=/images/421_1_00_CH_Title_2R_Arrow.png> src=/images/421_1_00_CH_Title_2R_Arrow.png>
[$rec get name] [$rec get name]
@ -126,7 +126,7 @@ puts "
</tr> </tr>
</table> </table>
<a class=footnote href=/cgi-bin/epg_dump.jim?service=[$record get service_id]&event=[$record get event_id]&raw=1> <a class=footnote href=/cgi-bin/epg/dump.jim?service=[$record get service_id]&event=[$record get event_id]&raw=1>
<img border=0 src=/images/532_1_00_Find_Path_Arrow.png> <img border=0 src=/images/532_1_00_Find_Path_Arrow.png>
Show raw EPG info Show raw EPG info
</a> </a>

View File

@ -108,7 +108,7 @@ foreach record [lsort -command rsort $records] {
puts "<td>[$record get channel_num]</td>" puts "<td>[$record get channel_num]</td>"
puts "<td>[$record channel_icon 50]</td>" puts "<td>[$record channel_icon 50]</td>"
puts "<td nowrap> puts "<td nowrap>
<a href=/cgi-bin/epg_service.jim?service=[$record get service_id]> <a href=/cgi-bin/epg/service.jim?service=[$record get service_id]>
[$record get channel_name] [$record get channel_name]
</a></td>" </a></td>"
puts [$record cell] puts [$record cell]

View File

@ -101,7 +101,7 @@ if {$crid != ""} {
puts "<tr><th>" puts "<tr><th>"
if $series { puts "Series" } else { puts "Event" } if $series { puts "Series" } else { puts "Event" }
puts " CRID</th><td>" puts " CRID</th><td>"
puts -nonewline "<a href=/cgi-bin/epg_search.jim?" puts -nonewline "<a href=/cgi-bin/epg/search.jim?"
if $series { puts -nonewline "s" } if $series { puts -nonewline "s" }
puts "crid=/$crid> puts "crid=/$crid>
<img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png <img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png
@ -117,7 +117,7 @@ foreach ev [split [$event get szEventToRecord] "|"] {
if {$flag} { puts "<br>" } if {$flag} { puts "<br>" }
incr flag incr flag
set crid [join [lrange [split $ev /] 1 end]] set crid [join [lrange [split $ev /] 1 end]]
puts -nonewline "<a href=/cgi-bin/epg_search.jim?" puts -nonewline "<a href=/cgi-bin/epg/search.jim?"
puts "crid=/$crid> puts "crid=/$crid>
<img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png <img border=0 src=/images/421_1_00_CH_Title_2R_Arrow.png
height=14> height=14>

View File

@ -98,7 +98,7 @@ foreach e $records {
puts "[$e channel_icon 30]&nbsp;" puts "[$e channel_icon 30]&nbsp;"
puts "$chnum puts "$chnum
<a href=/cgi-bin/epg_service.jim?service=[$e get service_id] <a href=/cgi-bin/epg/service.jim?service=[$e get service_id]
title=\"[$e get channel_name]\"> title=\"[$e get channel_name]\">
[$e get channel_name] [$e get channel_name]
</a></div>" </a></div>"

View File

@ -127,7 +127,7 @@ table.keyval td
color: black; color: black;
} }
pre, .pre pre, .pre, .prelike
{ {
font-family: Consolas, 'Courier New', Courier, monospace; font-family: Consolas, 'Courier New', Courier, monospace;
color: black; color: black;
@ -145,7 +145,10 @@ pre, .pre
-webkit-border-top-right-radius: 4px; -webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px; -moz-border-radius-topright: 4px;
-khtml-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px;
}
pre, .pre
{
white-space: pre-wrap; white-space: pre-wrap;
white-space: -moz-pre-wrap !important; white-space: -moz-pre-wrap !important;
white-space: -pre-wrap; white-space: -pre-wrap;

View File

@ -15,7 +15,7 @@ Diagnostic:
</fieldset> </fieldset>
<div style="margin-top: 2em; display: none; float: left; clear: left" <div style="margin-top: 2em; display: none; float: left; clear: left"
class=pre id=results></div> id=results></div>
<script type=text/javascript> <script type=text/javascript>
$('#rundiag').button().click(function() { $('#rundiag').button().click(function() {
@ -30,7 +30,9 @@ $('a.log').click(function() {
.slideDown() .slideDown()
.text('\n\nLoading log, please wait...\n\n') .text('\n\nLoading log, please wait...\n\n')
.load('/cgi-bin/cat.jim?file=' + .load('/cgi-bin/cat.jim?file=' +
encodeURIComponent($(this).attr('file'))); encodeURIComponent($(this).attr('file')), function() {
$('#results').wrapInner('<pre>');
});
}); });
</script> </script>

View File

@ -55,7 +55,7 @@ foreach record $records {
puts "<td>$chnum</td>" puts "<td>$chnum</td>"
puts "<td>[$record channel_icon 50]</td> puts "<td>[$record channel_icon 50]</td>
<td> <td>
<a href=/cgi-bin/epg_service.jim?service=[$record get service_id]> <a href=/cgi-bin/epg/service.jim?service=[$record get service_id]>
[$record get channel_name] [$record get channel_name]
</a></td>" </a></td>"
set lcn $chnum set lcn $chnum

View File

@ -25,7 +25,7 @@ if {[system busy]} {
} }
puts { puts {
<small><button id=restart_cancel>Hide</button></small> <small><button id=restart_cancel>Dismiss</button></small>
</font> </font>
</div> </div>
<div style="width: 60%; height: 0.7em; margin-bottom: 2em; <div style="width: 60%; height: 0.7em; margin-bottom: 2em;

View File

@ -4,7 +4,7 @@ puts {
$(document).ready(function() { $(document).ready(function() {
function doschedule(type) function doschedule(type)
{ {
$('#epginfo_extra').load('/cgi-bin/epg_schedule.jim?' + $('#epginfo_extra').load('/cgi-bin/epg/schedule.jim?' +
'service=' + 'service=' +
encodeURIComponent($('#dialogue').attr('xs')) + encodeURIComponent($('#dialogue').attr('xs')) +
'&event=' + '&event=' +
@ -52,7 +52,7 @@ $(document).ready(function() {
$dialog.dialog("option", "buttons", $buttons2); $dialog.dialog("option", "buttons", $buttons2);
else else
$dialog.dialog("option", "buttons", $buttons1); $dialog.dialog("option", "buttons", $buttons1);
var url = '/cgi-bin/epg_info.jim?service=' + var url = '/cgi-bin/epg/info.jim?service=' +
o.attr('xs') + '&event=' + o.attr('xs') + '&event=' +
o.attr('xe') + '&bare=1'; o.attr('xe') + '&bare=1';
$('#dialogue').load(url, function() { $('#dialogue').load(url, function() {

View File

@ -13,7 +13,7 @@ set searchfull 0
catch { if {[dict exists $_cgi full]} { set searchfull 1 } } catch { if {[dict exists $_cgi full]} { set searchfull 1 } }
puts " puts "
<form method=get action=/cgi-bin/epg_search.jim> <form method=get action=/cgi-bin/epg/search.jim>
<fieldset> <fieldset>
<legend>EPG Search</legend> <legend>EPG Search</legend>
<label for=term>Query</label> <label for=term>Query</label>
@ -31,7 +31,7 @@ puts ">
" "
proc cts {type img text} { proc cts {type img text} {
puts "<a href=/cgi-bin/epg_search.jim?ct=$type> puts "<a href=/cgi-bin/epg/search.jim?ct=$type>
<img height=18 border=0 src=/images/173_3_00_G3_$img.png> <img height=18 border=0 src=/images/173_3_00_G3_$img.png>
&nbsp;$text</a>"; &nbsp;$text</a>";
} }
@ -96,7 +96,7 @@ if {[llength $res] > 0} {
set kw [string range [lindex $keyword 1] 1 end] set kw [string range [lindex $keyword 1] 1 end]
# Clean the keyword string. # Clean the keyword string.
regexp -nocase {^(\w+)} $kw kw regexp -nocase {^(\w+)} $kw kw
puts "<td><a href=/cgi-bin/epg_search.jim?term=[cgi_quote_url $kw]>$kw puts "<td><a href=/cgi-bin/epg/search.jim?term=[cgi_quote_url $kw]>$kw
</a></td>" </a></td>"
} }
puts " puts "