Refactor
This commit is contained in:
parent
aad8c7cd14
commit
f9be136345
1 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
||||||
$(function () {
|
$(function () {
|
||||||
|
var wishlist = {
|
||||||
|
'id' : $_GET.id
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Wishlists
|
* Get Wishlists
|
||||||
*/
|
*/
|
||||||
|
@ -17,8 +21,8 @@ $(function () {
|
||||||
placeholder : text.wishlist_no_selection
|
placeholder : text.wishlist_no_selection
|
||||||
})
|
})
|
||||||
|
|
||||||
if ($_GET.id) {
|
if (wishlist.id) {
|
||||||
element.dropdown('set selected', $_GET.id);
|
element.dropdown('set selected', wishlist.id);
|
||||||
} else {
|
} else {
|
||||||
if (wishlists[0]) {
|
if (wishlists[0]) {
|
||||||
element.dropdown('set selected', wishlists[0].value);
|
element.dropdown('set selected', wishlists[0].value);
|
||||||
|
@ -43,7 +47,7 @@ $(function () {
|
||||||
progress.addClass('indeterminate');
|
progress.addClass('indeterminate');
|
||||||
|
|
||||||
if (wishlistValue) {
|
if (wishlistValue) {
|
||||||
$_GET.id = wishlistValue;
|
wishlist.id = wishlistValue;
|
||||||
|
|
||||||
$('.wishlist-share').attr('href', '/?wishlist=' + wishlists[wishlistIndex].hash);
|
$('.wishlist-share').attr('href', '/?wishlist=' + wishlists[wishlistIndex].hash);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue