updates for 1.0.6

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1658 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-09-07 22:13:03 +00:00
parent 9fb84443cd
commit 27c7818da8
16 changed files with 160 additions and 61 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.5-5
Version: 1.0.6
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)

View File

@ -2,7 +2,9 @@
package require cgi
source /mod/webif/lib/setup
require epg.class
require epg.class system.class
set irinst [system pkginst ir]
httpheader
@ -14,7 +16,10 @@ set record [lindex [epg fetch dump -service $service -event $event] 0]
$record get_channel_info
set others [$record othertimes]
jqplugin confirmAction
puts "
<script type=text/javascript src=/js/chanchange.js></script>
<table class=keyval>
<tr>
<th>Programme</th>
@ -116,7 +121,14 @@ if {[$record get rec_crid] != ""} {
puts "
<tr>
<td colspan=2 valign=top>
[$record channel_icon 70]
"
if {$irinst} {
puts "<a class=chanchange chan=[$record get channel_num] href=#>"
}
puts [$record channel_icon 70]
if {$irinst} { puts "</a>" }
puts "
[join [$record icon_set] "&nbsp;"]
</td>
</tr>

View File

@ -120,8 +120,6 @@ header
puts {
<script type="text/javascript" src="/cgi-bin/settings.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<script type="text/javascript" src="/js/jconfirmaction.jquery.js"></script>
<link href=/css/jconfirmaction.jquery.css rel=stylesheet type=text/css />
<script type="text/javascript" src="/js/iphone-style-checkboxes.js"></script>
<link href=/css/iphone-style-checkboxes.css rel=stylesheet type=text/css />
}

View File

@ -4,12 +4,17 @@ package require cgi
source /mod/webif/lib/setup
header
jqplugin confirmAction
require epg.class spinner.class altrow epg_search totop
require epg.class spinner.class altrow epg_search totop system.class
set irinst [system pkginst ir]
puts {
<link type="text/css" href="/css/xepg.css" rel="Stylesheet" />
<script type=text/javascript src=/js/enadis.js></script>
<script type=text/javascript src=xepg.js></script>
<script type=text/javascript src=/js/chanchange.js></script>
}
[spinner new {
@ -121,7 +126,11 @@ foreach e $records {
if {$chnum != $lcn} {
puts "<div class=xechan style=\"width: ${chanpx}px;\">"
if {$irinst} {
puts "<a class=chanchange chan=$chnum href=#>"
}
puts "[$e channel_icon 30]&nbsp;"
if {$irinst} { puts "</a>" }
puts "$chnum
<a href=\"/cgi-bin/epg/service.jim?service=[$e get service_id]\"
title=\"[$e get channel_name]\">
@ -200,48 +209,11 @@ puts "
</div>
"
puts "
<script type=text/javascript>
\$(document).ready(function() {
\$('#epgswitch').button().click(function() {
window.location = '/epg.shtml';
});
\$('button.nav').click(function() {
window.location = '/cgi-bin/xepg.jim?stt=' + \$(this).attr('tt') +
'&pos=' + \$('#xegrid').scrollTop();
});
\$('#xepg_dp').datepicker({
buttonImage: '/img/cal.gif',
buttonImageOnly: true,
showOn: 'button',
dateFormat: '@',
minDate: '[expr $now * 1000]',
maxDate: '[expr ($now + 7 * 86400) * 1000]',
onSelect: function(val, sel) {
var stt = \$(this).attr('stt');
// Extract date part
dval = Math.round(val / 86400000.0);
// Extract current time part
var tm = ~~(stt % 86400);
var ret = dval * 86400 + tm;
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
}
});
\$('img.ui-datepicker-trigger').hover(
function() { \$(this).css('cursor', 'pointer'); },
function() { \$(this).css('cursor', 'auto'); }
);
"
if {$current} {
puts "
<script type=text/javascript>
\$(function() {
"
puts {
var kt = $('#xe0');
@ -252,20 +224,18 @@ var height = $('#keypos').position().top - ktpos.top;
}
puts "var nowpos = ktpos.left + (kt.width() * $offset);"
puts {
if (window.console)
console.log('NOWPOS: %d', nowpos);
$('#xepgnow')
.css('left', nowpos + 'px')
.css('top', ktpos.top)
.height(height)
.show('slow');
}
}
puts "
});
</script>
"
puts "
});
</script>
"
}
puts "
<a href=/cgi-bin/settings.jim>

View File

@ -0,0 +1,38 @@
$(function() {
$('#epgswitch').button().click(function() {
window.location = '/epg.shtml';
});
$('button.nav').click(function() {
window.location = '/cgi-bin/xepg.jim?stt=' + $(this).attr('tt') +
'&pos=' + $('#xegrid').scrollTop();
});
$('#xepg_dp').datepicker({
buttonImage: '/img/cal.gif',
buttonImageOnly: true,
showOn: 'button',
dateFormat: '@',
minDate: '[expr $now * 1000]',
maxDate: '[expr ($now + 7 * 86400) * 1000]',
onSelect: function(val, sel) {
var stt = $(this).attr('stt');
// Extract date part
dval = Math.round(val / 86400000.0);
// Extract current time part
var tm = ~~(stt % 86400);
var ret = dval * 86400 + tm;
window.location = '/cgi-bin/xepg.jim?stt=' + ret;
}
});
$('img.ui-datepicker-trigger').hover(
function() { $(this).css('cursor', 'pointer'); },
function() { $(this).css('cursor', 'auto'); }
);
});

View File

@ -113,6 +113,7 @@ switch $action {
"$dir/[file tail $path]"}
}
}
ts resetnew $dir
}
$cb clear
$cb save

View File

@ -39,10 +39,11 @@ proc icon {img {hover ""} {extra ""} {class "va"}} {
}
proc directory {file bfile tbfile} {
puts "<div class=va>"
puts "<div class=\"va relative\">"
set img "/images/711_1_09_Media_Folder.png"
if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" }
puts "<img border=0 class=va id=\"img$tbfile\" src=$img>"
puts "<span class=foldernum></span>"
puts "<input class=\"fs fsdir\" type=checkbox>"
puts "<a class=dbf
href=\"$::env(REQUEST_URI)?dir=[cgi_quote_url $file]\"

View File

@ -115,7 +115,13 @@ function set_folder_new(folder, cnt)
folder = folder.replace(/ /g, '');
folder = folder.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g, '\\$1');
//console.log("Folder: (%s) = (%s)", folder, cnt);
$('#img' + folder).attr('src', '/img/Folder_New.png');
left = cnt > 99 ? 11 : (cnt > 9 ? 14 : 17);
$('#img' + folder)
.attr('src', '/img/Folder_New.png')
.next('span.foldernum')
.css('left', left + 'px')
.text(cnt)
.show();
}
function new_folder_callback(data, status, xhr)

