Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: HTML cleanup #7381

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</div>
</div>

<script type="text/javascript" src="<%=resource%>/bmx7/js/polling.js"></script>
<script type="text/javascript">//<![CDATA[
<script src="<%=resource%>/bmx7/js/polling.js"></script>
<script>
new TablePooler(10,"/cgi-bin/bmx7-info", {'originators':''}, "nodes_div", function(st){
var originators = st.originators;
var res = Array();
Expand All @@ -37,4 +37,4 @@
});
return res;
});
//]]></script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
-%>

<%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript" src="<%=resource%>/bmx7/js/polling.js"></script>
<script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/bmx7/js/polling.js"></script>


<style>
Expand Down Expand Up @@ -88,7 +88,7 @@ <h2>Mesh nodes</h2>

</div>

<script type="text/javascript">//<![CDATA[
<script>
var displayExtraInfo = function ( id ) {
document.getElementById('extra-info').innerHTML = document.getElementById(id).innerHTML;
}
Expand Down Expand Up @@ -150,6 +150,6 @@ <h2>Mesh nodes</h2>
});
return res;
});
//]]></script>
</script>

<%+footer%>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript" src="<%=resource%>/bmx7/js/polling.js"></script>
<script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/bmx7/js/polling.js"></script>

<div class="cbi-map">
<center>
Expand Down Expand Up @@ -87,7 +87,7 @@

</div>

<script type="text/javascript">//<![CDATA[
<script>
new TablePooler(10,"/cgi-bin/bmx7-info", {'info':''}, "config_div", function(st){
var res = Array();
var sta = st.info[0].status;
Expand Down Expand Up @@ -125,6 +125,6 @@
return res;
});

//]]></script>
</script>

<%+footer%>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%+header%>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.min.js" integrity="sha512-uy3foVtL4u0+5430l7zZt4PHjVtICfrbu3mtzdanR425sKD7kS5264djeZAzNIV0l4vc1QkFpW2+G5i5KoJIFQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript" src="<%=resource%>/bmx7/js/netjsongraph.js"></script>
<script src="<%=resource%>/bmx7/js/netjsongraph.js"></script>

<link href="<%=resource%>/bmx7/css/netjsongraph.css" rel="stylesheet">
<style type="text/css">
<style>
body {
font-family: Arial, sans-serif;
font-size: 13px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@


<%+header%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript" src="<%=resource%>/bmx7/js/polling.js"></script>
<script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/bmx7/js/polling.js"></script>

<div class="cbi-map">
<h2>Gateway announcements</h2>
Expand All @@ -50,7 +50,7 @@ <h2>Gateway announcements</h2>

</div>

<script type="text/javascript">//<![CDATA[
<script>
new TablePooler(5,"/cgi-bin/bmx7-info", {'tunnels':''}, "tunnels_div", function(st){
var tunicon = "<%=resource%>/icons/tunnel.png";
var tunicon_dis = "<%=resource%>/icons/tunnel_disabled.png";
Expand All @@ -71,6 +71,6 @@ <h2>Gateway announcements</h2>
}
return res;
});
//]]></script>
</script>

