summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-02-02 19:11:09 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-02-02 19:11:09 (GMT)
commite3725629c6a74bccaa5b96f9ad93c752ad66799b (patch)
tree04698cddb8b99b050783d394456f077680967901 /www
parent5370b3db0d4b482a61db3b3bd7b6ff88ff0d6dda (diff)
create importer globally in apps.js
Diffstat (limited to 'www')
-rw-r--r--www/js/apps.js6
-rw-r--r--www/js/jingles.js4
-rw-r--r--www/js/musicpools.js4
3 files changed, 5 insertions, 9 deletions
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;
}