start rebuilding of bookmarkable functions

This commit is contained in:
Sebastian Sdorra
2011-11-16 15:04:44 +01:00
parent f574d605e3
commit 026cda04ce
8 changed files with 132 additions and 182 deletions

View File

@@ -74,7 +74,6 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, {
this.addEvents('login', 'logout', 'init');
this.mainTabPanel = Ext.getCmp('mainTabPanel');
this.addListener('login', this.postLogin, this);
this.createHistory();
Sonia.scm.Main.superclass.constructor.call(this, config);
},
@@ -151,39 +150,6 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, {
this.addTabPanel('groups', 'groupPanel', this.tabGroupsText);
}
},
createHistory: function(){
Sonia.History.register('repositories', function(params){
this.addRepositoriesTabPanel();
var grid = Ext.getCmp('repositoryGrid');
if (grid){
grid.handleHistory(params);
} else if (debug){
console.debug('could not find repository grid');
}
}, this);
Sonia.History.register('scmConfig', this.addScmConfigTabPanel, this);
Sonia.History.register('repositoryConfig', this.addRepositoryConfigTabPanel, this);
Sonia.History.register('plugins', this.addPluginTabPanel, this);
Sonia.History.register('users', function(params){
this.addUsersTabPanel();
var grid = Ext.getCmp('userGrid');
if (grid){
grid.handleHistory(params);
} else if (debug){
console.debug('could not find user grid');
}
}, this);
Sonia.History.register('groups', function(params){
this.addGroupsTabPanel();
var grid = Ext.getCmp('groupGrid');
if (grid){
grid.handleHistory(params);
} else if (debug){
console.debug('could not find group grid');
}
}, this);
},
createMainMenu: function(){
if ( debug ){
@@ -510,10 +476,7 @@ Ext.onReady(function(){
listeners: {
tabchange: function(tabPanel, tab){
if ( Ext.isDefined(tab) ){
var id = tab.historyId ? tab.historyId : tab.id;
if (id){
Sonia.History.add(id, true);
}
Sonia.History.onActivate(tab);
}
}
}