ptite modif de la previsu

This commit is contained in:
thaaoblues 2024-04-06 22:36:28 +02:00
parent 466ce8756e
commit 7dffea80a3
2 changed files with 14 additions and 5 deletions

View file

@ -94,14 +94,23 @@ async function gen_contenu() {
video.controls = true;
previewCell.appendChild(video);
break;
default: // link
case "html":
previewCell = document.createElement('td');
const iframe = document.createElement('iframe');
iframe.href = doc.upload_path;
//iframe.textContent = doc.titre;
previewCell.appendChild(iframe);
break;
default :
previewCell = document.createElement('td');
const link = document.createElement('a');
link.href = doc.upload_path;
link.textContent = doc.titre;
link.textContent = 'Type de fichier non supporté.';
link.target = '_blank';
previewCell.appendChild(link);
break;
break;
}
const commentaireCell = document.createElement('td');

View file

@ -31,8 +31,8 @@ $csrf = new CSRF();
<label for="titre" class="champ" >N'hésitez pas à bien mettre 1A, 2A, ... et la matière concernée dans le titre.</label>
<br>
<select id="select_type" class="champ" >
<option value="1" >annale</option>
<option value="2" >fiche_revision</option>
<option value="1" >Annale</option>
<option value="2" >Fiche de vision</option>
<option value="3" >HTML personnalisé</option>
</select>