webif/var/mongoose/html/js/chanchange.js
hummypkg 27c7818da8 updates for 1.0.6
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1658 2a923420-c742-0410-a762-8d5b09965624
2013-09-07 22:13:03 +00:00

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);
});
});