Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/public/html/js/edit-profile.js
Назад
$(function () { $('.save-changes-btn').hide(); $('.edit-btn').on('click', function () { $('.profile-fields input:not(.specific-disabled)').prop("disabled", false); $('.profile-fields textarea').prop("disabled", false); $('.edit-btn').prop("disabled", true); $('.cancel-btn').addClass('active'); $('.custom-select').removeClass('disable-field'); $('.save-changes-btn').show(); }); $('.cancel-btn').on('click', function () { $('.profile-fields input:not(.specific-disabled)').prop("disabled", true); $('.profile-fields textarea').prop("disabled", true); $('.edit-btn').prop("disabled", false); $('.cancel-btn').removeClass('active'); $('.custom-select').addClass('disable-field'); $('.save-changes-btn').hide(); }); // profile-image function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#imagePreview').css('background-image', 'url(' + e.target.result + ')'); $('#imagePreview').hide(); $('#imagePreview').fadeIn(650); } reader.readAsDataURL(input.files[0]); } } $("#imageUpload").change(function () { readURL(this); }); // profile image uploader end // 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).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); closeSelectOptions(); // Close the options panel selectValidation(); // You can customize the behavior when an option is selected here console.log("Selected Value:", value); } }); // 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
|
Настройка