mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
added reload button to plugin grid
This commit is contained in:
@@ -36,6 +36,7 @@ Sonia.plugin.CenterInstance = new Sonia.plugin.Center();
|
|||||||
// plugin grid
|
// plugin grid
|
||||||
Sonia.plugin.Grid = Ext.extend(Sonia.rest.Grid, {
|
Sonia.plugin.Grid = Ext.extend(Sonia.rest.Grid, {
|
||||||
|
|
||||||
|
// columns
|
||||||
colNameText: 'Name',
|
colNameText: 'Name',
|
||||||
colAuthorText: 'Author',
|
colAuthorText: 'Author',
|
||||||
colDescriptionText: 'Description',
|
colDescriptionText: 'Description',
|
||||||
@@ -43,7 +44,12 @@ Sonia.plugin.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
colActionText: 'Action',
|
colActionText: 'Action',
|
||||||
colUrlText: 'Url',
|
colUrlText: 'Url',
|
||||||
colCategoryText: 'Category',
|
colCategoryText: 'Category',
|
||||||
|
|
||||||
|
// grid
|
||||||
emptyText: 'No plugins avaiable',
|
emptyText: 'No plugins avaiable',
|
||||||
|
|
||||||
|
// buttons
|
||||||
|
btnReload: 'Reload',
|
||||||
|
|
||||||
actionLinkTemplate: '<a style="cursor: pointer;" onclick="Sonia.plugin.CenterInstance.{1}(\'{2}\')">{0}</a>',
|
actionLinkTemplate: '<a style="cursor: pointer;" onclick="Sonia.plugin.CenterInstance.{1}(\'{2}\')">{0}</a>',
|
||||||
|
|
||||||
@@ -99,7 +105,15 @@ Sonia.plugin.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
forceFit: true,
|
forceFit: true,
|
||||||
enableGroupingMenu: false,
|
enableGroupingMenu: false,
|
||||||
groupTextTpl: '{group} ({[values.rs.length]} {[values.rs.length > 1 ? "Plugins" : "Plugin"]})'
|
groupTextTpl: '{group} ({[values.rs.length]} {[values.rs.length > 1 ? "Plugins" : "Plugin"]})'
|
||||||
})
|
}),
|
||||||
|
tbar: [{
|
||||||
|
text: this.btnReload,
|
||||||
|
icon: 'resources/images/reload.png',
|
||||||
|
handler: function(){
|
||||||
|
this.getStore().reload();
|
||||||
|
},
|
||||||
|
scope: this
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
Sonia.plugin.CenterInstance.addListener('changed', function(){
|
Sonia.plugin.CenterInstance.addListener('changed', function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user