Update Font, Migrated away from JQUERY dependent libs: toastr to bootstrap5 toasts, daterangepicker to flatpickr, select2 to Tom Select, InputMask to IMask

This commit is contained in:
johnnyq
2026-08-14 17:08:40 -04:00
parent 0fe6d51bdb
commit dc6b191eed
377 changed files with 1783 additions and 3769 deletions

View File

@@ -13,12 +13,10 @@ function populateShareModal(client_id, item_type, item_ref_id) {
document.getElementById("div_share_link_form").hidden = false;
document.getElementById("div_share_link_generate").hidden = false;
$(document).ready(function() {
$('#share_email').select2({
tags: true,
placeholder: 'Select or type a value',
allowClear: true
});
initTomSelect(document.getElementById('share_email'), {
create: true,
placeholder: 'Select or type a value',
allowEmptyOption: true
});
}

View File

@@ -32,9 +32,7 @@ $(document).ready(function() {
}
// Refresh Select2
if ($.fn.select2) {
$contactSelect.trigger('change.select2');
}
refreshTomSelect($contactSelect[0]);
},
error: function(xhr, status, error) {
console.error('AJAX Error:', error);

View File

@@ -27,7 +27,7 @@
}
// Listener for client selection. Populate select lists when a client is selected
$(clientSelectDropdown).on('select2:select', function (e) {
$(clientSelectDropdown).on('change', function (e) {
let client_id = $(this).find(':selected').val();
// Update the dependent dropdown lists
@@ -77,7 +77,7 @@
dropdown.innerHTML = '';
// A multi-select keeps showing its old selections until select2 is told the value changed
$(dropdown).val(null).trigger('change.select2');
clearTomSelect(dropdown instanceof Element ? dropdown : $(dropdown)[0]);
if (placeholderLabel !== null) {
dropdown[dropdown.length] = new Option(placeholderLabel, placeholderValue);
@@ -89,7 +89,7 @@
// Redraws a select2 component after its options have been replaced
function refreshDropdown(dropdown) {
if (dropdown) {
$(dropdown).trigger('change.select2');
refreshTomSelect(dropdown instanceof Element ? dropdown : $(dropdown)[0]);
}
}