diff --git a/scm-webapp/src/main/webapp/index.html b/scm-webapp/src/main/webapp/index.html
index a69c3e2fdb..77242c190a 100644
--- a/scm-webapp/src/main/webapp/index.html
+++ b/scm-webapp/src/main/webapp/index.html
@@ -39,9 +39,7 @@
diff --git a/scm-webapp/src/main/webapp/resources/js/layout.js b/scm-webapp/src/main/webapp/resources/js/layout.js
index ae15a01e4a..1b3c433834 100644
--- a/scm-webapp/src/main/webapp/resources/js/layout.js
+++ b/scm-webapp/src/main/webapp/resources/js/layout.js
@@ -74,7 +74,6 @@ Ext.onReady(function(){
]});
function addGroupPanel(){
- console.log( 'addGroupPanel' );
tabPanel.add({
id: 't_group',
xtype: 'groupGrid',
@@ -85,16 +84,25 @@ Ext.onReady(function(){
tabPanel.setActiveTab('t_group');
}
+ function createMainMenu(){
+ var menu = Ext.get( 'main-menu' );
+ var groupsLink = menu.createChild({
+ tag: 'li',
+ html: 'Groups'
+ });
+ groupsLink.on('click', addGroupPanel);
+ }
+
Ext.Ajax.request({
url: restUrl + 'authentication.json',
method: 'GET',
success: function(){
- addGroupPanel();
+ createMainMenu();
},
failure: function(){
var loginWin = new Sonia.login.Window();
loginWin.on('success', function(){
- addGroupPanel();
+ createMainMenu();
});
loginWin.show();
}