mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_SVG.pm: set poltEditor input to readonly for readinly .gplot (Forum #126561)
git-svn-id: https://svn.fhem.de/fhem/trunk@25782 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
82cc49142d
commit
b845a57306
@ -531,7 +531,7 @@ SVG_PEdit($$$$)
|
|||||||
|
|
||||||
$ret .= "<tr class=\"".(($r++&1)?"odd":"even")."\"><td colspan=\"3\">";
|
$ret .= "<tr class=\"".(($r++&1)?"odd":"even")."\"><td colspan=\"3\">";
|
||||||
$ret .= (exists($conf{readonly}) ?
|
$ret .= (exists($conf{readonly}) ?
|
||||||
FW_submit("readonly", '.gplot file is set readonly'):
|
'<span>.gplot file is "set readonly"</span>' :
|
||||||
FW_submit("submit", "Write .gplot file"))." ".
|
FW_submit("submit", "Write .gplot file"))." ".
|
||||||
FW_submit("showFileLogData", "Show preprocessed input").
|
FW_submit("showFileLogData", "Show preprocessed input").
|
||||||
"</td></tr>";
|
"</td></tr>";
|
||||||
@ -542,6 +542,12 @@ SVG_PEdit($$$$)
|
|||||||
if(defined($FW_pos{zoom}) && defined($FW_pos{off})) {
|
if(defined($FW_pos{zoom}) && defined($FW_pos{off})) {
|
||||||
$sl .= "&pos=zoom=$FW_pos{zoom};off=$FW_pos{off}";
|
$sl .= "&pos=zoom=$FW_pos{zoom};off=$FW_pos{off}";
|
||||||
}
|
}
|
||||||
|
my $ro="";
|
||||||
|
if(exists($conf{readonly})) {
|
||||||
|
$ro = '$("table.plotEditor input").prop("readonly", true);
|
||||||
|
$("table.plotEditor input[type=checkbox]").prop("disabled", true);
|
||||||
|
$("table.plotEditor select").prop("disabled", true);';
|
||||||
|
}
|
||||||
|
|
||||||
$ret .= <<'EOF';
|
$ret .= <<'EOF';
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -564,6 +570,7 @@ EOF
|
|||||||
\$("table.internals div[informid=$gpfEsc-GPLOTFILE]")
|
\$("table.internals div[informid=$gpfEsc-GPLOTFILE]")
|
||||||
.html("<a href='$link'>$gpf</a>");
|
.html("<a href='$link'>$gpf</a>");
|
||||||
}, 10);
|
}, 10);
|
||||||
|
$ro
|
||||||
</script>
|
</script>
|
||||||
EOF
|
EOF
|
||||||
return $ret;
|
return $ret;
|
||||||
@ -664,13 +671,6 @@ SVG_WriteGplot($)
|
|||||||
FW_digestCgi($arg);
|
FW_digestCgi($arg);
|
||||||
|
|
||||||
return if($FW_hiddenroom{detail});
|
return if($FW_hiddenroom{detail});
|
||||||
if($FW_webArgs{readonly}) {
|
|
||||||
$FW_RET .=
|
|
||||||
'<div id="errmsg">'.
|
|
||||||
"gplot file marked as readonly: won't write!".
|
|
||||||
'</div>';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return SVG_showData() if($FW_webArgs{showFileLogData});
|
return SVG_showData() if($FW_webArgs{showFileLogData});
|
||||||
|
|
||||||
if(!defined($FW_webArgs{par_0_0})) {
|
if(!defined($FW_webArgs{par_0_0})) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user