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}',
|
changesetViewerTitleText: 'Commits {0}',
|
||||||
|
|
||||||
initComponent: function(){
|
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({
|
this.changesetStore = new Sonia.rest.JsonStore({
|
||||||
id: 'changesetStore',
|
id: 'changesetStore',
|
||||||
|
|||||||
@@ -38,13 +38,28 @@ Sonia.History = {
|
|||||||
recentlyChanged: [],
|
recentlyChanged: [],
|
||||||
|
|
||||||
add: function(token){
|
add: function(token){
|
||||||
if ( debug ){
|
if (token != Ext.History.getToken()){
|
||||||
console.debug('add history element ' + token);
|
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){
|
append: function(item){
|
||||||
|
|||||||
Reference in New Issue
Block a user