add the toolbar for the filebrowser in initComponent

add a browse button to MoveStorage
This commit is contained in:
Damien Churchill 2010-03-09 23:40:29 +00:00
parent c1bf8c1da1
commit 3a56af99c0
2 changed files with 22 additions and 7 deletions

View File

@ -6,15 +6,19 @@ Deluge.FileBrowser = Ext.extend(Ext.Window, {
width: 500,
height: 400,
tbar: {
items: [{
cls: 'x-btn-icon',
iconCls: 'icon-back'
}]
},
initComponent: function() {
Deluge.FileBrowser.superclass.initComponent.call(this);
this.add({
xtype: 'toolbar',
items: [{
cls: 'x-btn-icon',
iconCls: 'icon-back'
}, {
cls: 'x-btn-icon',
iconCls: 'icon-forward'
}]
});
}
});

View File

@ -69,6 +69,17 @@ Ext.deluge.MoveStorage = Ext.extend(Ext.Window, {
name: 'location',
width: 240
});
this.form.add({
xtype: 'button',
text: _('Browse'),
handler: function() {
if (!this.fileBrowser) {
this.fileBrowser = new Deluge.FileBrowser();
}
this.fileBrowser.show();
},
scope: this
});
},
hide: function() {