Files
neutrino/data/y-web/Y_Boxcontrol_Menue.yhtm
Thilo Graf 4518361d3d Revert "yWeb: rework for basic functionality"
Your reaction to this commit were remarkable. You demanded with an
imperious kind to revert this commit. You spoke about any rules only,
and I didn't hear evidencing explanations from you.
Admittedly, my commit wasn't very pretty and not the best style because
everything was squashed in a single commit with some customizations,
but which is ultimately just a formality... that's about it, and was quite
compliant with license conditions. In additional, your name was noted on
the commit. I'm just reminding you, until a few years ago, you didn't care
about licenses. The general copyright mainly lies with yjogol and a lot of
changes of the origin yweb code has been coming in by several committers
since yweb exists. I won't judge, whether any unique selling points play a
role, but such restrictions are exactly what the license should prevent.
Especially as, many creeped in brandings in some code parts (not only yweb)
do suggest that. Besides neutralizing such things, mainly it was the
purpose to get more compatibility, even though some functionalities
were removed or switched off.

Related to yweb I have decided to take back this commit for the sake of
peace, and I hope you are happy with it. However, I still reserve to
continue using and adopting yweb.
2023-01-05 16:05:18 +01:00

249 lines
7.7 KiB
Plaintext

{=include-block:Y_Blocks.txt;head=}
<script type="text/javascript" src="/prototype.js"></script>
<script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript" src="/Y_yweb.js"></script>
<script type="text/javascript">
//<![CDATA[
var g_sig = 100;
function set_sigbar(_sig){
var l = $("sigbar_left");
var r = $("sigbar_right");
/*IE: width=0 -> =""*/
if(_sig > 0)
l.width = _sig.toString()+"%";
else
l.width = "";
if(_sig >= 100)
r.width = "";
else
r.width = (100-_sig).toString()+"%";
}
function sig_get(){
var __sig_str = loadSyncURL("/control/signal?sig");
var __sig = parseInt(__sig_str,10);
if(isNaN(__sig)) __sig=100;
set_sigbar(__sig);
g_sig = __sig;
$('sig_value').update(g_sig);
return __sig;
}
var g_snr = 100;
function set_snrbar(_snr){
var l = $("snrbar_left");
var r = $("snrbar_right");
/*IE: width=0 -> =""*/
if(_snr > 0)
l.width = _snr.toString()+"%";
else
l.width = "";
if(_snr >= 100)
r.width = "";
else
r.width = (100-_snr).toString()+"%";
}
function snr_get(){
var __snr_str = loadSyncURL("/control/signal?snr");
var __snr = parseInt(__snr_str,10);
if(isNaN(__snr)) __snr=100;
set_snrbar(__snr);
g_snr = __snr;
$('snr_value').update(g_snr);
return __snr;
}
var g_ber = 0;
function ber_get(){
var __ber_str = loadSyncURL("/control/signal?ber");
var __ber = parseInt(__ber_str,10);
if(isNaN(__ber)) __ber=100;
g_ber = __ber;
$('ber_value').update(g_ber);
//return __ber;
}
var g_volumen = 100;
function volumen_set_audiobar(_volumen){
var l = $("audiobar_left");
var r = $("audiobar_right");
/*IE: width=0 -> =""*/
if(_volumen > 0)
l.width = _volumen.toString()+"%";
else
l.width = "";
if(_volumen >= 100)
r.width = "";
else
r.width = (100-_volumen).toString()+"%";
}
function volumen_get(){
var __volumen_str = loadSyncURL("/control/volume");
var __volumen = parseInt(__volumen_str,10);
if(isNaN(__volumen)) __volumen=100;
volumen_set_audiobar(__volumen);
g_volumen = __volumen;
return __volumen;
}
function volumen_set(_volumen){
_volumen = Math.min(100, _volumen);
_volumen = Math.max(0, _volumen);
loadSyncURL("/control/volume?"+_volumen);
volumen_set_audiobar(_volumen);
g_volumen = _volumen;
}
function set_mute_button(){
var status = loadSyncURL("/control/volume?status");
$('btMute').update( (status==1) ? "<img src=\"/images/volumeunmute.png\">" : "<img src=\"/images/volumemute.png\">");
return status;
}
function toggle_mute(){
var status = loadSyncURL("/control/volume?status");
if(status==0)//aus
loadSyncURL("/control/volume?mute");
else
loadSyncURL("/control/volume?unmute");
set_mute_button();
}
function set_mode(_mode){
var actual_mode = loadSyncURL("/control/getmode");
if(actual_mode != _mode)
loadSyncURL("/control/setmode?" + _mode);
parent.work.location.reload();
}
function init(){
volumen_set_audiobar(volumen_get());
set_mute_button();
set_sigbar(sig_get());
set_snrbar(snr_get());
ber_get();
// add_yExtensions('boxcontrol', 'secmenu_boxcontrol');
}
function get_data(){
volumen_set_audiobar(volumen_get());
set_sigbar(sig_get());
set_snrbar(snr_get());
ber_get();
add_yExtensions('boxcontrol', 'secmenu_boxcontrol');
}
function epg_plus_popup() {
window.open("Y_EPG_Plus.yhtm","_blank","resizable=yes,scrollbars=yes");
}
//]]>
</script>
</head>
{=var-set:lcshot={=find-exec:lcshot=}=}
<body>
<div class="y_menu_sec_box">
<div class="y_menu_sec_box_head"><h2>{=L:main.boxcontrol=}</h2></div>
<div class="y_menu_sec_box_body">
<div class="y_menu_sec">
<ul id="secmenu_boxcontrol">
<li>
<a target="work" title="{=L:bc.menue.bouquets_desc=}" href="Y_Boxcontrol_Bouquets.yhtm">{=L:bc.menue.bouquets=}</a>
</li>
<li>
<a target="work" href="Y_EPG_Plus.yhtm">{=L:live.epg_plus=}</a>
<a class="y_menu_popup_link" title="{=L:live.epg_plus_popup_desc=}" href="javascript:epg_plus_popup()"><img src="/images/popup.png"/></a>
</li>
<li>
<a target="work" title="{=L:bc.menue.control_desc=}" href="Y_Tools_Boxcontrol.yhtm">{=L:bc.menue.control=}</a>
</li>
<li>
<a target="work" title="{=L:bc.menue.messages_desc=}" href="Y_Boxcontrol_Messages.yhtm">{=L:bc.menue.messages=}</a>
</li>
<li>
<a target="work" title="{=L:bc.menue.remote_desc=}" href="Y_Tools_Rcsim.yhtm">{=L:bc.menue.remote=}</a>
</li>
{=if-equal:{=ini-get:%(CONFIGDIR)/neutrino.conf;glcd_enable;0=}~1~
<li>
<a target="work" title="{=L:bc.menue.glcd_screenshot_desc=}" href="Y_Tools_Glcd_Screenshot.yhtm">{=L:bc.menue.glcd_screenshot=}</a>
</li>
~=}
<li>
<a target="work" title="OSD-{=L:bc.menue.screenshot=}" href="Y_Tools_Screenshot.yhtm?osd=1&rc={=ini-get:%(CONFIGDIR)/Y-Web.conf;screenshot_rc;false=}">OSD-{=L:bc.menue.screenshot=}</a>
</li>
<li>
<a target="work" title="TV-{=L:bc.menue.screenshot=}" href="Y_Tools_Screenshot.yhtm?video=1&rc={=ini-get:%(CONFIGDIR)/Y-Web.conf;screenshot_rc;false=}">TV-{=L:bc.menue.screenshot=}</a>
</li>
<li>
<a target="work" href="Y_Timer_List.yhtm">{=L:live.timer=}</a>
</li>
</ul>
</div>
</div>
</div>
<div class="y_menu_sec_box">
<div class="y_menu_sec_box_head"><h2>{=L:bc.menue.control=}</h2></div>
<div class="y_menu_sec_box_body">
<center>
<table class="y_text_boxcontrol_table" cellspacing="0" cellpadding="0" title="{=L:bc.menue.volumen_display=}">
<tr>
<td id="audiobar_left" width="100%"><img src="/images/blank.gif" height="1" width="0" alt="."/></td>
<td id="audiobar_right" width="0%"><img src="/images/blank.gif" height="1" width="0" alt="."/></td>
</tr>
</table>
<br/>
<span class="control_icon" title="{=L:bc.menue.decrease_volume=}">
<a href="javascript:volumen_set(g_volumen-10);">
<img src="/images/volumedown.png">
</a>
</span>
<span class="control_icon" title="{=L:bc.menue.increase_volume=}">
<a href="javascript:volumen_set(g_volumen+10);">
<img src="/images/volumeup.png">
</a>
</span>
<span class="control_icon" title="{=L:bc.menue.mute_volume=}">
<a id="btMute" href="javascript:toggle_mute();">
<img src="/images/volumemute.png">
</a>
</span>
<span class="control_icon" title="{=L:bc.menue.switch_to_tv=}">
<a href="javascript:set_mode('tv');">
<img src="/images/live.png">
</a>
</span>
<span class="control_icon" title="{=L:bc.menue.switch_to_radio=}">
<a href="javascript:set_mode('radio');">
<img src="/images/radio.png">
</a>
</span>
</center>
</div>
</div>
<div class="y_menu_sec_box">
<div class="y_menu_sec_box_head"><h2>{=L:bc.menue.signal=}</h2></div>
<div class="y_menu_sec_box_body">
<center>
<div class="y_text_boxcontrol_div_progress">SIG <span id="sig_value"></span>%</div>
<table class="y_text_boxcontrol_table_progress" cellspacing="0" cellpadding="0" title="{=L:bc.menue.sig_display=}">
<tr>
<td id="sigbar_left" width="100%"><img src="/images/blank.gif" height="1" width="0" alt="." /></td>
<td id="sigbar_right" width="0%"><img src="/images/blank.gif" height="1" width="0" alt="." /></td>
</tr>
</table>
</center>
<center>
<div class="y_text_boxcontrol_div_progress">SNR <span id="snr_value"></span>%</div>
<table class="y_text_boxcontrol_table_progress" cellspacing="0" cellpadding="0" title="{=L:bc.menue.snr_display=}">
<tr>
<td id="snrbar_left" width="100%"><img src="/images/blank.gif" height="1" width="0" alt="." /></td>
<td id="snrbar_right" width="0%"><img src="/images/blank.gif" height="1" width="0" alt="." /></td>
</tr>
</table>
</center>
<center>
<div class="y_text_boxcontrol_div_progress">BER <span id="ber_value"></span></div>
</center>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
init();
window.setInterval("get_data();",5000);
//]]>
</script>
</body>
</html>