Skip to content

Commit

Permalink
Merge branch 'development' into portal-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Jan 16, 2025
2 parents 74e748a + ae659a3 commit 7a2cb98
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions group_manager/static/group_manager/js/group_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,6 @@ async function processImportedRow (row) {

// if all is complete reload the left pane with data and setup click capability to open newly added groups in the groupmananger
if ($('.import-groupname').length === $('.import-groupname-done').length) {
// only enable new groups that have been successfully added
$('.import-csv-group-ok').on('click', function () {
const groupName = 'research-' + $(this).attr('groupname')
$('#dlg-import-groups-csv').modal('hide')
Yoda.groupManager.unfoldToGroup(groupName)
Yoda.groupManager.selectGroup(groupName)
})

// Renew the data of the left pane as new groups have been added not yet loaded.
Yoda.call('group_data').then((groupdata) => {
Yoda.groupManager.groupHierarchy = groupdata.group_hierarchy
Expand Down Expand Up @@ -498,6 +490,13 @@ async function processImportedRow (row) {
catIdx = catIdx + 1
}
$('#group-list').html(html)

// Get the selected group if exists and reselect it to get the changes.
// If no active group, no group is selected.
const activeGroupName = Yoda.storage.session.get('selected-group')
if (activeGroupName) {
Yoda.groupManager.selectGroup(activeGroupName)
}
})
}
}
Expand Down

0 comments on commit 7a2cb98

Please sign in to comment.