mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
related to #1465 removing the lines when api is called and added spinner during infos fetch time
This commit is contained in:
committed by
plegall
parent
a23167f98c
commit
ab7b6ecb29
@@ -76,7 +76,6 @@ $(document).ready(() => {
|
||||
});
|
||||
|
||||
$(".refresh-results").on("click", function () {
|
||||
$(this).addClass("animate-spin")
|
||||
fillHistoryResult(current_param);
|
||||
})
|
||||
})
|
||||
@@ -166,14 +165,18 @@ function fillSummaryResult(summary) {
|
||||
|
||||
function fillHistoryResult(ajaxParam) {
|
||||
// console.log(current_param);
|
||||
|
||||
// $(".tab .search-line").remove();
|
||||
$.ajax({
|
||||
url: API_METHOD,
|
||||
method: "POST",
|
||||
dataType: "JSON",
|
||||
data: ajaxParam,
|
||||
success: function (raw_data) {
|
||||
beforeSend: function () {
|
||||
$(".tab .search-line").remove();
|
||||
$(".loading").removeClass("hide");
|
||||
},
|
||||
success: function (raw_data) {
|
||||
|
||||
data = raw_data.result["lines"];
|
||||
imageDisplay = raw_data.result["params"].display_thumbnail;
|
||||
maxPage = raw_data.result["maxPage"];
|
||||
@@ -181,7 +184,7 @@ function fillHistoryResult(ajaxParam) {
|
||||
// console.log(raw_data);
|
||||
|
||||
//clear lines before refill
|
||||
$(".tab .search-line").remove();
|
||||
|
||||
|
||||
var id = 0;
|
||||
data.forEach(line => {
|
||||
@@ -198,7 +201,6 @@ function fillHistoryResult(ajaxParam) {
|
||||
activateLineOptions();
|
||||
$(".loading").addClass("hide");
|
||||
updatePagination(maxPage);
|
||||
$(".refresh-results").removeClass("animate-spin")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -677,4 +677,8 @@ jQuery(document).ready( function() {
|
||||
#start_unset:hover, #end_unset:hover {
|
||||
color: #ffa500;
|
||||
}
|
||||
|
||||
.loading {
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user