bludit/bl-kernel/admin/themes/booty/html/alert.php

18 lines
530 B
PHP
Raw Permalink Normal View History

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);
2020-06-04 08:59:07 +02:00
$("#alert").slideDown().delay(<?php echo ALERT_DISAPPEAR_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>