Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/js/all-properties.js
Назад
$(function () { // Function to close all select options function closeSelectOptions() { $(".select-options").slideUp(); $('.select-arrow').removeClass('active') } $(".select-selected, .select-arrow").on("click", function (e) { e.stopPropagation(); const $customSelect = $(this).closest(".custom-select"); const $selectOptions = $customSelect.find(".select-options"); $(this).next('.select-arrow').toggleClass('active'); // Toggle the options panel with a slide animation $selectOptions.slideToggle(); }); $(".select-option").on("click", function () { const value = $(this).data("value"); const text = $(this).contents().filter(function() { return this.nodeType === Node.TEXT_NODE; }).text(); // console.log(text) const $customSelect = $(this).closest(".custom-select"); const isMultiple = $customSelect.data("multiple"); if (isMultiple) { $(this).toggleClass("selected"); const selectedOptions = $customSelect .find(".select-option.selected") .map(function () { return $(this).data("value"); }) .get(); $customSelect.find(".select-selected").text(selectedOptions.join(", ")); $customSelect.find(".select-selected").attr("data-value", selectedOptions.join(", ")); // selectValidation();//IF NULL } else { $customSelect.find(".select-selected").text(text); $customSelect.find(".select-selected").attr("data-value", value); $(".select-selected").addClass('selected-opt') closeSelectOptions(); // Close the options panel // selectValidation(); // You can customize the behavior when an option is selected here } // console.log("Selected Value:", value); if(value){ showLoading(); $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'), }, url: '/landlord/change/selected', type: 'post', dataType: 'json', data: { property_id: value, }, success: function(response){ swal.close() // console.log(response); if(response.data){ TopEndPopUp('success', response.message) }else{ TopEndPopUp('warning',response.message) } }, error: function(XMLHttpRequest, textStatus, errorThrown) { swal.close() TopEndPopUp('warning',errorThrown) } }); } }); // Close the dropdowns when clicking outside $(document).on("click", function () { closeSelectOptions(); }); // Prevent clicks inside the dropdown from closing it $(".select-options").on("click", function (e) { e.stopPropagation(); }); // custom select end });
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка