admin管理员组文章数量:1794759
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);
};
本文标签: gantt
版权声明:本文标题:Gantt 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1696348866a327070.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论