From 385817c565d49dc9759edb5e23ee0cea5e85df9c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 5 Feb 2016 18:58:11 +0100 Subject: beautify musicpools diff --git a/www/index.html b/www/index.html index 57ed2f7..563a63d 100644 --- a/www/index.html +++ b/www/index.html @@ -335,11 +335,13 @@ Cart # Titel + Interpret + Album Länge importiert # gespielt zuletzt gespielt - Aktionen + Aktionen @@ -377,10 +379,10 @@ beginne... - +
- + 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 = $('') .attr('id', 'musicpool-' + this.model.number) .append($('').text(number)) - .append($('').text(title)) + .append($('').text(this.model.title)) + .append($('').text(this.model.artist)) + .append($('').text(this.model.album)) .append($('').text(length)) .append($('').text(imported)) .append($('').text(playcnt)) .append($('').text(lastplayed)) - .append($('').append(deleteButton)); + .append($('').addClass('text-center').append(deleteButton)); }; Rivendell.MusicpoolCartView.prototype.delete = function() { + this.$el.find('td:last').html('') + 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 { -- cgit v0.10.2