2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 03:44:52 +00:00

AutomowerConnect: cref update, new design attribute hideSchedulerButton

git-svn-id: https://svn.fhem.de/fhem/trunk@28918 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2024-05-27 17:52:32 +00:00
parent 5a31d2a39b
commit 75c5e84ef3
3 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,6 @@
# 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: 74_AutomowerConnect: new design attribute hideSchedulerButton
- change: 76_SolarForecast: VictronVRM - API request start time adopted
- change: 73_GardenaSmartBridge: fix: api call,rate limit
- change: 49_SSCAM: NOTE! set enable/disable renamed to enableCam/disableCam

View File

@ -352,7 +352,8 @@ __END__
mowingPathLineWidth="1"<br>
mowingPathDotWidth="2"<br>
mowingPathUseDots=""<br>
mowingPathShowCollisions=""
mowingPathShowCollisions=""<br>
hideSchedulerButton=""
</code>
</ul>
</li>
@ -837,7 +838,8 @@ __END__
mowingPathLineWidth="1"<br>
mowingPathDotWidth="2"<br>
mowingPathUseDots=""<br>
mowingPathShowCollisions=""
mowingPathShowCollisions=""<br>
hideSchedulerButton=""
</code>
</ul>
</li>

View File

@ -168,6 +168,7 @@ mowingPathLineWidth="1"
mowingPathDotWidth="2"
mowingPathUseDots=""
mowingPathShowCollisions=""
hideSchedulerButton=""
';
my $mapZonesTpl = '{
@ -453,6 +454,7 @@ sub FW_detailFn {
my $iam = "$type $name FW_detailFn:";
return '' if( AttrVal($name, 'disable', 0) || !$::init_done || !$FW_ME );
my $mapDesign = getDesignAttr( $hash );
my $reta = "<div id='amc_${name}_schedule_buttons' name='fhem_amc_mower_schedule_buttons' ><button id='amc_${name}_schedule_button' onclick='AutomowerConnectSchedule( \"$name\" )' style='font-size:16px; ' >Mower Schedule</button>";
# $reta .= "<label for='amc_${name}_select_workareas' > for Work Area: </label><select id='amc_${name}_select_workareas' name=work_areas_select>";
# $reta .= "<option value='-1' selected >default</option>";
@ -465,8 +467,6 @@ sub FW_detailFn {
my $backgroundcolor = AttrVal($name, 'mapBackgroundColor','');
my $bgstyle = $backgroundcolor ? " background-color:$backgroundcolor;" : '';
my $mapDesign = getDesignAttr( $hash );
my ($picx,$picy) = AttrVal( $name,"mapImageWidthHeight", $hash->{helper}{imageWidthHeight} ) =~ /(\d+)\s(\d+)/;
$picx=int($picx*$zoom);
$picy=int($picy*$zoom);
@ -544,7 +544,7 @@ sub FW_detailFn {
my $ret = "";
$ret .= "<style>
.${type}_devname_div{padding:0px !important;
.${type}_${name}_div{padding:0px !important;
$bgstyle background-image: url('$img');
background-size: ${picx}px ${picy}px;
background-repeat: no-repeat;
@ -559,11 +559,13 @@ sub FW_detailFn {
my $contentflg = $content =~ /ON_TOP/;
$content =~ s/command=['"](.*?)['"]/onclick="AutomowerConnectPanelCmd('set $name $1')"/g;
$ret .= $content if ( $contentflg );
$ret .= "<div id='${type}_${name}_div' class='${type}_devname_div' $$mapDesign $csdata $limi $propli width='$picx' height='$picy' >";
my $mDesign = $$mapDesign;
$mDesign =~ s/data-hideSchedulerButton="1?"//;
$ret .= "<div id='${type}_${name}_div' class='${type}_${name}_div' $mDesign $csdata $limi $propli width='$picx' height='$picy' >";
$ret .= "<canvas id='${type}_${name}_canvas_0' class='${type}_${name}_canvas_0' width='$picx' height='$picy' ></canvas>";
$ret .= "<canvas id='${type}_${name}_canvas_1' class='${type}_${name}_canvas_1' width='$picx' height='$picy' ></canvas>";
$ret .= "</div>";
$ret .= $reta if( AttrVal ($name, 'showMap', 1 ) );
$ret .= $reta if( AttrVal ($name, 'showMap', 1 ) ) && $$mapDesign =~ m/hideSchedulerButton=""/g;
$ret .= "<div class='fhem_amc_hull_buttons' >";
$ret .= "<button class='fhem_amc_hull_button' title='Sends the hull polygon points to attribute mowingAreaHull.' onclick='AutomowerConnectGetHull( \"$FW_ME/$type/$name/json\" )' style='font-size:12pt; ' >mowingAreaHullToAttribute</button>"