diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-02-05 17:58:11 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-02-05 17:58:11 (GMT) |
commit | 385817c565d49dc9759edb5e23ee0cea5e85df9c (patch) | |
tree | 5ab2a52bd86b76aa5312a4498f906c8ff9c8aca3 /www/js | |
parent | 8f3e1153bdc0297038340c0ec559dc622065c232 (diff) |
beautify musicpools
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/musicpools.js | 11 | ||||
-rw-r--r-- | www/js/rdxport.js | 2 |
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 { |