Added original Vuexy files and cloned focus2 views into vuexy views for its conversion

This commit is contained in:
imnavajas
2023-05-06 13:01:53 +02:00
parent f0772cf1a6
commit ab99ba508b
1240 changed files with 240576 additions and 12 deletions

View File

@ -0,0 +1,51 @@
/**
* Selects & Tags
*/
'use strict';
$(function () {
const selectPicker = $('.selectpicker'),
select2 = $('.select2'),
select2Icons = $('.select2-icons');
// Bootstrap Select
// --------------------------------------------------------------------
if (selectPicker.length) {
selectPicker.selectpicker();
}
// Select2
// --------------------------------------------------------------------
// Default
if (select2.length) {
select2.each(function () {
var $this = $(this);
$this.wrap('<div class="position-relative"></div>').select2({
placeholder: 'Select value',
dropdownParent: $this.parent()
});
});
}
// Select2 Icons
if (select2Icons.length) {
// custom template to render icons
function renderIcons(option) {
if (!option.id) {
return option.text;
}
var $icon = "<i class='" + $(option.element).data('icon') + " me-2'></i>" + option.text;
return $icon;
}
select2Icons.wrap('<div class="position-relative"></div>').select2({
templateResult: renderIcons,
templateSelection: renderIcons,
escapeMarkup: function (es) {
return es;
}
});
}
});