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

0

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

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

openEditor () function :

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's toolbar.

    
asked by anonymous 14.07.2017 / 15:52

1 answer

0

The following code in openEditor () was enough:

var scheduler = $("#scheduler-bh").data("kendoScheduler");
scheduler.addEvent({ });
    
20.07.2017 / 20:30