I have the following template which opens a modal with the id "terminAbsagen".
In the modal i have a button with id "absagen" which needs the id of the entry i clicked, so i can take further actions for that item, e.g. delete the entry via Ajax:
<script id="termineTemplate" type="text/x-kendo-template">
<a
class="details-link"
data-role="listview-link"
href="\#termindetails?id=#:id#">
<h2>#:titel# #:date# um #:time# Uhr, #:ort#</h2>
</a>
<div class="options">
<a data-role="button" data-item-id="#:id#" href="\#terminAbsagen" data-rel="modalview">absagen</a>
</div>
<div data-role="modalview" id="terminAbsagen" style="width: 95%; height: 80%;">
<div data-role="header">
<div data-role="navbar">
<span>Abmelden</span>
</div>
</div>
<ul data-role="listview">
<li> Möchten Sie sich wirklich abmelden?</li>
</ul>
<div data-role="footer">
<div data-role="navbar">
<a data-click="doSomething(idOfItem)" id="absagen" type="button" data-role="button" class="btn-primary">Ja</a>
</div>
</div>
</div>
</script>
In the modal i have a button with id "absagen" which needs the id of the entry i clicked, so i can take further actions for that item, e.g. delete the entry via Ajax:
<script id="termineTemplate" type="text/x-kendo-template">
<a
class="details-link"
data-role="listview-link"
href="\#termindetails?id=#:id#">
<h2>#:titel# #:date# um #:time# Uhr, #:ort#</h2>
</a>
<div class="options">
<a data-role="button" data-item-id="#:id#" href="\#terminAbsagen" data-rel="modalview">absagen</a>
</div>
<div data-role="modalview" id="terminAbsagen" style="width: 95%; height: 80%;">
<div data-role="header">
<div data-role="navbar">
<span>Abmelden</span>
</div>
</div>
<ul data-role="listview">
<li> Möchten Sie sich wirklich abmelden?</li>
</ul>
<div data-role="footer">
<div data-role="navbar">
<a data-click="doSomething(idOfItem)" id="absagen" type="button" data-role="button" class="btn-primary">Ja</a>
</div>
</div>
</div>
</script>