mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
117 lines
4.2 KiB
HTML
Executable File
117 lines
4.2 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Loading content with AJAX</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="demo-section k-content wide">
|
|
<div id="wizard"></div>
|
|
</div>
|
|
<script>
|
|
$("#wizard").kendoWizard({
|
|
loadOnDemand: true,
|
|
reloadOnSelect: false,
|
|
steps: [
|
|
{
|
|
title: "Welcome",
|
|
buttons: ["next"],
|
|
contentUrl: "../content/web/wizard/ajax/ajaxContent1.html"
|
|
}, {
|
|
title: "Attendee Details",
|
|
contentUrl: "../content/web/wizard/ajax/ajaxContent2.html",
|
|
}, {
|
|
title: "Agenda",
|
|
buttons: ["previous", "next"],
|
|
contentUrl: "../content/web/wizard/ajax/ajaxContent3.html",
|
|
}, {
|
|
title: "Finalize",
|
|
buttons: ["previous", "done"],
|
|
contentUrl: "../content/web/wizard/ajax/ajaxContent4.html"
|
|
},
|
|
],
|
|
done: function (e) {
|
|
e.preventDefault();
|
|
var form = $('#attendeeDetails').getKendoForm();
|
|
var talkDDLValue = $("#talk").data("kendoDropDownList").value();
|
|
var workshopDDLValue = $("#workshop").data("kendoDropDownList").value();
|
|
|
|
if (!form.validate()) {
|
|
e.sender.stepper.steps()[1].setValid(false);
|
|
kendo.alert("Please complete registration form");
|
|
e.sender.select(1);
|
|
} else if (talkDDLValue == "" || workshopDDLValue == "") {
|
|
e.sender.stepper.steps()[1].setValid(true);
|
|
e.sender.stepper.steps()[2].setValid(false);
|
|
kendo.alert("Please select the talk and workshop you want to subscribe for");
|
|
e.sender.select(2);
|
|
}
|
|
else {
|
|
if (e.sender.stepper.steps()[1].options.error) {
|
|
e.sender.stepper.steps()[1].setValid(true);
|
|
e.sender.stepper.steps()[2].setValid(true);
|
|
}
|
|
|
|
kendo.alert("Thank you for registering! Registration details will be sent to your email.");
|
|
}
|
|
},
|
|
select: function (e) {
|
|
if (e.step.options.index == 3) {
|
|
updateSelection(e);
|
|
}
|
|
},
|
|
contentLoad: function (e) {
|
|
if (e.step.options.index == 3) {
|
|
updateSelection(e);
|
|
}
|
|
},
|
|
reset: function () {
|
|
var form = $('#attendeeDetails').getKendoForm();
|
|
|
|
if (form) {
|
|
form.clear();
|
|
}
|
|
}
|
|
});
|
|
|
|
function updateSelection(e) {
|
|
var selectedTalk = e.sender.wrapper.find('#talk').getKendoDropDownList().dataItem();
|
|
var selectedWorkshop = e.sender.wrapper.find('#workshop').getKendoDropDownList().dataItem();
|
|
$('#selectedTalk').html(selectedTalk.id === '' ? '' : selectedTalk.title);
|
|
$('#selectedWorkshop').html(selectedWorkshop.id === '' ? '' : selectedWorkshop.title);
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.wizardContainer {
|
|
display: flex;
|
|
height: 250px;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|