From dfc9da9636315aee89720fdc8e2ef6f454bcdeb4 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 11 May 2013 10:23:59 +0000 Subject: [PATCH] roomIcons added git-svn-id: https://svn.fhem.de/fhem/trunk@3168 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 4 +++- fhem/FHEM/01_FHEMWEB.pm | 22 +++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 0aaee1bad..f5c1b7ff5 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII - SVN - - feature: SYSSTAT: optionaly calculate geometric average of last 4 temperature values + - feature: FHEMWEB attribute roomIcons added + - feature: SYSSTAT: optionaly calculate geometric average of last 4 + temperature values - feature: weblink details screen can be used to edit .gplot files - feature: eventTypes module added, to help with FileLog details screen - feature: FB_CALLMONITOR: new reverse search provider dasschnelle.at for diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 517b8da4a..99f001316 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -118,7 +118,8 @@ FHEMWEB_Initialize($) "plotmode:gnuplot,gnuplot-scroll,SVG plotsize endPlotToday:1,0 plotfork ". "stylesheetPrefix touchpad:deprecated smallscreen:deprecated ". "basicAuth basicAuthMsg hiddenroom hiddengroup HTTPS allowfrom CORS:0,1 ". - "refresh longpoll:1,0 redirectCmds:0,1 reverseLogs:0,1 menuEntries"; + "refresh longpoll:1,0 redirectCmds:0,1 reverseLogs:0,1 menuEntries ". + "roomIcons"; ############### # Initialize internal structures @@ -743,7 +744,7 @@ FW_makeSelect($$$$) FW_pO FW_select("","arg.$cmd$d",\@al, $selEl, $class, "FW_selChange(this.options[selectedIndex].text,'$list','val.$cmd$d')"); FW_pO FW_textfield("val.$cmd$d", 30, $class); - +Log 1, "$d $cmd $list"; # Initial setting FW_pO ""; @@ -970,7 +971,10 @@ FW_roomOverview($) } # image tag if we have an icon, else empty - my $icon = FW_iconName("ico$l1") ? FW_makeImage("ico$l1")." " : ""; + my $icoName = "ico$l1"; + map { my ($n,$v) = split(":",$_); $icoName=$v if($l1 =~ m/$n/); } + split(" ", AttrVal($FW_wname, "roomIcons", "")); + my $icon = FW_iconName($icoName) ? FW_makeImage($icoName)." " : ""; if($l2 =~ m/.html$/ || $l2 =~ m/^http/) { FW_pO "$td$icon$l1"; @@ -2838,6 +2842,18 @@ FW_dropdownFn()
+ +
  • roomIcons
    + Space separated list of room:icon pairs, to override the default + behaviour of showing an icon, if there is one with the name of + "icoRoomName". This is the correct way to remove the icon for the room + Evertything, or the set one for rooms with / in the name (e.g. + Anlagen/EDV). The first part is treated as regexp, so space is + represented by a dot. Example:
    + attr WEB roomIcons Everything: Anlagen.EDV:icoEverything +
  • +
    +
  • sortby
    Take the value of this attribute when sorting the devices in the room