我在我的MVC3项目中使用了DHTMLX Scheduler。我需要使用Recurring事件调度程序。除DB外,所有配置似乎都很好。我需要知道我需要在服务器上包含哪些必要的字段来重复发生事件。
如何定期重复事件的xml配置和数据检索。在该示例教程中包含服务器端代码,如在php中。所以我不知道如何为MVC环境编写代码。请指导我如何做到这一点。
索引
function init() {
scheduler.templates.event_text = function (start, end, ev) {
return 'Event: ' + ev.Description + '';
};
scheduler.templates.calendar_month = scheduler.date.date_to_str("%F %Y");
scheduler.config.full_day = true;
scheduler.locale.labels.full_day = "Full day";
//week label of calendar
scheduler.templates.calendar_scale_date = scheduler.date.date_to_str("%D");
//date value on the event's details form
scheduler.templates.calendar_time = scheduler.date.date_to_str("%d-%m-%Y");
scheduler.config.repeat_date = "%m-%d-%Y";
scheduler.config.update_render = "true";
scheduler.locale.labels.section_category = 'Category';
scheduler.locale.labels.section_location = 'Title';
scheduler.config.lightbox.sections = [
{ name: "location", height: 15, map_to: "title", type: "textarea" },
{ name: "description", height: 50, map_to: "text", type: "textarea", focus: true },
{ name: "recurring", height: 115, type: "recurring", map_to: "rec_type", button: "recurring" },
{ name: "time", height: 72, type: "time", map_to: "auto" },
{ name: "category", height: 22, type: "select", map_to: "category", options: [
{key:"", label:"Select Category"},
{key:"A", label:"Public"},
{key:"P", label:"Private"},
{key:"C", label:"Closed"}
]}
]
scheduler.config.xml_date = "%m/%d/%Y %H:%i";
scheduler.init("scheduler_here", new Date(), "month");
scheduler.load("/Admin/EventCalendar/Dat");
var dp = new dataProcessor("/Admin/EventCalendar/Save");
dp.init(scheduler);
dp.setTransactionMode("POST", false);
}
感谢。
答案 0 :(得分:1)
您需要在DB
中为相关记录定义4个字段