added Sonia.hg.InformationPanel

This commit is contained in:
Sebastian Sdorra
2011-04-29 14:12:47 +02:00
parent 3ae6866865
commit 21f825bd74

View File

@@ -165,6 +165,36 @@ Sonia.hg.ConfigPanel = Ext.extend(Sonia.config.ConfigForm, {
Ext.reg("hgConfigPanel", Sonia.hg.ConfigPanel);
// hg information panel
Sonia.hg.InformationPanel = Ext.extend(Sonia.repository.InfoPanel,{
checkoutTemplate: 'hg clone <a href="{0}" target="_blank">{0}</a>',
modifyDefaultConfig: function(config){
var items = config.items;
if ( items == null ){
items = [];
}
items.push({
xtype: 'label',
text: 'Checkout: '
},{
xtype: 'box',
html: String.format(
this.checkoutTemplate,
this.getRepositoryUrlWithUsername()
)
},
this.createSpacer(),
this.createChangesetViewerLink()
);
}
});
Ext.reg("hgRepositoryInfoPanel", Sonia.hg.InformationPanel);
// i18n
if ( i18n != null && i18n.country == 'de' ){
@@ -194,7 +224,15 @@ if ( i18n != null && i18n.country == 'de' ){
}
// register panel
// register information panel
initCallbacks.push(function(main){
main.registerInfoPanel('hg', {
xtype: 'hgRepositoryInfoPanel'
});
});
// register config panel
registerConfigPanel({
id: 'hgConfigForm',