gfsd
This commit is contained in:
+18
-1
@@ -1364,9 +1364,22 @@ window.initUploadForm = (selector) => {
|
||||
const caption = document.createElement('div');
|
||||
caption.className = 'album-stage-caption';
|
||||
caption.title = file.name;
|
||||
caption.textContent = `${file.name} (${formatSize(file.size)})`;
|
||||
card.appendChild(caption);
|
||||
|
||||
const tagWrap = document.createElement('div');
|
||||
tagWrap.className = 'album-stage-tags-wrap';
|
||||
const tagInput = document.createElement('input');
|
||||
tagInput.type = 'text';
|
||||
tagInput.className = 'album-stage-tags-input';
|
||||
tagInput.placeholder = (window.f0ckI18n && window.f0ckI18n.album_subf0ck_tags_placeholder) || 'Tags for this subf0ck (optional)';
|
||||
tagInput.value = item.subTags || '';
|
||||
tagInput.addEventListener('input', () => {
|
||||
item.subTags = tagInput.value;
|
||||
});
|
||||
tagInput.addEventListener('click', (e) => e.stopPropagation());
|
||||
tagWrap.appendChild(tagInput);
|
||||
card.appendChild(tagWrap);
|
||||
|
||||
grid.appendChild(card);
|
||||
});
|
||||
|
||||
@@ -2982,6 +2995,10 @@ window.initUploadForm = (selector) => {
|
||||
for (let i = 0; i < selectedFiles.length; i++) {
|
||||
const f = selectedFiles[i].file || selectedFiles[i];
|
||||
formData.append('files', f);
|
||||
const subTags = selectedFiles[i].subTags || '';
|
||||
if (subTags) {
|
||||
formData.append(`subf0ck_tags_${i}`, subTags);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user