mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: fix pagination
This commit is contained in:
1 parent
9f378226c9
commit
2b86898b26
3 files changed
+5
-4
No files matched your search
@@ -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;
|
||||
@@ -48,6 +48,7 @@ function decProgress() {
|
||||
}
|
||||
|
||||
pjax.request = async (opt) => {
|
||||
if (typeof opt === 'string') opt = { url: opt };
|
||||
const options = {
|
||||
method: 'get',
|
||||
push: true,
|
||||
|
||||
Reference in new issue
Block a user