mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
WIP new WebAdmin: fix back pagination in events page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -158,7 +158,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
const paginationData = new Map();
|
const paginationData = new Map();
|
||||||
|
|
||||||
function resetPagination() {
|
function resetPagination() {
|
||||||
$('#pagePrev').addClass("disabled");
|
$('#pagePrevious').addClass("disabled");
|
||||||
$('#pageNext').addClass("disabled");
|
$('#pageNext').addClass("disabled");
|
||||||
$('#paginationContainer').addClass("d-none");
|
$('#paginationContainer').addClass("d-none");
|
||||||
paginationData.delete("firstId");
|
paginationData.delete("firstId");
|
||||||
@@ -190,15 +190,15 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
data.pop();
|
data.pop();
|
||||||
length--;
|
length--;
|
||||||
if (isPrev || isNext){
|
if (isPrev || isNext){
|
||||||
$('#pagePrev').removeClass("disabled");
|
$('#pagePrevious').removeClass("disabled");
|
||||||
}
|
}
|
||||||
$('#pageNext').removeClass("disabled");
|
$('#pageNext').removeClass("disabled");
|
||||||
} else {
|
} else {
|
||||||
if (isPrev){
|
if (isPrev){
|
||||||
$('#pagePrev').addClass("disabled");
|
$('#pagePrevious').addClass("disabled");
|
||||||
$('#pageNext').removeClass("disabled");
|
$('#pageNext').removeClass("disabled");
|
||||||
} else if (isNext){
|
} else if (isNext){
|
||||||
$('#pagePrev').removeClass("disabled");
|
$('#pagePrevious').removeClass("disabled");
|
||||||
$('#pageNext').addClass("disabled");
|
$('#pageNext').addClass("disabled");
|
||||||
} else {
|
} else {
|
||||||
$('#pageNext').addClass("disabled");
|
$('#pageNext').addClass("disabled");
|
||||||
@@ -221,12 +221,13 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
|
|
||||||
function humanizeMilliseconds(val) {
|
function humanizeMilliseconds(val) {
|
||||||
let units = ["d", "h", "m", "s", "ms"];
|
let units = ["d", "h", "m", "s", "ms"];
|
||||||
if (val > 60000){
|
if (val > 1000){
|
||||||
units = ["d", "h", "m", "s"]
|
units = ["d", "h", "m", "s"]
|
||||||
}
|
}
|
||||||
return humanizeDuration(val, {
|
return humanizeDuration(val, {
|
||||||
language: i18next.resolvedLanguage,
|
language: i18next.resolvedLanguage,
|
||||||
fallbacks: ["en"],
|
fallbacks: ["en"],
|
||||||
|
maxDecimalPoints: 1,
|
||||||
units: units
|
units: units
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user