mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
01_FHEMWEB.js: add attribute confirmJSError (Forum #64541)
git-svn-id: https://svn.fhem.de/fhem/trunk@13064 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a2b0d10687
commit
b08ea575d8
@ -148,6 +148,7 @@ FHEMWEB_Initialize($)
|
|||||||
closeConn:1,0
|
closeConn:1,0
|
||||||
column
|
column
|
||||||
confirmDelete
|
confirmDelete
|
||||||
|
confirmJSError
|
||||||
defaultRoom
|
defaultRoom
|
||||||
deviceOverview:always,iconOnly,onClick,never
|
deviceOverview:always,iconOnly,onClick,never
|
||||||
editConfig:1,0
|
editConfig:1,0
|
||||||
@ -1262,9 +1263,10 @@ FW_doDetail($)
|
|||||||
my $h = $defs{$d};
|
my $h = $defs{$d};
|
||||||
my $t = $h->{TYPE};
|
my $t = $h->{TYPE};
|
||||||
$t = "MISSING" if(!defined($t));
|
$t = "MISSING" if(!defined($t));
|
||||||
my $cd = AttrVal($FW_wname, "confirmDelete", 1);
|
FW_pO "<div id=\"content\" ".
|
||||||
FW_pO "<div id=\"content\" data-confirmDelete=\"$cd\" ".
|
"data-confirmDelete='" .AttrVal($FW_wname,"confirmDelete",1) ."' ".
|
||||||
"data-webName=\"$FW_wname\">";
|
"data-confirmJSError='".AttrVal($FW_wname,"confirmJSError",1)."' ".
|
||||||
|
"data-webName='$FW_wname'>";
|
||||||
|
|
||||||
if($FW_ss) { # FS20MS2 special: on and off, is not the same as toggle
|
if($FW_ss) { # FS20MS2 special: on and off, is not the same as toggle
|
||||||
my $webCmd = AttrVal($d, "webCmd", undef);
|
my $webCmd = AttrVal($d, "webCmd", undef);
|
||||||
@ -3207,6 +3209,13 @@ FW_widgetOverride($$)
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<a name="confirmJSError"></a>
|
||||||
|
<li>confirmJSError<br>
|
||||||
|
JavaScript errors are reported in a dialog as default.
|
||||||
|
Set this attribute to 0 to disable the reporting.
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
<a name="CORS"></a>
|
<a name="CORS"></a>
|
||||||
<li>CORS<br>
|
<li>CORS<br>
|
||||||
If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
|
If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
|
||||||
@ -3944,6 +3953,14 @@ FW_widgetOverride($$)
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<a name="confirmJSError"></a>
|
||||||
|
<li>confirmJSError<br>
|
||||||
|
JavaScript Fehler werden per Voreinstellung in einem Dialog gemeldet.
|
||||||
|
Durch setzen dieses Attributes auf 0 werden solche Fehler nicht
|
||||||
|
gemeldet.
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
<a name="CORS"></a>
|
<a name="CORS"></a>
|
||||||
<li>CORS<br>
|
<li>CORS<br>
|
||||||
Wenn auf 1 gestellt, wird FHEMWEB einen "Cross origin resource sharing"
|
Wenn auf 1 gestellt, wird FHEMWEB einen "Cross origin resource sharing"
|
||||||
|
@ -35,6 +35,7 @@ window.onbeforeunload = function(e)
|
|||||||
window.onerror = function(errMsg, url, lineno)
|
window.onerror = function(errMsg, url, lineno)
|
||||||
{
|
{
|
||||||
url = url.replace(/.*\//,'');
|
url = url.replace(/.*\//,'');
|
||||||
|
if($("div#content").attr("data-confirmJSError") != 0)
|
||||||
FW_okDialog(url+" line "+lineno+":<br>"+errMsg);
|
FW_okDialog(url+" line "+lineno+":<br>"+errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user