From f2d8ac31bb85e5322a4ce94fca7294963ba63d28 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 4 Nov 2010 19:41:07 +0100 Subject: [PATCH] remove repositoryTypes from sonia.global.js --- .../src/main/webapp/resources/js/sonia.global.js | 8 -------- .../src/main/webapp/resources/js/sonia.scm.js | 14 +++++++++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.global.js b/scm-webapp/src/main/webapp/resources/js/sonia.global.js index 79515174aa..2c350a1afa 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.global.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.global.js @@ -39,12 +39,6 @@ var loginCallbacks = []; // function called after logout var logoutCallbacks = []; -// TODO: move to sonia.repository.js -var repositoryTypeStore = new Ext.data.JsonStore({ - id: 1, - fields: [ 'displayName', 'name' ] -}); - var restUrl = "api/rest/"; function loadState(s){ @@ -52,8 +46,6 @@ function loadState(s){ console.debug( s ); } state = s; - // load repository types from callback - repositoryTypeStore.loadData(state.repositoryTypes); // call login callback functions Ext.each(loginCallbacks, function(callback){ if ( Ext.isFunction(callback) ){ diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js index 62e3fe947c..6aac89b606 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js @@ -90,7 +90,19 @@ Ext.onReady(function(){ } }); -// methods called after login + // adds a tab to main TabPanel + function addTabPanel(id, xtype, title){ + mainTabPanel.add({ + id: id, + xtype: xtype, + title: title, + closable: true, + autoScroll: true + }); + mainTabPanel.setActiveTab(id); + } + + // methods called after login function createMainMenu(){ if ( debug ){