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

75 lines
2.3 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<title>Events</title>
<meta charset="utf-8">
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
<script src="../../js/jquery.min.js"></script>
<script src="../../js/jszip.min.js"></script>
<script src="../../js/kendo.all.min.js"></script>
<script src="../content/shared/js/console.js"></script>
<script>
</script>
</head>
<body>
<a class="offline-button" href="../index.html">Back</a>
<div id="example">
<span id="notification" style="display:none;"></span>
<div class="demo-section k-content" style="text-align: center;">
<p>
<button id="showNotification" class="k-button k-primary">Show</button> &nbsp; &nbsp;
<button id="hideAllNotifications" class="k-button">Hide All</button>
</p>
</div>
<script>
$(document).ready(function() {
function onShow(e) {
kendoConsole.log("event :: show (" + $(e.element).find(".timeWrap").text() + ")" );
}
function onHide(e) {
kendoConsole.log("event :: hide (" + $(e.element).find(".timeWrap").text() + ")" );
}
var notification = $("#notification").kendoNotification({
width: "12em",
show: onShow,
hide: onHide,
templates: [{
type: "time",
template: "<div style='padding: .6em 1em'>Time is: <span class='timeWrap'>#: time #</span></div>"
}]
}).data("kendoNotification");
$("#showNotification").click(function(){
var d = new Date();
notification.show({ time: kendo.toString(d, 'HH:MM:ss.') + kendo.toString(d.getMilliseconds(), "000") }, "time");
});
$("#hideAllNotifications").click(function(){
notification.hide();
});
});
</script>
</div>
</body>
</html>