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.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index fdf8a74..a5cd323 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -32,8 +32,8 @@ function musicpools_init() {
}
function musicpools_cleanup() {
+ importer.cancelAllUploads();
musicpoolsView = null;
- rdxport = null;
}
Rivendell.MusicpoolsView = function(model) {
@@ -148,20 +148,25 @@ Rivendell.MusicpoolView.prototype.render = function() {
});
$('.uploadButton', this.$el).on('click', function() {
- importer.openModal(self.model, self, true, true);
+ importer.openModal(self.model, self, true, null, true);
});
};
-Rivendell.MusicpoolView.prototype.uploadProgress = function(file) {
+Rivendell.MusicpoolView.prototype.uploadProgress = function(upload, file) {
if (!file.cartNumber || !file.cutNumber) {
return;
}
var $cart = $('#musicpool-' + file.cartNumber).first();
if (!$cart.hasClass('uploading')) {
var $progressBar = $('.progressBarTemplate.musicpools').clone().removeClass('progressBarTemplate');
- $progressBar.find('.file-name').text(file.name);
- $progressBar.find('.cart-number').text(file.cartNumber);
+ $('.file-name', $progressBar).text(file.name);
+ $('.cart-number', $progressBar).text(file.cartNumber);
$cart.html($progressBar.html());
+
+ $('button', $cart).on('click', function() {
+ upload.cancel();
+ });
+
$cart.addClass('uploading');
}
@@ -177,6 +182,10 @@ Rivendell.MusicpoolView.prototype.uploadProgress = function(file) {
}
};
+Rivendell.MusicpoolView.prototype.uploadError = function(upload, file, msg) {
+ // todo
+};
+
Rivendell.MusicpoolCartView = function(model) {
this.model = model;