forked from hummypkg/webif
27c7818da8
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1658 2a923420-c742-0410-a762-8d5b09965624
29 lines
599 B
JavaScript
29 lines
599 B
JavaScript
$(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);
|
|
});
|
|
|
|
});
|
|
|