summaryrefslogtreecommitdiff
path: root/www/js/musicpools.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/musicpools.js')
-rw-r--r--www/js/musicpools.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index 1a2c78d..4449865 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -22,13 +22,13 @@
'use strict';
-var Rivendell = Rivendell || {};
+var Rdxport = Rdxport || {};
var musicpoolsView = null;
function musicpools_init() {
- var musicpools = new Rivendell.GroupList();
- musicpoolsView = new Rivendell.MusicpoolsView(musicpools);
+ var musicpools = new Rdxport.GroupList();
+ musicpoolsView = new Rdxport.MusicpoolsView(musicpools);
}
function musicpools_cleanup() {
@@ -36,7 +36,7 @@ function musicpools_cleanup() {
musicpoolsView = null;
}
-Rivendell.MusicpoolsView = function(model) {
+Rdxport.MusicpoolsView = function(model) {
this.model = model;
this.musicpoolViews = [];
@@ -45,7 +45,7 @@ Rivendell.MusicpoolsView = function(model) {
var self = this;
$(this.model).on('update', function() {
$(self.model.groups).each(function(index, musicpool) {
- var musicpoolView = new Rivendell.MusicpoolView(musicpool);
+ var musicpoolView = new Rdxport.MusicpoolView(musicpool);
self.musicpoolViews.push(musicpoolView);
});
self.updateSelector();
@@ -53,12 +53,12 @@ Rivendell.MusicpoolsView = function(model) {
this.model.fetch('musicpool');
};
-Rivendell.MusicpoolsView.prototype.setCurrentPoolId = function(currentPoolId) {
+Rdxport.MusicpoolsView.prototype.setCurrentPoolId = function(currentPoolId) {
this.currentPoolId = currentPoolId;
sessionStorage.setItem('currentPoolId', this.currentPoolId);
};
-Rivendell.MusicpoolsView.prototype.getCurrentPoolView = function() {
+Rdxport.MusicpoolsView.prototype.getCurrentPoolView = function() {
if (this.model.groups.length === 0) {
return null;
}
@@ -79,7 +79,7 @@ Rivendell.MusicpoolsView.prototype.getCurrentPoolView = function() {
return musicpoolViewFound;
};
-Rivendell.MusicpoolsView.prototype.updateSelector = function() {
+Rdxport.MusicpoolsView.prototype.updateSelector = function() {
var self = this;
var $musicpoolSelector = $('#musicpool-selector');
@@ -104,21 +104,21 @@ Rivendell.MusicpoolsView.prototype.updateSelector = function() {
this.getCurrentPoolView().model.fetchCarts();
};
-Rivendell.Musicpool = function(groupName, description, lowcart, highcart, normlevel, trimlevel, title, clock) {
+Rdxport.Musicpool = function(groupName, description, lowcart, highcart, normlevel, trimlevel, title, clock) {
if (arguments.length === 1) {
- Rivendell.Group.call(this, groupName);
+ Rdxport.Group.call(this, groupName);
this.title = $('musicpool-title', this.xml).text();
this.clock = $('musicpool-clock', this.xml).text();
} else {
- Rivendell.Group.call(this, groupName, description, lowcart, highcart, normlevel, trimlevel);
+ Rdxport.Group.call(this, groupName, description, lowcart, highcart, normlevel, trimlevel);
this.title = title;
this.clock = clock;
}
};
-Rivendell.Musicpool.prototype = Object.create(Rivendell.Group.prototype);
-Rivendell.Musicpool.prototype.constructor = Rivendell.Musicpool;
+Rdxport.Musicpool.prototype = Object.create(Rdxport.Group.prototype);
+Rdxport.Musicpool.prototype.constructor = Rdxport.Musicpool;
-Rivendell.MusicpoolView = function(model) {
+Rdxport.MusicpoolView = function(model) {
this.model = model;
this.cartViews = [];
@@ -130,7 +130,7 @@ Rivendell.MusicpoolView = function(model) {
});
};
-Rivendell.MusicpoolView.prototype.render = function() {
+Rdxport.MusicpoolView.prototype.render = function() {
var self = this;
this.$el = $('#hiddenTemplates .musicpoolTemplate').clone().removeClass('musicpoolTemplate');
@@ -141,7 +141,7 @@ Rivendell.MusicpoolView.prototype.render = function() {
this.cartViews = [];
$(this.model.carts).each(function(index, cart) {
- var cartView = new Rivendell.MusicpoolCartView(cart);
+ var cartView = new Rdxport.MusicpoolCartView(cart);
self.cartViews.push(cartView);
$('table > tbody', self.$el).append(cartView.$el);
@@ -152,7 +152,7 @@ Rivendell.MusicpoolView.prototype.render = function() {
});
};
-Rivendell.MusicpoolView.prototype.uploadProgress = function(upload, file) {
+Rdxport.MusicpoolView.prototype.uploadProgress = function(upload, file) {
if (!file.cartNumber || !file.cutNumber) {
return;
}
@@ -182,7 +182,7 @@ Rivendell.MusicpoolView.prototype.uploadProgress = function(upload, file) {
}
};
-Rivendell.MusicpoolView.prototype.uploadError = function(upload, file, msg, xhr, acknowledge) {
+Rdxport.MusicpoolView.prototype.uploadError = function(upload, file, msg, xhr, acknowledge) {
if (!file.cartNumber) {
return;
}
@@ -213,7 +213,7 @@ Rivendell.MusicpoolView.prototype.uploadError = function(upload, file, msg, xhr,
$('#musicpool-' + file.cartNumber).replaceWith($errorRow);
};
-Rivendell.MusicpoolCartView = function(model) {
+Rdxport.MusicpoolCartView = function(model) {
this.model = model;
this.$spinner = null;
@@ -222,7 +222,7 @@ Rivendell.MusicpoolCartView = function(model) {
this.render();
};
-Rivendell.MusicpoolCartView.prototype.render = function() {
+Rdxport.MusicpoolCartView.prototype.render = function() {
var length = '-';
var imported = '-';
var playcnt = '-';
@@ -263,7 +263,7 @@ Rivendell.MusicpoolCartView.prototype.render = function() {
.append($('<td>').addClass('text-center').append(deleteButton));
};
-Rivendell.MusicpoolCartView.prototype.delete = function() {
+Rdxport.MusicpoolCartView.prototype.delete = function() {
this.$el.find('td:last').html(this.$spinner);
var self = this;