diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 2e149e30b..83374a660 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -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(); diff --git a/app/assets/javascripts/projects/show.js b/app/assets/javascripts/projects/show.js index 1c6c3f875..d5fd2aaee 100644 --- a/app/assets/javascripts/projects/show.js +++ b/app/assets/javascripts/projects/show.js @@ -124,8 +124,8 @@ } }); }, - error: function() { - viewContainer.html('Error loading project list'); + error: function(e) { + viewContainer.html('Error loading experiment list'); }, complete: function() { updateSelectAllCheckbox();