Skip to Content
Menu
This question has been flagged

Hi

Is it possible to define the calendar event colors in System Parameters?

I've set up the colors in a css file, but only changes in my Database, in others the values of color is different and i need to set a javascript to use System Parameters that i define in those colors.

I once did this with calendar hours and define the min Time and maxTime in parameters, like this:

CalendarModel.include({

_getFullCalendarOptions: function () {
var res = this._super.apply(this, arguments);
return _.extend(res, {
minTime: this.custom_fc_options['calendar.start_time'],
maxTime: this.custom_fc_options['calendar.end_time'],
slotDuration: this.custom_fc_options['calendar.slot_duration'],
});
},
_loadCalendar: function () {
var self = this;
var args = arguments;
var sup = this._super;
var defs = [];
this.custom_fc_options = {};

_.each(['calendar.start_time', 'calendar.end_time', 'calendar.slot_duration'], function (param) {
var def = self._rpc({
model: 'ir.config_parameter',
method: 'get_param',
args: [param]
}).then(function (res) {
self.custom_fc_options[param] = res;
});
defs.push(def);
});

return $.when.apply($, defs).then(function () {
return sup.apply(self, args);
});
},

});


But i can't do it with colors, can anyone help me?


Avatar
Discard
Related Posts Replies Views Activity
4
Jul 24
8944
1
May 21
13779
1
Jul 19
3356
1
Jul 19
267
1
Jul 24
554