Skip to content

Commit

Permalink
Merge branch 'MDL-56597-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Oct 31, 2016
2 parents 0e86392 + bff9fd8 commit 5ad34c4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ public function maintenance_warning() {
if (isset($CFG->maintenance_later) and $CFG->maintenance_later > time()) {
$timeleft = $CFG->maintenance_later - time();
// If timeleft less than 30 sec, set the class on block to error to highlight.
$errorclass = ($timeleft < 30) ? 'error' : 'warning';
$output .= $this->box_start($errorclass . ' moodle-has-zindex maintenancewarning');
$errorclass = ($timeleft < 30) ? 'alert-error alert-danger' : 'alert-warning';
$output .= $this->box_start($errorclass . ' moodle-has-zindex maintenancewarning m-a-1 alert');
$a = new stdClass();
$a->hour = (int)($timeleft / 3600);
$a->min = (int)(($timeleft / 60) % 60);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ Y.extend(MAINTENANCEMODETIMER, Y.Base, {
}
// Set error class to highlight the importance.
if (this.timeleftinsec < 30) {
this.maintenancenode.addClass('error')
.removeClass('warning');
this.maintenancenode.addClass('alert-error')
.addClass('alert-danger')
.removeClass('alert-warning');
} else {
this.maintenancenode.addClass('warning')
.removeClass('error');
this.maintenancenode.addClass('alert-warning')
.removeClass('alert-error')
.removeClass('alert-danger');
}
}
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ Y.extend(MAINTENANCEMODETIMER, Y.Base, {
}
// Set error class to highlight the importance.
if (this.timeleftinsec < 30) {
this.maintenancenode.addClass('error')
.removeClass('warning');
this.maintenancenode.addClass('alert-error')
.addClass('alert-danger')
.removeClass('alert-warning');
} else {
this.maintenancenode.addClass('warning')
.removeClass('error');
this.maintenancenode.addClass('alert-warning')
.removeClass('alert-error')
.removeClass('alert-danger');
}
}
});
Expand Down
10 changes: 6 additions & 4 deletions lib/yui/src/maintenancemodetimer/js/maintenancemodetimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ Y.extend(MAINTENANCEMODETIMER, Y.Base, {
}
// Set error class to highlight the importance.
if (this.timeleftinsec < 30) {
this.maintenancenode.addClass('error')
.removeClass('warning');
this.maintenancenode.addClass('alert-error')
.addClass('alert-danger')
.removeClass('alert-warning');
} else {
this.maintenancenode.addClass('warning')
.removeClass('error');
this.maintenancenode.addClass('alert-warning')
.removeClass('alert-error')
.removeClass('alert-danger');
}
}
});
Expand Down
2 changes: 0 additions & 2 deletions theme/boost/scss/moodle/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,6 @@
}

.maintenancewarning {
padding: 3px 1em;
text-align: center;
position: fixed;
bottom: 0;
right: 0;
Expand Down

0 comments on commit 5ad34c4

Please sign in to comment.