From 0e85dd0933dd7d3df0efb3a4995fe8173cea9ac6 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 15 Nov 2018 11:04:58 +0000 Subject: [PATCH] fhemweb.js: add outer li for help (Forum #93243) git-svn-id: https://svn.fhem.de/fhem/trunk@17748 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 3806289c9..d18ff22e3 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -295,16 +295,20 @@ FW_jqueryReadyFn() return; $("#devSpecHelp").remove(); var sel = this; - FW_getHelp(m[2], function(data) { + FW_getHelp(m[2], function(data) { // show either the next or the outer li $("#content") .append(""); $("#content > #workbench").html(data); var aTag = $("#content > #workbench").find("a[name="+val+"]"); - - if($(aTag).length && $(aTag).next("li").length) { - $(sel).closest("div[cmd='"+m[1]+"']") - .after('
') - $("#devSpecHelp").html($(aTag).next("li").html()); + if($(aTag).length) { + var liTag = $(aTag).next("li"); + if(!$(liTag).length) + liTag = $(aTag).parent("li"); + if($(liTag).length) { + $(sel).closest("div[cmd='"+m[1]+"']") + .after('
') + $("#devSpecHelp").html($(liTag).html()); + } } $("#content > #workbench").remove(); });