2013-09-07 22:13:03 +00:00
|
|
|
$(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();
|
|
|
|
});
|
|
|
|
|
2013-09-08 19:15:54 +00:00
|
|
|
var now = new Date().getTime();
|
|
|
|
|
2013-09-07 22:13:03 +00:00
|
|
|
$('#xepg_dp').datepicker({
|
|
|
|
buttonImage: '/img/cal.gif',
|
|
|
|
buttonImageOnly: true,
|
|
|
|
showOn: 'button',
|
|
|
|
dateFormat: '@',
|
2013-09-08 19:15:54 +00:00
|
|
|
minDate: now,
|
|
|
|
maxDate: now + 7 * 86400,
|
2013-09-07 22:13:03 +00:00
|
|
|
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'); }
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|