git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1804 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-02-23 22:22:07 +00:00
parent b4af9b62fc
commit 3416d4e9e2
9 changed files with 44 additions and 9 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.9
Version: 1.0.9-3
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.9),mongoose(>=3.0.11),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-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.5-3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)

View File

@ -55,6 +55,7 @@ if {$ct > 0 } {
}
set favlist [epg favlist]
set s [settings]
if {[$s service_style] eq "standard"} {
set surl xservice
} else {

View File

@ -4,7 +4,7 @@ package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow
jqplugin iphone-style-checkboxes freezeheader
jqplugin iphone-style-checkboxes freezeheader scrollto
jscss service.js service.css
header
@ -30,6 +30,8 @@ if {[llength $records] == 0} {
exit
}
set nowhour [clock format [clock seconds] -format "%H"]
# Load the channel information from the first entry
set tr [lindex $records 0]
$tr get_channel_info
@ -42,6 +44,8 @@ puts "
[$tr channel_icon 40 {vertical-align:middle}]
</td><td>
$channel_num - $channel_name
</td><td style=\"width: 50px\">&nbsp;</td><td>
<button id=jumptonow hour=$nowhour>Jump to Now</button>
</td><td style=\"width: 50px\">&nbsp;</td><td>
Show synopsis?
</td><td>
@ -219,7 +223,7 @@ foreach e $records {
puts -nonewline "</td></tr>"
}
puts "
<tr class=hour>
<tr class=hour id=hour_$hour>
<th class=hour>$hour:00</th>
<td class=dayhour>
"

View File

@ -20,5 +20,10 @@ $('#listview').bind('click', function() {
$('table.weekview').freezeHeader();
$('#jumptonow').bind('click', function() {
var hour = $(this).attr('hour');
$('body').scrollTo('#hour_' + hour);
});
});

View File

@ -26,10 +26,10 @@ puts {
<script type="text/javascript" src="/lib/jquery.ui/js/jquery-ui.js"></script>
}
if {[info exists _mws_js]} {
foreach js $_mws_js {
foreach js $::_mws_js {
puts "<script type=text/javascript src=\"$js\"></script>"
}
foreach css $_mws_css {
foreach css $::_mws_css {
puts "<link href=\"$css\" rel=stylesheet type=text/css />"
}
}

View File

@ -0,0 +1,7 @@
/**
* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 1.4.11
*/
;(function(a){if(typeof define==='function'&&define.amd){define(['jquery'],a)}else{a(jQuery)}}(function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||typeof a=='object'?a:{top:a,left:a}};return j}));

View File

@ -3,6 +3,7 @@
source /mod/webif/lib/setup
require altrow rsv.class
noheader
jscss /cgi-bin/backup/backup.js
puts {
<h2>Backup/Restore</h2>

View File

@ -2,7 +2,11 @@
package require cgi
source /mod/webif/lib/setup
require epg.class spinner.class altrow epg_search totop system.class
require epg.class spinner.class altrow epg_search system.class
noheader
require totop
set irinst [system pkginst ir]
@ -17,7 +21,8 @@ require epg_popup
set start [clock milliseconds]
set now [clock seconds]
set then $($now + 14400)
set favgroup [[settings] channel_group]
set s [settings]
set favgroup [$s channel_group]
if {$::qepg} {
if {$favgroup} {
set records [epg dbfetch dump \
@ -31,13 +36,19 @@ if {$::qepg} {
}
set got [clock milliseconds]
if {[[settings] chanchangenc]} {
if {[$s chanchangenc]} {
jscss /js/chanchangeenc.js
} else {
jqplugin confirmAction
jscss /js/chanchange.js
}
if {[$s service_style] eq "standard"} {
set surl xservice
} else {
set surl service
}
puts {
<small><button id=switch>Switch to grid-style Now/Next</button></small>
<script type=text/javascript>
@ -71,7 +82,7 @@ foreach record $records {
if {$irinst} { puts "</a>" }
puts "</td>
<td>
<a href=\"/epg/service.jim?service=[\
<a href=\"/epg/$surl.jim?service=[\
$record get service_id]\">
[$record get channel_name]
</a></td>"

View File

@ -35,6 +35,7 @@ if {![exists -proc require]} {
}
proc noheader {} {
emit_jscss
incr ::_mws_headerdone
}
@ -66,6 +67,11 @@ if {![exists -proc require]} {
}
}
proc emit_jscss {} {
foreach js $::_mws_js { _js $js }
foreach css $::_mws_css { _css $css }
}
proc jqplugin {args} {{done {}}} {
foreach name $args {
if {$name in $done} continue