📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
propanel
/
view
/
javascript
/
ocm
📝
xuploader.min.js
← Geri Dön
(function() { function OcmBulk() { var _self = this; this.files = []; this.dropzone = null; this.file = null; this.total = 0; this.current = 0; this.selector = "#images"; this.spiner = '<i class="fa fas fa-spinner fa-pulse"></i> '; this.text = "{current} of {total} Yüklendi"; this.auto_text = "Resim Yüklendikten Sonra Otomatik Kaydet"; this.dom = '<div class="ocm-auto-submit"><label class="checkbox-inline"><input type="checkbox" id="id-ocm-auto" name="ocm-auto" /> ' + this.auto_text + '</label></div><div class="ocm-bulk-box"><div class="ocm-progress"></div><div class="ocm-bulk-content"><input class="ocm-file" type="file" name="ocm_files[]" accept="image/*" id="ocm-file" multiple /><label for="ocm-file"><strong>Resim Seçin</strong><span> veya Buraya Sürükleyin.</span>.</label></div></div>'; this.init = function init() { $(this.selector).before(this.dom); this.dropzone = $(".ocm-bulk-box"); this.dropzone.on("drag dragstart dragend dragover dragenter dragleave drop", (function(e) { e.preventDefault(); e.stopPropagation() })).on("dragover dragenter", (function() { _self.dropzone.addClass("dragover") })).on("dragleave dragend drop", (function() { _self.dropzone.removeClass("dragover") })).on("drop", (function(e) { _self.load(e.originalEvent.dataTransfer.files) })); this.dropzone.find("#ocm-file").on("change", (function(e) { _self.load(e.target.files) })) }; this.load = function load(files) { $(files).each((function(i, file) { _self.files.push(file); _self.total++ })); _self.process() }; this.process = function process() { if (this.files.length) { this.file = _self.files.shift(); this.upload() } this.progress() }; this.progress = function progress() { var text = this.text.replace("{current}", this.current).replace("{total}", this.total); var html = this.files.length ? this.spiner + text : text; this.dropzone.find(".ocm-progress").html(html).show(); if (!this.files.length && this.total > 0 && this.current === this.total && $("#id-ocm-auto").prop("checked")) { $("#form-product").submit() } }; this.complete = function complete(json) { if (json.images) { for (var i = 0; i < json.images.length; i++) { var each = json.images[i]; addImage(); var _row = image_row - 1; $("#thumb-image" + _row).find("img").attr("src", each.thumb); $("#input-image" + _row).val(each.image); $('input[name="product_image[' + _row + '][sort_order]"]').val(_row) } } if (json.error) { alert(json.error) } }; this.upload = function upload() { var fd = new FormData; fd.append("file[]", this.file); $.ajax({ url: _xuploader, type: "post", data: fd, dataType: "json", cache: false, contentType: false, processData: false, success: function(json) { _self.current++; _self.complete(json); _self.process() }, error: function() { _self.files.push(_self.file) } }) }; this.init() } new OcmBulk })();
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula