mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
yWeb: move goUrl() and goPort() away from Y_NIlib.js
Origin commit data
------------------
Commit: bc15870197
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Origin message was:
------------------
- yWeb: move goUrl() and goPort() away from Y_NIlib.js
This commit is contained in:
@@ -528,3 +528,28 @@ function saveTextAsFile(content, filename, filetype)
|
||||
}
|
||||
downloadLink.click();
|
||||
}
|
||||
|
||||
function goUrl(_url)
|
||||
{
|
||||
var res = trim(loadSyncURL(_url));
|
||||
switch(res)
|
||||
{
|
||||
case "1": res = "on"; break;
|
||||
case "0": res = "off"; break;
|
||||
}
|
||||
var out = document.getElementById("out");
|
||||
if (out)
|
||||
out.innerHTML = res;
|
||||
}
|
||||
|
||||
function goPort(_port)
|
||||
{
|
||||
if (_port == "")
|
||||
return;
|
||||
var host = self.location.href;
|
||||
var pos1 = host.indexOf('//');
|
||||
var temp = host.substring(pos1 + 2, host.length);
|
||||
var pos2 = temp.indexOf('/');
|
||||
var host = host.substring(0, pos1 + 2 + pos2);
|
||||
window.open(host + ":" + _port, "_blank");
|
||||
}
|
||||
|
@@ -299,7 +299,6 @@ start-block~head_ni
|
||||
{=include-block:Y_Blocks.txt;js_prototype=}
|
||||
{=include-block:Y_Blocks.txt;js_jquery=}
|
||||
{=include-block:Y_Blocks.txt;js_jquery_ui=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script src="/Y_NIlib.js"></script>
|
||||
<script>
|
||||
// Clear y-Cache in our pages
|
||||
|
@@ -1,5 +1,3 @@
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
|
||||
{=var-set:_mtd_info_dev={=script:Y_NI_Tools get_mtd_info dev=}=}
|
||||
{=var-set:_mtd_info_name={=script:Y_NI_Tools get_mtd_info name=}=}
|
||||
|
||||
@@ -19,6 +17,9 @@
|
||||
{=var-set:_mem_free={=script:Y_NI_Tools get_mem_info free=}=}
|
||||
|
||||
{=var-set:boxmodel={=func:get_boxmodel=}=}
|
||||
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
// taken from http://www.jjam.de/JavaScript/Datum_Uhrzeit/Wochentag.html
|
||||
function getWeekDay(dd,mm,yyyy) {
|
||||
|
@@ -21,6 +21,7 @@
|
||||
{=var-set:doscamport={=script:Y_NI_Tools get_doscam_webif_port=}=}
|
||||
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<style>
|
||||
input[type="button"], .tools select {
|
||||
width: 100%;
|
||||
|
@@ -7,7 +7,9 @@
|
||||
{=var-set:icons_flag6={=ini-get:%(CONFIGDIR)/neutrino.conf;mode_icons_flag6~cache=}=}
|
||||
{=var-set:icons_flag7={=ini-get:%(CONFIGDIR)/neutrino.conf;mode_icons_flag7~cache=}=}
|
||||
{=var-set:icons_dir=%(ICONSDIR)=}
|
||||
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
function do_submit()
|
||||
{
|
||||
|
@@ -17,6 +17,7 @@
|
||||
{=var-set:nr=7=} {=include-block:Y_Blocks.txt;netfs_is_mount=}
|
||||
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
function edit_popup()
|
||||
{
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
function form_init()
|
||||
{
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
jQuery(document).ready(function(){
|
||||
window.document.location.href='/Y_NI_NetFS-control.yhtm?mount_type={=mount_type=}&mount_type_s={=mount_type_s=}';
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
{=include-block:Y_Blocks.txt;head_close=}
|
||||
<body>
|
||||
<div class="work_box">
|
||||
|
@@ -9,6 +9,7 @@
|
||||
{=var-set:xupnpdport={=script:Y_NI_Tools get_xupnpd_webif_port=}=}
|
||||
|
||||
{=include-block:Y_Blocks.txt;head_ni=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
{=include-block:Y_Blocks.txt;head_close=}
|
||||
<body onload='goUrl("/control/reloadplugins");'>
|
||||
{=var-set:wait_text={=L:ni.plugin-control.title=}<br/>=}{=include-block:Y_Blocks.txt;snip_wait=}
|
||||
|
@@ -1,27 +1,6 @@
|
||||
/* yWeb NIlib by NI-Team
|
||||
*/
|
||||
|
||||
// next function is taken from the original yweb
|
||||
// to make them available in all of our pages
|
||||
function goUrl(_url){
|
||||
var res = trim(loadSyncURL(_url));
|
||||
switch(res){
|
||||
case "1": res="on"; break;
|
||||
case "0": res="off"; break;
|
||||
}
|
||||
$("out").update(res);
|
||||
}
|
||||
|
||||
function goPort(_port) {
|
||||
if (_port == "") return;
|
||||
var host = self.location.href;
|
||||
var pos1 = host.indexOf('//');
|
||||
var temp = host.substring(pos1+2,host.length);
|
||||
var pos2 = temp.indexOf('/');
|
||||
var host = host.substring(0,pos1+2+pos2);
|
||||
window.open(host + ":" + _port,"_blank");
|
||||
}
|
||||
|
||||
function Y_NI_Tools(_cmd, _tout){
|
||||
$("out").update("");
|
||||
show_waitbox(true);
|
||||
|
@@ -6,14 +6,6 @@
|
||||
function goConfirmUrl(_meld, _url){
|
||||
if (confirm(_meld)==true) goUrl(_url);
|
||||
}
|
||||
function goUrl(_url){
|
||||
var res = trim(loadSyncURL(_url));
|
||||
switch(res){
|
||||
case "1": res="on"; break;
|
||||
case "0": res="off"; break;
|
||||
}
|
||||
jQuery('#out').text(res);
|
||||
}
|
||||
function set_btn_standby(){
|
||||
var res = trim(loadSyncURL("/control/standby"));
|
||||
var color = "gray";
|
||||
|
@@ -1,11 +1,5 @@
|
||||
{=include-block:Y_Blocks.txt;head=}
|
||||
<script src="/Y_Baselib.js"></script>
|
||||
<script>
|
||||
function goUrl(_url){
|
||||
var res = loadSyncURL(_url);
|
||||
id("out").innerHTML = res;
|
||||
}
|
||||
</script>
|
||||
{=include-block:Y_Blocks.txt;head_close=}
|
||||
<body>
|
||||
<div class="work_box">
|
||||
|
@@ -1,3 +1,3 @@
|
||||
version=3.0.40
|
||||
date=20.02.2023
|
||||
version=3.0.41
|
||||
date=21.02.2023
|
||||
info=NI-Neutrino-Webinterface
|
||||
|
Reference in New Issue
Block a user