diff --git a/fhem/FHEM/00_MQTT2_CLIENT.pm b/fhem/FHEM/00_MQTT2_CLIENT.pm index c986829b4..736698d61 100644 --- a/fhem/FHEM/00_MQTT2_CLIENT.pm +++ b/fhem/FHEM/00_MQTT2_CLIENT.pm @@ -702,7 +702,7 @@ MQTT2_CLIENT_getStr($$) Attributes The visibility of the ploteditor can be configured with the FHEMWEB attribute - ploteditor. + ploteditor.
@@ -2690,10 +2734,10 @@ plotAsPng(@) =begin html_DE - +

SVG

- Die Sichtbarkeit des Plot-Editors kann mit dem FHEMWEB Attribut ploteditor konfiguriert werden. + Die Sichtbarkeit des Plot-Editors kann mit dem FHEMWEB Attribut + ploteditor konfiguriert werden.
diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html index fbf1e2b96..cf520064a 100644 --- a/fhem/docs/commandref_frame.html +++ b/fhem/docs/commandref_frame.html @@ -519,7 +519,7 @@ attribute list if you want to know if a device supports these attributes.

-

  • event-aggregator
  • +
  • event-aggregator The primary uses of this attribute are to calculate (time-weighted) averages of readings over time periods and to throttle the update rate of readings and thus the amount of data written to the logs.

    @@ -584,7 +584,7 @@ attribute list if you want to know if a device supports these attributes.

  • - + bla

  • event-min-interval
    This attribute takes a comma-separated list of reading:minInterval pairs. You may use regular expressions for reading. Events will only be diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html index 8ed407cef..63df936fe 100644 --- a/fhem/docs/commandref_frame_DE.html +++ b/fhem/docs/commandref_frame_DE.html @@ -526,7 +526,7 @@ Gerät dokumentiert.

    -

  • event-aggregator
  • +
  • event-aggregator The primary uses of this attribute are to calculate (time-weighted) averages of readings over time periods and to throttle the update rate of readings and thus the amount of data written to the logs.

    diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 98f4613ac..6bee70497 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -308,40 +308,7 @@ FW_jqueryReadyFn() return; $("#devSpecHelp").remove(); var sel=this, devName=m[2], selType=m[1]; - FW_getHelp(devName, function(data) { // show either the next or the outer li - $("#content") - .append("

    "); - $("#content > #workbench").html(data); - - var mtype = $("#content > #workbench a[id]").attr("id"), aTag; - if(!mtype) - mtype = $("#content > #workbench a[name]").attr("name"), aTag; - - if(mtype) { // old style #1 syntax: MODULETYPEattrname - var mv = (""+mtype+"-"+selType+"-"+val).replace(/[^a-z0-9_-]/ig,'_'); - aTag = $("#content > #workbench").find("a[id="+mv+"]"); - if(!$(aTag).length) { - mv = (""+mtype+val).replace(/[^a-z0-9_]/ig,'_'); - aTag = $("#content > #workbench").find("a[name="+mv+"]"); - } - } - if(!$(aTag).length) { // old style #2 syntax without type - var v = (val).replace(/[^a-z0-9_]/ig,'_'); - aTag = $("#content > #workbench").find("a[name="+v+"]"); - } - - if($(aTag).length) { - var liTag = $(aTag).next("li"); - if(!$(liTag).length) - liTag = $(aTag).parent("li"); - if($(liTag).length) { - $(sel).closest("div[cmd='"+selType+"']") - .after('
    ') - $("#devSpecHelp").html($(liTag).html()); - } - } - $("#content > #workbench").remove(); - }); + FW_displayHelp(devName, sel, selType, val, 1); }); FW_smallScreenCommands(); @@ -365,18 +332,85 @@ FW_jqueryReadyFn() } -var FW_helpData; +function +FW_displayHelp(devName, sel, selType, val, level) +{ + FW_getHelp(devName, function(data) { // show either the next or the outer li + $("#content") + .append(""); + $("#content > #workbench").html(data); + + var mtype = $("#content > #workbench a[id]").attr("id"), aTag; + if(!mtype) + mtype = $("#content > #workbench a[name]").attr("name"), aTag; + if(level == 3) // commandref + mtype = ""; + + if(mtype) { // old style #1 syntax: MODULETYPEattrname + var mv = (""+mtype+"-"+selType+"-"+val).replace(/[^a-z0-9_-]/ig,'_'); + aTag = $("#content > #workbench").find("a[id="+mv+"]"); + if(!$(aTag).length) { + mv = (""+mtype+val).replace(/[^a-z0-9_-]/ig,'_'); + aTag = $("#content > #workbench").find("a[name="+mv+"]"); + } + } + if(!$(aTag).length) { // old style #2 syntax without type + var v = (val).replace(/[^a-z0-9_-]/ig,'_'); + aTag = $("#content > #workbench").find("a[name="+v+"]"); + } + + if($(aTag).length) { + var liTag = $(aTag).next("li"); + if(!$(liTag).length) + liTag = $(aTag).parent("li"); + if(!$(liTag).length) + liTag = $(aTag).parent().next("li"); + if($(liTag).length) { + $(sel).closest("div[cmd='"+selType+"']") + .after('
    ') + $("#devSpecHelp").html($(liTag).html()); + } + } + $("#content > #workbench").remove(); + + if(!$(aTag).length) { + if(devName != "FHEMWEB" && level == 1) + return FW_displayHelp("FHEMWEB", sel, selType, val, 2); + if(devName != "commandref" && level < 3) + return FW_displayHelp("commandref", sel, selType, val, 3); + } + }); +} + +var FW_helpData={}; function FW_getHelp(dev, fn) { - if(FW_helpData) - return fn(FW_helpData); + if(FW_helpData[dev]) + return fn(FW_helpData[dev]); + + if(dev == "commandref") { + var lang = $("body").attr("data-language"); + var url = FW_root+"/docs/commandref_frame"+ + (lang == "EN" ? "" : "_"+lang)+".html"; +log(url); + $.ajax({ + url:url, headers: { "cache-control": "no-cache" }, + success: function(data, textStatus, req){ + FW_helpData[dev] = data; + return fn(data); + }, + error:function(xhr, status, err) { log("E:"+err+"/"+status); } + }); + return; + } + FW_cmd(FW_root+"?cmd=help "+dev+"&XHR=1", function(data) { if(data.match(/^No help found/) && !dev.match(" DE")) // for our german only friends return FW_getHelp(dev+" DE", fn); - FW_helpData = data; - return fn(FW_helpData); + FW_helpData[dev] = data; + return fn(data); }); }