summaryrefslogtreecommitdiff
path: root/public/inversion.js
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2023-03-03 23:44:43 +0100
committerpolo <ordipolo@gmx.fr>2023-03-03 23:44:43 +0100
commitc0b176ae142624d6a6daa0f65ea6fead448b8b47 (patch)
treee06445897db82e0f3cddd13bb2a67860fcf9fc3c /public/inversion.js
parenta1a9c5d80d800f6c38b900c66c77db05801a6f1d (diff)
downloadmelaine-c0b176ae142624d6a6daa0f65ea6fead448b8b47.zip
inversion de positions
Diffstat (limited to 'public/inversion.js')
-rw-r--r--public/inversion.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/public/inversion.js b/public/inversion.js
new file mode 100644
index 0000000..20a6871
--- /dev/null
+++ b/public/inversion.js
@@ -0,0 +1,16 @@
1// public/inversion.js
2
3// inverser la position de deux "articles" ou albums d'une page
4function inversion()
5{
6 var page = '';
7 var action = ''; // monter ou descendre
8 var fileCode = ''; // <?= $Articles->fileList[$i]['fileCode'] ?>
9 var position = ''; // <?= $Articles->fileList[$i]['position'] ?>
10
11 const xhr = new XMLHttpRequest();
12 url = 'index.php?page='+page+'&action='+action+'&file_code='+fileCode+'&position='+position+'#'+fileCode;
13 url = 'index.php?action=restauration&file_name='+fileInfos.name+'&file_size='+fileInfos.size;
14 xhr.open("GET", url);
15 xhr.send();
16} \ No newline at end of file