Sindbad~EG File Manager
!function i(s,n,a){function p(t,o){if(!n[t]){if(!s[t]){var e="function"==typeof require&&require;if(!o&&e)return e(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}e=n[t]={exports:{}},s[t][0].call(e.exports,function(o){return p(s[t][1][o]||o)},e,e.exports,i,s,n,a)}return n[t].exports}for(var l="function"==typeof require&&require,o=0;o<a.length;o++)p(a[o]);return p}({1:[function(o,t,e){(function(p){(function(){"use strict";var o,t,s,n,i="undefined"!=typeof window?window.peepso:void 0!==p?p.peepso:null,a=window.psdata_photos_albumdialog&&window.psdata_photos_albumdialog.template;function e(o){this.create(o),this.popup.show()}o=jQuery,(t=peepso).PhotoAlbumDialog=(s=o,(n=t).npm.objectAssign(e.prototype,n.npm.EventEmitter.prototype,{template:psdata_photos_albumdialog.template,album_url:psdata_photos_albumdialog.album_url,create:function(o){var t="ps-js-dialog-create-album",e=_.uniqueId(t+"-");this.user_id=o||peepsodata.userid,this.popup=(0,i.dialog)(a,{wide:!0}).show(),this.$el=this.popup.$el,this.$el.addClass(t).attr("id",e),this.$submit=this.$el.find(".ps-js-submit"),this.$loading=this.$el.find(".ps-js-loading"),this.$container=this.$el.find(".ps-js-photos-container"),this.$upload=this.$el.find(".ps-js-photos-upload"),this.$el.on("click",".ps-js-photos-upload-button",s.proxy(this.onUpload,this)),this.$el.on("click",".ps-js-cancel",s.proxy(this.onClose,this)),this.$el.on("click",".ps-js-submit",s.proxy(this.onSubmit,this)),this.$el.appendTo(document.body),this.dropzone=new n.PhotoDropzone(this.$el.find(".ps-js-photos-container")),this.dropzone.on("photo_added",s.proxy(this.onPhotoAdded,this)),this.dropzone.on("photo_upload_start",s.proxy(this.onPhotoUploadStart,this)),this.dropzone.on("photo_upload_done",s.proxy(this.onPhotoUploadDone,this)),this.dropzone.on("photo_empty",s.proxy(this.onPhotoEmpty,this)),n.observer.applyFilters("photo_create_album",{popup:this.$el})},onUpload:function(){this.dropzone.triggerUpload()},onPhotoAdded:function(){this.$upload.hide(),this.$container.show()},onPhotoUploadStart:function(){this.$submit.attr("disabled","disabled")},onPhotoUploadDone:function(o){o<=0&&this.$submit.removeAttr("disabled")},onPhotoEmpty:function(){this.$container.hide(),this.$upload.show()},onClose:function(o){o.preventDefault(),o.stopPropagation(),this.dropzone.destroy(),this.$el.remove()},onSubmit:function(){var o=s.trim(this.$el.find("[name=album_name]").val()),t=s.trim(this.$el.find("[name=album_desc]").val()),e=this.dropzone.getPhotos(),i=!1;o.length?this.$el.find(".ps-js-error-name").hide():(this.$el.find(".ps-js-error-name").show(),i=!0),1<=e.length?this.$el.find(".ps-js-error-photo").hide():(this.$el.find(".ps-js-error-photo").show(),i=!0),i||(i={user_id:this.user_id,name:o,description:t,privacy:this.$el.find("[name=album_privacy]").val(),type:"album",photo:e,_wpnonce:this.$el.find("[name=_wpnonce]").val(),_wp_http_referer:this.$el.find("[name=_wp_http_referer]").val()},i=n.observer.applyFilters("photos_create_album_req",i),t=(o=this.$el.find("[name=album_location]")).data("location"),e=o.data("latitude"),o=o.data("longitude"),t&&e&&o&&(i["location[name]"]=t,i["location[latitude]"]=e,i["location[longitude]"]=o),this.$submit.attr("disabled","disabled"),this.$loading.show(),n.postJson("photosajax.create_album",i,s.proxy(function(o){this.$loading.hide(),this.$submit.removeAttr("disabled"),o.success&&(this.$el.remove(),o=this.album_url+"/"+o.data.album_id,window.location.href=o)},this)))}}),e)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists