This commit is contained in:
grandeljay 2022-12-14 14:50:03 +01:00
parent 4c14866d1f
commit f3cf2fb13d
4 changed files with 4 additions and 20 deletions

View file

@ -27,19 +27,6 @@ $(function() {
$.fn.api.settings.onComplete = function(response, element, xhr) { $.fn.api.settings.onComplete = function(response, element, xhr) {
element.removeClass('loading'); element.removeClass('loading');
} }
$.fn.api.settings.onSuccess = function(response, element, xhr) {
element.dropdown({
values : response.results
})
if (wishthis.$_GET.id) {
element.dropdown('set selected', wishthis.$_GET.id);
} else {
if (response.results[0]) {
element.dropdown('set selected', response.results[0].value);
}
}
}
$.fn.api.settings.onFailure = function(response, element, xhr) { $.fn.api.settings.onFailure = function(response, element, xhr) {
var content = ''; var content = '';

View file

@ -3,7 +3,7 @@ $(function () {
/** /**
* Details * Details
*/ */
$(document).on('click', '.ui.button.details', function() { $(document).on('click', '.ui.button.wish-details', function() {
var wish_details_template = $('template#wish-details').clone(true, true); var wish_details_template = $('template#wish-details').clone(true, true);
var wish_details = wish_details_template.contents().filter(function() { return this.nodeType !== 3; }); var wish_details = wish_details_template.contents().filter(function() { return this.nodeType !== 3; });

View file

@ -1,4 +1,5 @@
$(function () { $(function () {
/** /**
* Get Wishlists * Get Wishlists
*/ */
@ -73,11 +74,6 @@ $(function () {
updateURL(); updateURL();
/** */ /** */
/**
* Trigger priorities dropdown
*/
$('.ui.dropdown.filter.priority').api('query');
/** /**
* Very dirty hack to ensure the wishes are going to be * Very dirty hack to ensure the wishes are going to be
* displayed after the page has laoded. * displayed after the page has laoded.
@ -742,4 +738,5 @@ $(function () {
} }
} }
} }
}); });

View file

@ -354,7 +354,7 @@ class Wish
ob_start(); ob_start();
?> ?>
<div class="extra content buttons"> <div class="extra content buttons">
<button class="ui compact labeled icon button details"> <button class="ui compact labeled icon button wish-details">
<i class="stream icon"></i> <i class="stream icon"></i>
<span><?= __('Details') ?></span> <span><?= __('Details') ?></span>
</button> </button>