Show countdown in red if negative (projector and control panel).
Show 00:00 instead of --:--
This commit is contained in:
parent
b291473c61
commit
646bf52ea7
@ -458,6 +458,10 @@ img {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.col2 .countdown_timer.negative {
|
||||
color: #CC0000;
|
||||
}
|
||||
|
||||
.col2 .notNull {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
|
@ -333,8 +333,8 @@ angular.module('OpenSlidesApp.core', [
|
||||
function () {
|
||||
return function (totalseconds) {
|
||||
var time;
|
||||
var total = Math.abs(totalseconds);
|
||||
if (parseInt(totalseconds)) {
|
||||
// floor returns the largest integer of the absolut value of totalseconds
|
||||
var total = Math.floor(Math.abs(totalseconds));
|
||||
var hh = Math.floor(total / 3600);
|
||||
var mm = Math.floor(total % 3600 / 60);
|
||||
var ss = Math.floor(total % 60);
|
||||
@ -349,9 +349,6 @@ angular.module('OpenSlidesApp.core', [
|
||||
time = hh + ":" + mm + ":" + ss;
|
||||
if (totalseconds < 0)
|
||||
time = "-"+time;
|
||||
} else {
|
||||
time = "--:--";
|
||||
}
|
||||
return time;
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div ng-controller="SlideCountdownCtrl">
|
||||
<div ng-if="visible">
|
||||
<div class="countdown well" style="margin-top: calc({{index}}*100px);">
|
||||
<div class="countdown well" style="margin-top: calc({{index}}*100px);" ng-class="{ 'negative': seconds < 0 }">
|
||||
{{ seconds | osSecondsToTime}}
|
||||
<div class="description">{{ description }}</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user