diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/specials.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/www/js/specials.js b/www/js/specials.js index 51d83f1..3591af5 100644 --- a/www/js/specials.js +++ b/www/js/specials.js @@ -56,7 +56,7 @@ rh.ShowList.prototype.fetch = function() { rh.Show = function(show) { this.id = show.id; - this.title = show.title; + this.title = show.title.replace(" (Sondersendung)", ""); this.pv_id = show.pv_id; this.pv_name = show.pv_name; @@ -117,16 +117,17 @@ rh.ShowView = function(model, listView) { this.model = model; this.listView = listView; - this.$el = $('<div>'); + this.$el = $('<div>').addClass('row'); }; rh.ShowView.prototype.render = function() { - var id = $('<span>').addClass('show-id').text(this.model.id); - var showlink = $('<a>').attr('href', "https://import.helsinki.at/shows/" + this.model.id) .attr('target', "import").text(this.model.title); var title = $('<span>').addClass('show-title').append(showlink); + var rd = $('<div>').addClass('col-md-3 col-md-offset-1').append(title); + var tag = $('<div>').addClass('col-md-1'); + var pv = $('<div>').addClass('col-md-7'); if(this.model.pv_id >= 0) { var pvlink = $('<a>').attr('href', "https://pv.helsinki.at/admin/program/show/" + this.model.pv_id) .attr('target', "import").text(this.model.pv_name); @@ -141,11 +142,14 @@ rh.ShowView.prototype.render = function() { } var pvtimes = $('<span>').addClass('pv-time').text(start_end); - this.$el.empty().addClass('show').append(id).append(title).append(pvtitle).append(pvtimes); + pv.append(pvtitle).append(pvtimes); + tag.append($('<div>').addClass('label label-danger').text("used")); } else { - var pv = $('<span>').addClass('pv-unused').text("unused"); - this.$el.empty().addClass('show').append(id).append(title).append(pv); + pv.text("-"); + tag.append($('<div>').addClass('label label-success').text("free")); } + + this.$el.empty().append(rd).append(tag).append(pv); } |