summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-02-05 17:58:11 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-02-05 17:58:11 (GMT)
commit385817c565d49dc9759edb5e23ee0cea5e85df9c (patch)
tree5ab2a52bd86b76aa5312a4498f906c8ff9c8aca3 /www
parent8f3e1153bdc0297038340c0ec559dc622065c232 (diff)
beautify musicpools
Diffstat (limited to 'www')
-rw-r--r--www/index.html8
-rw-r--r--www/js/musicpools.js11
-rw-r--r--www/js/rdxport.js2
3 files changed, 13 insertions, 8 deletions
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 @@
<tr>
<th>Cart #</th>
<th>Titel</th>
+ <th>Interpret</th>
+ <th>Album</th>
<th>Länge</th>
<th>importiert</th>
<th># gespielt</th>
<th>zuletzt gespielt</th>
- <th>Aktionen</th>
+ <th class="text-center">Aktionen</th>
</tr>
</thead>
<tbody>
@@ -377,10 +379,10 @@
<td class="file-bytes">
beginne...
</td>
- <td colspan="3">
+ <td colspan="5">
<div class="progress"><div class="progress-bar" style="width: 0%;"></div></div>
</td>
- <td>
+ <td class="text-center">
<button class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;Abbrechen</button>
</td>
</tr>
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 {