mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
FHEMWEB: save displays a message, connect_err renamed to errmsg
git-svn-id: https://svn.fhem.de/fhem/trunk@4891 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c156cac8a2
commit
26e27b5ff7
@ -1257,7 +1257,7 @@ CommandSave($$)
|
||||
foreach my $fh (values %fh) {
|
||||
close($fh) if($fh ne "1");
|
||||
}
|
||||
return ($ret ? $ret : undef);
|
||||
return ($ret ? $ret : "Wrote configuration to $param");
|
||||
}
|
||||
|
||||
#####################################
|
||||
|
@ -8,7 +8,7 @@ div#logo { position: fixed; z-index:12000; top:3px; left:5px; float:left; wid
|
||||
#console { width:100%; height:100%; position:absolute; overflow-y:auto;}
|
||||
#hdr { position: fixed; z-index: 1000; float: left; clear: both; height:32px; width: 100%; -webkit-box-sizing: border-box; moz-box-sizing: border-box; box-sizing: border-box; background:black; background-image: linear-gradient(#333333,#222222); }
|
||||
#content { width:70%; float:right; margin-top:60px; }
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
table { margin: 0; padding: 0; border-spacing: 0px; border-collapse:separate; }
|
||||
td, th { font-family: Arial, sans-serif; font-size:11px; line-height:13px; vertical-align:middle; }
|
||||
th { font-weight:bold; font-size:12px; text-align:left; }
|
||||
|
@ -6,13 +6,11 @@ function
|
||||
consUpdate()
|
||||
{
|
||||
if(consConn.readyState == 4) {
|
||||
var errdiv = document.createElement('div');
|
||||
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
|
||||
errdiv.setAttribute("id","connect_err");
|
||||
document.body.appendChild(errdiv);
|
||||
setTimeout("consFill()", 5000);
|
||||
FW_errmsg("Connection lost, trying a reconnect every 5 seconds.");
|
||||
setTimeout(consFill, 5000);
|
||||
return; // some problem connecting
|
||||
}
|
||||
|
||||
if(consConn.readyState != 3)
|
||||
return;
|
||||
|
||||
@ -26,12 +24,8 @@ consUpdate()
|
||||
function
|
||||
consFill()
|
||||
{
|
||||
var errdiv = document.getElementById("connect_err");
|
||||
if(errdiv)
|
||||
document.body.removeChild(errdiv);
|
||||
|
||||
FW_errmsg("");
|
||||
consConn = new XMLHttpRequest();
|
||||
// Needed when using multiple FF windows
|
||||
var query = document.location.pathname+"?XHR=1"+
|
||||
"&inform=type=raw;filter=.*"+
|
||||
"×tamp="+new Date().getTime();
|
||||
|
@ -13,7 +13,7 @@ body[id~=Media] { background-color: #A5A5A5; font-family:Arial, Helvetica, s
|
||||
box-shadow:5px 5px 5px #000; margin-bottom: 10px;}
|
||||
#content { position:absolute; top:50px; left:180px; bottom:10px; right:10px; text-align:center}
|
||||
#startcontent {position:absolute; top:20px; left:200px; text-align:left; font-size: 16px; color:gray; }
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
|
||||
a { color:#CCCCCC; text-decoration:none;}
|
||||
td {padding-left: 3px; padding-right: 3px; padding-top: 3px; padding-bottom: 3px;}
|
||||
|
@ -6,7 +6,7 @@ body { background-color: #444444; background-image:url(../images/default/fhe
|
||||
#menu { position:absolute; top: 2px; left:65px; }
|
||||
#hdr { position:absolute; top:40px; left:65px; }
|
||||
#content { position:absolute; top:75px; left: 0px; right: 0px;}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
|
||||
a { color: #CCCCCC; text-decoration: none;}
|
||||
a:hover { color: #ffffff; }
|
||||
|
@ -7,7 +7,7 @@ body { background-color: #444444; background-image:url(../images/default/fhe
|
||||
#console { width:100%; height:100%; position:absolute; overflow-y:auto;}
|
||||
#hdr { position:absolute; top:10px; left:180px; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:20px; right:10px; }
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
|
||||
a { color: #CCCCCC; text-decoration: none;}
|
||||
a:hover { color: #ffffff; }
|
||||
|
@ -1,6 +1,4 @@
|
||||
/* Author: Volker */
|
||||
.background { fill:none; fill-opacity:0.0; }
|
||||
|
||||
text { font-family:Arial, Helvetica, sans-serif; font-size:12px; fill:#CCCCCC;}
|
||||
text.title {font-family:Arial, Helvetica, sans-serif; font-size:16px; fill:#CCCCCC;}
|
||||
text.copy { text-decoration:underline; stroke:none; fill:blue;}
|
||||
|
@ -10,22 +10,44 @@ FW_cmd(arg) /* see also FW_devState */
|
||||
var req = new XMLHttpRequest();
|
||||
req.open("GET", arg, true);
|
||||
req.send(null);
|
||||
req.onreadystatechange = function(){
|
||||
if(req.readyState == 4)
|
||||
FW_errmsg(req.responseText, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
function
|
||||
FW_errmsg(txt, timeout)
|
||||
{
|
||||
var errmsg = document.getElementById("errmsg");
|
||||
if(!errmsg) {
|
||||
if(txt == "")
|
||||
return;
|
||||
errmsg = document.createElement('div');
|
||||
errmsg.setAttribute("id","errmsg");
|
||||
document.body.appendChild(errmsg);
|
||||
}
|
||||
if(txt == "") {
|
||||
document.body.removeChild(errmsg);
|
||||
return;
|
||||
}
|
||||
errmsg.innerHTML = txt;
|
||||
if(timeout)
|
||||
setTimeout("FW_errmsg('')", timeout);
|
||||
}
|
||||
|
||||
function
|
||||
FW_doUpdate()
|
||||
{
|
||||
if(FW_pollConn.readyState == 4 && !FW_leaving) {
|
||||
var errdiv = document.createElement('div');
|
||||
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
|
||||
errdiv.setAttribute("id","connect_err");
|
||||
document.body.appendChild(errdiv);
|
||||
setTimeout("FW_longpoll()", 5000);
|
||||
FW_errmsg("Connection lost, trying a reconnect every 5 seconds.", 4900);
|
||||
setTimeout(FW_longpoll, 5000);
|
||||
return; // some problem connecting
|
||||
}
|
||||
|
||||
if(FW_pollConn.readyState != 3)
|
||||
return;
|
||||
|
||||
var lines = FW_pollConn.responseText.split("\n");
|
||||
//Pop the last (maybe empty) line after the last "\n"
|
||||
//We wait until it is complete, i.e. terminated by "\n"
|
||||
@ -76,12 +98,7 @@ FW_doUpdate()
|
||||
function
|
||||
FW_longpoll()
|
||||
{
|
||||
var errdiv = document.getElementById("connect_err");
|
||||
if(errdiv)
|
||||
document.body.removeChild(errdiv);
|
||||
|
||||
FW_curLine = 0;
|
||||
|
||||
FW_pollConn = new XMLHttpRequest();
|
||||
|
||||
var filter = document.body.getAttribute("longpollfilter");
|
||||
@ -131,7 +148,7 @@ FW_replaceLinks()
|
||||
for(var i1=0; i1< elArr.length; i1++) {
|
||||
var a = elArr[i1];
|
||||
var ma = a.getAttribute("href").match(/^(.*\?)(cmd[^=]*=.*)$/);
|
||||
if(ma == null || ma.length == 0 || ma[2].match(/=(style|save)/))
|
||||
if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/))
|
||||
continue;
|
||||
a.removeAttribute("href");
|
||||
a.setAttribute("onclick", "FW_cmd('"+ma[1]+"XHR=1&"+ma[2]+"')");
|
||||
|
@ -19,7 +19,7 @@ body[id~=Media] { background-color: #A5A5A5;
|
||||
table a:hover {font-weight:bold;}
|
||||
#hdr { position:absolute; top:10px; left:180px; border:1px solid gray; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:10px; right:10px; text-align:center}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
a { color: #278727; }
|
||||
img { border-style: none; }
|
||||
table { -moz-border-radius:8px; border-radius:8px; }
|
||||
|
@ -19,7 +19,7 @@ body[id~=Media] { background-color: #A5A5A5;
|
||||
table a:hover {font-weight:bold;}
|
||||
#hdr { position:absolute; top:10px; left:180px; border:1px solid gray; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:10px; right:10px; text-align:center}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
a { color: #278727; }
|
||||
img { border-style: none; }
|
||||
table { -moz-border-radius:8px; border-radius:8px; }
|
||||
|
@ -19,7 +19,7 @@ body[id~=Media] { background-color: #A5A5A5;
|
||||
table a:hover {font-weight:bold;}
|
||||
#hdr { position:absolute; top:10px; left:180px; border:1px solid gray; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:10px; right:10px; text-align:center}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
a { color: #278727; }
|
||||
img { border-style: none; }
|
||||
table { -moz-border-radius:8px; border-radius:8px; }
|
||||
|
@ -15,7 +15,7 @@ select { font-family:Helvetica; font-weight:300; font-size:16px;}
|
||||
#console { width:100%; height:100%; position:absolute; overflow-y:auto;}
|
||||
#hdr { position:absolute; top:40px; left:65px; }
|
||||
#content { position:absolute; top:85px; left: 0px; right: 0px;}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
|
||||
.devType { padding-top:10px; font-size:16px;}
|
||||
a { color: #151515; }
|
||||
|
@ -23,7 +23,7 @@ select { font-family:Helvetica; font-weight:300; font-size:16px; }
|
||||
#content { position:absolute; top:50px; left:250px; bottom:20px; right:20px;
|
||||
}
|
||||
|
||||
#connect_err { background-color: #e5e5e5; color: #151515; text-align: center; padding-top: 25%; font-size: 350%; font-weight: bold;
|
||||
#errmsg { background-color: #e5e5e5; color: #151515; text-align: center; padding-top: 25%; font-size: 350%; font-weight: bold;
|
||||
position:fixed; top:0px; left:0px; z-index: 10; width:100%; height: 100%; opacity: 0.7;
|
||||
}
|
||||
|
||||
@ -136,4 +136,4 @@ table#TYPE_remotecontrol td { padding: 5px 7px; }
|
||||
background: #e5e5e5; font-size:6px;}
|
||||
.rc_button { padding: 5px 7px;}
|
||||
.rc_button img { border-style: solid; border-width: 1px; border-color: transparent; }
|
||||
.rc_button img:active { border-color: gray; }
|
||||
.rc_button img:active { border-color: gray; }
|
||||
|
@ -1,6 +1,4 @@
|
||||
/* Author: Volker Edit: fhainz */
|
||||
.background { fill:none; fill-opacity:0.0; }
|
||||
|
||||
text { font-family: Helvetica; font-weight:300; font-size:12px; fill:#343434;}
|
||||
text.title {font-family: Helvetica; font-weight:300; font-size:16px; fill:#343434;}
|
||||
text.copy { text-decoration:underline; stroke:none; fill:blue;}
|
||||
|
@ -19,7 +19,7 @@ body[id~=Media] { background-color: #A5A5A5;
|
||||
table a:hover {font-weight:bold;}
|
||||
#hdr { position:absolute; top:10px; left:180px; border:1px solid gray; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:10px; right:10px; text-align:center}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
a { color: #278727; }
|
||||
img { border-style: none; }
|
||||
table { -moz-border-radius:8px; border-radius:8px; }
|
||||
|
@ -12,7 +12,7 @@ select { font-family:Arial, sans-serif; font-size:16px;}
|
||||
#console { width:100%; height:100%; position:absolute; overflow-y:auto;}
|
||||
#hdr { position:absolute; top:40px; left:65px; }
|
||||
#content { position:absolute; top:85px; left: 0px; right: 0px;}
|
||||
#connect_err { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
#errmsg { background-color: #000000; color: #FFFFFF; position:absolute; top:0px; left:0px; z-index: 10; }
|
||||
|
||||
.devType { padding-top:10px; font-size:12px;}
|
||||
a { color: #278727; }
|
||||
@ -79,3 +79,4 @@ svg { height:32px; width:32px; fill:#278727; }
|
||||
g.on { fill:red; }
|
||||
|
||||
.changed { color:red; }
|
||||
#cloudfree { display:none; }
|
||||
|
@ -15,7 +15,7 @@ select { font-family:Arial, sans-serif; font-size:16px; }
|
||||
#hdr { position:absolute; top:10px; left:180px; }
|
||||
#content { position:absolute; top:50px; left:180px; bottom:20px; right:10px; }
|
||||
|
||||
#connect_err { background-color: #000000; color: #FFFFFF;
|
||||
#errmsg { background-color: #000000; color: #FFFFFF;
|
||||
position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
.devType { padding-top:20px; }
|
||||
a { color: #278727; }
|
||||
|
@ -1,5 +1,3 @@
|
||||
.background { fill:none; fill-opacity:0.0; }
|
||||
|
||||
text { font-family:Times; font-size:12px; }
|
||||
text.title { font-size:16px; }
|
||||
text.copy { text-decoration:underline; stroke:none; fill:blue; }
|
||||
|
@ -12,7 +12,7 @@ select { font-family:Arial, sans-serif; font-size:18px}
|
||||
#hdr { position:absolute; top:10px; left:160px; }
|
||||
#console { width:100%; height:100%; position:absolute; overflow-y:auto;}
|
||||
#content { position:absolute; top:50px; left:160px; bottom:20px; right:10px; }
|
||||
#connect_err { background-color:#000000; color:#FFFFFF;
|
||||
#errmsg { background-color:#000000; color:#FFFFFF;
|
||||
position:absolute; top:0px; left:40px; z-index: 10; }
|
||||
|
||||
.devType { padding-top:20px; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user