2011-06-09 00:42:26 +00:00
|
|
|
puts {
|
|
|
|
<div id=dialogue></div>
|
|
|
|
<script type=text/javascript>
|
|
|
|
$(document).ready(function() {
|
2011-07-12 18:57:30 +00:00
|
|
|
function doschedule(type)
|
|
|
|
{
|
2011-07-11 23:29:21 +00:00
|
|
|
$('#epginfo_extra').load('/cgi-bin/epg_schedule.jim?' +
|
|
|
|
'service=' +
|
|
|
|
encodeURIComponent($('#dialogue').attr('xs')) +
|
|
|
|
'&event=' +
|
|
|
|
encodeURIComponent($('#dialogue').attr('xe')) +
|
2011-07-12 18:57:30 +00:00
|
|
|
'&type=' + type, function() {
|
|
|
|
$('#restart_block')
|
|
|
|
.load('/cgi-bin/restartblock.jim');
|
|
|
|
});
|
2011-07-11 23:29:21 +00:00
|
|
|
$(":button:contains('Record')").fadeOut('slow');
|
2011-07-12 18:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var $buttons1 = {
|
|
|
|
"Close" : function() {$(this).dialog('close');}
|
|
|
|
};
|
|
|
|
var $buttons2 = $.extend(
|
|
|
|
{"Record Programme": function() { doschedule(1) }},
|
2011-07-11 23:29:21 +00:00
|
|
|
$buttons1);
|
|
|
|
var $buttons3 = $.extend(
|
2011-07-12 18:57:30 +00:00
|
|
|
{"Record Series": function() { doschedule(2) }},
|
2011-07-11 23:29:21 +00:00
|
|
|
$buttons2);
|
|
|
|
|
2011-06-09 00:42:26 +00:00
|
|
|
var $dialog = $('#dialogue').dialog({
|
|
|
|
title: "Programme Details",
|
2011-06-14 11:48:55 +00:00
|
|
|
modal: false, autoOpen: false,
|
|
|
|
height: 500, width: 700,
|
|
|
|
show: 'scale', hide: 'fade',
|
|
|
|
draggable: true, resizable: true,
|
2011-07-11 23:29:21 +00:00
|
|
|
buttons: $buttons1,
|
2011-06-16 03:10:41 +00:00
|
|
|
close: function(e,u) { $('#dialogue').empty().html(
|
|
|
|
'<img src="/img/loading.gif" alt="loading">'); }
|
2011-06-09 00:42:26 +00:00
|
|
|
});
|
|
|
|
$('a.event').click(function(e) {
|
|
|
|
e.preventDefault();
|
2011-07-11 23:29:21 +00:00
|
|
|
var sch = $(this).attr('sch');
|
|
|
|
var rec = $(this).attr('rec');
|
|
|
|
if (sch != 0)
|
|
|
|
$dialog.dialog("option", "buttons", $buttons1);
|
|
|
|
else if (rec == 2)
|
|
|
|
$dialog.dialog("option", "buttons", $buttons3);
|
|
|
|
else if (rec == 1)
|
|
|
|
$dialog.dialog("option", "buttons", $buttons2);
|
|
|
|
else
|
|
|
|
$dialog.dialog("option", "buttons", $buttons1);
|
2011-06-16 03:10:41 +00:00
|
|
|
var url = '/cgi-bin/epg_info.jim?service=' +
|
|
|
|
$(this).attr('xs') + '&event=' +
|
|
|
|
$(this).attr('xe') + '&bare=1';
|
|
|
|
$('#dialogue').load(url);
|
2011-07-11 23:29:21 +00:00
|
|
|
$('#dialogue')
|
|
|
|
.attr('xs', $(this).attr('xs'))
|
|
|
|
.attr('xe', $(this).attr('xe'));
|
2011-06-09 00:42:26 +00:00
|
|
|
$dialog.dialog('open');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
}
|
|
|
|
|