<%+footer%>
4 changes: 2 additions & 2 deletions applications/luci-app-commands/ucode/template/commands.ut
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
` });
-%}

<script type="text/javascript">//<![CDATA[
<script>
function command_run(ev, id)
{
var field = document.getElementById(id);
Expand Down Expand Up @@ -113,7 +113,7 @@
ev.preventDefault();
}

//]]></script>
</script>

{%
const commands = [];
Expand Down
4 changes: 2 additions & 2 deletions applications/luci-app-cshark/luasrc/view/cshark.htm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<hr/>

<script type="text/javascript">//<![CDATA[
<script>

var capture_running = 0;
var pid_file = 0;
Expand Down Expand Up @@ -287,4 +287,4 @@

check_status();
link_list_update();
//]]></script>
</script>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style type="text/css">
<style>
#docker_apply_overlay {
position: absolute;
top: 0;
Expand Down Expand Up @@ -42,7 +42,7 @@
}
</style>

<script type="text/javascript">//<![CDATA[
<script>
var xhr = new XHR(),
uci_apply_rollback = <%=math.max(luci.config and luci.config.apply and luci.config.apply.rollback or 90, 90)%>,
uci_apply_holdoff = <%=math.max(luci.config and luci.config.apply and luci.config.apply.holdoff or 4, 1)%>,
Expand Down Expand Up @@ -144,4 +144,4 @@
});
}

//]]></script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<li id="cbi-tab-container_logs"><a id="a-cbi-tab-container_logs" href=""><%:Logs%></a></li>
</ul>

<script type="text/javascript">
<script>
let re = /\/admin\/docker\/container\//
let p = window.location.href
let path = p.split(re)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="cbi-map">
<iframe id="terminal" style="width: 100%; min-height: 500px; border: none; border-radius: 3px;"></iframe>
</div>
<script type="text/javascript">
<script>
document.getElementById("terminal").src = "http://" + window.location.hostname + ":7682";
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
</div>

<script type="text/javascript">
<script>
let btnUpload = document.getElementById('upload')
btnUpload.onclick = function (e) {
let uploadArchive = document.getElementById('upload_archive')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">//<![CDATA[
<script>
let last_bw_tx
let last_bw_rx
let interval = 3
Expand Down Expand Up @@ -78,4 +78,4 @@
}

});
//]]></script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<input type="file" id="file_import" style="visibility:hidden; position: absolute;top: 0px; left: 0px;" />
</div>

<script type="text/javascript">
<script>
let btnImport = document.getElementById('btnimport')
let valISrc = document.getElementById('isrc')
let valITag = document.getElementById('itag')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<input type="button"" class="btn cbi-button cbi-button-add" id="btnload" name="load" value="<%:Load%>" />
<input type="file" id="file_load" style="visibility:hidden; position: absolute;top: 0px; left: 0px;" accept="application/x-tar" />
</div>
<script type="text/javascript">
<script>
let btnLoad = document.getElementById('btnload')
btnLoad.onclick = function (e) {
document.getElementById("file_load").click()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style type="text/css">
<style>
#dialog_reslov {
position: absolute;
top: 0;
Expand Down Expand Up @@ -50,7 +50,7 @@
}
</style>

<script type="text/javascript">
<script>
function close_reslov_dialog() {
document.body.classList.remove('dialog-reslov-active')
document.documentElement.style.overflowY = 'scroll'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">//<![CDATA[
<script>
XHR.poll(-1, '<%=url('admin/telephony/status')%>', null,
function(x, st)
{
Expand All @@ -14,7 +14,7 @@
}
}
);
//]]></script>
</script>

<fieldset class="cbi-section">
<legend><%:Current Telephony State%></legend>
Expand Down
4 changes: 1 addition & 3 deletions applications/luci-app-lxc/luasrc/view/lxc.htm
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ <h3><%:Create New Container%></h3>

<hr />

<script type="text/javascript">
//<![CDATA[
<script>
window.img = { "red" : "<%=resource%>/cbi/red.gif", "green" : "<%=resource%>/cbi/green.gif", "purple" : "<%=resource%>/cbi/purple.gif" };
window.states = { "STOPPED" : "red", "RUNNING" : "green", "FROZEN" : "purple" };

Expand Down Expand Up @@ -502,5 +501,4 @@ <h3><%:Create New Container%></h3>
})

lxc_list_update();
//]]>
</script>
4 changes: 2 additions & 2 deletions applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<%+header%>

<script type="text/javascript">//<![CDATA[
<script>
var bwxhr = new XHR();

var RC = { };
Expand Down Expand Up @@ -120,7 +120,7 @@
}
}, 1000
);
//]]></script>
</script>

<h2 name="content"><%:Realtime Rate%></h2>

Expand Down
4 changes: 2 additions & 2 deletions applications/luci-app-ocserv/luasrc/view/ocserv_status.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script type="text/javascript">//<![CDATA[
<script>

function ocserv_disconnect(idx) {
(new XHR()).post('<%=url('admin/vpn/ocserv/disconnect')%>/' + idx, { token: '<%=token%>' },
Expand Down Expand Up @@ -42,7 +42,7 @@
}
}
);
//]]></script>
</script>

<fieldset class="cbi-section">
<legend><%:Active OpenConnect Users%></legend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ call)

jsonreq4=$(
cat <<EOF
<script language='JavaScript1.2' type='text/javascript'>
<script>
EOF

# sed + txtinfo plugin
Expand Down
5 changes: 2 additions & 3 deletions applications/luci-app-olsr/htdocs/cgi-bin-status.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; URL=/cgi-bin/luci/freifunk/olsr/neighbors" />
</head>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

<script type="text/javascript">
//<![CDATA[
<script>
function vpn_add()
{
var vpn_name = div_add.querySelector("#instance_name1").value.replace(/[^\x00-\x7F]|[\s\.!@#$%^&*()\-+=\[\]{};':"\\|,<>\/?]/g,'');
Expand Down Expand Up @@ -68,7 +67,6 @@
setTimeout(function(){ output.innerHTML=""}, timeout);
}
}
//]]>
</script>

<%+openvpn/ovpn_css%>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style type="text/css">
<style>
h4
{
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<!-- ++ BEGIN ++ Privoxy ++ detail_logview.htm ++ -->
<script type="text/javascript">//<![CDATA[
<script>
function onclick_logview(section, bottom) {
// get elements
var txt = document.getElementById("cbid.privoxy.privoxy._logview.txt"); // TextArea
Expand All @@ -18,7 +18,7 @@
txt.scrollTop = 0; }
);
}
//]]></script>
</script>

<%+cbi/valueheader%>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<!-- ++ BEGIN ++ Privoxy ++ detail_startstop.htm ++ -->
<script type="text/javascript">//<![CDATA[
<script>

// show XHR.poll/XHR.get response on button
function _data2elements(x) {
Expand Down Expand Up @@ -30,7 +30,7 @@
function(x, data) { _data2elements(x); }
);

//]]></script>
</script>

<%+cbi/valueheader%>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<!-- ++ BEGIN ++ Radicale ++ btn_startstop.htm ++ -->
<script type="text/javascript">//<![CDATA[
<script>

// show XHR.poll/XHR.get response on button
function _data2elements(x) {
Expand Down Expand Up @@ -30,7 +30,7 @@
function(x, data) { _data2elements(x); }
);

//]]></script>
</script>

<%+cbi/valueheader%>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2 name="content"><%=self.title%></h2>
<%+cbi/apply_widget%>
<% cbi_apply_widget() %>
<div class="alert-message" id="cbi_apply_status" style="display:none"></div>
<script type="text/javascript">
<script>
document.addEventListener("DOMContentLoaded", function() {
<% if confirmmap then -%>
uci_confirm(true, Date.now() + <%=confirmmap%> * 1000);
Expand Down
Loading
Loading