ПДУ
(custom)
<link href="../templates/app_pult/css/style.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width,user-scalable=no">
<script>
//document.oncontextmenu = function (){return false};
jQuery().ready(function(){
//jQuery('img').bind('contextmenu',function(){return false;});
});
function send_cmd(cmd){
// var url='/popup/app_pult.html?alias=';
// url+='[#alias#]'
// url+='&cmd='
// url+=cmd;
//alert(url);
// AJAXRequest(url, '', '');
//Вкл выкл телевизор
if(cmd=='btn_OFF'){
$.get('../objects/?script=TelevisorON_Off');
}
//Вкл выкл звук
if(cmd=='btn_MUTE'){
$.get('../objects/?script=ТелевизорЗвук');
}
//input
if(cmd=='btn_INPUT'){
$.get('../objects/?script=ТелевизорInput');
}
//Menu
if(cmd=='btn_MENU'){
$.get('../objects/?script=ТелевизорMenu');
}
//OK
if(cmd=='btn_OK'){
$.get('../objects/?script=ТелевизорOK');
}
//UP
if(cmd=='btn_UP'){
$.get('../objects/?script=ТелевизорUP');
}
//Down
if(cmd=='btn_DOWN'){
$.get('../objects/?script=ТелевизорDown');
}
//Left
if(cmd=='btn_LEFT'){
$.get('../objects/?script=ТелевизорLeft');
}
//Right
if(cmd=='btn_RIGHT'){
$.get('../objects/?script=ТелевизорRight');
}
//0
if(cmd=='btn_0'){
$.get('../objects/?script=Телевизор0');
}
//1
if(cmd=='btn_1'){
$.get('../objects/?script=Телевизор1');
}
//2
if(cmd=='btn_2'){
$.get('../objects/?script=Телевизор2');
}
//3
if(cmd=='btn_3'){
$.get('../objects/?script=Телевизор3');
}
//4
if(cmd=='btn_4'){
$.get('../objects/?script=Телевизор4');
}
//5
if(cmd=='btn_5'){
$.get('../objects/?script=Телевизор5');
}
//6
if(cmd=='btn_6'){
$.get('../objects/?script=Телевизор6');
}
//7
if(cmd=='btn_7'){
$.get('../objects/?script=Телевизор7');
}
//8
if(cmd=='btn_8'){
$.get('../objects/?script=Телевизор8');
}
//9
if(cmd=='btn_9'){
$.get('../objects/?script=Телевизор9');
}
//chUP
if(cmd=='btn_chUP'){
$.get('../objects/?script=ТелевизорChUp');
}
//chDown
if(cmd=='btn_chDOWN'){
$.get('../objects/?script=ТелевизорChDown');
}
//volUP
if(cmd=='btn_volUP'){
$.get('../objects/?script=ТелевизорVOL');
}
//volDOWN
if(cmd=='btn_volDOWN'){
$.get('../objects/?script=ТелевизорVOL-');
}
//LIST
if(cmd=='btn_LIST'){
$.get('../objects/?script=ТелевизорList');
}
//back
if(cmd=='btn_BACK'){
$.get('../objects/?script=ТелевизорBack');
}
}
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
var isTouchSupported = "ontouchstart" in document;
var poke = isTouchSupported ? "touchstart" : "mousedown";
$(".nav_area")
.bind(poke, function(){
var cmd = $(this).attr("cmd");
if(cmd=='btn_OK'){
document.getElementById(cmd).style.display = 'none';
document.getElementById('btn_OK_press').style.display = 'block';
}
else{
document.getElementById(cmd).style.display = 'block';
}
send_cmd(cmd);
//document.write (cmd); Посмотреть нажатую кнопку
})
.bind('mouseup touchend', function(){
var cmd = $(this).attr("cmd");
if(cmd=='btn_OK'){
document.getElementById(cmd).style.display = 'block';
document.getElementById('btn_OK_press').style.display = 'none';
}
else{
document.getElementById(cmd).style.display = 'none';
}
});
$(".btn")
.bind(poke, function(){
var cmd = $(this).attr("cmd");
send_cmd(cmd);
if(cmd=='btn_OFF'){
$(this).css('backgroundImage', 'url(/templates/app_pult/images/power_button_pressed.png)');
} else {
$(this).css('backgroundImage', 'url(/templates/app_pult/images/button_pressed.png)');
}
})
.bind('mouseup touchend', function(){
var cmd = $(this).attr("cmd");
if(cmd=='btn_OFF'){
$(this).css('backgroundImage', 'url(/templates/app_pult/images/power_button.png)');
} else {
$(this).css('backgroundImage', 'url(/templates/app_pult/images/button.png)');
}
});
});
</script>
<div class="remote">
<div class="srv">
<div class="btn pwr srv_" cmd="btn_OFF"></div>
<div class="btn srv_ srv_1" cmd="btn_MUTE">MUTE</div>
<div class="btn srv_ srv_2" cmd="btn_INPUT">INPUT</div>
<div class="btn srv_ srv_3" cmd="btn_MENU">MENU</div>
</div>
<div class="center">
<div class="navigation">
<img src="../templates/app_pult/images/nav.png" width="220" height="220" usemap="#navigationMap"/>
<map name="navigationMap">
<area shape="poly" coords="102,4,5,102,5,4" href="javascript:void(0)" cmd="btn_volUP" class="nav_area">
<area shape="poly" coords="119,5,216,5,216,103" href="javascript:void(0)" cmd="btn_chUP" class="nav_area">
<area shape="poly" coords="215,115,118,213,215,213" href="javascript:void(0)" cmd="btn_chDOWN" class="nav_area">
<area shape="poly" coords="5,117,5,215,102,215" href="javascript:void(0)" cmd="btn_volDOWN" class="nav_area">
<area shape="poly" coords="148,141,153,132,153,91,143,80,158,65,203,110,160,153" href="javascript:void(0)" cmd="btn_RIGHT" class="nav_area">
<area shape="poly" coords="147,144,158,155,110,203,64,157,76,145,83,153,138,153" href="javascript:void(0)" cmd="btn_DOWN" class="nav_area">
<area shape="poly" coords="76,143,67,134,67,91,79,77,64,62,16,109,63,156" href="javascript:void(0)" cmd="btn_LEFT" class="nav_area">
<area shape="poly" coords="141,78,157,64,109,16,65,60,81,76,90,66,132,67" href="javascript:void(0)" cmd="btn_UP" class="nav_area">
<area shape="circle" coords="111,111,37" href="javascript:void(0)" cmd="btn_OK" class="nav_area">
</map>
</div>
<div class="center_arrows">
<div id="btn_OK" class="remote_center">
<img src="../templates/app_pult/images/remote_center.png" ></div>
<div id="btn_OK_press" class="remote_center" style="display: none;">
<img src="../templates/app_pult/images/remote_center_pressed.png" ></div>
<div id="btn_RIGHT" class="arrow_right_pressed">
<img src="../templates/app_pult/images/arrow_right_pressed.png" ></div>
<div id="btn_DOWN" class="arrow_down_pressed">
<img src="../templates/app_pult/images/arrow_down_pressed.png" ></div>
<div id="btn_LEFT" class="arrow_left_pressed">
<img src="../templates/app_pult/images/arrow_left_pressed.png" ></div>
<div id="btn_UP" class="arrow_up_pressed">
<img src="../templates/app_pult/images/arrow_up_pressed.png" ></div>
<div class="remote_center_arrows">
<img src="../templates/app_pult/images/remote_center_arrows.png"></div>
</div>
<div class="vol_UP">
<img src="../templates/app_pult/images/button_icon_volume_up.png" width="40" height="35" alt=""/></div>
<div class="vol_DOWN">
<img src="../templates/app_pult/images/button_icon_volume_down.png" width="40" height="35" alt=""/></div>
<div class="ch_UP">
<img src="../templates/app_pult/images/button_icon_channel_up.png" width="32" height="32" alt=""/></div>
<div class="ch_DOWN">
<img src="../templates/app_pult/images/button_icon_channel_down.png" width="32" height="32" alt=""/></div>
<div class="control_button_tl">
<img src="../templates/app_pult/images/control_button_tl.png"></div>
<div class="control_button_tr">
<img src="../templates/app_pult/images/control_button_tr.png"></div>
<div class="control_button_bl">
<img src="../templates/app_pult/images/control_button_bl.png"></div>
<div class="control_button_br">
<img src="../templates/app_pult/images/control_button_br.png"></div>
<div id="btn_volUP" class="control_button_tl" style="display: none; top: -1px;">
<img src="../templates/app_pult/images/control_button_tl_pressed.png"></div>
<div id="btn_chUP" class="control_button_tr" style="display: none; top: -1px;">
<img src="../templates/app_pult/images/control_button_tr_pressed.png"></div>
<div id="btn_volDOWN" class="control_button_bl" style="display: none; top: 114px;">
<img src="../templates/app_pult/images/control_button_bl_pressed.png"></div>
<div id="btn_chDOWN" class="control_button_br" style="display: none; top: 114px;">
<img src="../templates/app_pult/images/control_button_br_pressed.png"></div>
</div>
<div class="btn_num">
<div class="btn btn_ btn_1" cmd="btn_1">1</div>
<div class="btn btn_ btn_2" cmd="btn_2">2</div>
<div class="btn btn_ btn_3" cmd="btn_3">3</div>
<div class="btn btn_ btn_4" cmd="btn_4">4</div>
<div class="btn btn_ btn_5" cmd="btn_5">5</div>
<div class="btn btn_ btn_6" cmd="btn_6">6</div>
<div class="btn btn_ btn_7" cmd="btn_7">7</div>
<div class="btn btn_ btn_8" cmd="btn_8">8</div>
<div class="btn btn_ btn_9" cmd="btn_9">9</div>
<div class="btn btn_ btn_0" cmd="btn_0">0</div>
<div class="btn btn_ btn_LIST" cmd="btn_LIST">LIST</div>
<div class="btn btn_ btn_BACK" cmd="btn_BACK">BACK</div>
</div>
</div>