fhemweb.js: no dialog for empty gets (Forum #38519)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8830 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -826,7 +826,8 @@ FW_answerCall($)
|
|||||||
sub
|
sub
|
||||||
FW_addLinks($)
|
FW_addLinks($)
|
||||||
{
|
{
|
||||||
my @lines = split( /\n/, shift); # Adding links
|
return undef if(!defined($_[0]));
|
||||||
|
my @lines = split( /\n/, $_[0]); # Adding links
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
foreach my $line (@lines) {
|
foreach my $line (@lines) {
|
||||||
$ret .= "\n" if( $ret );
|
$ret .= "\n" if( $ret );
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ FW_jqueryReadyFn()
|
|||||||
cmd += (cmd?"&":"")+$(this).attr("name")+"="+$(this).val();
|
cmd += (cmd?"&":"")+$(this).attr("name")+"="+$(this).val();
|
||||||
});
|
});
|
||||||
FW_cmd(FW_root+"?"+cmd+"&XHR=1&addLinks=1", function(data) {
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user