mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-10 10:28:39 +00:00
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:
parent
6039280fb5
commit
692ec5bb1b
3 changed files with 14 additions and 16 deletions
|
@ -155,6 +155,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onFile: function() {
|
onFile: function() {
|
||||||
|
if (!this.file) this.file = new Deluge.add.FileWindow();
|
||||||
this.file.show();
|
this.file.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
closeAction: 'hide',
|
closeAction: 'hide',
|
||||||
bodyStyle: 'padding: 10px 5px;',
|
bodyStyle: 'padding: 10px 5px;',
|
||||||
iconCls: 'x-deluge-add-file'
|
iconCls: 'x-deluge-add-file',
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.add.FileWindow.superclass.initComponent.call(this);
|
Deluge.add.FileWindow.superclass.initComponent.call(this);
|
|
@ -32,21 +32,18 @@
|
||||||
|
|
||||||
Ext.namespace('Deluge.add');
|
Ext.namespace('Deluge.add');
|
||||||
Deluge.add.UrlWindow = Ext.extend(Deluge.add.Window, {
|
Deluge.add.UrlWindow = Ext.extend(Deluge.add.Window, {
|
||||||
constructor: function(config) {
|
|
||||||
config = Ext.apply({
|
title: _('Add from Url'),
|
||||||
|
modal: true,
|
||||||
|
plain: true,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
width: 350,
|
width: 350,
|
||||||
height: 155,
|
height: 155,
|
||||||
bodyStyle: 'padding: 10px 5px;',
|
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
closeAction: 'hide',
|
closeAction: 'hide',
|
||||||
modal: true,
|
bodyStyle: 'padding: 10px 5px;',
|
||||||
plain: true,
|
iconCls: 'x-deluge-add-url-window-icon',
|
||||||
title: _('Add from Url'),
|
|
||||||
iconCls: 'x-deluge-add-url-window-icon'
|
|
||||||
}, config);
|
|
||||||
Deluge.add.UrlWindow.superclass.constructor.call(this, config);
|
|
||||||
},
|
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.add.UrlWindow.superclass.initComponent.call(this);
|
Deluge.add.UrlWindow.superclass.initComponent.call(this);
|
Loading…
Add table
Add a link
Reference in a new issue