2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

01_FHEMWEB.pm: addHtmlTitle (Forum #72578)

git-svn-id: https://svn.fhem.de/fhem/trunk@14437 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-05-31 15:17:19 +00:00
parent a131c66b95
commit 94a626eca5
2 changed files with 20 additions and 2 deletions

View File

@ -141,6 +141,7 @@ FHEMWEB_Initialize($)
CssFiles
JavaScripts
SVGcache:1,0
addHtmlTitle:1,0
addStateEvent
csrfToken
alarmTimeout
@ -1010,8 +1011,9 @@ FW_answerCall($)
$FW_id = $FW_chash->{NR} if( !$FW_id );
my $dataAttr =
"data-confirmDelete='" .AttrVal($FW_wname,"confirmDelete",1) ."' ".
"data-confirmDelete='" .AttrVal($FW_wname,"confirmDelete", 1)."' ".
"data-confirmJSError='".AttrVal($FW_wname,"confirmJSError",1)."' ".
"data-addHtmlTitle='" .AttrVal($FW_wname,"addHtmlTitle", 1)."' ".
"data-webName='$FW_wname '";
FW_pO "</head>\n<body name='$t' fw_id='$FW_id' $gen $lp $csrf $dataAttr>";
@ -3289,6 +3291,14 @@ FW_widgetOverride($$)
<a name="FHEMWEBattr"></a>
<b>Attributes</b>
<ul>
<a name="addHtmlTitle"></a>
<li>addHtmlTitle<br>
If set to 0, do not add a title Attribute to the set/get/attr detail
widgets. This might be necessary for some screenreaders. Default is 1.
</li><br>
<li><a href="#addStateEvent">addStateEvent</a></li><br>
<li>alias_&lt;RoomName&gt;<br>
@ -4046,6 +4056,13 @@ FW_widgetOverride($$)
<a name="FHEMWEBattr"></a>
<b>Attribute</b>
<ul>
<a name="addHtmlTitle"></a>
<li>addHtmlTitle<br>
Falls der Wert 0 ist, wird bei den set/get/attr Parametern in der
DetailAnsicht der Ger&auml;te kein title Attribut gesetzt. Das is bei
manchen Screenreadern erforderlich. Die Voreinstellung ist 1.
</li><br>
<li><a href="#addStateEvent">addStateEvent</a></li><br>
<li>alias_&lt;RoomName&gt;<br>

View File

@ -1058,7 +1058,8 @@ FW_replaceWidget(oldEl, devName, vArr, currVal, reading, set, params, cmd)
if( $(newEl).find("[informId]").length == 0 && !$(newEl).attr("informId") ) {
if(reading)
$(newEl).attr("informId", devName+"-"+reading);
if(reading != "state")
var addTitle = $("body").attr("data-addHtmlTitle");
if(reading != "state" && addTitle==1)
$(newEl).attr("title", reading);
}