Here is an example of what I mean.
Load this page.
Left click on “my event”
control+c then control+v
A new event is placed under “my event”. Now we have 2 overlapping events which are saved.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>For demo purpose only :: &1</title>
<script src='../../sources/dhtmlxscheduler.js' type="text/javascript" charset="utf-8"></script>
<script src='../../sources/ext/dhtmlxscheduler_timeline.js' type="text/javascript" charset="utf-8"></script>
<script src='../../sources/ext/dhtmlxscheduler_treetimeline.js' type="text/javascript" charset="utf-8"></script>
<script src="../../sources/ext/dhtmlxscheduler_key_nav.js" type="text/javascript" charset="utf-8"></script>
<script src="../../sources/ext/dhtmlxscheduler_collision.js" type="text/javascript" charset="utf-8"></script>
<link rel='stylesheet' type='text/css' href='../../codebase/dhtmlxscheduler.css'>
</head>
<style type="text/css" media="screen">
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
.one_line{
white-space:nowrap;
overflow:hidden;
padding-top:5px; padding-left:5px;
text-align:left !important;
}
</style>
<script type="text/javascript" charset="utf-8">
function init() {
scheduler.locale.labels.timeline_tab = "Timeline";
scheduler.locale.labels.section_custom="Section";
scheduler.locale.labels.section_video_format="Video Format";
scheduler.locale.labels.section_audio_format="Audio Format";
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
//===============
//Configuration
//===============
var elements = [ // original hierarhical array to display
{key:10, label:"Stuff", open: true, children: [
{key:40, label:"Stuff 1"},
{key:50, label:"Stuff 2"}
]},
];
scheduler.createTimelineView({
section_autoheight: false,
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 16,
x_length: 48,
y_unit: elements,
y_property: "section_id",
render: "tree",
folder_dy:20,
dy:20
});
//===============
//Data loading
//===============
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"custom", height:23, type:"timeline", options:null , map_to:"section_id" }, //type should be the same as name of the tab
{name:"time", height:72, type:"time", map_to:"auto"}
]
scheduler.init('scheduler_here',new Date(2009,5,30),"timeline");
scheduler.parse([
{ start_date: "2009-06-30 12:00", end_date: "2009-06-30 14:00", text:"my event", section_id:40},
],"json");
}
</script>
<body onload="init();">
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button"> </div>
<div class="dhx_cal_next_button"> </div>
<div class="dhx_cal_today_button"></div>
<div class="dhx_cal_date"></div>
<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
<div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>
<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
</div>
<div class="dhx_cal_header">
</div>
<div class="dhx_cal_data">
</div>
</div>
</body>