competitions are now colored in the same way as on digitalrock.de
This commit is contained in:
parent
e92a757ccd
commit
1c0e6aaca8
1 changed files with 14 additions and 2 deletions
|
@ -179,6 +179,18 @@ Page {
|
|||
return true
|
||||
}
|
||||
|
||||
function getCompCatData(compCatId) {
|
||||
var obj = app.compCats
|
||||
|
||||
for(var prop in obj) {
|
||||
// go through the whole array and search for data keys
|
||||
if (obj.hasOwnProperty(prop) && obj[prop]["cat_id"].indexOf(compCatId) >= 0) {
|
||||
console.log("found cat: " + obj[prop]['label'])
|
||||
return obj[prop]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataListView {
|
||||
id: calendarList
|
||||
|
||||
|
@ -230,7 +242,7 @@ Page {
|
|||
property string name: calendarList.listData[index]["name"]
|
||||
property string date: calendarList.listData[index]["date_span"]
|
||||
property var cats: calendarList.listData[index]["cats"]
|
||||
property int catId: calendarList.listData[index]["cat_id"]
|
||||
property int catId: calendarList.listData[index]["cat_id"] === undefined ? 0:calendarList.listData[index]["cat_id"]
|
||||
property bool over
|
||||
property var thisData: calendarList.listData[index]
|
||||
|
||||
|
@ -263,7 +275,7 @@ Page {
|
|||
|
||||
opacity: 0.5
|
||||
|
||||
color: app.competitionCategoryColors[catId]
|
||||
color: root.getCompCatData(catId) === undefined ? "white":root.getCompCatData(catId)["bgcolor"]
|
||||
}
|
||||
|
||||
Column {
|
||||
|
|
Loading…
Reference in a new issue