mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
98_weekprofile: attribute widgetEditDaysInRow to control visible days in one row
git-svn-id: https://svn.fhem.de/fhem/trunk@10893 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
470a296b55
commit
82fb97daad
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 98_weekprofile: attribute widgetEditDaysInRow to control
|
||||
visible days in one row
|
||||
- feature 49_SSCAM: function "get ... eventlist" added,
|
||||
Reading "CamEventNum" added which containes total
|
||||
number of camera events,
|
||||
|
@ -386,7 +386,7 @@ sub weekprofile_Initialize($)
|
||||
$hash->{StateFn} = "weekprofile_State";
|
||||
$hash->{NotifyFn} = "weekprofile_Notify";
|
||||
$hash->{AttrFn} = "weekprofile_Attr";
|
||||
$hash->{AttrList} = "useTopics:0,1 widgetWeekdays widgetEditOnNewPage:0,1 configFile ".$readingFnAttributes;
|
||||
$hash->{AttrList} = "useTopics:0,1 widgetWeekdays widgetEditOnNewPage:0,1 widgetEditDaysInRow:1,2,3,4,5,6,7 configFile ".$readingFnAttributes;
|
||||
|
||||
$hash->{FW_summaryFn} = "weekprofile_SummaryFn";
|
||||
|
||||
@ -1013,6 +1013,7 @@ sub weekprofile_SummaryFn()
|
||||
my $iconName = AttrVal($d, "icon", "edit_settings");
|
||||
my $editNewpage = AttrVal($d, "widgetEditOnNewPage", 0);
|
||||
my $useTopics = AttrVal($d, "useTopics", 0);
|
||||
my $editDaysInRow = AttrVal($d, "widgetEditDaysInRow", undef);
|
||||
|
||||
my $editIcon = FW_iconName($iconName) ? FW_makeImage($iconName,$iconName,"icon") : "";
|
||||
$editIcon = "<a name=\"$d.edit\" onclick=\"weekprofile_DoEditWeek('$d','$editNewpage')\" href=\"javascript:void(0)\">$editIcon</a>";
|
||||
@ -1025,6 +1026,7 @@ sub weekprofile_SummaryFn()
|
||||
my $args = "weekprofile,MODE:SHOW";
|
||||
$args .= ",USETOPICS:$useTopics";
|
||||
$args .= ",MASTERDEV:$masterDev" if (defined($masterDev));
|
||||
$args .= ",DAYINROW:$editDaysInRow" if (defined($editDaysInRow));
|
||||
|
||||
my $curr = "";
|
||||
if (@{$hash->{PROFILES}} > 0)
|
||||
@ -1057,10 +1059,14 @@ sub weekprofile_SummaryFn()
|
||||
##############################################
|
||||
sub weekprofile_editOnNewpage(@)
|
||||
{
|
||||
my ($device, $prf) = @_;
|
||||
my ($device, $prf, $daysInRow) = @_;
|
||||
my $hash = $defs{$device};
|
||||
|
||||
my $args = "weekprofile,MODE:EDIT,JMPBACK:1";
|
||||
my $editDaysInRow = AttrVal($device, "widgetEditDaysInRow", undef);
|
||||
$editDaysInRow = $daysInRow if (defined($daysInRow));
|
||||
|
||||
my $args = "weekprofile,MODE:EDIT,JMPBACK:1";
|
||||
$args .= ",DAYINROW:$editDaysInRow" if (defined($editDaysInRow));
|
||||
|
||||
my $html;
|
||||
$html .= "<html>";
|
||||
@ -1248,7 +1254,10 @@ sub weekprofile_getEditLNK_MasterDev($$)
|
||||
<li>widgetEditOnNewPage<br>
|
||||
Editing the profile on a new html page if it is set to '1'
|
||||
</li>
|
||||
<li>configFile<br>
|
||||
<li>widgetEditDaysInRow<br>
|
||||
Count of visible days in on row during Edit. Default 2.<br>
|
||||
</li>
|
||||
<li>configFile<br>
|
||||
Path and filename of the configuration file where the profiles will be stored
|
||||
Default: ./log/weekprofile-<name>.cfg
|
||||
</li>
|
||||
@ -1385,6 +1394,9 @@ sub weekprofile_getEditLNK_MasterDev($$)
|
||||
Beginnend bei Montag. z.B.
|
||||
<code>attr name widgetWeekdays Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag</code>
|
||||
</li>
|
||||
<li>widgetEditDaysInRow<br>
|
||||
Anzahl in der in einer Reihe dargestellten Tage während der Bearbeitung. Default 2.<br>
|
||||
</li>
|
||||
<li>widgetEditOnNewPage<br>
|
||||
Wenn gesetzt ('1'), dann wird die Bearbeitung auf einer separaten\neuen Webseite gestartet.
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user