Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
jul. 24
10812
1
mei 21
15790
1
jul. 19
4315
1
jul. 19
267
1
jul. 24
2791