Fix project sort initialization [SCI-8756]

This commit is contained in:
Martin Artnik 2023-06-27 15:18:12 +02:00
parent 272baeb93e
commit 39aedd86e0
2 changed files with 4 additions and 4 deletions

View file

@ -462,6 +462,7 @@ var ProjectsIndex = (function() {
updateProjectsToolbar();
initProjectsFilters();
initSorting();
// set current sort item
if (projectsCurrentSort) {
@ -535,7 +536,7 @@ var ProjectsIndex = (function() {
}
function initSorting() {
$(document).on('click', '#sortMenuDropdown a', function() {
$('#sortMenuDropdown a').on('click', function() {
if (projectsCurrentSort !== $(this).data('sort')) {
$('#sortMenuDropdown a').removeClass('selected');
projectsCurrentSort = $(this).data('sort');
@ -708,7 +709,6 @@ var ProjectsIndex = (function() {
initEditButton();
initMoveButton();
initProjectsViewModeSwitch();
initSorting();
initSelectAllCheckbox();
initArchiveRestoreButton();
loadCardsView();

View file

@ -124,8 +124,8 @@
}
});
},
error: function() {
viewContainer.html('Error loading project list');
error: function(e) {
viewContainer.html('Error loading experiment list');
},
complete: function() {
updateSelectAllCheckbox();