move the stateful stuff to Deluge.js before any other js has executed

This commit is contained in:
Damien Churchill 2009-09-28 16:48:02 +00:00
commit 3f8abf1e34
2 changed files with 171 additions and 170 deletions

View file

@ -1,5 +1,5 @@
/*
Script: deluge-ui.js
Script: Deluge.UI.js
The core ui module that builds up the ui layout and controls the polling
of the server.
@ -40,8 +40,6 @@ Copyright:
*/
Deluge.UI = {
cookies: new Ext.state.CookieProvider(),
errorCount: 0,
/**
@ -49,7 +47,6 @@ Deluge.UI = {
* and set up various events that the UI will utilise.
*/
initialize: function() {
Ext.state.Manager.setProvider(this.cookies);
this.MainPanel = new Ext.Panel({
id: 'mainPanel',
iconCls: 'x-deluge-main-panel',
@ -182,7 +179,7 @@ Deluge.UI = {
// Enable the plugin
Deluge.Plugins[options.pluginName].enable();
},
},
/**
* @static

View file

@ -31,8 +31,12 @@ Copyright:
statement from all source files in the program, then also delete it here.
*/
// Create the namespace Ext.deluge
Ext.namespace('Ext.deluge');
// Setup the state manager
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
(function() {
/* Add some helper functions to Ext */
Ext.apply(Function.prototype, {