File manager - Edit - /home/linknsbh/rassudr.online/public/assets/js/vendor-dropzone.js
Back
(function ($) { "use strict"; $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); // Dropzone initialization Dropzone.options.myDropzone = { acceptedFiles: '.png, .jpg, .jpeg', url: storeUrl, maxFiles: galleryImages, success: function (file, response) { $("#sliders").append(`<input type="hidden" name="slider_images[]" id="slider${response.file_id}" value="${response.file_id}">`); // Create the remove button var removeButton = Dropzone.createElement("<button class='rmv-btn'><i class='fa fa-times'></i></button>"); // Capture the Dropzone instance as closure. var _this = this; // Listen to the click event removeButton.addEventListener("click", function (e) { // Make sure the button click doesn't submit the form: e.preventDefault(); e.stopPropagation(); _this.removeFile(file); rmvimg(response.file_id); }); // Add the button to the file preview element. file.previewElement.appendChild(removeButton); if (typeof response.error != 'undefined') { if (typeof response.file != 'undefined') { document.getElementById('errpreimg').innerHTML = response.file[0]; } } } }; function rmvimg(fileid) { // If you want to the delete the file on the server as well, // you can do the AJAX request here. $.ajax({ url: removeUrl, type: 'POST', data: { fileid: fileid }, success: function (data) { $("#slider" + fileid).remove(); } }); } //remove existing images $(document).on('click', '.rmvbtndb', function () { let indb = $(this).data('indb'); $(".request-loader").addClass("show"); $.ajax({ url: rmvdbUrl, type: 'POST', data: { fileid: indb }, success: function (data) { $(".request-loader").removeClass("show"); if(data == 'success'){ location.reload(); } } }); }); })(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 1.6 |
proxy
|
phpinfo
|
Settings