JQuery ve Dropzone eklentisi hakkında bir sorum var. dropzone.js
yılındajquery ile yeni eleman oluşturma
<form action="/file-upload" class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple />
</div>
</form>
Ben addRemoveLinks: true
ayarlanır ve bağlantı kaldırma dosyasını biraz stil istiyorum istiyorum:
böyle html kodu var.
dropzone.js
kodunda bu şekilde olur.
Dropzone.prototype.defaultOptions = {
dictRemoveFile: "Remove file",
if (this.options.addRemoveLinks) {
file._removeLink = Dropzone.createElement("<a class=\"dz-remove btn btn-default\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");
file.previewElement.appendChild(file._removeLink);
}
Ve öğeyi denetle do sonucudur:
<a class="dz-remove btn btn-default" href="javascript:undefined;" data-dz-remove="">Remove file</a>
Sadece etiketinin hemen dışında div class="custom"
yapmak istiyorum a
Örnek:
Dropzone.prototype.defaultOptions = {
dictRemoveFile: "Remove file",
if (this.options.addRemoveLinks) {
file._removeLink = Dropzone.createElement("<div class=\"custom\"><a class=\"dz-remove btn btn-default\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a><div>");
file.previewElement.appendChild(file._removeLink);
}
Ama Nedenini bilmiyorum. web tarayıcısında çalıştırmayı denediğimde, bağlantı tıklanabilir değil. Bu yüzden öğeyi denetle çalıştığınızda ve yalnızca bu vardır:
<div class="custom">Remove file</div>
Bildirim etiketi a
gitti.
sonucun bu
<div class="custom">
<a class="dz-remove btn btn-default" href="javascript:undefined;" data-dz-remove="">Remove file</a>
</div>
gibi yapmaya Ama düzgün çalışmıyor.
Dropzone.prototype.defaultOptions = {
dictRemoveFile: "Remove file",
if (this.options.addRemoveLinks) {
file._removeLink = Dropzone.createElement("<a class=\"dz-remove btn btn-default\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");
var custom = Dropzone.createElement("<div class=\"custom\"></div>");
custom.appendChild(file._removeLink);
file.previewElement.appendChild(custom);
}
Lütfen bir joker veya plunker oluşturun – brk
http://jsfiddle.net/sbxsa4e3/2/ burada efendim –
yardımcı olabilirsiniz efendim? 'AddRemoveLinks: true, removeTemplate: Bu çalışma http://jsfiddle.net/sbxsa4e3/4/ –