Author: damoxc
Revision: 5585
Log:
hide all the preferences page upon the first page change and don't set
the width/height
Diff:
Modified: trunk/deluge/ui/web/js/Deluge.Preferences.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Preferences.js 2009-07-30 22:26:23 UTC
(rev 5584)
+++ trunk/deluge/ui/web/js/Deluge.Preferences.js 2009-07-30 22:32:58 UTC
(rev 5585)
@@ -33,6 +33,9 @@
*/
Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
+
+ currentPage: null,
+
constructor: function(config) {
config = Ext.apply({
layout: 'border',
@@ -45,8 +48,7 @@
plain: true,
resizable: false,
title: _('Preferences'),
-
- currentPage: false,
+
items: [{
xtype: 'grid',
region: 'west',
@@ -113,8 +115,6 @@
store.loadData([[name]], true);
page['bodyStyle'] = 'margin: 5px';
this.pages[name] = this.configPanel.add(page);
- this.pages[name].setWidth(365);
- this.pages[name].setHeight(410);
},
/**
@@ -130,9 +130,14 @@
},
onPageSelect: function(selModel, rowIndex, r) {
- if (this.currentPage) {
+ if (this.currentPage == null) {
+ for (var page in this.pages) {
+ this.pages[page].hide();
+ }
+ } else {
this.currentPage.hide();
}
+
var name = r.get('name');
this.pages[name].show();
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---