From 5a577416e669d3ae8d4f26947367a08540bc9a03 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 5 Feb 2016 18:28:17 +0100 Subject: make jingle view great again diff --git a/www/index.html b/www/index.html index 835d928..57ed2f7 100644 --- a/www/index.html +++ b/www/index.html @@ -310,9 +310,12 @@ + - + + + @@ -320,7 +323,7 @@
Cut # TitelAktionenLängeimportiertAktionen
- + @@ -344,19 +347,20 @@ - + + - - diff --git a/www/js/jingles.js b/www/js/jingles.js index 20b27c5..70d84f9 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -170,12 +170,15 @@ Rivendell.JingleCutView = function(model) { }; Rivendell.JingleCutView.prototype.render = function() { - var moveButton = $(''); + var status = $(''); + var moveButton = $(''); var activateButton; if (this.model.active) { - activateButton = $(''); + activateButton = $(''); + status.addClass('label-success').html(''); } else { - activateButton = $(''); + activateButton = $(''); + status.addClass('label-danger').html(''); } var deleteButton = $(''); @@ -192,14 +195,15 @@ Rivendell.JingleCutView.prototype.render = function() { this.$el = $('') .attr('id', 'jingle-' + this.model.cartNumber + '-' + this.model.number) + .append($(' function shows_newCartEntry(elem) { @@ -168,7 +168,7 @@ function shows_newCartEntry(elem) { var buttons = cart_exists ? '' : - ''; return $('').append($('
beginne... +
+
').append(status)) .append($('').text(this.model.name)) .append($('').text(this.model.description)) + .append($('').text(msToTimeString(this.model.length))) + .append($('').text(format_datetime(new Date(this.model.originDatetime)))) .append( - $('') + $('').addClass('text-center') .append(moveButton) - .append(' ') .append(activateButton) - .append(' ') .append(deleteButton) ); }; diff --git a/www/js/shows.js b/www/js/shows.js index eb6fc20..84d49a5 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -153,7 +153,7 @@ function shows_importCart(cart) { // // // -// +// //
').text(elem)) diff --git a/www/js/utils.js b/www/js/utils.js index 1359b39..fab6736 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -57,10 +57,10 @@ var weekday_short = new Array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'); function format_datetime(d) { if(Object.prototype.toString.call(d) !== '[object Date]') { - return d; + return '-'; } if (d.toString() === 'Invalid Date') { - return d; + return '-'; } var datetimestr = weekday_short[d.getDay()]; datetimestr += ' ' + Number(d.getDate()).pad(2); diff --git a/www/styles/jingles.css b/www/styles/jingles.css index 8fb1f55..1dc50c1 100644 --- a/www/styles/jingles.css +++ b/www/styles/jingles.css @@ -23,3 +23,8 @@ #app-jingles .group { margin-bottom: 40px; } + +#app-jingles table .btn { + margin-top: 0.3em; + margin-left: 0.6em; +} diff --git a/www/styles/main-style.css b/www/styles/main-style.css index 17925fb..8a4793f 100644 --- a/www/styles/main-style.css +++ b/www/styles/main-style.css @@ -93,3 +93,7 @@ body { #uploadModal div.modal-body form div.dz-preview { display: none; } + +.text-center { + text-align: center; +} -- cgit v0.10.2