mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
fix history bug
This commit is contained in:
@@ -41,7 +41,12 @@ Sonia.repository.ChangesetViewerPanel = Ext.extend(Ext.Panel, {
|
||||
changesetViewerTitleText: 'Commits {0}',
|
||||
|
||||
initComponent: function(){
|
||||
this.historyId = 'changesetviewer|' + this.repository.id;
|
||||
this.historyId = Sonia.History.createToken([
|
||||
'changesetviewer',
|
||||
this.repository.id,
|
||||
this.start,
|
||||
this.pageSize
|
||||
]);
|
||||
|
||||
this.changesetStore = new Sonia.rest.JsonStore({
|
||||
id: 'changesetStore',
|
||||
|
||||
@@ -38,13 +38,28 @@ Sonia.History = {
|
||||
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.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){
|
||||
|
||||
Reference in New Issue
Block a user