Difference between revisions of "Widget:Multi upload"

From cm2.liecourt.com
(Fill database)
m (Reverted edits by Maintenance script (talk) to last revision by Merel)
(Tag: Rollback)
 
(4 intermediate revisions by 3 users not shown)
Line 31: Line 31:
  
 
function uploadFiles(evt){
 
function uploadFiles(evt){
 +
  evt.classList.add('pending');
 +
  evt.disabled = true;
 
var files = document.getElementById('files').files;
 
var files = document.getElementById('files').files;
 
var proms = [];  
 
var proms = [];  
Line 92: Line 94:
 
   var filesSelected = document.getElementById("files").files;
 
   var filesSelected = document.getElementById("files").files;
 
     if (filesSelected.length > 0) {
 
     if (filesSelected.length > 0) {
 
+
    document.getElementById("imgTest").innerHTML = '';
 
     for(i = 0; i < filesSelected.length; ++i){
 
     for(i = 0; i < filesSelected.length; ++i){
  
Line 123: Line 125:
  
 
function editFilePage(file){
 
function editFilePage(file){
 +
 
 +
 
 +
<!--{if (isset($edit) && $edit!="")}-->
 +
 
 +
 +
 +
  uuid = '<!--{$id}-->';
 +
 
 +
<!--{/if}-->
  
 
var newWikitextEdit = '{{File for case|Case file='+uuid+'|File uploaded by=User:'+mw.user.getName()+'|type='+file.substr( file.length -3 )+'}}';
 
var newWikitextEdit = '{{File for case|Case file='+uuid+'|File uploaded by=User:'+mw.user.getName()+'|type='+file.substr( file.length -3 )+'}}';

Latest revision as of 12:37, 24 February 2022


This is the Widget:Multi upload page. It should be called in the following format:

{{#widget:Multi upload }}