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 The core ui module that builds up the ui layout and controls the polling
of the server. of the server.
@ -40,8 +40,6 @@ Copyright:
*/ */
Deluge.UI = { Deluge.UI = {
cookies: new Ext.state.CookieProvider(),
errorCount: 0, errorCount: 0,
/** /**
@ -49,7 +47,6 @@ Deluge.UI = {
* and set up various events that the UI will utilise. * and set up various events that the UI will utilise.
*/ */
initialize: function() { initialize: function() {
Ext.state.Manager.setProvider(this.cookies);
this.MainPanel = new Ext.Panel({ this.MainPanel = new Ext.Panel({
id: 'mainPanel', id: 'mainPanel',
iconCls: 'x-deluge-main-panel', iconCls: 'x-deluge-main-panel',

View file

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