mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
create id for content panel
This commit is contained in:
@@ -107,9 +107,13 @@ Sonia.repository.BlamePanel = Ext.extend(Ext.grid.GridPanel, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
openContentPanel: function(revision){
|
openContentPanel: function(revision){
|
||||||
|
var id = Sonia.repository.createContentId(
|
||||||
|
this.repository,
|
||||||
|
this.path,
|
||||||
|
revision
|
||||||
|
);
|
||||||
main.addTab({
|
main.addTab({
|
||||||
// TODO create real id
|
id: id,
|
||||||
id: Ext.id(),
|
|
||||||
xtype: 'contentPanel',
|
xtype: 'contentPanel',
|
||||||
repository: this.repository,
|
repository: this.repository,
|
||||||
revision: revision,
|
revision: revision,
|
||||||
|
|||||||
@@ -57,6 +57,14 @@ Sonia.repository.createContentUrl = function(repository, path, revision){
|
|||||||
return contentUrl;
|
return contentUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Sonia.repository.createContentId = function(repository, path, revision){
|
||||||
|
var id = repository.id + '-b-' + path;
|
||||||
|
if ( revision ){
|
||||||
|
id += '-r-' + revision;
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
Sonia.repository.isOwner = function(repository){
|
Sonia.repository.isOwner = function(repository){
|
||||||
return admin || repository.permissions != null;
|
return admin || repository.permissions != null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,8 +221,14 @@ Sonia.repository.RepositoryBrowser = Ext.extend(Ext.grid.GridPanel, {
|
|||||||
console.debug( 'open file: ' + path );
|
console.debug( 'open file: ' + path );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var id = Sonia.repository.createContentId(
|
||||||
|
this.repository,
|
||||||
|
path,
|
||||||
|
this.revision
|
||||||
|
);
|
||||||
|
|
||||||
main.addTab({
|
main.addTab({
|
||||||
id: this.repository.id + "-b-" + path,
|
id: id,
|
||||||
path: path,
|
path: path,
|
||||||
revision: this.revision,
|
revision: this.revision,
|
||||||
repository: this.repository,
|
repository: this.repository,
|
||||||
|
|||||||
Reference in New Issue
Block a user