From 42bc7d757948ccb8d31cc06c3e1a2cba415e51a3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 2 Oct 2011 22:01:55 +0200 Subject: [PATCH] Wizzard in domready --- couchpotato/core/plugins/wizard/static/wizard.js | 44 +++++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/couchpotato/core/plugins/wizard/static/wizard.js b/couchpotato/core/plugins/wizard/static/wizard.js index c47e6bd..91cead6 100644 --- a/couchpotato/core/plugins/wizard/static/wizard.js +++ b/couchpotato/core/plugins/wizard/static/wizard.js @@ -61,25 +61,27 @@ WizardBase.Screen = new Class({ }) -window.Wizard = new WizardBase([ - { - 'title': 'Fill in your username and password', - 'Description': 'Outside blabla', - 'tab': 'general', - 'fields': ['username', 'password'] - }, - { - 'title': 'What do you use to download your movies', - 'answers': [ - {'name': 'nzb', 'label': 'Usenet'}, - {'name': 'torrent', 'label': 'Torrents'} - ] - }, - { - 'title': 'Do you have a login for any of the following sites', - 'tab': 'providers', - 'needs': function(){ - return self.config_nzb || self.config_torrent +window.addEvent('domready', function(){ + window.Wizard = new WizardBase([ + { + 'title': 'Fill in your username and password', + 'Description': 'Outside blabla', + 'tab': 'general', + 'fields': ['username', 'password'] + }, + { + 'title': 'What do you use to download your movies', + 'answers': [ + {'name': 'nzb', 'label': 'Usenet'}, + {'name': 'torrent', 'label': 'Torrents'} + ] + }, + { + 'title': 'Do you have a login for any of the following sites', + 'tab': 'providers', + 'needs': function(){ + return self.config_nzb || self.config_torrent + } } - } -]) + ]) +});