X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0a7090f11131631647db366ff87976407e788412..eaba19e725b49fdf4efc858604a7b9d70d27f59f:/src/wolnelektury/static/2021/scripts/main.js?ds=inline diff --git a/src/wolnelektury/static/2021/scripts/main.js b/src/wolnelektury/static/2021/scripts/main.js index 843cddbbf..3bbb38d55 100644 --- a/src/wolnelektury/static/2021/scripts/main.js +++ b/src/wolnelektury/static/2021/scripts/main.js @@ -401,7 +401,7 @@ liked: [], }; - $(".icon-like").on('click', function(e) { + $(document).on('click', '.icon-like', function(e) { e.preventDefault(); let liked = $(this).hasClass('icon-liked'); $btn = $(this); @@ -431,6 +431,7 @@ } }) + // TODO: DYNAMICALLY ADD $(".add-set-tag input[name=name]").autocomplete({ source: '/ludzie/moje-tagi/', }).on('autocompleteopen', function() { @@ -478,6 +479,7 @@ }); } refreshAll(ids); + $.refreshLikes = refreshAll; function updateFromData(data) { for (pk in data) {