(js) Fix display of category colors of components
This commit is contained in:
parent
0cc7c6be3d
commit
736921bdf7
1
NEWS
1
NEWS
|
@ -30,6 +30,7 @@ Bug fixes
|
||||||
- [web] fixed missing CC or BCC when specified before sending message (#3944)
|
- [web] fixed missing CC or BCC when specified before sending message (#3944)
|
||||||
- [web] enabled Save button after deleting attributes from a card (#4095)
|
- [web] enabled Save button after deleting attributes from a card (#4095)
|
||||||
- [web] don't show Copy To and Move To menu options when user has a single address book
|
- [web] don't show Copy To and Move To menu options when user has a single address book
|
||||||
|
- [web] fixed display of category colors in events and tasks lists
|
||||||
- [eas] fixed opacity in EAS freebusy (#4033)
|
- [eas] fixed opacity in EAS freebusy (#4033)
|
||||||
|
|
||||||
3.2.7 (2017-02-14)
|
3.2.7 (2017-02-14)
|
||||||
|
|
|
@ -316,10 +316,6 @@
|
||||||
componentData.hour = start.getHourString();
|
componentData.hour = start.getHourString();
|
||||||
componentData.blocks = [];
|
componentData.blocks = [];
|
||||||
component = new Component(componentData);
|
component = new Component(componentData);
|
||||||
// Filter out categories for which there's no associated color
|
|
||||||
component.categories = _.filter(component.categories, function(name) {
|
|
||||||
return Component.$Preferences.defaults.SOGoCalendarCategoriesColors[name];
|
|
||||||
});
|
|
||||||
objects.push(component);
|
objects.push(component);
|
||||||
return objects;
|
return objects;
|
||||||
};
|
};
|
||||||
|
@ -437,10 +433,6 @@
|
||||||
_.reduce(data[type], function(components, componentData, i) {
|
_.reduce(data[type], function(components, componentData, i) {
|
||||||
var data = _.zipObject(fields, componentData), component;
|
var data = _.zipObject(fields, componentData), component;
|
||||||
component = new Component(data);
|
component = new Component(data);
|
||||||
// Filter out categories for which there's no associated color
|
|
||||||
component.categories = _.filter(component.categories, function(name) {
|
|
||||||
return Component.$Preferences.defaults.SOGoCalendarCategoriesColors[name];
|
|
||||||
});
|
|
||||||
components.push(component);
|
components.push(component);
|
||||||
return components;
|
return components;
|
||||||
}, components);
|
}, components);
|
||||||
|
@ -539,8 +531,15 @@
|
||||||
else if (this.type == 'task')
|
else if (this.type == 'task')
|
||||||
this.completed = new Date();
|
this.completed = new Date();
|
||||||
|
|
||||||
if (this.c_category)
|
if (this.c_category) {
|
||||||
this.categories = _.invokeMap(this.c_category, 'asCSSIdentifier');
|
// c_category is only defined in list mode (when calling $filter)
|
||||||
|
Component.$Preferences.ready().then(function() {
|
||||||
|
// Filter out categories for which there's no associated color
|
||||||
|
_this.categories = _.invokeMap(_.filter(_this.c_category, function(name) {
|
||||||
|
return Component.$Preferences.defaults.SOGoCalendarCategoriesColors[name];
|
||||||
|
}), 'asCSSIdentifier');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Parse recurrence rule definition and initialize default values
|
// Parse recurrence rule definition and initialize default values
|
||||||
this.$isRecurrent = angular.isDefined(data.repeat);
|
this.$isRecurrent = angular.isDefined(data.repeat);
|
||||||
|
|
Loading…
Reference in a new issue