When create an event backgroud inline style is added to header divs, botho dhx_header and dhx_title
But on last slot, it doesn’t. Why? Is it an error?
When create an event backgroud inline style is added to header divs, botho dhx_header and dhx_title
But on last slot, it doesn’t. Why? Is it an error?
Hi,
how exactly do you add the style? please clarify so i could reproduce the issue
I do not add the inline style, I overwrite event_text template and set color property to event, insted to set a hardcoded color, I get it throw Jquery from a style seet.
scheduler.templates.event_text = function (start, end, ev) {
ev.color = $("#hiddenEventId").css(“background-color”);
}
Then, when header is rendered the inline style is setted automatically with the background, but not in last slot.
I’ve checked it’s due to config.last_hour parameter
e.g:
config.last_hour=20
if add an event that ends at 20h, then head template doesn’t apply, If the event ends at 19:59 it does.
I’ve checked the bg_color it’s rendered in this function
scheduler._render_v_bar = function (id, x, y, w, h, style, contentA, contentB, bottom) {
var d = document.createElement(“DIV”);
var ev = this.getEvent(id);
…
var bg_color = (ev.color ? (“background:” + ev.color + “;”) : “”);
therefore, ev.color it’s null if event last hour == config.last_hour.
Why? It should not