mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
call history init after login to get bookmarkable pages for installations without public access
This commit is contained in:
@@ -112,4 +112,4 @@ var main = null;
|
||||
Ext.QuickTips.init();
|
||||
|
||||
// enable history
|
||||
Ext.History.init();
|
||||
// Ext.History.init();
|
||||
@@ -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);
|
||||
}
|
||||
if (token && token != 'null'){
|
||||
Sonia.History.onChange(token);
|
||||
}, 750);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user