From 3a56af99c0884b852bfbfad645763f8f828a1db5 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 9 Mar 2010 23:40:29 +0000 Subject: [PATCH] add the toolbar for the filebrowser in initComponent add a browse button to MoveStorage --- .../ui/web/js/deluge-all/Deluge.FileBrowser.js | 18 +++++++++++------- .../ui/web/js/deluge-all/Deluge.MoveStorage.js | 11 +++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Deluge.FileBrowser.js b/deluge/ui/web/js/deluge-all/Deluge.FileBrowser.js index acebb5154..acabf2c7d 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.FileBrowser.js +++ b/deluge/ui/web/js/deluge-all/Deluge.FileBrowser.js @@ -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' + }] + }); } }); diff --git a/deluge/ui/web/js/deluge-all/Deluge.MoveStorage.js b/deluge/ui/web/js/deluge-all/Deluge.MoveStorage.js index f38ab986c..87cfb08af 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.MoveStorage.js +++ b/deluge/ui/web/js/deluge-all/Deluge.MoveStorage.js @@ -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() {