2018-07-10 18:37:46 +02:00
|
|
|
<script charset="utf-8">
|
2018-05-08 00:15:40 +02:00
|
|
|
function showAlert(text) {
|
2018-06-24 13:37:45 +02:00
|
|
|
console.log("[INFO] Function showAlert() called.");
|
2018-05-08 00:15:40 +02:00
|
|
|
$("#alert").html(text);
|
2019-05-09 17:18:26 +02:00
|
|
|
$("#alert").slideDown().delay(<?php echo ALERT_DISSAPEAR_IN*1000 ?>).slideUp();
|
2018-05-08 00:15:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
<?php if (Alert::defined()): ?>
|
|
|
|
setTimeout(function(){ showAlert("<?php echo Alert::get() ?>") }, 500);
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
$(window).click(function() {
|
|
|
|
$("#alert").hide();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2018-06-24 13:37:45 +02:00
|
|
|
<div id="alert" class="alert <?php echo (Alert::status()==ALERT_STATUS_FAIL)?'alert-danger':'alert-success' ?>"></div>
|