summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-11-25 22:23:29 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-11-25 22:23:29 (GMT)
commit08298703d0f387dc5376af9380938b7dd64a212a (patch)
tree82a5f41d989e60cc1cdf53881e2a4ed3584d7a2a /www
parentfc5c7436c230d7dd205142521ee732d08ef6449f (diff)
use newly introduced show type when displaying show title
Diffstat (limited to 'www')
-rw-r--r--www/js/shows.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/www/js/shows.js b/www/js/shows.js
index d58aa66..328181a 100644
--- a/www/js/shows.js
+++ b/www/js/shows.js
@@ -99,7 +99,13 @@ Rdxport.ShowListView.prototype.updateSelector = function() {
$(this.model.groups).sort(function(a, b) {
var atitle = a.title.toLowerCase();
+ if(a.type == "r") {
+ atitle += " (Wiederholung)";
+ }
var btitle = b.title.toLowerCase();
+ if(b.type == "r") {
+ btitle += " (Wiederholung)";
+ }
if(atitle == btitle) {
if(b.rhythm == a.rhythm) {
if(a.dayofweek == b.dayofweek) {
@@ -118,7 +124,11 @@ Rdxport.ShowListView.prototype.updateSelector = function() {
if(atitle > btitle) return 1;
return -1;
}).each(function(index, show) {
- var name = show.id + ' | <strong>' + show.title + '</strong> (' + show.rhythm + ', ' + weekday[show.dayofweek] + ', ' + show.starttime + ', ' + show.length + ' Min.)';
+ var title = show.title;
+ if(show.type == "r") {
+ title += " (Wiederholung)";
+ }
+ var name = show.id + ' | <strong>' + title + '</strong> (' + show.rhythm + ', ' + weekday[show.dayofweek] + ', ' + show.starttime + ', ' + show.length + ' Min.)';
var link = $('<a>').attr('href', '#').html(name).click(function() {
self.setCurrentShowId(show.id);
self.getCurrentShowView().model.fetchCarts();
@@ -143,7 +153,7 @@ Rdxport.ShowListView.prototype.updateSelector = function() {
};
Rdxport.Show = function(groupName, description, lowcart, highcart, normlevel, trimlevel,
- id, title, log, rhythm, dayofweek, starttime, length) {
+ id, title, log, rhythm, dayofweek, starttime, length, type) {
if (arguments.length = 1) {
Rdxport.Group.call(this, groupName);
this.id = parseInt($('show-id', this.xml).text());
@@ -153,6 +163,7 @@ Rdxport.Show = function(groupName, description, lowcart, highcart, normlevel, tr
this.dayofweek = parseInt($('show-dayofweek', this.xml).text());
this.starttime = $('show-starttime', this.xml).text();
this.length = parseInt($('show-length', this.xml).text());
+ this.type = $('show-type', this.xml).text();
} else {
Rdxport.Group.call(this, groupName, description, lowcart, highcart, normlevel, trimlevel);
this.id = id;
@@ -162,6 +173,7 @@ Rdxport.Show = function(groupName, description, lowcart, highcart, normlevel, tr
this.dayofweek = dayofweek;
this.starttime = starttime;
this.length = length;
+ this.type = type;
}
this.logs = [];
@@ -223,7 +235,11 @@ Rdxport.ShowView = function(model) {
};
Rdxport.ShowView.prototype.render = function() {
- $('#show-title').text(this.model.title);
+ if(this.model.type == 'r') {
+ $('#show-title').text(this.model.title + " (Wiederholung)");
+ } else {
+ $('#show-title').text(this.model.title);
+ }
$('#show-dow').text(weekday[this.model.dayofweek]);
$('#show-starttime').text(this.model.starttime);
$('#show-length').text(this.model.length + ' Min.');