98_SVG.pm: fix for configDb

01_FHEMWEB.pm: fix some links


git-svn-id: https://svn.fhem.de/fhem/trunk@15555 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-12-04 20:37:15 +00:00
parent 1b2c48a262
commit 66c28d044d
2 changed files with 4 additions and 3 deletions

View File

@ -1102,7 +1102,7 @@ FW_addLinks($)
{ {
my ($txt) = @_; my ($txt) = @_;
return undef if(!defined($txt)); return undef if(!defined($txt));
$txt =~ s,\s([a-z0-9._]+)\s, $txt =~ s,\b([a-z0-9._]+)\b,
$defs{$1} ? "<a href='$FW_ME$FW_subdir?detail=$1'>$1</a>" : $1,gei; $defs{$1} ? "<a href='$FW_ME$FW_subdir?detail=$1'>$1</a>" : $1,gei;
return $txt; return $txt;
} }

View File

@ -366,6 +366,8 @@ SVG_PEdit($$$$)
return "" if( $pe eq 'never' ); return "" if( $pe eq 'never' );
my $gpf = $defs{$d}{GPLOTFILE}; my $gpf = $defs{$d}{GPLOTFILE};
my $link = "$FW_ME?cmd=style edit $gpf.gplot".
(configDBUsed() ? " configDB" : "").$FW_CSRF;
my $gp = "$FW_gplotdir/$gpf.gplot"; my $gp = "$FW_gplotdir/$gpf.gplot";
my $pm = AttrVal($d,"plotmode",$FW_plotmode); my $pm = AttrVal($d,"plotmode",$FW_plotmode);
@ -569,8 +571,7 @@ EOF
}); });
setTimeout(function(){ setTimeout(function(){
\$("table.internals div[informid=$gpf-GPLOTFILE]").each(function(){ \$("table.internals div[informid=$gpf-GPLOTFILE]").each(function(){
\$(this).html( \$(this).html("<a href='$link'>$gpf</a>");
"<a href='$FW_ME?cmd=style edit $gpf.gplot&fwcsrf=$FW_CSRF'>$gpf</a>");
}) }, 10); }) }, 10);
</script> </script>
EOF EOF