Přejít na obsah
Menu
You need to be registered to interact with the community.
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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
čvc 24
10714
1
kvě 21
15740
1
čvc 19
4250
1
čvc 19
267
1
čvc 24
2722