diff options
Diffstat (limited to 'public/js/inversion.js')
| -rw-r--r-- | public/js/inversion.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/js/inversion.js b/public/js/inversion.js new file mode 100644 index 0000000..77c3151 --- /dev/null +++ b/public/js/inversion.js | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // public/js/inversion.js | ||
| 2 | |||
| 3 | // inverser la position de deux "articles" ou albums d'une page | ||
| 4 | function 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 | ||
