From a7940d5bf932a35c1fdcd2420e1668c2c883890a Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 27 Apr 2010 22:56:02 +0100 Subject: [PATCH] use deferredRender: true on the card layout to fix the spinnergroups and comboboxes --- .../deluge-all/preferences/DownloadsPage.js | 6 --- .../deluge-all/preferences/InterfacePage.js | 5 +-- .../js/deluge-all/preferences/PluginsPage.js | 1 - .../preferences/PreferencesWindow.js | 3 ++ .../js/ext-extensions/form/TriggerFieldFix.js | 44 ------------------- 5 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 deluge/ui/web/js/ext-extensions/form/TriggerFieldFix.js diff --git a/deluge/ui/web/js/deluge-all/preferences/DownloadsPage.js b/deluge/ui/web/js/deluge-all/preferences/DownloadsPage.js index 81c6ad43b..be45a7085 100644 --- a/deluge/ui/web/js/deluge-all/preferences/DownloadsPage.js +++ b/deluge/ui/web/js/deluge-all/preferences/DownloadsPage.js @@ -145,11 +145,5 @@ Deluge.preferences.Downloads = Ext.extend(Ext.FormPanel, { height: 22, boxLabel: _('Add torrents in Paused state') })); - - this.on('show', this.onShow, this); - }, - - onShow: function() { - Deluge.preferences.Downloads.superclass.onShow.call(this); } }); diff --git a/deluge/ui/web/js/deluge-all/preferences/InterfacePage.js b/deluge/ui/web/js/deluge-all/preferences/InterfacePage.js index fac96afa1..0eecaa477 100644 --- a/deluge/ui/web/js/deluge-all/preferences/InterfacePage.js +++ b/deluge/ui/web/js/deluge-all/preferences/InterfacePage.js @@ -49,7 +49,7 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, { Deluge.preferences.Interface.superclass.initComponent.call(this); var optMan = this.optionsManager = new Deluge.OptionsManager(); - this.on('show', this.onShow, this); + this.on('show', this.onPageShow, this); var fieldset = this.add({ xtype: 'fieldset', @@ -247,8 +247,7 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, { this.optionsManager.commit(); }, - onShow: function() { - Deluge.preferences.Interface.superclass.onShow.call(this); + onPageShow: function() { deluge.client.web.get_config({ success: this.onGotConfig, scope: this diff --git a/deluge/ui/web/js/deluge-all/preferences/PluginsPage.js b/deluge/ui/web/js/deluge-all/preferences/PluginsPage.js index c805cba06..fbd04edc8 100644 --- a/deluge/ui/web/js/deluge-all/preferences/PluginsPage.js +++ b/deluge/ui/web/js/deluge-all/preferences/PluginsPage.js @@ -224,7 +224,6 @@ Deluge.preferences.Plugins = Ext.extend(Ext.Panel, { } }); - this.on('show', this.onShow, this); this.pluginInfo.on('render', this.onPluginInfoRender, this); this.grid.on('cellclick', this.onCellClick, this); deluge.preferences.on('show', this.onPreferencesShow, this); diff --git a/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js b/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js index 1e9657848..f71c463f6 100644 --- a/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js +++ b/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js @@ -94,6 +94,9 @@ Deluge.preferences.PreferencesWindow = Ext.extend(Ext.Window, { autoDestroy: false, region: 'center', layout: 'card', + layoutConfig: { + deferredRender: true + }, autoScroll: true, width: 300, margins: '5 5 5 5', diff --git a/deluge/ui/web/js/ext-extensions/form/TriggerFieldFix.js b/deluge/ui/web/js/ext-extensions/form/TriggerFieldFix.js deleted file mode 100644 index 0d42ab89c..000000000 --- a/deluge/ui/web/js/ext-extensions/form/TriggerFieldFix.js +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Ext.ux.form.TriggerField.js - * - * Copyright (c) Damien Churchill 2009-2010 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, write to: - * The Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301, USA. - * - * In addition, as a special exception, the copyright holders give - * permission to link the code of portions of this program with the OpenSSL - * library. - * You must obey the GNU General Public License in all respects for all of - * the code used other than OpenSSL. If you modify file(s) with this - * exception, you may extend this exception to your version of the file(s), - * but you are not obligated to do so. If you do not wish to do so, delete - * this exception statement from your version. If you delete this exception - * statement from all source files in the program, then also delete it here. - */ - -if (Ext.isWebKit) { -Ext.override(Ext.form.TriggerField, { - onResize: function(w, h) { - Ext.form.TriggerField.superclass.onResize.call(this, w, h); - var tw = this.getTriggerWidth(); - if (Ext.isNumber(w)) { - this.el.setWidth(w - tw); - } - this.wrap.setWidth(w); - } -}); -}