Gantt
Templates of the Lightbox
gantt.templates = {task_date: '指定灯箱“时间段”部分中日期标签的格式',task_text: '指定任务栏中的文本和灯箱的标题',task_time: '指定灯箱标题中的日期时间段',lightbox_header: '指定灯箱的标题',time_picker: '指定灯箱中下拉时间选择器的格式'
}
用法:
task_date: 指定灯箱“时间段”部分中日期标签的格式
/**
* @param date:Date 需要格式化的日期
*/
gantt.templates.task_date = function (date) {return gantt.date.date_to_str(gantt.config.task_date)(date);
};
task_text: 指定任务栏中的文本和灯箱的标题
/**
* @param start:Date 任务计划开始的日期
* @param end:Date 计划完成任务的日期
* @param task:object 任务对象
*/
gantt.templates.task_text = function (start, end, task) {return task.text;
};
task_time: 指定灯箱标题中的日期时间段
/**
* @param start:Date 任务计划开始的日期
* @param end:Date 计划完成任务的日期
* @param task:object 任务对象
*/
gantt.templates.task_time = function (start, end, task) {return gantt.templates.task_date(start) + " - " + gantt.templates.task_end_date(end);
};
lightbox_header: 指定灯箱的标题
/**
* @param start:Date 任务计划开始的日期
* @param end:Date 计划完成任务的日期
* @param task:object 任务对象
*/
gantt.templates.lightbox_header = function (start, end, task) {return 'lightbox_header';
};
time_picker: 指定灯箱中下拉时间选择器的格式
/**
* @param date:Date 需要格式化的日期
*/
gantt.config.lightbox.sections = [{ name: "description", type: "textarea", map_to: "text", height: 40, focus: true },{ name: "time", type: "duration", map_to: "auto", time_format: ["%Y", "%m", "%d", "%H:%i"] }
];gantt.templates.time_picker = function (date) {return gantt.date.date_to_str(gantt.config.time_picker)(date);
};
发布者:admin,转转请注明出处:http://www.yc00.com/news/1696348858a777015.html
评论列表(0条)