fix to favourites
Showing
10 changed files
with
28 additions
and
10 deletions
| ... | @@ -9428,6 +9428,13 @@ label[for=quicksearch] { | ... | @@ -9428,6 +9428,13 @@ label[for=quicksearch] { |
| 9428 | background-repeat: no-repeat; | 9428 | background-repeat: no-repeat; |
| 9429 | background-position: right; | 9429 | background-position: right; |
| 9430 | } | 9430 | } |
| 9431 | .favourite.loading { | ||
| 9432 | background: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_ajPY{transform-origin:center;animation:spinner_AtaB .75s infinite linear}@keyframes spinner_AtaB{100%{transform:rotate(360deg)}}</style><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_ajPY"/></svg>'); | ||
| 9433 | background-repeat: no-repeat; | ||
| 9434 | background-position: right; | ||
| 9435 | background-size: contain; | ||
| 9436 | } | ||
| 9437 | |||
| 9431 | .next.paginate_button, | 9438 | .next.paginate_button, |
| 9432 | .previous.paginate_button { | 9439 | .previous.paginate_button { |
| 9433 | font-size: 0px; | 9440 | font-size: 0px; | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -22975,20 +22975,23 @@ | ... | @@ -22975,20 +22975,23 @@ |
| 22975 | }); | 22975 | }); |
| 22976 | $('.favourite').on('click', function (e) { | 22976 | $('.favourite').on('click', function (e) { |
| 22977 | e.preventDefault(); | 22977 | e.preventDefault(); |
| 22978 | if ($(this).attr('disabled')) { | ||
| 22979 | return; | ||
| 22980 | } | ||
| 22978 | $(this).attr('disabled', true).addClass('loading'); | 22981 | $(this).attr('disabled', true).addClass('loading'); |
| 22979 | var _request = $(this).attr('href'), | 22982 | var _request = $(this).attr('href'), |
| 22980 | _other_request = $(this).data('other-request'); | 22983 | _other_request = $(this).data('other-request'); |
| 22981 | var that = this; | 22984 | var that = this; |
| 22985 | if ($(this).hasClass('fav')) { | ||
| 22986 | $(this).removeClass('fav'); | ||
| 22987 | } else { | ||
| 22988 | $(this).addClass('fav'); | ||
| 22989 | } | ||
| 22982 | $.get(_request, function (response) { | 22990 | $.get(_request, function (response) { |
| 22983 | if (response.response === true) { | 22991 | if (response.response === true) { |
| 22984 | var _href = _request; | 22992 | var _href = _request; |
| 22985 | $(that).attr('href', _other_request); | 22993 | $(that).attr('href', _other_request); |
| 22986 | $(that).data('other-request', _href); | 22994 | $(that).data('other-request', _href); |
| 22987 | if (response.response_body == 'rm') { | ||
| 22988 | $(that).removeClass('fav'); | ||
| 22989 | } else { | ||
| 22990 | $(that).addClass('fav'); | ||
| 22991 | } | ||
| 22992 | } | 22995 | } |
| 22993 | }).done(function () { | 22996 | }).done(function () { |
| 22994 | $(that).attr('disabled', false).removeClass('loading'); | 22997 | $(that).attr('disabled', false).removeClass('loading'); | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -76,20 +76,23 @@ jQuery(document).ready(function($) { | ... | @@ -76,20 +76,23 @@ jQuery(document).ready(function($) { |
| 76 | 76 | ||
| 77 | $('.favourite').on('click', function(e) { | 77 | $('.favourite').on('click', function(e) { |
| 78 | e.preventDefault(); | 78 | e.preventDefault(); |
| 79 | if($(this).attr('disabled')) { | ||
| 80 | return; | ||
| 81 | } | ||
| 79 | $(this).attr('disabled', true).addClass('loading'); | 82 | $(this).attr('disabled', true).addClass('loading'); |
| 80 | var _request = $(this).attr('href'), | 83 | var _request = $(this).attr('href'), |
| 81 | _other_request = $(this).data('other-request'); | 84 | _other_request = $(this).data('other-request'); |
| 82 | var that = this; | 85 | var that = this; |
| 86 | if($(this).hasClass('fav')) { | ||
| 87 | $(this).removeClass('fav'); | ||
| 88 | } else { | ||
| 89 | $(this).addClass('fav'); | ||
| 90 | } | ||
| 83 | $.get(_request, function(response) { | 91 | $.get(_request, function(response) { |
| 84 | if(response.response === true) { | 92 | if(response.response === true) { |
| 85 | var _href = _request; | 93 | var _href = _request; |
| 86 | $(that).attr('href',_other_request); | 94 | $(that).attr('href',_other_request); |
| 87 | $(that).data('other-request', _href); | 95 | $(that).data('other-request', _href); |
| 88 | if(response.response_body == 'rm') { | ||
| 89 | $(that).removeClass('fav'); | ||
| 90 | } else { | ||
| 91 | $(that).addClass('fav'); | ||
| 92 | } | ||
| 93 | } | 96 | } |
| 94 | }).done(function() { | 97 | }).done(function() { |
| 95 | $(that).attr('disabled', false).removeClass('loading'); | 98 | $(that).attr('disabled', false).removeClass('loading'); | ... | ... |
| ... | @@ -268,11 +268,16 @@ label[for="quicksearch"] { | ... | @@ -268,11 +268,16 @@ label[for="quicksearch"] { |
| 268 | background-position: right; | 268 | background-position: right; |
| 269 | display: flex; | 269 | display: flex; |
| 270 | &.fav { | 270 | &.fav { |
| 271 | |||
| 271 | background:url('data:image/svg+xml,<svg id="ICON_-_Heart" data-name="ICON - Heart" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.847" height="19.166" viewBox="0 0 20.847 19.166"><defs><clipPath id="clip-path"><rect id="Rectangle_189" data-name="Rectangle 189" width="20.847" height="19.166" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/></clipPath></defs><g id="Group_1167" data-name="Group 1167" clip-path="url(%23clip-path)"><path id="Path_1371" data-name="Path 1371" d="M9.976,3.11c-.218-.229-.387-.41-.56-.589a4.869,4.869,0,0,0-7.187,6.57c2.344,2.622,4.735,5.2,7.112,7.794.467.508.8.508,1.259.006,2.377-2.593,4.765-5.174,7.112-7.794a4.869,4.869,0,0,0-7.174-6.583c-.173.18-.342.364-.561.6" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/><path id="Path_1372" data-name="Path 1372" d="M9.976,3.11c.219-.232.389-.416.561-.6A4.869,4.869,0,0,1,17.711,9.1c-2.346,2.619-4.735,5.2-7.112,7.794-.46.5-.792.5-1.259-.006-2.377-2.593-4.768-5.172-7.112-7.794a4.869,4.869,0,0,1,7.187-6.57c.173.178.342.36.56.589" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/><path id="Path_1373" data-name="Path 1373" d="M9.976,3.11c.219-.232.389-.416.561-.6A4.869,4.869,0,0,1,17.711,9.1c-2.346,2.619-4.735,5.2-7.112,7.794-.46.5-.792.5-1.259-.006-2.377-2.593-4.768-5.172-7.112-7.794a4.869,4.869,0,0,1,7.187-6.57C9.589,2.7,9.758,2.881,9.976,3.11Z" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="2"/></g></svg>'); | 272 | background:url('data:image/svg+xml,<svg id="ICON_-_Heart" data-name="ICON - Heart" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.847" height="19.166" viewBox="0 0 20.847 19.166"><defs><clipPath id="clip-path"><rect id="Rectangle_189" data-name="Rectangle 189" width="20.847" height="19.166" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/></clipPath></defs><g id="Group_1167" data-name="Group 1167" clip-path="url(%23clip-path)"><path id="Path_1371" data-name="Path 1371" d="M9.976,3.11c-.218-.229-.387-.41-.56-.589a4.869,4.869,0,0,0-7.187,6.57c2.344,2.622,4.735,5.2,7.112,7.794.467.508.8.508,1.259.006,2.377-2.593,4.765-5.174,7.112-7.794a4.869,4.869,0,0,0-7.174-6.583c-.173.18-.342.364-.561.6" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/><path id="Path_1372" data-name="Path 1372" d="M9.976,3.11c.219-.232.389-.416.561-.6A4.869,4.869,0,0,1,17.711,9.1c-2.346,2.619-4.735,5.2-7.112,7.794-.46.5-.792.5-1.259-.006-2.377-2.593-4.768-5.172-7.112-7.794a4.869,4.869,0,0,1,7.187-6.57c.173.178.342.36.56.589" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="1"/><path id="Path_1373" data-name="Path 1373" d="M9.976,3.11c.219-.232.389-.416.561-.6A4.869,4.869,0,0,1,17.711,9.1c-2.346,2.619-4.735,5.2-7.112,7.794-.46.5-.792.5-1.259-.006-2.377-2.593-4.768-5.172-7.112-7.794a4.869,4.869,0,0,1,7.187-6.57C9.589,2.7,9.758,2.881,9.976,3.11Z" transform="translate(0.45 0.45)" fill="%23eb519a" stroke="%23eb519a" stroke-width="2"/></g></svg>'); |
| 272 | background-repeat: no-repeat; | 273 | background-repeat: no-repeat; |
| 273 | background-position: right; | 274 | background-position: right; |
| 274 | } | 275 | } |
| 275 | &.loading { | 276 | &.loading { |
| 277 | background:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_ajPY{transform-origin:center;animation:spinner_AtaB .75s infinite linear}@keyframes spinner_AtaB{100%{transform:rotate(360deg)}}</style><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_ajPY"/></svg>'); | ||
| 278 | background-repeat: no-repeat; | ||
| 279 | background-position: right; | ||
| 280 | background-size: contain; | ||
| 276 | } | 281 | } |
| 277 | } | 282 | } |
| 278 | 283 | ... | ... |
-
Please register or sign in to post a comment