Refactor
This commit is contained in:
parent
4c14866d1f
commit
f3cf2fb13d
4 changed files with 4 additions and 20 deletions
|
@ -27,19 +27,6 @@ $(function() {
|
|||
$.fn.api.settings.onComplete = function(response, element, xhr) {
|
||||
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) {
|
||||
var content = '';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ $(function () {
|
|||
/**
|
||||
* 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 = wish_details_template.contents().filter(function() { return this.nodeType !== 3; });
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
$(function () {
|
||||
|
||||
/**
|
||||
* Get Wishlists
|
||||
*/
|
||||
|
@ -73,11 +74,6 @@ $(function () {
|
|||
updateURL();
|
||||
/** */
|
||||
|
||||
/**
|
||||
* Trigger priorities dropdown
|
||||
*/
|
||||
$('.ui.dropdown.filter.priority').api('query');
|
||||
|
||||
/**
|
||||
* Very dirty hack to ensure the wishes are going to be
|
||||
* displayed after the page has laoded.
|
||||
|
@ -742,4 +738,5 @@ $(function () {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -354,7 +354,7 @@ class Wish
|
|||
ob_start();
|
||||
?>
|
||||
<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>
|
||||
<span><?= __('Details') ?></span>
|
||||
</button>
|
||||
|
|
Loading…
Reference in a new issue