文本/ X-剑道模板脚本型我this新的按钮和onclick
事件我打电话功能openEditor()
,而这个函数中我要调用一个text/x-kendo-template
脚本类型。我怎样才能做到这一点?从调用一个JavaScript函数
我现在代码:
自定义按钮:
schedulerToolbar.append(
"<ul class='k-reset'>
<li class='k-state-default'>
<a role='button' href='#' class='k-link newMeetingButton' onclick='openEditor()'>
Nova reserva
</a>
</li>
</ul>"
)
功能openEditor():
function openEditor() {
*code to call customEditorTemplateBh script*
}
模板脚本:
<script id="customEditorTemplateBh" type="text/x-kendo-template">
*template code*
</script>
编辑:我正在使用kendo计划程序,并在工具栏上添加了该自定义按钮。通过调用template
作为函数
var template = kendo.template($("#customEditorTemplateBh").html());
从这里你可以提供您的模板所需的所有数据: