Merge pull request #2283 from connortechnology/warn_colour_when_disabled

Use a warning colour when motion detection is disabled.
This commit is contained in:
Andrew Bauer 2018-12-11 09:36:07 -06:00 committed by GitHub
commit fe5cb4bfdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 14 deletions

View File

@ -342,17 +342,17 @@ fieldset > legend {
/* /*
* Behavior classes * Behavior classes
*/ */
.alarm, .errorText, .error {
color: #ff3f34;
}
.alert, .warnText, .warning {
color: #ffa801;
}
.ok, .infoText { .ok, .infoText {
color: #0fb9b1; color: #0fb9b1;
} }
.alert, .warnText, .warning, .disabledText {
color: #ffa801;
}
.alarm, .errorText, .error {
color: #ff3f34;
}
.fakelink { .fakelink {
color: #7f7fb2; color: #7f7fb2;

View File

@ -251,15 +251,19 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
} }
} }
if ( $monitor['Function'] == 'None' ) if ( $monitor['Function'] == 'None' )
$fclass = 'errorText'; $function_class = 'errorText';
else else
$fclass = 'infoText'; $function_class = 'infoText';
if ( !$monitor['Enabled'] )
$fclass .= ' disabledText';
$scale = max(reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE), SCALE_BASE); $scale = max(reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE), SCALE_BASE);
$stream_available = canView('Stream') and $monitor['Type']=='WebSite' or ($monitor['CaptureFPS'] && $monitor['Function'] != 'None'); $stream_available = canView('Stream') and $monitor['Type']=='WebSite' or ($monitor['CaptureFPS'] && $monitor['Function'] != 'None');
$dot_class=$source_class; $dot_class = $source_class;
if ( $fclass != 'infoText' ) $dot_class=$fclass; if ( $function_class != 'infoText' ) {
$dot_class = $function_class;
} else if ( !$monitor['Enabled'] ) {
$dot_class .= ' warnText';
}
if ( ZM_WEB_ID_ON_CONSOLE ) { if ( ZM_WEB_ID_ON_CONSOLE ) {
?> ?>
@ -281,7 +285,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
?> ?>
</div></td> </div></td>
<td class="colFunction"> <td class="colFunction">
<?php echo makePopupLink( '?view=function&amp;mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?><br/> <?php echo makePopupLink( '?view=function&amp;mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$function_class.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', <span class="disabledText">disabled</span>' : '' ) .'</span>', canEdit('Monitors') ) ?><br/>
<?php echo translate('Status'.$monitor['Status']) ?><br/> <?php echo translate('Status'.$monitor['Status']) ?><br/>
<div class="small text-nowrap text-muted"> <div class="small text-nowrap text-muted">
<?php <?php