mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
merge with branch issue-287
This commit is contained in:
@@ -203,20 +203,28 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, {
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
getChangesetId: function(id, record){
|
||||
return id;
|
||||
},
|
||||
|
||||
getParentIds: function(id, record){
|
||||
return record.get('parents');
|
||||
},
|
||||
|
||||
renderIds: function(value, p, record){
|
||||
var parent = null;
|
||||
var parents = this.getParentIds(value, record);
|
||||
var parent1 = null;
|
||||
var parent2 = null;
|
||||
var parents = record.get('parents');
|
||||
if ( parents ){
|
||||
parent = parents[0];
|
||||
if ( parents.length >= 1 ){
|
||||
parent1 = parents[0];
|
||||
if (parents.length > 1){
|
||||
parent2 = parents[1];
|
||||
}
|
||||
}
|
||||
return this.idsTemplate.apply({
|
||||
id: value,
|
||||
parent: parent,
|
||||
id: this.getChangesetId(value, record),
|
||||
parent: parent1,
|
||||
parent2: parent2
|
||||
});
|
||||
},
|
||||
|
||||
@@ -178,4 +178,18 @@ if (!Array.prototype.filter) {
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Sonia.util.getProperty = function(properties, key){
|
||||
var value = null;
|
||||
if ( properties != null ){
|
||||
for (var i=0; i<properties.length; i++){
|
||||
var property = properties[i];
|
||||
if ( property.key == key ){
|
||||
value = property.value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user