summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-02-10 05:47:38 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-02-10 05:47:38 (GMT)
commitb1821ae253555aea1e840d4809b1c144a7f5fc15 (patch)
treec4dcdfde192eb6aec39d93964e64f71b625a7327 /www
parent8ce69bbc3ef2974ab1bc4b02b5320827a1ae9935 (diff)
rename rivendell instance to rdxport
Diffstat (limited to 'www')
-rw-r--r--www/js/apps.js16
-rw-r--r--www/js/auth.js6
-rw-r--r--www/js/importer.js6
-rw-r--r--www/js/jingles.js8
-rw-r--r--www/js/musicgrid.js4
-rw-r--r--www/js/musicpools.js6
-rw-r--r--www/js/rdxport.js6
-rw-r--r--www/js/rdxport.rh.js4
-rw-r--r--www/js/shows.js22
9 files changed, 38 insertions, 40 deletions
diff --git a/www/js/apps.js b/www/js/apps.js
index ab5d4b9..02ed76f 100644
--- a/www/js/apps.js
+++ b/www/js/apps.js
@@ -25,7 +25,7 @@
var Rivendell = Rivendell || {};
var apps_current = null;
-var rivendell = null;
+var rdxport = null;
var importer = null;
function apps_select(app) {
@@ -101,9 +101,9 @@ function apps_init() {
if(auth_token && auth_username) {
// todo: do this at a central place
- rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
- rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
- rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
+ rdxport = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
+ rdxport.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
+ rdxport.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
apps_select(apps_current);
}
@@ -111,9 +111,9 @@ function apps_init() {
$(window).on('popstate', function(event) {
if(auth_token && auth_username) {
// todo: do this at a central place
- rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
- rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
- rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
+ rdxport = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
+ rdxport.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
+ rdxport.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
apps_select(locationHrefValue());
}
@@ -136,6 +136,6 @@ function apps_cleanup() {
$(window).off('popstate');
importer = null;
- rivendell = null;
+ rdxport = null;
apps_current = null;
}
diff --git a/www/js/auth.js b/www/js/auth.js
index df09ce6..aee8502 100644
--- a/www/js/auth.js
+++ b/www/js/auth.js
@@ -39,9 +39,9 @@ function auth_loginSuccess(data) {
sessionStorage.setItem("auth_token", auth_token);
// todo: do this at a central place
- rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
- rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
- rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
+ rdxport = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi');
+ rdxport.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi');
+ rdxport.setMusicgridEndpoint('/rh-bin/musicgrid.cgi');
apps_select(apps_current);
diff --git a/www/js/importer.js b/www/js/importer.js
index c17c953..ab702e5 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -114,7 +114,7 @@ Rivendell.Importer.prototype.importCartConfirm = function(dropzone, group, group
});*/
if (createCart) {
- rivendell.addCart(group.groupName, 'audio', null, function(cartXML) {
+ rdxport.addCart(group.groupName, 'audio', null, function(cartXML) {
var cart = new Rivendell.Cart(cartXML, group);
self.importAddCut(dropzone, group, files[0], createCart, cart, useMetadata);
});
@@ -147,7 +147,7 @@ Rivendell.Importer.prototype.importFileUploadError = function(dropzone, file, ms
};
Rivendell.Importer.prototype.importAddCut = function(dropzone, group, file, createCart, cart, useMetadata) {
- rivendell.addAndEditCut(cart.number, {DESCRIPTION: file.name}, function(cutXml) {
+ rdxport.addAndEditCut(cart.number, {DESCRIPTION: file.name}, function(cutXml) {
group.fetchCarts();
dropzone.on('sending', function(file, xhr, formData) {
var cutNumber = $('cutNumber', cutXml).text();
@@ -179,7 +179,7 @@ Rivendell.Importer.prototype.importAddCut = function(dropzone, group, file, crea
}).fail(function(xhr, status, err) {
self.importFileUploadError(dropzone, file, err, xhr);
if (createCart) {
- rivendell.removeCart(cart.number);
+ rdxport.removeCart(cart.number);
}
});
};
diff --git a/www/js/jingles.js b/www/js/jingles.js
index 377f5b8..64847dd 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -27,7 +27,7 @@ var Rivendell = Rivendell || {};
var jingleGroupListView = null;
function jingles_init() {
- var groupList = new Rivendell.GroupList(rivendell);
+ var groupList = new Rivendell.GroupList();
jingleGroupListView = new Rivendell.JingleGroupListView(groupList);
}
@@ -234,7 +234,7 @@ Rivendell.JingleCutView.prototype.move = function() {
}
// todo: fix
- rivendell.moveCut(this.model.cartNumber, this.model.number, destinationCart.number, function() {
+ rdxport.moveCut(this.model.cartNumber, this.model.number, destinationCart.number, function() {
self.model.cart.group.fetchCarts();
destinationCart.group.fetchCarts();
});
@@ -249,7 +249,7 @@ Rivendell.JingleCutView.prototype.toggleActive = function() {
destinationCart--;
}
var self = this;
- rivendell.moveCut(this.model.cartNumber, this.model.number, destinationCart, function() {
+ rdxport.moveCut(this.model.cartNumber, this.model.number, destinationCart, function() {
self.model.cart.group.fetchCarts();
});
};
@@ -257,7 +257,7 @@ Rivendell.JingleCutView.prototype.toggleActive = function() {
Rivendell.JingleCutView.prototype.delete = function() {
this.$el.find('td:first').html(this.$spinner);
var self = this;
- rivendell.removeCut(this.model.cartNumber, this.model.number, function() {
+ rdxport.removeCut(this.model.cartNumber, this.model.number, function() {
self.model.cart.removeCut(self.model);
self.$el.remove();
});
diff --git a/www/js/musicgrid.js b/www/js/musicgrid.js
index 2a5a742..6a47bb9 100644
--- a/www/js/musicgrid.js
+++ b/www/js/musicgrid.js
@@ -31,7 +31,7 @@ function musicgrid_init() {
var musicgrid = new Rivendell.Musicgrid();
musicgridView = new Rivendell.MusicgridView(musicgrid);
- var musicpools = new Rivendell.GroupList(rivendell);
+ var musicpools = new Rivendell.GroupList();
musicpoolModal = new Rivendell.MusicpoolModal(musicpools);
}
@@ -121,7 +121,7 @@ Rivendell.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName)
}
$button.on('click', function() {
- rivendell.setMusicgrid(dow, hour, musicpool.clock, function() {
+ rdxport.setMusicgrid(dow, hour, musicpool.clock, function() {
$('#musicpoolModal').modal('hide');
musicgridView.model.fetch();
});
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index 28fcabb..fdf8a74 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -27,13 +27,13 @@ var Rivendell = Rivendell || {};
var musicpoolsView = null;
function musicpools_init() {
- var musicpools = new Rivendell.GroupList(rivendell);
+ var musicpools = new Rivendell.GroupList();
musicpoolsView = new Rivendell.MusicpoolsView(musicpools);
}
function musicpools_cleanup() {
musicpoolsView = null;
- rivendell = null;
+ rdxport = null;
}
Rivendell.MusicpoolsView = function(model) {
@@ -231,7 +231,7 @@ Rivendell.MusicpoolCartView.prototype.delete = function() {
this.$el.find('td:last').html(this.$spinner);
var self = this;
- rivendell.removeCart(this.model.number, function() {
+ rdxport.removeCart(this.model.number, function() {
self.model.group.removeCart(self.model);
self.$el.remove();
});
diff --git a/www/js/rdxport.js b/www/js/rdxport.js
index 35c1b7d..db8bf0a 100644
--- a/www/js/rdxport.js
+++ b/www/js/rdxport.js
@@ -351,9 +351,7 @@ Rivendell.Rdxport.prototype.deleteAudio = function(cartNumber, cutNumber, succes
return $.post(this.endpoint, command, success, 'xml');
};
-Rivendell.GroupList = function(rivendell) {
- this.rivendell = rivendell;
-
+Rivendell.GroupList = function() {
this.groups = [];
};
@@ -404,7 +402,7 @@ Rivendell.Group.prototype.removeCart = function(cart) {
Rivendell.Group.prototype.fetchCarts = function() {
var self = this;
- rivendell.listCarts(this.groupName, 1, function(cartsXml, status, req) {
+ rdxport.listCarts(this.groupName, 1, function(cartsXml, status, req) {
self.carts = [];
self.cartsByNumber = {};
diff --git a/www/js/rdxport.rh.js b/www/js/rdxport.rh.js
index 3c1bdfe..3c949ac 100644
--- a/www/js/rdxport.rh.js
+++ b/www/js/rdxport.rh.js
@@ -87,7 +87,7 @@ Rivendell.GroupList.prototype.fetch = function(type) {
this.groups = [];
var self = this;
- this.rivendell.listDropboxes(type, function(groupsXml, status, req) {
+ rdxport.listDropboxes(type, function(groupsXml, status, req) {
var dbs = $('dropboxList', groupsXml).children();
dbs.each(function(index, groupXml) {
var group = null;
@@ -123,7 +123,7 @@ Rivendell.Musicgrid.prototype.fetch = function() {
this.clocks = [];
var self = this;
- rivendell.getMusicgrid(function(gridXml, status, req) {
+ rdxport.getMusicgrid(function(gridXml, status, req) {
var dbs = $('grid', gridXml).children();
dbs.each(function(index, clockXml) {
self.clocks.push(new Rivendell.MusicgridClock(clockXml));
diff --git a/www/js/shows.js b/www/js/shows.js
index 91c4bc0..cc226cd 100644
--- a/www/js/shows.js
+++ b/www/js/shows.js
@@ -35,9 +35,9 @@ var showListView = null;
function shows_init() {
/*shows_currentid = sessionStorage.getItem("shows_currentid");
shows_list = [];
- rivendell.listDropboxes('show', shows_updateList);*/
+ rdxport.listDropboxes('show', shows_updateList);*/
- var showList = new Rivendell.GroupList(rivendell);
+ var showList = new Rivendell.GroupList();
showListView = new Rivendell.ShowListView(showList);
drawClock('Do, 1.1.1970', '00:00:00', 0);
@@ -151,7 +151,7 @@ Rivendell.Show.prototype.constructor = Rivendell.Show;
Rivendell.Show.prototype.fetchCartsAndLogs = function() {
var self = this;
- var lcd = rivendell.listLog(this.log, function(logsXml, status, req) {
+ var lcd = rdxport.listLog(this.log, function(logsXml, status, req) {
self.logs = [];
var loglines = $('logList', logsXml).children();
@@ -164,7 +164,7 @@ Rivendell.Show.prototype.fetchCartsAndLogs = function() {
});
});
- var gcd = rivendell.listCarts(this.groupName, 1, function(cartsXml, status, req) {
+ var gcd = rdxport.listCarts(this.groupName, 1, function(cartsXml, status, req) {
self.carts = [];
var dbs = $('cartList', cartsXml).children();
@@ -276,7 +276,7 @@ Rivendell.ShowCartView.prototype.delete = function() {
$('td:last', this.$el).html(this.$spinner);
var self = this;
- rivendell.removeCart(this.model.number, function() {
+ rdxport.removeCart(this.model.number, function() {
self.model.group.removeCart(self.model);
self.renderEmpty();
});
@@ -286,13 +286,13 @@ Rivendell.ShowCartView.prototype.delete = function() {
function shows_deleteCart(cart) {
- rivendell.removeCart(cart, function() {
+ rdxport.removeCart(cart, function() {
shows_updateGroupCartInfo(cart);
});
}
function shows_importAddCut(cart, dz, file) {
- rivendell.addCut(cart, function() {
+ rdxport.addCut(cart, function() {
dz.processQueue();
}).fail(function(xhr, status, err) {
shows_importFileUploadError(cart, dz, file, err, xhr);
@@ -300,7 +300,7 @@ function shows_importAddCut(cart, dz, file) {
}
function shows_importAddCart(cart, dz, file) {
- rivendell.addCart(shows_current.group.name, 'audio', cart, function() {
+ rdxport.addCart(shows_current.group.name, 'audio', cart, function() {
shows_importAddCut(cart, dz, file);
}).fail(function(xhr, status, err) {
shows_importFileUploadError(cart, dz, file, err, xhr);
@@ -467,7 +467,7 @@ function shows_newImportErrorEntry(cart, msg) {
}
function shows_updateGroupCartInfo(cart) {
- rivendell.listCart(cart, 1, function(data) {
+ rdxport.listCart(cart, 1, function(data) {
shows_updateGroupCartList(data);
shows_redrawCartEntry(cart);
}).fail(function() {
@@ -532,10 +532,10 @@ function shows_showSelected() {
$('#show-length').text(shows_current.length + ' Min.');
shows_log_carts = [];
- var lcd = rivendell.listLog(shows_current.log, shows_updateLogCartList);
+ var lcd = rdxport.listLog(shows_current.log, shows_updateLogCartList);
shows_group_carts = {};
- var gcd = rivendell.listCarts(shows_current.group.name, 1, shows_updateGroupCartList);
+ var gcd = rdxport.listCarts(shows_current.group.name, 1, shows_updateGroupCartList);
$.when(lcd, gcd).done(
function(lcres, gcres) {