Calling a text/x-Kendo-template script from a javascript function

Asked

Viewed 51 times

0

I have this new button and event onclick I’m calling the function openEditor(), and within this function I want to call a script of type text/x-kendo-template. How can I do that?

My code currently:

Custom button:

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>"
)

Function openEditor():

function openEditor() {
   *código para chamar o script customEditorTemplateBh*
}

Template Script:

<script id="customEditorTemplateBh" type="text/x-kendo-template"> 
   *código do template*
</script>

I’m using the Kendo Scheduler component and added that custom button to the component Toolbar.

1 answer

0


The following openEditor() code was enough:

var scheduler = $("#scheduler-bh").data("kendoScheduler");
scheduler.addEvent({ });

Browser other questions tagged

You are not signed in. Login or sign up in order to post.