Commits

Sebastian Sdorra committed dcb9ef0

added link for group tab

Comments (0)

Files changed (2)

scm-webapp/src/main/webapp/index.html

 
     </div>
     <div id="west" class="x-hide-display">
-      <ul>
-        <li><a id="groups">Groups</a></li>
-      </ul>
+      <ul id="main-menu" />
     </div>
     <div id="settings">
       <ul>

scm-webapp/src/main/webapp/resources/js/layout.js

   ]});
 
   function addGroupPanel(){
-    console.log( 'addGroupPanel' );
     tabPanel.add({
       id: 't_group',
       xtype: 'groupGrid',
     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();
     }