fix history bug

This commit is contained in:
Sebastian Sdorra
2011-08-22 15:57:43 +02:00
parent 82e7589538
commit fa03332fe6
2 changed files with 26 additions and 6 deletions

View File

@@ -38,13 +38,28 @@ Sonia.History = {
recentlyChanged: [],
add: function(token){
if ( debug ){
console.debug('add history element ' + token);
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);
}
}
if (this.isInvokeable(this.recentlyChanged, token)){
this.recentlyAdded.push(token);
Ext.History.add(token, true);
},
createToken: function(elements){
var token = '';
if (Ext.isArray(elements)){
for (var i=0; i<elements.length; i++){
token += elements[i];
if ( (i+1)<elements.length ){
token += '|';
}
}
}
return token;
},
append: function(item){