summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/musicpools.js11
-rw-r--r--www/js/rdxport.js2
2 files changed, 8 insertions, 5 deletions
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index 301ce07..6af133f 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -187,7 +187,6 @@ Rivendell.MusicpoolCartView = function(model) {
Rivendell.MusicpoolCartView.prototype.render = function() {
var number = this.model.number;
- var title = this.model.title;
var length = '-';
var imported = '-';
@@ -197,8 +196,6 @@ Rivendell.MusicpoolCartView.prototype.render = function() {
if (this.model.cuts.length > 0) {
var cut = this.model.cuts[0];
- title = this.model.cuts[0].description;
-
length = msToTimeString(Number(cut.length));
if (!isNaN(new Date(cut.originDatetime))) {
imported = format_datetime(new Date(cut.originDatetime));
@@ -220,15 +217,19 @@ Rivendell.MusicpoolCartView.prototype.render = function() {
this.$el = $('<tr>')
.attr('id', 'musicpool-' + this.model.number)
.append($('<td>').text(number))
- .append($('<td>').text(title))
+ .append($('<td>').text(this.model.title))
+ .append($('<td>').text(this.model.artist))
+ .append($('<td>').text(this.model.album))
.append($('<td>').text(length))
.append($('<td>').text(imported))
.append($('<td>').text(playcnt))
.append($('<td>').text(lastplayed))
- .append($('<td>').append(deleteButton));
+ .append($('<td>').addClass('text-center').append(deleteButton));
};
Rivendell.MusicpoolCartView.prototype.delete = function() {
+ this.$el.find('td:last').html('<span class="label label-default"><span class="glyphicon glyphicon-repeat spin"></span></span>')
+
var self = this;
rivendell.removeCart(this.model.number, function() {
self.model.group.removeCart(self.model);
diff --git a/www/js/rdxport.js b/www/js/rdxport.js
index 633b89e..91944ac 100644
--- a/www/js/rdxport.js
+++ b/www/js/rdxport.js
@@ -420,6 +420,8 @@ Rivendell.Cart = function(number, title, groupName, group) {
this.xml = arguments[0];
this.number = $('number', this.xml).text();
this.title = $('title', this.xml).text();
+ this.artist = $('artist', this.xml).text();
+ this.album = $('album', this.xml).text();
this.groupName = $('groupName', this.xml).text();
this.group = arguments[1];
} else {