call history init after login to get bookmarkable pages for installations without public access

This commit is contained in:
Sebastian Sdorra
2011-11-19 18:02:22 +01:00
parent fa460a6549
commit d9422d2e50
3 changed files with 7 additions and 14 deletions

View File

@@ -112,4 +112,4 @@ var main = null;
Ext.QuickTips.init();
// enable history
Ext.History.init();
// Ext.History.init();

View File

@@ -32,7 +32,6 @@ Ext.ns('Sonia');
Sonia.History = {
initialized: false,
historyElements: [],
recentlyAdded: [],
recentlyChanged: [],
@@ -133,9 +132,6 @@ Sonia.History = {
},
onChange: function(token){
if (!this.initialized){
this.initialized = true;
}
if(token){
if (this.isInvokeable(this.recentlyAdded, token)){
var parts = token.split('|');
@@ -173,15 +169,8 @@ Sonia.History = {
Ext.History.on('ready', function(history){
var token = history.getToken();
if (!token || token == 'null'){
Sonia.History.initialized = true;
} else {
setTimeout(function(){
if (debug){
console.debug('history ready, handle history token ' + token);
}
Sonia.History.onChange(token);
}, 750);
if (token && token != 'null'){
Sonia.History.onChange(token);
}
});

View File

@@ -528,6 +528,10 @@ Ext.onReady(function(){
main.addListeners('login', loginCallbacks);
main.addListeners('logout', logoutCallbacks);
main.addListeners('login', function(){
Ext.History.init();
});
main.init();
main.checkLogin();
});