mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Fix dashboard infinite scroll [SCI-5462]
This commit is contained in:
parent
bb93df004a
commit
0609e9699d
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ var DasboardCurrentTasksWidget = (function() {
|
|||
function appendTasksList(json, container) {
|
||||
$.each(json.data, (i, task) => {
|
||||
var currentTaskItem = task;
|
||||
$(container).append(currentTaskItem);
|
||||
$(container).find('.current-tasks-list').append(currentTaskItem);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ var DasboardCurrentTasksWidget = (function() {
|
|||
}
|
||||
|
||||
function initInfiniteScroll() {
|
||||
InfiniteScroll.init('.current-tasks-list', {
|
||||
InfiniteScroll.init('.current-tasks-list-wrapper', {
|
||||
url: $('.current-tasks-list').data('tasksListUrl'),
|
||||
customResponse: (json, container) => {
|
||||
appendTasksList(json, container);
|
||||
|
@ -136,7 +136,7 @@ var DasboardCurrentTasksWidget = (function() {
|
|||
}
|
||||
appendTasksList(result, $currentTasksList);
|
||||
PerfectSb().update_all();
|
||||
if (newList) InfiniteScroll.resetScroll('.current-tasks-list');
|
||||
if (newList) InfiniteScroll.resetScroll('.current-tasks-list-wrapper');
|
||||
animateSpinner($currentTasksList, false);
|
||||
}).error(function(error) {
|
||||
// If error is 403, it is possible that the user was removed from project/experiment,
|
||||
|
|
Loading…
Reference in a new issue