diff options
author | Christian Pointner <equinox@helsinki.at> | 2017-04-09 17:49:50 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2017-04-09 17:49:50 (GMT) |
commit | 4f7184f01215d348cc4a7b5b7a094cb1a7c6e695 (patch) | |
tree | 694bcc0f6310cf5ec036d0ccffe596ef3dee5b7a /www/js | |
parent | b2ef257d0ec95f98d447309e8f3b60ebc90a2da0 (diff) |
specials overview is much nicer now
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); } |