Files
jube-fork/Jube.App/wwwroot/kendo/examples/actionsheet/index.html
2022-11-04 13:24:24 +02:00

79 lines
2.6 KiB
HTML
Executable File

<div data-role="view" data-title="Inbox" id="actionsheet-view" data-use-native-scrolling="true">
<h3 id="actionResult"></h3>
<ul data-role="listview" data-source="inbox" data-template="inboxItem" class="inboxList"></ul>
<ul data-role="actionsheet" id="inboxActions" data-open="onOpen" data-popup='{"direction": "left"}'>
<li class="km-actionsheet-title">Monday Meeting:</li>
<li><a href="#" data-action="reply">Reply</a></li>
<li><a href="#" data-action="replyAll">Reply All</a></li>
<li><a href="#" data-action="archive">Archive</a></li>
</ul>
</div>
<script type="script/x-kendo-template" id="inboxItem">
<a class="reply km-primary km-button-right"
data-role="button"
data-rel="actionsheet"
href="\\#inboxActions"
data-actionsheet-context="#:ID#">Reply</a>
<h6>#: From # <span class="disabled">#: Time#</span></h6>
<h4>#: Subject#</h4>
<p>#: Text#</p>
</script>
<script>
var inbox = [
{
ID: 1,
From: "John Doe",
Subject: "Monday meeting",
Text: "Hi Tom, Since Monday I'll be out of office, I'm rescheduling the meeting for Tuesday.",
Time: "07:56"
},
{
ID: 2,
From: "Sarah Connor",
Subject: "Regarding org chart changes",
Text: "Tom, I checked the new org chart last night and I have some reservations about it...",
Time: "08:22"
},
{
ID: 3,
From: "Jane Parker",
Subject: "Your Costume is ready",
Text: "Hi mr. Sawyer, I'm sorry for the delay, your Halloween costume is ready. The bears...",
Time: "10:14"
},
{
ID: 4,
From: "Joe Harper",
Subject: "I'm sorry, Tom",
Text: "Hi Tom, my aunt comes for a visit this Saturday, so I can't come back to St. Pete...",
Time: "10:14"
},
{
ID: 5,
From: "Becky Thatcher",
Subject: "Out tonight?",
Text: "Honey, wanna go out tonight to grab some chicken? My weekly vouchers for cooking...",
Time: "10:14"
}
];
function onOpen(e) {
this.element.find(".km-actionsheet-title").text(e.target.next().text());
}
function reply(e) {
$("#actionResult").html("Replying to message #" + e.context);
}
function replyAll(e) {
$("#actionResult").html("Replying to all in message #" + e.context);
}
function archive(e) {
$("#actionResult").html("Archiving message #" + e.context);
}
</script>