mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
yWeb/Y_Tools_Screenshot: drop prototype.js; use jquery
Origin commit data
------------------
Commit: aaef51bb8a
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Origin message was:
------------------
- yWeb/Y_Tools_Screenshot: drop prototype.js; use jquery
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
{=var-set:grab={=find-exec:grab=}=}
|
{=var-set:grab={=find-exec:grab=}=}
|
||||||
{=var-set:fbshot={=find-exec:fbshot=}=}
|
{=var-set:fbshot={=find-exec:fbshot=}=}
|
||||||
|
|
||||||
{=include-block:Y_Blocks.txt;head_ni=}
|
{=include-block:Y_Blocks.txt;head=}
|
||||||
|
{=include-block:Y_Blocks.txt;jQuery=}
|
||||||
|
{=include-block:Y_Blocks.txt;jQuery_ui=}
|
||||||
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
||||||
<script type="text/javascript" src="/prototype.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var enableOSD;
|
var enableOSD;
|
||||||
@@ -12,9 +13,9 @@ var enablePiP;
|
|||||||
var interval;
|
var interval;
|
||||||
|
|
||||||
function checkEnable() {
|
function checkEnable() {
|
||||||
enableOSD = (document.getElementById('checkOSD').checked == true) ? 1 : 0;
|
enableOSD = (id('checkOSD').checked == true) ? 1 : 0;
|
||||||
enableVideo = (document.getElementById('checkVideo').checked == true) ? 1 : 0;
|
enableVideo = (id('checkVideo').checked == true) ? 1 : 0;
|
||||||
enablePiP = (document.getElementById('checkPiP').checked == true) ? 1 : 0;
|
enablePiP = (id('checkPiP').checked == true) ? 1 : 0;
|
||||||
|
|
||||||
if (enableOSD == 0 && enableVideo == 0) {
|
if (enableOSD == 0 && enableVideo == 0) {
|
||||||
alert("{=L:bc.screenshot.checkenable=}");
|
alert("{=L:bc.screenshot.checkenable=}");
|
||||||
@@ -27,12 +28,12 @@ function checkEnable() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
function rcsim(_key) {
|
function rcsim(_key) {
|
||||||
if(!checkEnable()) return;
|
if (!checkEnable()) return;
|
||||||
|
|
||||||
if(_key == "KEY_POWER"){
|
if(_key == "KEY_POWER"){
|
||||||
var __result = trim(loadSyncURL("/control/standby"));
|
var __result = trim(loadSyncURL("/control/standby"));
|
||||||
if (__result == "off") {
|
if (__result == "off") {
|
||||||
if(confirm("{=L:bc.control.shutdown.ask=}") != true)
|
if (confirm("{=L:bc.control.shutdown.ask=}") != true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,15 +41,15 @@ function rcsim(_key) {
|
|||||||
window.setTimeout("do_snapshot()", 750);
|
window.setTimeout("do_snapshot()", 750);
|
||||||
}
|
}
|
||||||
function do_snapshot() {
|
function do_snapshot() {
|
||||||
if(!checkEnable()) return;
|
if (!checkEnable()) return;
|
||||||
|
|
||||||
$('shot').hide();
|
jQuery('#shot').hide();
|
||||||
$('shot').src = "";
|
jQuery('#shot').attr("src", "");
|
||||||
$('buttons').hide();
|
jQuery('#buttons').hide();
|
||||||
$('status').show();
|
jQuery('#status').show();
|
||||||
|
|
||||||
var filename = "screenshot";
|
var filename = "screenshot";
|
||||||
if (id("filename").value != "") {
|
if (id('filename').value != "") {
|
||||||
filename = id("filename").value;
|
filename = id("filename").value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,27 +77,19 @@ function do_showshot(_filename) {
|
|||||||
if (_filename == "")
|
if (_filename == "")
|
||||||
_filename = "screenshot";
|
_filename = "screenshot";
|
||||||
|
|
||||||
$('status').hide();
|
jQuery('#status').hide();
|
||||||
$('buttons').show();
|
jQuery('#buttons').show();
|
||||||
$('shot').src = "/tmp/"+_filename+".png?"+Math.random();
|
jQuery('#shot').attr("src", "/tmp/"+_filename+".png?" + Math.random());
|
||||||
$('shot').show();
|
jQuery('#shot').show();
|
||||||
}
|
}
|
||||||
function do_clearshot(){
|
function do_clearshot() {
|
||||||
$('shot').hide();
|
jQuery('#shot').hide();
|
||||||
$('shot').src = "";
|
jQuery('#shot').attr("src", "");
|
||||||
|
|
||||||
loadSyncURL("/control/exec?Y_Tools&screenshot_clear");
|
loadSyncURL("/control/exec?Y_Tools&screenshot_clear");
|
||||||
}
|
}
|
||||||
function do_switchrc(){
|
|
||||||
//NI
|
|
||||||
/*
|
|
||||||
if (id('remote').style.display == 'none')
|
|
||||||
$('remote').show();
|
|
||||||
else
|
|
||||||
$('remote').hide();
|
|
||||||
|
|
||||||
do_switchrc_txt();
|
function do_switchrc() {
|
||||||
*/
|
|
||||||
jQuery('#remote').toggle('slide', {direction: 'left'}, 'slow', function() {
|
jQuery('#remote').toggle('slide', {direction: 'left'}, 'slow', function() {
|
||||||
do_switchrc_txt();
|
do_switchrc_txt();
|
||||||
});
|
});
|
||||||
@@ -104,14 +97,14 @@ function do_switchrc(){
|
|||||||
|
|
||||||
function do_switchrc_txt(){
|
function do_switchrc_txt(){
|
||||||
if (id('remote').style.display == 'none')
|
if (id('remote').style.display == 'none')
|
||||||
$('switchrc').update("{=L:bc.control.remote=} {=L:show=}");
|
jQuery('#switchrc').text("{=L:bc.control.remote=} {=L:show=}");
|
||||||
else
|
else
|
||||||
$('switchrc').update("{=L:bc.control.remote=} {=L:hide=}");
|
jQuery('#switchrc').text("{=L:bc.control.remote=} {=L:hide=}");
|
||||||
}
|
}
|
||||||
|
|
||||||
function do_reload(){
|
function do_reload(){
|
||||||
if (document.getElementById("checkReload").checked)
|
if (id('checkReload').checked)
|
||||||
interval = setInterval(do_snapshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_snapshot, id('inputReload').value + "000");
|
||||||
else
|
else
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
@@ -164,13 +157,13 @@ function do_reload(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('checkReload').onclick = function() {
|
id('checkReload').onclick = function() {
|
||||||
if (this.checked ) {
|
if (this.checked ) {
|
||||||
interval = setInterval(do_snapshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_snapshot, id("inputReload").value + "000");
|
||||||
document.getElementById("inputReload").disabled = false;
|
id("inputReload").disabled = false;
|
||||||
} else {
|
} else {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
document.getElementById("inputReload").disabled = true;
|
id("inputReload").disabled = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -1,24 +1,24 @@
|
|||||||
|
|
||||||
{=include-block:Y_Blocks.txt;head=}
|
{=include-block:Y_Blocks.txt;head=}
|
||||||
|
{=include-block:Y_Blocks.txt;jQuery=}
|
||||||
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
||||||
<script type="text/javascript" src="/prototype.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var interval;
|
var interval;
|
||||||
|
|
||||||
function do_snapshot() {
|
function do_snapshot() {
|
||||||
|
|
||||||
$('shot').hide();
|
jQuery('#shot').hide();
|
||||||
$('shot').src = "";
|
jQuery('#shot').attr("src", "");
|
||||||
$('buttons').hide();
|
jQuery('#buttons').hide();
|
||||||
$('status').show();
|
jQuery('#status').show();
|
||||||
|
|
||||||
|
// FIXME: any other filename then "glcdscreenshot" seeems broken
|
||||||
var filename = "glcdscreenshot";
|
var filename = "glcdscreenshot";
|
||||||
if (id("filename").value != "") {
|
if (id('filename').value != "") {
|
||||||
filename = id("filename").value;
|
filename = id("filename").value;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSyncURL("/control/glcdscreenshot?name"+filename);
|
loadSyncURL("/control/glcdscreenshot?name="+filename);
|
||||||
|
|
||||||
do_showshot(filename);
|
do_showshot(filename);
|
||||||
}
|
}
|
||||||
@@ -26,21 +26,21 @@ function do_showshot(_filename) {
|
|||||||
if (_filename == "")
|
if (_filename == "")
|
||||||
_filename = "glcdscreenshot";
|
_filename = "glcdscreenshot";
|
||||||
|
|
||||||
$('status').hide();
|
jQuery('#status').hide();
|
||||||
$('buttons').show();
|
jQuery('#buttons').show();
|
||||||
$('shot').src = "/tmp/"+_filename+".png?"+Math.random();
|
jQuery('#shot').attr("src", "/tmp/"+_filename+".png?" + Math.random());
|
||||||
$('shot').show();
|
jQuery('#shot').show();
|
||||||
}
|
}
|
||||||
function do_clearshot(){
|
function do_clearshot(){
|
||||||
$('shot').hide();
|
jQuery('#shot').hide();
|
||||||
$('shot').src = "";
|
jQuery('#shot').attr("src", "");
|
||||||
|
|
||||||
loadSyncURL("/control/exec?Y_Tools&screenshot_clear");
|
loadSyncURL("/control/exec?Y_Tools&screenshot_clear");
|
||||||
}
|
}
|
||||||
|
|
||||||
function do_reload(){
|
function do_reload(){
|
||||||
if (document.getElementById("checkReload").checked)
|
if (id('checkReload').checked)
|
||||||
interval = setInterval(do_snapshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_snapshot, id('inputReload').value + "000");
|
||||||
else
|
else
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ function do_reload(){
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<form onsubmit="do_snapshot(); return false">
|
<form onsubmit="do_snapshot(); return false">
|
||||||
{=L:filename=}: <input type="text" value="glcdscreenshot" id="filename" size="10" />
|
{=L:filename=}: <input type="text" value="glcdscreenshot" id="filename" size="12" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
@@ -84,13 +84,13 @@ function do_reload(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('checkReload').onclick = function() {
|
id('checkReload').onclick = function() {
|
||||||
if (this.checked ) {
|
if (this.checked ) {
|
||||||
interval = setInterval(do_snapshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_snapshot, id('inputReload').value + "000");
|
||||||
document.getElementById("inputReload").disabled = false;
|
id('inputReload').disabled = false;
|
||||||
} else {
|
} else {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
document.getElementById("inputReload").disabled = true;
|
id('inputReload').disabled = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -1,16 +1,17 @@
|
|||||||
{=include-block:Y_Blocks.txt;head_ni=}
|
{=include-block:Y_Blocks.txt;head=}
|
||||||
|
{=include-block:Y_Blocks.txt;jQuery=}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var interval;
|
var interval;
|
||||||
|
|
||||||
function do_showshot() {
|
function do_showshot() {
|
||||||
$('shot').src = "/tmp/lcd4linux.png?"+Math.random();
|
jQuery('#shot').attr("src", "/tmp/lcd4linux.png?" + Math.random());
|
||||||
$('shot').show();
|
jQuery('#shot').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function do_reload(){
|
function do_reload(){
|
||||||
if (document.getElementById("checkReload").checked)
|
if (id('checkReload').checked)
|
||||||
interval = setInterval(do_showshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_showshot, id('inputReload').value + "000");
|
||||||
else
|
else
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
@@ -40,13 +41,13 @@ function do_reload(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('checkReload').onclick = function() {
|
id('checkReload').onclick = function() {
|
||||||
if (this.checked ) {
|
if (this.checked ) {
|
||||||
interval = setInterval(do_showshot, document.getElementById("inputReload").value + "000");
|
interval = setInterval(do_showshot, id('inputReload').value + "000");
|
||||||
document.getElementById("inputReload").disabled = false;
|
id('inputReload').disabled = false;
|
||||||
} else {
|
} else {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
document.getElementById("inputReload").disabled = true;
|
id('inputReload').disabled = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
version=3.0.7
|
version=3.0.8
|
||||||
date=01.02.2023
|
date=02.02.2023
|
||||||
info=NI-Neutrino-Webinterface
|
info=NI-Neutrino-Webinterface
|
||||||
|
Reference in New Issue
Block a user