Ilya,
I have studied in the timeline samples (dhtmlxScheduler/samples/06_timeline). In fact, my project is done according to its sample. The project’s the code is also used from its sample.
Now, the main problem is :
-
By default, , and tab are on the schedule. I add a new tab to schedule.
-
I set the new tab on the starting page. Then the new tab content can also display at the starting.
-
But cannot produce the new tab in the toolbar. The tab name cannot display same as to , and tab .
-
If I choose other tab tab, then I cannot go back to the new tab due to lost the tab. I need to go back to starting page and display the new tab content again.
-
Moreover, all data is lost according to point 4.
I try to test the following code :
scheduler.locale.labels.timeline_tab = "Timeline";
This code is name the tab. This code is no function for the new tab . However, I use same code and change to , and tab that this case is work and OK.
I also concern on the following code :
<div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>
This code is CSS to set and add the new tab.
How about your suggestion in this case.
Thanks for your help !
Ivan
I may provide the full code as following :
<div class="dhx_cal_navline">
<div class="dhx_cal_date"></div>
<div class="dhx_minical_icon" id="dhx_minical_icon" onclick="show_minical()"> </div>
<div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>
<script type="text/javascript">
var page_layout = new dhtmlXLayoutObject(document.body, '1C');
var page_layout_header = page_layout.cells('a');
page_layout_header.hideHeader();
scheduler.locale.labels.timeline_tab = "Timeline";
scheduler.locale.labels.section_description = "Description";
scheduler.locale.labels.section_custom = "District";
scheduler.locale.labels.section_subject = "Subject";
scheduler.config.details_on_create = true;
scheduler.config.details_on_dblclick = true;
scheduler.config.xml_date = "%Y-%m-%d %H:%i";
scheduler.config.time_step = 30;
scheduler.config.start_on_monday = false;
var sections = [
{ key: 1, label: "KLN West - Airport" },
{ key: 2 , label: "KLN East" },
{ key: 3 , label: "MongKok - Hunghom" },
{ key: 4, label: "YauMaTei - TST" },
{ key: 5, label: "CausewayBay - Southern" },
{ key: 6 , label: "HK Central - HK West" },
{ key: 7, label: "HK East" },
{ key: 8, label: "NT East (KCR line)" },
{ key: 9, label: "NT West" }
];
scheduler.config.lightbox.sections = [
{ name: "subject", height: 30, map_to: "text", type: "textarea", focus: true },
{ name: "description", height: 130, map_to: "text", type: "textarea", focus: true },
{ name: "custom", height: 23, type: "select", options: sections, map_to: "section_id" },
{ name: "time", height: 72, type: "time", map_to: "auto" }
];
scheduler.createTimelineView({
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 0,
x_length: 48,
y_unit: sections,
y_property: "section_id",
render: "bar"
});
function show_minical() {
if (scheduler.isCalendarVisible())
scheduler.destroyCalendar();
else
scheduler.renderCalendar({
position: "dhx_minical_icon",
date: scheduler._date,
navigation: true,
handler: function (date, calendar) {
scheduler.setCurrentView(date);
scheduler.destroyCalendar()
}
});
}
page_layout_header.attachScheduler(new Date(), "timeline");