mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
120 lines
3.5 KiB
HTML
Executable File
120 lines
3.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>API</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">
|
|
<div class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<div class="box-col">
|
|
<h4>Navigation</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<button class="k-button prev">Previous</button>
|
|
<button class="k-button next">Next</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box-col">
|
|
<h4>Open Event at Index</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<input type="text" id="eventIndex" />
|
|
<button class="openEvent k-button">Open event</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="demo-section k-content wide">
|
|
<div id="timeline"></div>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function () {
|
|
var next = function (e) {
|
|
var timeline = $("#timeline").data("kendoTimeline");
|
|
timeline.next();
|
|
};
|
|
|
|
var prev = function (e) {
|
|
var timeline = $("#timeline").data("kendoTimeline");
|
|
timeline.previous();
|
|
};
|
|
|
|
var openEvent = function (e) {
|
|
if (e.type != "keypress" || kendo.keys.ENTER == e.keyCode) {
|
|
var timeline = $("#timeline").data("kendoTimeline"),
|
|
eventIndex = $("#eventIndex").val(),
|
|
event = timeline.element.find("li.k-timeline-track-item:not(.k-timeline-flag-wrap)").eq(eventIndex);
|
|
|
|
timeline.open(event);
|
|
}
|
|
};
|
|
|
|
|
|
$(".next").click(next);
|
|
$(".prev").click(prev);
|
|
|
|
$(".openEvent").click(openEvent);
|
|
$(".openEvent").keypress(openEvent);
|
|
|
|
$("#eventIndex").kendoNumericTextBox({
|
|
min: 0,
|
|
max: 20,
|
|
decimal: 0,
|
|
format: "n0",
|
|
value: 0
|
|
});
|
|
|
|
$("#timeline").kendoTimeline({
|
|
dataSource: {
|
|
transport: {
|
|
read: {
|
|
url: "../content/web/timeline/events.json",
|
|
dataType: "json"
|
|
}
|
|
},
|
|
schema: {
|
|
model: {
|
|
fields: {
|
|
date: {
|
|
type: "date"
|
|
},
|
|
}
|
|
}
|
|
}
|
|
},
|
|
orientation: "horizontal"
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
<style>
|
|
.demo-section, .box {
|
|
max-width: 1200px;
|
|
}
|
|
</style>
|
|
|
|
|
|
</body>
|
|
</html>
|