From e3725629c6a74bccaa5b96f9ad93c752ad66799b Mon Sep 17 00:00:00 2001 From: Peter Grassberger Date: Tue, 2 Feb 2016 20:11:09 +0100 Subject: create importer globally in apps.js diff --git a/www/js/apps.js b/www/js/apps.js index ef904f2..1c04526 100644 --- a/www/js/apps.js +++ b/www/js/apps.js @@ -26,6 +26,7 @@ var Rivendell = Rivendell || {}; var apps_current = null; var rivendell = null; +var importer = null; function apps_select(app) { $('.container').removeClass('fullWidth'); @@ -94,6 +95,8 @@ function apps_select(app) { } function apps_init() { + importer = new Rivendell.Importer(); + apps_current = locationHrefValue(); if(auth_token && auth_username) { @@ -131,7 +134,8 @@ function apps_cleanup() { musicgrid_cleanup(); $(window).off('popstate'); - + + importer = null; rivendell = null; apps_current = null; } diff --git a/www/js/jingles.js b/www/js/jingles.js index 11f23a5..3b3b176 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -24,12 +24,9 @@ var Rivendell = Rivendell || {}; -var importer = null; var jingleGroupListView = null; function jingles_init() { - importer = new Rivendell.Importer(); - var groupList = new Rivendell.GroupList(rivendell); jingleGroupListView = new Rivendell.JingleGroupListView(groupList); } @@ -39,7 +36,6 @@ function jingles_cleanup() { jingleGroupListView.destroy(); jingleGroupListView = null; } - importer = null; } Rivendell.JingleGroupListView = function(model) { diff --git a/www/js/musicpools.js b/www/js/musicpools.js index 7a880fd..8fd59f4 100644 --- a/www/js/musicpools.js +++ b/www/js/musicpools.js @@ -24,19 +24,15 @@ var Rivendell = Rivendell || {}; -var importer = null; var musicpoolsView = null; function musicpools_init() { - importer = new Rivendell.Importer(); - var musicpools = new Rivendell.GroupList(rivendell); musicpoolsView = new Rivendell.MusicpoolsView(musicpools); } function musicpools_cleanup() { musicpoolsView = null; - importer = null; rivendell = null; } -- cgit v0.10.2