mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Accept categories as objects in an array as well as map by category ID
This commit is contained in:
parent
8c8f7ccbfd
commit
ab2a1ae9b9
@ -493,10 +493,17 @@ var et2_nextmatch_rowProvider = Class.extend(
|
||||
// Check for existing class
|
||||
// TODO
|
||||
|
||||
// Create class
|
||||
if(this.categories && this.categories[cat_id] && this.categories[cat_id].color)
|
||||
var cat = this.categories[cat_id] || null;
|
||||
for(var i = 0; cat == null && this.categories && i < this.categories.length; i++)
|
||||
{
|
||||
if(this.categories[i] && this.categories[i].value && this.categories[i].value == cat_id)
|
||||
{
|
||||
cat = this.categories[i];
|
||||
}
|
||||
}
|
||||
// Create class
|
||||
if(cat && cat.color)
|
||||
{
|
||||
var cat = this.categories[cat_id];
|
||||
this._rootWidget.egw().css('.'+cat_class, "background-color: " + cat.color + ";");
|
||||
classes += ' '+cat_class;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user