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
*/
.alarm, .errorText, .error {
color: #ff3f34;
}
.alert, .warnText, .warning {
color: #ffa801;
}
.ok, .infoText {
color: #0fb9b1;
}
.alert, .warnText, .warning, .disabledText {
color: #ffa801;
}
.alarm, .errorText, .error {
color: #ff3f34;
}
.fakelink {
color: #7f7fb2;

View File

@ -251,15 +251,19 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
}
}
if ( $monitor['Function'] == 'None' )
$fclass = 'errorText';
$function_class = 'errorText';
else
$fclass = 'infoText';
if ( !$monitor['Enabled'] )
$fclass .= ' disabledText';
$function_class = 'infoText';
$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');
$dot_class=$source_class;
if ( $fclass != 'infoText' ) $dot_class=$fclass;
$dot_class = $source_class;
if ( $function_class != 'infoText' ) {
$dot_class = $function_class;
} else if ( !$monitor['Enabled'] ) {
$dot_class .= ' warnText';
}
if ( ZM_WEB_ID_ON_CONSOLE ) {
?>
@ -268,7 +272,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
}
?>
<td class="colName">
<span class="glyphicon glyphicon-dot <?php echo $dot_class ?>" aria-hidden="true"></span><a <?php echo ($stream_available ? 'href="?view=watch&amp;mid='.$monitor['Id'].'">' : '>') . $monitor['Name'] ?></a><br/><div class="small text-nowrap text-muted">
<span class="glyphicon glyphicon-dot <?php echo $dot_class ?>" aria-hidden="true"></span><a <?php echo ($stream_available ? 'href="?view=watch&amp;mid='.$monitor['Id'].'">' : '>') . $monitor['Name'] ?></a><br/><div class="small text-nowrap text-muted">
<?php echo implode('<br/>',
array_map(function($group_id){
$Group = Group::find_one(array('Id'=>$group_id));
@ -281,7 +285,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
?>
</div></td>
<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/>
<div class="small text-nowrap text-muted">
<?php