mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Update select2bs5.php para que sea compatible con Vuexy Theme
This commit is contained in:
@ -1,19 +1,27 @@
|
|||||||
<!-- Push section css -->
|
<!-- Push section css -->
|
||||||
<?= $this->section('css') ?>
|
<?= $this->section('css') ?>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css">
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/select2/select2.css') ?>"/>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.1.1/dist/select2-bootstrap-5-theme.min.css" />
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
<!-- Push additional js -->
|
<!-- Push additional js -->
|
||||||
<?= $this->section('additionalExternalJs') ?>
|
<?= $this->section('additionalExternalJs') ?>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.full.min.js"></script>
|
<script src="<?= site_url('themes/vuexy/vendor/libs/select2/select2.js') ?>"></script>
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
<?= $this->section('additionalInlineJs') ?>
|
<?= $this->section('additionalInlineJs') ?>
|
||||||
|
|
||||||
$('.select2bs').select2({
|
const select2 = $('.select2');
|
||||||
theme: "bootstrap-5",
|
|
||||||
allowClear: false,
|
// Select2
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
if (select2.length) {
|
||||||
|
select2.each(function () {
|
||||||
|
var $this = $(this);
|
||||||
|
$this.wrap('<div class="position-relative"></div>').select2({
|
||||||
|
placeholder: 'Select value',
|
||||||
|
dropdownParent: $this.parent()
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
Reference in New Issue
Block a user