removes if statement that prevents select2-ifying inputs

This commit is contained in:
Godfrey M 2024-02-06 12:46:17 -08:00
parent 5f8ac66036
commit ca59bc3c9c
2 changed files with 2 additions and 5 deletions

View file

@ -191,9 +191,7 @@ $(document).ready(function () {
* Select2 * Select2
*/ */
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
// Vue collision: Avoid overriding a vue select2 instance // Vue collision: Avoid overriding a vue select2 instance
// by checking to see if the item has already been select2'd. // by checking to see if the item has already been select2'd.
$('select.select2:not(".select2-hidden-accessible")').each(function (i,obj) { $('select.select2:not(".select2-hidden-accessible")').each(function (i,obj) {
@ -201,7 +199,7 @@ $(document).ready(function () {
$(obj).select2(); $(obj).select2();
} }
}); });
}
// $('.datepicker').datepicker(); // $('.datepicker').datepicker();
// var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value // var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value

View file

@ -132,7 +132,6 @@
$(":submit").attr("disabled", "disabled"); $(":submit").attr("disabled", "disabled");
//The line below needs to be here because in mobile view the status_id select2 forgets its select2 so this makes it function properly. //The line below needs to be here because in mobile view the status_id select2 forgets its select2 so this makes it function properly.
$("[name='status_id']").select2();
$("[name='status_id']").on('select2:select', function (e) { $("[name='status_id']").on('select2:select', function (e) {
if (e.params.data.id != "") { if (e.params.data.id != "") {
console.log(e.params.data.id); console.log(e.params.data.id);