liked: [],
};
- $(".icon-like").on('click', function(e) {
+ $(document).on('click', '.icon-like', function(e) {
e.preventDefault();
let liked = $(this).hasClass('icon-liked');
$btn = $(this);
}
})
+ // TODO: DYNAMICALLY ADD
$(".add-set-tag input[name=name]").autocomplete({
source: '/ludzie/moje-tagi/',
}).on('autocompleteopen', function() {
});
}
refreshAll(ids);
+ $.refreshLikes = refreshAll;
function updateFromData(data) {
for (pk in data) {
clearTimeout(timer);
});
})();
+
+
+
+// Update search form filters.
+(function() {
+ $('.j-form-auto').each(function() {
+ let $form = $(this);
+ $('input', $form).change(function() {$form.submit()});
+ $('select', $form).change(function() {$form.submit()});
+ $('textarea', $form).change(function() {$form.submit()});
+ });
+})();