ui: fix pagination

This commit is contained in:
undefined committed 2021-10-10 11:39:20 +08:00
1 parent 9f378226c9
commit 2b86898b26
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.22.16",
"version": "4.22.17",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -230,12 +230,12 @@ const page = new NamedPage(['problem_main', 'problem_category'], () => {
});
$(document).on('click', 'a.pager__item', (ev) => {
ev.preventDefault();
pjax.request({ url: $(ev.currentTaget).attr('href') }).then(() => window.scrollTo(0, 0));
pjax.request(ev.currentTarget.getAttribute('href')).then(() => window.scrollTo(0, 0));
});
$(document).on('vjContentNew', (e) => {
createHint('Hint::icon::difficulty', $(e.target).find('th.col--difficulty'))
createHint('Hint::icon::difficulty', $(e.target).find('th.col--difficulty'));
});
createHint('Hint::icon::difficulty', $(document).find('th.col--difficulty'))
createHint('Hint::icon::difficulty', $(document).find('th.col--difficulty'));
});
export default page;
+1
View File
@@ -48,6 +48,7 @@ function decProgress() {
}
pjax.request = async (opt) => {
if (typeof opt === 'string') opt = { url: opt };
const options = {
method: 'get',
push: true,