diff --git a/scm-webapp/src/main/webapp/resources/js/group/sonia.group.panel.js b/scm-webapp/src/main/webapp/resources/js/group/sonia.group.panel.js index 2370956fc5..f2971d16a8 100644 --- a/scm-webapp/src/main/webapp/resources/js/group/sonia.group.panel.js +++ b/scm-webapp/src/main/webapp/resources/js/group/sonia.group.panel.js @@ -181,16 +181,25 @@ Sonia.History.register('groupPanel', { return token; }, - onChange: function(repoId){ + onChange: function(groupId){ var panel = Ext.getCmp('groups'); if ( ! panel ){ main.addGroupsTabPanel(); panel = Ext.getCmp('groups'); + if (groupId){ + var selected = false; + panel.getGrid().getStore().addListener('load', function(){ + if (!selected){ + panel.getGrid().selectById(groupId); + selected = true; + } + }); + } } else { main.addTab(panel); - } - if (repoId){ - panel.getGrid().selectById(repoId); + if (groupId){ + panel.getGrid().selectById(groupId); + } } } }); \ No newline at end of file