aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/default/js
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-05-30 15:51:14 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit8eac2e54882d8adae8cbb45386dca1b465242632 (patch)
treee833e0ada87ac350ec2de8b7519a62e30e6731c6 /assets/default/js
parent66063ed1a18d739b1a60bfb163d8656417a4c529 (diff)
downloadShaarli-8eac2e54882d8adae8cbb45386dca1b465242632.tar.gz
Shaarli-8eac2e54882d8adae8cbb45386dca1b465242632.tar.zst
Shaarli-8eac2e54882d8adae8cbb45386dca1b465242632.zip
Process manage tags page through Slim controller
Diffstat (limited to 'assets/default/js')
-rw-r--r--assets/default/js/base.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index f61cfa92..8cc7eed5 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -546,7 +546,7 @@ function init(description) {
546 const refreshedToken = document.getElementById('token').value; 546 const refreshedToken = document.getElementById('token').value;
547 const fromtag = block.getAttribute('data-tag'); 547 const fromtag = block.getAttribute('data-tag');
548 const xhr = new XMLHttpRequest(); 548 const xhr = new XMLHttpRequest();
549 xhr.open('POST', './?do=changetag'); 549 xhr.open('POST', './manage-tags');
550 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 550 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
551 xhr.onload = () => { 551 xhr.onload = () => {
552 if (xhr.status !== 200) { 552 if (xhr.status !== 200) {
@@ -559,7 +559,7 @@ function init(description) {
559 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none'; 559 findParent(input, 'div', { class: 'rename-tag-form' }).style.display = 'none';
560 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag); 560 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
561 block.querySelector('a.tag-link').setAttribute('href', `./?searchtags=${encodeURIComponent(totag)}`); 561 block.querySelector('a.tag-link').setAttribute('href', `./?searchtags=${encodeURIComponent(totag)}`);
562 block.querySelector('a.rename-tag').setAttribute('href', `./?do=changetag&fromtag=${encodeURIComponent(totag)}`); 562 block.querySelector('a.rename-tag').setAttribute('href', `./manage-tags?fromtag=${encodeURIComponent(totag)}`);
563 563
564 // Refresh awesomplete values 564 // Refresh awesomplete values
565 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag)); 565 existingTags = existingTags.map(tag => (tag === fromtag ? totag : tag));
@@ -593,7 +593,7 @@ function init(description) {
593 593
594 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) { 594 if (confirm(`Are you sure you want to delete the tag "${tag}"?`)) {
595 const xhr = new XMLHttpRequest(); 595 const xhr = new XMLHttpRequest();
596 xhr.open('POST', './?do=changetag'); 596 xhr.open('POST', './manage-tags');
597 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 597 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
598 xhr.onload = () => { 598 xhr.onload = () => {
599 block.remove(); 599 block.remove();