summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-02-22 07:06:37 +0100
committerache <ache@ache.one>2019-02-22 07:06:37 +0100
commit8efecda7e3a28477842032bd3357f93d2ecd505c (patch)
tree7e963c04c26d1269095ff5806c3127d06533af80
parentIHM Dav (diff)
Fill button
-rw-r--r--dir.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/dir.html b/dir.html
index e21b425..d3c84d6 100644
--- a/dir.html
+++ b/dir.html
@@ -30,7 +30,7 @@
</div>
<hr/>
<div class="moveDiv">
- <label for="file_move1">Déplaçer un fichier : </label><br/>
+ <label for="file_move1">Déplaçer : </label><br/>
<input id="file_move1" type="input"> <br/>
<label for="file_move2">Vers : <br/>
<input id="file_move2" type="input">
@@ -121,17 +121,28 @@ const onPageLoad = () => {
const as = Array.from(document.getElementsByTagName('a'));
as.filter( e => e.parentNode.parentNode.tagName == "TR").forEach( e => {
+ const aFill = document.createElement('a');
const a = document.createElement('a');
const td = document.createElement('td');
+ const moveInput = document.getElementById('file_move1');
a.appendChild(document.createTextNode('🗙'));
+ aFill.appendChild(document.createTextNode('↩'));
a.classList.add('delete');
+ aFill.classList.add('fill');
a.href = "#";
+ aFill.href = "#";
a.onclick = () => false;
+ aFill.onclick = () => false;
+ td.appendChild(aFill);
td.appendChild(a);
a.addEventListener('click', () => {
deleteMethode('/' + e.href.split('/').slice(3).join('/'), e.parentNode.parentNode)
return false;
}, false);
+ aFill.addEventListener('click', () => {
+ moveInput.value = e.href.split('/').slice(3).join('/');
+ }, false);
+
e.parentNode.parentNode.appendChild(td);
});
}