Fix wishlist and wish urls
This commit is contained in:
parent
4303efaf9e
commit
6ffdabd93b
3 changed files with 8 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
||||||
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&id=$2 [QSA,L]
|
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&id=$2 [QSA,L]
|
||||||
|
|
||||||
# Wishlists
|
# Wishlists
|
||||||
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&wishlist=$2 [QSA,L]
|
RewriteRule ^([a-z\-]+)/(\d+)$ /?page=$1&id=$2 [QSA,L]
|
||||||
|
|
||||||
# Wishlist
|
# Wishlist
|
||||||
RewriteRule ^wishlist/([a-z0-9]+)$ /?wishlist=$1 [QSA,L]
|
RewriteRule ^wishlist/([a-z0-9]+)$ /?wishlist=$1 [QSA,L]
|
||||||
|
|
|
@ -17,8 +17,8 @@ $(function () {
|
||||||
placeholder : text.wishlist_no_selection
|
placeholder : text.wishlist_no_selection
|
||||||
})
|
})
|
||||||
|
|
||||||
if ($_GET.wishlist) {
|
if ($_GET.id) {
|
||||||
element.dropdown('set selected', $_GET.wishlist);
|
element.dropdown('set selected', $_GET.id);
|
||||||
} else {
|
} else {
|
||||||
if (wishlists[0]) {
|
if (wishlists[0]) {
|
||||||
element.dropdown('set selected', wishlists[0].value);
|
element.dropdown('set selected', wishlists[0].value);
|
||||||
|
@ -53,9 +53,11 @@ $(function () {
|
||||||
$('.wishlist-delete').removeClass('disabled');
|
$('.wishlist-delete').removeClass('disabled');
|
||||||
|
|
||||||
/** Update URL */
|
/** Update URL */
|
||||||
urlParams.set('wishlist', wishlistValue);
|
urlParams.set('id', wishlistValue);
|
||||||
|
|
||||||
fetch('/src/api/url.php?url=' + btoa(urlParams.toString()), {
|
console.log(wishlistValue);
|
||||||
|
|
||||||
|
fetch('/src/api/url.php?url=' + window.btoa(urlParams.toString()), {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
.then(handleFetchError)
|
.then(handleFetchError)
|
||||||
|
|
|
@ -56,7 +56,7 @@ $page->header();
|
||||||
$page->bodyStart();
|
$page->bodyStart();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
|
|
||||||
$referer = '/?page=wishlists&wishlist=' . $wish->wishlist;
|
$referer = '/?page=wishlists&id=' . $wish->wishlist;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|
Loading…
Reference in a new issue