uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
www
/
wp-content
/
plugins
/
charitable
/
assets
/
js
/
charitable-plupload-fields.min.js
/
/
CHARITABLE=window.CHARITABLE||{};(function($,exports){var Uploader=function($dragdrop){var self=this,params=$dragdrop.data("params"),uploader=new plupload.Uploader(params);this.$dragdrop=$dragdrop;this.$dropzone=$(uploader.settings.drop_element);this.$images=$("#"+$dragdrop.data("images"));this.$loader=this.$dragdrop.find(".charitable-drag-drop-image-loader").first();this.max_file_uploads=params.multipart_params.max_uploads;this.max_file_size=parseInt(this.$dragdrop.data("max-size"),10);this.uploaded=this.$images.children().length;this.max_uploads_alert_shown=false;this.max_upload_size_alert_shown=false;uploader.init();uploader.bind("Init",(function(uploader){self.Init(uploader)}));uploader.bind("PostInit",(function(uploader){uploader.refresh()}));uploader.bind("FileFiltered",(function(uploader,files){self.FileFiltered(uploader,files)}));uploader.bind("FilesAdded",(function(uploader,files){self.FilesAdded(uploader,files)}));uploader.bind("Error",(function(uploader,e){console.log(e)}));uploader.bind("FileUploaded",(function(uploader,file,r){self.FileUploaded(uploader,file,r)}))};Uploader.prototype.Init=function(uploader){var self=this;if(!this.$dropzone){return}if(uploader.features.dragdrop&&!this.$dragdrop.parent().hasClass("mobile")){this.$dragdrop.parent().addClass("supports-drag-drop");this.$dropzone.bind("dragover",(function(){self.$dropzone.addClass("drag-over")}));this.$dropzone.bind("dragleave",(function(){self.$dropzone.removeClass("drag-over")}))}this.$dragdrop.on("click",".remove-image",(function(e){e.preventDefault();return self.remove_image($(this),uploader)}))};Uploader.prototype.FileFiltered=function(uploader,file){var full=this.max_file_uploads&&this.uploaded>=this.max_file_uploads;if(full){if(!this.max_uploads_alert_shown){alert(this.get_max_uploads_message())}this.max_uploads_alert_shown=true;return uploader.removeFile(file)}if(file.size>=this.max_file_size){if(!this.max_upload_size_alert_shown){alert(CHARITABLE_UPLOAD_VARS.max_file_size.replace("%1$s",file.name).replace("%2$s",this.bytes_to_mb(this.max_file_size)))}this.max_upload_size_alert_shown=true;return uploader.removeFile(file)}this.uploaded+=1;if(this.uploaded===this.max_file_uploads){this.hide_dropzone()}this.add_image_loader(file)};Uploader.prototype.FilesAdded=function(uploader,files){this.$dropzone.removeClass("drag-over");this.max_uploads_alert_shown=false;this.max_upload_size_alert_shown=false;uploader.refresh();uploader.start()};Uploader.prototype.FileUploaded=function(uploader,file,r){var input,data;r=$.parseJSON(r.response);if(!r.success){this.add_image_error(file,CHARITABLE_UPLOAD_VARS.upload_problem.replace("%s",file.name));return}this.hide_image_loader(file);this.$images.append(r.data)};Uploader.prototype.get_max_uploads_message=function(){var msg=this.max_file_uploads>1?CHARITABLE_UPLOAD_VARS.max_file_uploads_plural:CHARITABLE_UPLOAD_VARS.max_file_uploads_single;return msg.replace("%d",this.max_file_uploads)};Uploader.prototype.add_image_loader=function(file){this.$loader.fadeIn(300);this.$loader.children(".images").append('<li data-file-id="'+file.id+'" class="">'+file.name+"</li>")};Uploader.prototype.hide_image_loader=function(file){this.$loader.find("[data-file-id="+file.id+"]").remove();if(!this.$loader.find(".images li").length){this.$loader.hide()}};Uploader.prototype.remove_image=function($anchor,uploader){var $image=$anchor.parent();$image.fadeOut(300,(function(){this.remove()}));this.$dropzone.fadeIn(300);this.uploaded-=1;uploader.refresh();return false};Uploader.prototype.hide_dropzone=function(){this.$dropzone.removeClass("drag-over");this.$dropzone.hide()};Uploader.prototype.bytes_to_mb=function(size){var i=Math.floor(Math.log(size)/Math.log(1024));return(size/Math.pow(1024,i)).toFixed(2)*1+" "+["B","kB","MB","GB","TB"][i]};Uploader.prototype.add_image_error=function(file,msg){var self=this;self.$dropzone.fadeIn(300);self.$loader.find("[data-file-id="+file.id+"]").addClass("error").text(msg).delay(5e3).fadeOut(300,(function(){self.hide_image_loader(file)}))};exports.Uploader=Uploader;$(document).ready((function(){$(".charitable-drag-drop").each((function(){new Uploader($(this))}))}))})(jQuery,CHARITABLE);
/home/batcwwjx/www/wp-content/plugins/charitable/assets/js/charitable-plupload-fields.min.js