Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Brent Thomas on Sep 04, 2009 14:16
open dhtmlx forum
event_header - drag and drop

Hello,

I'm working with the scheduler and trying to make a more functional event header

I've followed the customization method detailed under custom_styling and implemented this

scheduler.templates.event_header=function(start,end,event){
return "<span style='background-color:green'><img src='http://divorcemanagementzone.com/dmz/images/gavel_12x12.png' /><img src='http://divorcemanagementzone.com/dmz/images/scales_12x12.png' /><img src='http://divorcemanagementzone.com/dmz/images/man_12x12.png' /><img src='http://divorcemanagementzone.com/dmz/images/woman_12x12.png' />"+scheduler.templates.hour_scale(start)+"</span>";
}

The effect here is to color the selection in green and to add several icons to the header.

The problem comes that this 'green area' (or without the span just the icons themselves) become
'drag' objects in the scheduler instead of the event header on which they are embedded.

How can one add an item such as the span for color or simply an icon, and have that item NOT be seperately draggable?
(is it possible to wrap them in a style or span/div which would be ignored (ie treated as event_header for purpose of dragging?)

I could always place the items into the detail but i really would like to have some indicators 'embedded' in the header
and not treated as seperate drag targets.

The most ideal solution would be an header which could have its color set seperately from the body of the event, and which
could included embedded items (such as these .pngs) but which is still treated as the complete header for the purposes of
dragging/clicking.

If you post code in relation to this question please include the /sources directory as I'm minifying the js sources into my own
build of the final scheduler.js

Thank you!

Answer posted by dhxSupport on Sep 10, 2009 05:11
Problem is confirmed ( the element detection is based on the classes, so it fails for the inner html element. 
We are working on the fix, it will be available in few days.