Widget:Multi upload: verschil tussen versies
Uit Dorpsbelang Den Hout
(2 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 30: | Regel 30: | ||
} | } | ||
− | function uploadFiles(mode | + | function uploadFiles(mode){ |
var files = document.getElementById('files').files; | var files = document.getElementById('files').files; | ||
var proms = []; | var proms = []; | ||
for(i = 0; i < files.length; ++i){ | for(i = 0; i < files.length; ++i){ | ||
file = files[i]; | file = files[i]; | ||
− | if( | + | if(mode == "logo"){ |
− | var fileName = | + | var fileName = document.querySelector('input[name="Domein"]').value.replace('.','-')+'-logo.png'; |
}else{ | }else{ | ||
var fileName = files[i].name; | var fileName = files[i].name; | ||
Regel 116: | Regel 116: | ||
newImage.src = srcData; | newImage.src = srcData; | ||
− | var logos = document.querySelectorAll('[alt=" | + | var logos = document.querySelectorAll('[alt="Logo.png"]'), i; |
for(i = 0; i < logos.length; ++i){ | for(i = 0; i < logos.length; ++i){ | ||
logos[i].src = srcData; | logos[i].src = srcData; |
Huidige versie van 18 aug 2020 om 21:34
This is the Widget:Multi upload page. It should be called in the following format:
{{#widget:Multi upload }}