Allow visiting wish link

This commit is contained in:
grandeljay 2022-12-14 14:52:02 +01:00
parent acfa8eb8e3
commit e374030f8b

View file

@ -1,4 +1,5 @@
const wish_button_mark_as_fulfilled = '.ui.button.wish-fulfilled'; const wish_button_mark_as_fulfilled = '.ui.button.wish-fulfilled';
const wish_button_visit = '.ui.button.wish-visit';
var wish; var wish;
@ -6,6 +7,12 @@ function wish_set_to(wish_data) {
wish = wish_data; wish = wish_data;
$(wish_button_mark_as_fulfilled).removeClass('disabled'); $(wish_button_mark_as_fulfilled).removeClass('disabled');
if (wish.url) {
$(wish_button_visit)
.attr('href', wish.url)
.removeClass('disabled');
}
} }
function wish_unset() { function wish_unset() {