diff --git a/FHEM/95_Alarm.pm b/FHEM/95_Alarm.pm index caf108007..9f80a40cc 100644 --- a/FHEM/95_Alarm.pm +++ b/FHEM/95_Alarm.pm @@ -33,6 +33,7 @@ use strict; use warnings; use vars qw(%defs); # FHEM device/button definitions use vars qw(%intAt); # FHEM at definitions +use vars qw($FW_ME); ######################### # Global variables @@ -40,7 +41,7 @@ my $alarmname = "Alarms"; # link text my $alarmhiddenroom = "AlarmRoom"; # hidden room my $alarmpublicroom = "Alarm"; # public room my $alarmno = 8; -my $alarmversion = "2.82"; +my $alarmversion = "2.83"; ######################################################################################### # @@ -717,7 +718,7 @@ sub Alarm_Html($) my $showhelper = ($lockstate eq "unlocked") ? 1 : 0; #-- - $ret .= "'; @@ -1089,24 +1413,22 @@ sub PostMe_widget($) { $FW_RET=""; $res .= $css; $res .= '
'; - my $name = ReadingsVal($devname, sprintf("postme%02dName",$pmn),""); if( $click == 0){ - $res.= '
'; + $res.= '
'; } - FW_pO $res.''.$name.'
'; + FW_pO $res.''.$listname.'
'; #-- SVG rendering }else{ $FW_RETTYPE = "image/svg+xml"; $FW_RET=""; FW_pO ''; - my $name = ReadingsVal($devname, sprintf("postme%02dName",$pmn),""); $res.= ''; + $res.= 'onmouseover="postit=window.open(\'PostMe_widget?postit='.$devname.'&name='.$listname.'\',\'postit\',\'height=200,width=200,top=400,left=400,menubar=no,toolbar=no,titlebar=no\');" '; + $res.= 'onmouseout="postit.close()">'.$listname.''; FW_pO $res.''; } return ($FW_RETTYPE, $FW_RET); @@ -1114,9 +1436,9 @@ sub PostMe_widget($) { ################################################## default (type missing) => content of a single postme - my @lines=split(',',ReadingsVal($devname, sprintf("postme%02dCont",$pmn),"")); + my @lines=split(AttrVal($devname,"listseparator",','),ReadingsVal($devname, sprintf("postme%02dCont",$pmn),"")); if( !(int(@lines)>0) ){ - #Log 1,"[PostMe_widget] Asking to display empty PostMe $name"; + #Log 1,"[PostMe_widget] Asking to display empty PostMe $listname"; return undef; } @@ -1126,10 +1448,10 @@ sub PostMe_widget($) { $FW_RET=""; $res .= $css; $res .= '
'; - $res .= ''.$name.'
'; + $res .= ''.$listname.'
'; for (my $i=0;$i'; } FW_pO $res.'
'; @@ -1141,10 +1463,10 @@ sub PostMe_widget($) { FW_pO ''; $res = ''; - $res.= $name.''; + $res.= $listname.''; for (my $i=0;$i',25+$i*12); - $res.= PostMe_LineOut($hash,$lines[$i],0); + $res.= PostMe_LineOut($hash,$listname,$lines[$i],0); $res.= ''; } FW_pO $res.''; @@ -1171,19 +1493,38 @@ sub PostMe_widget($) {
Defines the PostMe system, <postit> is an arbitrary name for the system.

Usage

- See http://www.fhemwiki.de/wiki/Modul_PostMe - - An arbitrary number of lists may be added to the system with the create command as - set <postit> create <name> + See Wiki documentation +
+ An arbitrary number of lists may be added to the system with the create command.
List items may consist of one or more words, and are added/removed by the add and - remove command. - Attention: A comma "," is the separator for list items. - set <postit> add <name> <some text, but careful with commas> - - Special meta data for items may be included in the items by using "[" and "]"; characters, e.g. - set <postit> add <name> <item> [<attribute1>="<data1>" ... - These attribute-value pairs may be added, modified and removed with the modify command - + remove command, but no separator characters are allowed in one item
+ Attention: A comma "," is the default separator for list items, see attributes below.
+

+ Meta data for items (=annotations)may be included in the items by using "[" and "]"; characters, e.g.
+ set <postit> add <name> <item> [<attribute1>="<data1>" ...
+ These attribute-value pairs may be added, modified and removed with the modify command. +

+ Special annotations will be evaluated further, either on creation or manually by executing the commands
+ get <postit> special <name> resp. get <postit> allspecial +

The sticky notes may be integrated into any Web page by simply embedding the following tags - +
+ The module provides interface routines that may be called from your own Perl programs, see documentation in the Wiki. +

Set

Note, that in the parameters sent to the following functions, ":" serves as separator between list name and items, and "," serves as separator between items. They may be exchanged with simple regular expression operations.