View File

@ -445,3 +445,31 @@ img.doublebmp
width: 280px;
}
.relative
{
position: relative;
}
span.foldernum
{
display: none;
position: absolute;
left: 14px;
top: 9px;
color: white;
height: 15px;
line-height: 16px;
background-color: #CC0000;
background: linear-gradient(#FF0000, #CC0000) repeat scroll 0 0 #EEEEEE;
font-size: 10px;
border: 1px solid #660000;
padding: 0 2px 0 2px;
border-radius: 1em 1em 1em 1em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-top-right-radius: 1em;
border-top-left-radius: 1em;
border-bottom-right-radius: 1em;
border-bottom-left-radius: 1em;
}

View File

@ -111,3 +111,8 @@ button#later
margin-left: 2em;
}
.jcaquestion
{
margin-left: 0px;
}

View File

@ -0,0 +1,28 @@
$(function() {
var signalarray = ['ZERO', 'ONE', 'TWO', 'THREE', 'FOUR',
'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE'];
$('a.chanchange').jConfirmAction({
question: "Change channel?"
}, function(el) {
var lcn = $(el).attr('chan');
$('.jcaquestion').fadeOut(300,function(){$(this).remove();});
var cmd = '';
for (i = 0; i < lcn.length; i++)
{
if (i > 0)
cmd += '+';
cmd += signalarray[lcn.charAt(i)];
}
if (lcn < 1000)
cmd += '+OK';
//console.log('LCN: %O', lcn);
//console.log('CMD: %O', cmd);
$.get('/plugin/ir/send.jim?code=' + cmd);
});
});

View File

@ -10,7 +10,7 @@ puts {
source /mod/webif/include/model.jim
puts {
</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="icon" href="/favicon.ico" sizes="16x16 32x32 64x64"
type="image/vnd.microsoft.icon" />
<link rel="apple-touch-icon" href="/img/fav/57.png" />

View File

@ -2,7 +2,9 @@
package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow epg_search totop
require epg.class spinner.class altrow epg_search totop system.class
set irinst [system pkginst ir]
[spinner new {
text "Loading Now/Next Information..."
@ -29,8 +31,10 @@ if {$::qepg} {
}
set got [clock milliseconds]
jqplugin confirmAction
puts {
<script type=text/javascript src=/js/chanchange.js></script>
<small><button id=switch>Switch to grid-style Now/Next</button></small>
<script type=text/javascript>
$('#switch').button().click(function() {
@ -55,7 +59,13 @@ foreach record $records {
if {$lcn > 0} { puts "</tr>" }
altrow
puts "<td>$chnum</td>"
puts "<td>[$record channel_icon 50]</td>
puts "<td>"
if {$irinst} {
puts "<a class=chanchange chan=$chnum href=#>"
}
puts "[$record channel_icon 50]"
if {$irinst} { puts "</a>" }
puts "</td>
<td>
<a href=\"/cgi-bin/epg/service.jim?service=[\
$record get service_id]\">

View File

@ -4,7 +4,7 @@ if {![exists -proc require]} {
foreach file $args {
if {$file ni $done} {
uplevel source "/mod/webif/lib/$file"
lappend $done $file
lappend done $file
}
}
}
@ -41,7 +41,9 @@ if {![exists -proc require]} {
uplevel source /mod/webif/html/m/lib/footer.jim
}
proc jqplugin {name} {
proc jqplugin {name} {{done {}}} {
if {$name in $done} return
lappend done $name
foreach file [glob "/mod/webif/html/lib/jquery.$name/*.js"] {
set file [join [lrange [split $file /] 4 end] /]
puts "<script type=text/javascript src=/$file></script>"