2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

fhemweb.js: no dialog for empty gets (Forum #38519)

git-svn-id: https://svn.fhem.de/fhem/trunk@8830 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-06-26 09:16:16 +00:00
parent 8489800580
commit 6fb972ab13
2 changed files with 4 additions and 2 deletions

View File

@ -826,7 +826,8 @@ FW_answerCall($)
sub
FW_addLinks($)
{
my @lines = split( /\n/, shift); # Adding links
return undef if(!defined($_[0]));
my @lines = split( /\n/, $_[0]); # Adding links
my $ret = "";
foreach my $line (@lines) {
$ret .= "\n" if( $ret );

View File

@ -127,7 +127,8 @@ FW_jqueryReadyFn()
cmd += (cmd?"&":"")+$(this).attr("name")+"="+$(this).val();
});
FW_cmd(FW_root+"?"+cmd+"&XHR=1&addLinks=1", function(data) {
FW_okDialog('<pre>'+data+'</pre>', el);
if(!data.match(/^[\r\n]*$/)) // ignore empty answers
FW_okDialog('<pre>'+data+'</pre>', el);
});
});