From 0183f277ddb031b358d772c699d4920b89a137aa Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 22 Nov 2011 19:46:16 +0100 Subject: [PATCH] append new history tokens after login --- .../main/webapp/resources/js/sonia.history.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.history.js b/scm-webapp/src/main/webapp/resources/js/sonia.history.js index b9781c4794..895c89df39 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.history.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.history.js @@ -32,18 +32,22 @@ Ext.ns('Sonia'); Sonia.History = { + initialized: false, + historyElements: [], recentlyAdded: [], recentlyChanged: [], add: function(token){ - if (token != Ext.History.getToken()){ - if (this.isInvokeable(this.recentlyChanged, token)){ - if ( debug ){ - console.debug('add history element ' + token); + if (this.initialized){ + if (token != Ext.History.getToken()){ + if (this.isInvokeable(this.recentlyChanged, token)){ + if ( debug ){ + console.debug('add history element ' + token); + } + this.recentlyAdded.push(token); + Ext.History.add(token, true); } - this.recentlyAdded.push(token); - Ext.History.add(token, true); } } }, @@ -170,6 +174,7 @@ Ext.History.on('ready', function(history){ if (token && token != 'null'){ Sonia.History.onChange(token); } + Sonia.History.initialized = true; }); Ext.History.on('change', function(token){