Author: damoxc
Revision: 5047
Log:
fix page switching
Diff:
Modified: trunk/deluge/ui/web/js/deluge-preferences.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-preferences.js 2009-04-08 20:35:35 UTC
(rev 5046)
+++ trunk/deluge/ui/web/js/deluge-preferences.js 2009-04-08 21:25:46 UTC
(rev 5047)
@@ -90,16 +90,21 @@
addPage: function(name, page) {
var store = this.categoriesGrid.getStore();
store.loadData([[name]], true);
- this.pages[name] = page;
+ page['bodyStyle'] = 'margin: 5px';
+ page['hidden'] = true;
+ this.pages[name] = this.configPanel.add(page);
+ this.doLayout();
},
onPageSelect: function(selModel, rowIndex, r) {
- this.configPanel.removeAll();
- this.currentPage = rowIndex;
+ if (this.currentPage) {
+ this.currentPage.hide();
+ }
var name = r.get('name');
+
+ this.pages[name].show();
this.configPanel.setTitle(name);
- this.pages[name] =
this.configPanel.add(this.pages[name]);
- this.doLayout();
+ this.currentPage = this.pages[name];
},
onShow: function() {
@@ -125,7 +130,31 @@
});
Deluge.Preferences.addPage(_('Interface'), {
border: false,
- html: 'interface'
+ xtype: 'form',
+ items: [{
+ xtype: 'fieldset',
+ border: false,
+ title: _('Window'),
+ labelWidth: 10,
+ items: [{
+ xtype: 'checkbox',
+ fieldLabel: '',
+ labelSeparator: '',
+ boxLabel: _('Show session speed in titlebar'),
+ id: 'show_session_speed'
+ }]
+ }, {
+ xtype: 'fieldset',
+ border: false,
+ title: _('Sidebar'),
+ items: [{
+ xtype: 'checkbox',
+ fieldLabel: '',
+ labelSeparator: '',
+ boxLabel: _('Hide filters with 0 torrents'),
+ id: 'hide_sidebar_zero'
+ }]
+ }]
});
Deluge.Preferences.addPage(_('Other'), {
border: false,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---