Module: deluge Branch: master Commit: 3a56af99c0884b852bfbfad645763f8f828a1db5
Author: Damien Churchill <[email protected]> Date: Tue Mar 9 23:40:29 2010 +0000 add the toolbar for the filebrowser in initComponent add a browse button to MoveStorage --- deluge/ui/web/js/deluge-all/Deluge.FileBrowser.js | 18 +++++++++++------- deluge/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 acebb51..acabf2c 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 f38ab98..87cfb08 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() { -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
