JQxScheduler 如何在时间轴视图上垂直滚动?
JQxScheduler How can I scroll vertically on the timeline view?
我正在寻找一些可以扩展我自己的自定义功能的基本调度程序。 JQxScheduler
看起来很简单,重量也很轻。我正在尝试 fiddle 使用时间轴视图。问题是我只看到它们有水平滚动。 Here is an example. I have looked at the API reference,但对我来说没有什么特别的。
通过单击小箭头而不是滚动来显示更多约会的方式对用户来说不是很友好。我如何自定义它以便我可以垂直滚动?
我需要这个,因为我想在左侧创建一个树结构,以便将垂直滚动与时间轴视图同步。
如果链接不起作用,这里是控件的代码。
$(document).ready(function () {
var appointments = new Array();
var appointment1 = {
id: "id1",
description: "George brings projector for presentations.",
location: "",
subject: "Quarterly Project Review Meeting",
calendar: "Room 1",
start: new Date(2015, 10, 23, 9, 0, 0),
end: new Date(2015, 10, 23, 16, 0, 0)
}
var appointment2 = {
id: "id2",
description: "",
location: "",
subject: "IT Group Mtg.",
calendar: "Room 2",
start: new Date(2015, 10, 24, 10, 0, 0),
end: new Date(2015, 10, 24, 15, 0, 0)
}
var appointment3 = {
id: "id3",
description: "",
location: "",
subject: "Course Social Media",
calendar: "Room 3",
start: new Date(2015, 10, 27, 11, 0, 0),
end: new Date(2015, 10, 27, 13, 0, 0)
}
var appointment4 = {
id: "id4",
description: "",
location: "",
subject: "New Projects Planning",
calendar: "Room 2",
start: new Date(2015, 10, 23, 16, 0, 0),
end: new Date(2015, 10, 23, 18, 0, 0)
}
var appointment5 = {
id: "id5",
description: "",
location: "",
subject: "Interview with James",
calendar: "Room 1",
start: new Date(2015, 10, 25, 15, 0, 0),
end: new Date(2015, 10, 25, 17, 0, 0)
}
var appointment6 = {
id: "id6",
description: "",
location: "",
subject: "Interview with Nancy",
calendar: "Room 4",
start: new Date(2015, 10, 26, 14, 0, 0),
end: new Date(2015, 10, 26, 16, 0, 0)
}
appointments.push(appointment1);
appointments.push(appointment2);
appointments.push(appointment3);
appointments.push(appointment4);
appointments.push(appointment5);
appointments.push(appointment6);
// prepare the data
var source =
{
dataType: "array",
dataFields: [
{ name: 'id', type: 'string' },
{ name: 'description', type: 'string' },
{ name: 'location', type: 'string' },
{ name: 'subject', type: 'string' },
{ name: 'calendar', type: 'string' },
{ name: 'start', type: 'date' },
{ name: 'end', type: 'date' }
],
id: 'id',
localData: appointments
};
var adapter = new $.jqx.dataAdapter(source);
$("#scheduler").jqxScheduler({
date: new $.jqx.date(2015, 11, 23),
width: 850,
height: 600,
source: adapter,
showLegend: false,
ready: function () {
$("#scheduler").jqxScheduler('ensureAppointmentVisible', 'id1');
},
resources:
{
colorScheme: "scheme05",
dataField: "calendar",
source: new $.jqx.dataAdapter(source)
},
appointmentDataFields:
{
from: "start",
to: "end",
id: "id",
description: "description",
location: "place",
subject: "subject",
resourceId: "calendar"
},
view: 'timelineWeekView',
views:
[
'timelineDayView',
'timelineWeekView',
'timelineMonthView'
]
});
});`
您可以根据要显示的约会数量更改初始高度。这样,时间轴视图将能够在没有向下箭头的情况下容纳所有这些。
我正在寻找一些可以扩展我自己的自定义功能的基本调度程序。 JQxScheduler
看起来很简单,重量也很轻。我正在尝试 fiddle 使用时间轴视图。问题是我只看到它们有水平滚动。 Here is an example. I have looked at the API reference,但对我来说没有什么特别的。
通过单击小箭头而不是滚动来显示更多约会的方式对用户来说不是很友好。我如何自定义它以便我可以垂直滚动?
我需要这个,因为我想在左侧创建一个树结构,以便将垂直滚动与时间轴视图同步。
如果链接不起作用,这里是控件的代码。
$(document).ready(function () {
var appointments = new Array();
var appointment1 = {
id: "id1",
description: "George brings projector for presentations.",
location: "",
subject: "Quarterly Project Review Meeting",
calendar: "Room 1",
start: new Date(2015, 10, 23, 9, 0, 0),
end: new Date(2015, 10, 23, 16, 0, 0)
}
var appointment2 = {
id: "id2",
description: "",
location: "",
subject: "IT Group Mtg.",
calendar: "Room 2",
start: new Date(2015, 10, 24, 10, 0, 0),
end: new Date(2015, 10, 24, 15, 0, 0)
}
var appointment3 = {
id: "id3",
description: "",
location: "",
subject: "Course Social Media",
calendar: "Room 3",
start: new Date(2015, 10, 27, 11, 0, 0),
end: new Date(2015, 10, 27, 13, 0, 0)
}
var appointment4 = {
id: "id4",
description: "",
location: "",
subject: "New Projects Planning",
calendar: "Room 2",
start: new Date(2015, 10, 23, 16, 0, 0),
end: new Date(2015, 10, 23, 18, 0, 0)
}
var appointment5 = {
id: "id5",
description: "",
location: "",
subject: "Interview with James",
calendar: "Room 1",
start: new Date(2015, 10, 25, 15, 0, 0),
end: new Date(2015, 10, 25, 17, 0, 0)
}
var appointment6 = {
id: "id6",
description: "",
location: "",
subject: "Interview with Nancy",
calendar: "Room 4",
start: new Date(2015, 10, 26, 14, 0, 0),
end: new Date(2015, 10, 26, 16, 0, 0)
}
appointments.push(appointment1);
appointments.push(appointment2);
appointments.push(appointment3);
appointments.push(appointment4);
appointments.push(appointment5);
appointments.push(appointment6);
// prepare the data
var source =
{
dataType: "array",
dataFields: [
{ name: 'id', type: 'string' },
{ name: 'description', type: 'string' },
{ name: 'location', type: 'string' },
{ name: 'subject', type: 'string' },
{ name: 'calendar', type: 'string' },
{ name: 'start', type: 'date' },
{ name: 'end', type: 'date' }
],
id: 'id',
localData: appointments
};
var adapter = new $.jqx.dataAdapter(source);
$("#scheduler").jqxScheduler({
date: new $.jqx.date(2015, 11, 23),
width: 850,
height: 600,
source: adapter,
showLegend: false,
ready: function () {
$("#scheduler").jqxScheduler('ensureAppointmentVisible', 'id1');
},
resources:
{
colorScheme: "scheme05",
dataField: "calendar",
source: new $.jqx.dataAdapter(source)
},
appointmentDataFields:
{
from: "start",
to: "end",
id: "id",
description: "description",
location: "place",
subject: "subject",
resourceId: "calendar"
},
view: 'timelineWeekView',
views:
[
'timelineDayView',
'timelineWeekView',
'timelineMonthView'
]
});
});`
您可以根据要显示的约会数量更改初始高度。这样,时间轴视图将能够在没有向下箭头的情况下容纳所有这些。