mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Creado mecanismo de generacion de alertas tipo Boostrap (defecto) y ToastR. Aplicado a los controladores existentes
This commit is contained in:
@ -10,32 +10,49 @@
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
toastr.options = {
|
||||
"closeButton": false,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": false,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
toastr.options = {
|
||||
"closeButton": false,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": false,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
<?php if (session('sweet-success')) { ?>
|
||||
toastr.success(`<?= session('sweet-success') ?>`);
|
||||
<?php } ?>
|
||||
<?php if (session('sweet-warning')) { ?>
|
||||
toastr.success(`<?= session('sweet-warning') ?>`);
|
||||
<?php } ?>
|
||||
<?php if (session('sweet-error')) { ?>
|
||||
toastr.success(`<?= session('sweet-error') ?>`);
|
||||
<?php } ?>
|
||||
<?php if (session('sweet-success')) {
|
||||
if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
|
||||
toastr.success(`<?= session('sweet-success') ?>`);
|
||||
<?php } else { ?>
|
||||
popSuccessAlert(`<?= session('sweet-success') ?>`);
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (session('sweet-warning')) {
|
||||
if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
|
||||
toastr.warning(`<?= session('sweet-warning') ?>`);
|
||||
<?php } else { ?>
|
||||
popWarningAlert(`<?= session('sweet-warning') ?>`);
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (session('sweet-error')) {
|
||||
if (isset($alertStyle) && ($alertStyle == 'toastr')) { ?>
|
||||
toastr.error(`<?= session('sweet-error') ?>`);
|
||||
<?php } else { ?>
|
||||
popErrorgAlert(`<?= session('sweet-error') ?>`);
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -134,7 +134,6 @@ if (!empty($token) && $tfa == false) {
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="ti ti-bell ti-md"></i>
|
||||
<span class="badge bg-danger rounded-pill badge-notifications">5</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--/ Notification -->
|
||||
|
||||
Reference in New Issue
Block a user