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();
|
Ext.QuickTips.init();
|
||||||
|
|
||||||
// enable history
|
// enable history
|
||||||
Ext.History.init();
|
// Ext.History.init();
|
||||||
@@ -32,7 +32,6 @@ Ext.ns('Sonia');
|
|||||||
|
|
||||||
Sonia.History = {
|
Sonia.History = {
|
||||||
|
|
||||||
initialized: false,
|
|
||||||
historyElements: [],
|
historyElements: [],
|
||||||
recentlyAdded: [],
|
recentlyAdded: [],
|
||||||
recentlyChanged: [],
|
recentlyChanged: [],
|
||||||
@@ -133,9 +132,6 @@ Sonia.History = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onChange: function(token){
|
onChange: function(token){
|
||||||
if (!this.initialized){
|
|
||||||
this.initialized = true;
|
|
||||||
}
|
|
||||||
if(token){
|
if(token){
|
||||||
if (this.isInvokeable(this.recentlyAdded, token)){
|
if (this.isInvokeable(this.recentlyAdded, token)){
|
||||||
var parts = token.split('|');
|
var parts = token.split('|');
|
||||||
@@ -173,15 +169,8 @@ Sonia.History = {
|
|||||||
|
|
||||||
Ext.History.on('ready', function(history){
|
Ext.History.on('ready', function(history){
|
||||||
var token = history.getToken();
|
var token = history.getToken();
|
||||||
if (!token || token == 'null'){
|
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);
|
Sonia.History.onChange(token);
|
||||||
}, 750);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -528,6 +528,10 @@ Ext.onReady(function(){
|
|||||||
main.addListeners('login', loginCallbacks);
|
main.addListeners('login', loginCallbacks);
|
||||||
main.addListeners('logout', logoutCallbacks);
|
main.addListeners('logout', logoutCallbacks);
|
||||||
|
|
||||||
|
main.addListeners('login', function(){
|
||||||
|
Ext.History.init();
|
||||||
|
});
|
||||||
|
|
||||||
main.init();
|
main.init();
|
||||||
main.checkLogin();
|
main.checkLogin();
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user