clean up the Url window a little bit and rename Url.js to UrlWindow.js

create the FileWindow on demand and change the filename to match the classname
This commit is contained in:
Damien Churchill 2010-03-31 11:56:21 +01:00
parent 6039280fb5
commit 692ec5bb1b
3 changed files with 14 additions and 16 deletions

View file

@ -155,6 +155,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, {
},
onFile: function() {
if (!this.file) this.file = new Deluge.add.FileWindow();
this.file.show();
},

View file

@ -46,7 +46,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
buttonAlign: 'center',
closeAction: 'hide',
bodyStyle: 'padding: 10px 5px;',
iconCls: 'x-deluge-add-file'
iconCls: 'x-deluge-add-file',
initComponent: function() {
Deluge.add.FileWindow.superclass.initComponent.call(this);

View file

@ -32,21 +32,18 @@
Ext.namespace('Deluge.add');
Deluge.add.UrlWindow = Ext.extend(Deluge.add.Window, {
constructor: function(config) {
config = Ext.apply({
layout: 'fit',
width: 350,
height: 155,
bodyStyle: 'padding: 10px 5px;',
buttonAlign: 'center',
closeAction: 'hide',
modal: true,
plain: true,
title: _('Add from Url'),
iconCls: 'x-deluge-add-url-window-icon'
}, config);
Deluge.add.UrlWindow.superclass.constructor.call(this, config);
},
title: _('Add from Url'),
modal: true,
plain: true,
layout: 'fit',
width: 350,
height: 155,
buttonAlign: 'center',
closeAction: 'hide',
bodyStyle: 'padding: 10px 5px;',
iconCls: 'x-deluge-add-url-window-icon',
initComponent: function() {
Deluge.add.UrlWindow.superclass.initComponent.call(this);