added icons to add,remove and reload toolbars

This commit is contained in:
Sebastian Sdorra
2011-07-06 18:54:40 +02:00
parent 1e862fb8ca
commit 72885c6f67
5 changed files with 12 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -42,10 +42,10 @@ Sonia.group.Panel = Ext.extend(Sonia.rest.Panel, {
initComponent: function(){ initComponent: function(){
var config = { var config = {
tbar: [ tbar: [
{xtype: 'tbbutton', text: this.addText, scope: this, handler: this.showAddForm}, {xtype: 'tbbutton', text: this.addText, icon: this.addIcon, scope: this, handler: this.showAddForm},
{xtype: 'tbbutton', id: 'groupRmButton', disabled: true, text: this.removeText, scope: this, handler: this.removeGroup}, {xtype: 'tbbutton', id: 'groupRmButton', disabled: true, text: this.removeText, icon: this.removeIcon, scope: this, handler: this.removeGroup},
'-', '-',
{xtype: 'tbbutton', text: this.reloadText, scope: this, handler: this.reload} {xtype: 'tbbutton', text: this.reloadText, icon: this.reloadIcon, scope: this, handler: this.reload}
], ],
items: [{ items: [{
id: 'groupGrid', id: 'groupGrid',

View File

@@ -45,13 +45,13 @@ Sonia.repository.Panel = Ext.extend(Sonia.rest.Panel, {
var toolbar = []; var toolbar = [];
if ( admin ){ if ( admin ){
toolbar.push( toolbar.push(
{xtype: 'tbbutton', text: this.addText, scope: this, handler: this.showAddForm} {xtype: 'tbbutton', text: this.addText, icon: this.addIcon, scope: this, handler: this.showAddForm}
); );
} }
toolbar.push( toolbar.push(
{xtype: 'tbbutton', id: 'repoRmButton', disabled: true, text: this.removeText, scope: this, handler: this.removeRepository}, {xtype: 'tbbutton', id: 'repoRmButton', disabled: true, text: this.removeText, icon: this.removeIcon, scope: this, handler: this.removeRepository},
'-', '-',
{xtype: 'tbbutton', text: this.reloadText, scope: this, handler: this.reload} {xtype: 'tbbutton', text: this.reloadText, icon: this.reloadIcon, scope: this, handler: this.reload}
); );
var config = { var config = {

View File

@@ -38,9 +38,9 @@ Sonia.rest.Panel = Ext.extend(Ext.Panel, {
reloadText: 'Reload', reloadText: 'Reload',
// icons // icons
addIcon: '', addIcon: 'resources/images/add.gif',
removeIcon: '', removeIcon: 'resources/images/delete.gif',
reloadIcon: '', reloadIcon: 'resources/images/reload.gif',
initComponent: function(){ initComponent: function(){

View File

@@ -44,10 +44,10 @@ Sonia.user.Panel = Ext.extend(Sonia.rest.Panel, {
var config = { var config = {
bodyCssClass: 'x-panel-mc', bodyCssClass: 'x-panel-mc',
tbar: [ tbar: [
{xtype: 'tbbutton', text: this.addText, scope: this, handler: this.showAddPanel}, {xtype: 'tbbutton', text: this.addText, icon: this.addIcon, scope: this, handler: this.showAddPanel},
{xtype: 'tbbutton', text: this.removeText, scope: this, handler: this.removeUser}, {xtype: 'tbbutton', text: this.removeText, icon: this.removeIcon, scope: this, handler: this.removeUser},
'-', '-',
{xtype: 'tbbutton', text: this.reloadText, scope: this, handler: this.reload} {xtype: 'tbbutton', text: this.reloadText, icon: this.reloadIcon, scope: this, handler: this.reload}
], ],
items: [{ items: [{
id: 'userGrid', id: 'userGrid',