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>Orientation</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 class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<div class="box-col">
|
|
<h4>Orientation Settings</h4>
|
|
<ul class="options">
|
|
<li>
|
|
<label for="orientation">Orientation:</label>
|
|
<input id="orientation" name="orientation" />
|
|
</li>
|
|
</ul>
|
|
<br />
|
|
<a class="k-button" id="apply" href="#" style="width: 80px;">Apply</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="example">
|
|
<div class="demo-section k-content">
|
|
<div id="validation-success"></div>
|
|
|
|
<form id="exampleForm"></form>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
var validationSuccess = $("#validation-success");
|
|
|
|
$("#exampleForm").kendoForm({
|
|
orientation: "vertical",
|
|
formData: {
|
|
Username: "johny",
|
|
Email: "[email protected]",
|
|
Password: "abc123",
|
|
Birth: new Date(),
|
|
Agree: false
|
|
},
|
|
items: [{
|
|
type: "group",
|
|
label: "Registration Form",
|
|
items: [
|
|
{ field: "Username", label: "Username:", validation: { required: true } },
|
|
{ field: "Email", label: "Email:", validation: { required: true } },
|
|
{
|
|
field: "Password",
|
|
label: "Password:",
|
|
validation: { required: true },
|
|
hint: "Hint: enter alphanumeric characters only.",
|
|
editor: function(container, options) {
|
|
container.append($("<input type='password' class='k-textbox k-valid' id='Password' name='Password' title='Password' required='required' autocomplete='off' aria-labelledby='Password-form-label' data-bind='value:Password' aria-describedby='Password-form-hint'>"));
|
|
}
|
|
},
|
|
{ field: "Birth", label: { text: "Date of birth:", optional: true } },
|
|
{ field: "Agree", label: "Agree to Terms:", validation: { required: true } },
|
|
]
|
|
}],
|
|
validateField: function (e) {
|
|
validationSuccess.html("");
|
|
},
|
|
submit: function (e) {
|
|
e.preventDefault();
|
|
validationSuccess.html("<div class='k-messagebox k-messagebox-success'>Form data is valid!</div>");
|
|
},
|
|
clear: function (ev) {
|
|
validationSuccess.html("");
|
|
}
|
|
});
|
|
|
|
$("#orientation").kendoDropDownList({
|
|
dataTextField: "text",
|
|
dataValueField: "value",
|
|
dataSource: [
|
|
{ text: "Vertical", value: "vertical" },
|
|
{ text: "Horizontal", value: "horizontal" }
|
|
]
|
|
});
|
|
|
|
$("#apply").click(function (e) {
|
|
var form = $("#exampleForm").data("kendoForm");
|
|
var dropdownlist = $("#orientation").data("kendoDropDownList");
|
|
|
|
form.setOptions({
|
|
orientation: dropdownlist.value()
|
|
})
|
|
|
|
validationSuccess.html("");
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|