mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
parent
0641db14f5
commit
1a8560943e
@ -1,3 +1,25 @@
|
||||
const filter = {};
|
||||
|
||||
filter.checkUser = () => {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/check_user',
|
||||
success: function (response) {
|
||||
if (response.success == true) {
|
||||
$('#search-fav-modal').modal('toggle');
|
||||
} else {
|
||||
window.location.replace("/login");
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
reject(Error("It broke"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$('.sort-by-item').on('click', function () {
|
||||
let searchParams = new URLSearchParams(window.location.search);
|
||||
var sort_by = searchParams.get('sort_by');
|
||||
@ -15,8 +37,7 @@ $('.sort-by-item').on('click', function () {
|
||||
} else {
|
||||
goURL = url + "&sort_by=" + value;
|
||||
}
|
||||
console.log(goURL)
|
||||
window.location.href = goURL;
|
||||
window.location.replace(goURL);
|
||||
});
|
||||
|
||||
|
||||
@ -130,6 +151,10 @@ $(document).ready(function () {
|
||||
$(value).prev('input').prop('checked', false);
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$('#save-search').on('click', function () {
|
||||
filter.checkUser();
|
||||
});
|
||||
});
|
||||
|
||||
$('.ad-info-right-bar-video').tooltip({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user