2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhemweb.js: fix raw definition stuff (Forum #66313)

git-svn-id: https://svn.fhem.de/fhem/trunk@13319 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-02-03 10:55:28 +00:00
parent 090a423a21
commit 9fa9fe74ce
2 changed files with 4 additions and 2 deletions

View File

@ -1095,6 +1095,7 @@ FW_digestCgi($)
$pv =~ s/\+/ /g;
$pv =~ s/%([\dA-F][\dA-F])/chr(hex($1))/ige;
my ($p,$v) = split("=",$pv, 2);
$v = "" if(!defined($v));
# Multiline: escape the NL for fhem
$v =~ s/[\r]//g if($v && $p && $p ne "data");

View File

@ -620,7 +620,7 @@ function
FW_rawDef()
{
$("div.rawDef a").each(function(){ // Help on detail window
var dev = FW_getLink(this).split(" ").pop();
var dev = FW_getLink(this).split(" ").pop().split("&")[0];
$(this).unbind("click");
$(this).attr("href", "#"); // Desktop: show underlined Text
$(this).removeAttr("onclick");
@ -891,8 +891,9 @@ FW_longpoll()
"&timestamp="+new Date().getTime();
query = addcsrf(query);
var loc = (""+location).replace(/\?.*/,"");
if(typeof WebSocket == "function" && FW_longpollType == "websocket") {
FW_pollConn = new WebSocket((location+query).replace(/^http/i, "ws"));
FW_pollConn = new WebSocket((loc+query).replace(/^http/i, "ws"));
FW_pollConn.onclose =
FW_pollConn.onerror =
FW_pollConn.onmessage = FW_doUpdate;