change BLANK_IMAGE_URL to /images/s.gif rather than http://extjs.com/s.gif

begin converting D.P.D to a class
This commit is contained in:
Damien Churchill 2009-07-16 13:25:00 +00:00
commit 8fbe456410
3 changed files with 76 additions and 37 deletions

View file

@ -1,39 +1,76 @@
Deluge.Preferences.addPage({ (function() {
DownloadPanel = Ext.extend(Ext.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
title: _('Downloads'), title: _('Downloads'),
xtype: 'form', layout: 'form'
layout: 'form', }, config);
items: [{ DownloadPanel.superclass.constructor.call(this, config);
},
initComponent: function() {
DownloadPanel.superclass.initComponent.call(this);
this.fieldsets = {}
this.fields = {};
this.fieldsets['folders'] = this.add({
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Folders'), title: _('Folders'),
labelWidth: 140, labelWidth: 140,
defaultType: 'textfield', defaultType: 'textfield',
autoHeight: true, autoHeight: true
items: [{ });
this.fields['download_location'] = this.fieldsets['folders'].add({
name: 'download_location', name: 'download_location',
fieldLabel: _('Download to'), fieldLabel: _('Download to'),
width: 125 width: 125
}, { });
this.fields['move_completed'] = this.fieldsets['folders'].add({
name: 'move_completed', name: 'move_completed',
fieldLabel: _('Move completed to'), fieldLabel: _('Move completed to'),
width: 125 width: 125
}, { });
this.fields['copy_torrent_files'] = this.fieldsets['folders'].add({
name: 'copy_torrent_files', name: 'copy_torrent_files',
fieldLabel: _('Copy of .torrent files to'), fieldLabel: _('Copy of .torrent files to'),
width: 125 width: 125
}] });
}, {
this.fieldsets['allocation'] = this.add({
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Allocation'), title: _('Allocation'),
autoHeight: true, autoHeight: true,
labelWidth: 1, labelWidth: 1,
defaultType: 'radio', defaultType: 'radio'
items: [{ });
this.fields['compact_allocation'] = this.fieldsets['allocation'].add({
name: 'compact_allocation', name: 'compact_allocation',
labelSeparator: '', labelSeparator: '',
boxLabel: _('Compact') boxLabel: _('Compact')
});
},
onShow: function() {
DownloadPanel.superclass.onShow.call(this);
}
});
Deluge.Preferences.addPage(new DownloadPanel());
})();
/*Deluge.Preferences.addPage({
items: [, {
items: [{
}, { }, {
name: 'compact_allocation', name: 'compact_allocation',
labelSeparator: '', labelSeparator: '',
@ -56,4 +93,4 @@ Deluge.Preferences.addPage({
boxLabel: _('Add torrents in Paused state') boxLabel: _('Add torrents in Paused state')
}] }]
}] }]
}); });*/

View file

@ -60,6 +60,8 @@ Ext.namespace('Ext.deluge');
} }
}); });
Ext.getKeys = Ext.keys; Ext.getKeys = Ext.keys;
Ext.BLANK_IMAGE_URL = '/images/s.gif';
})(); })();
(function() { (function() {

File diff suppressed because one or more lines are too long