-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample13.html
More file actions
72 lines (71 loc) · 2.64 KB
/
Copy pathexample13.html
File metadata and controls
72 lines (71 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Cell editing | AltEditor examples</title>
<link
rel="stylesheet"
href="https://cdn.datatables.net/2.3.8/css/dataTables.dataTables.css"
/>
<link rel="stylesheet" href="../../dist/dataTables.altEditor.css" />
<link rel="stylesheet" href="../examples.css" />
<script src="../theme.js"></script>
</head>
<body class="examples-page">
<main class="example-main">
<header class="example-header">
<nav aria-label="Example navigation">
<a href="../../index.html">← All examples</a>
· <a href="./example13.js">Configuration source</a>
· <a href="https://github.com/bensitu/DataTable-AltEditor/blob/develop/docs/examples.md">Example guide</a>
</nav>
<p class="example-eyebrow">DataTable-AltEditor / Example 13</p>
<h1>Cell editing</h1>
<p>
Double-click a cell to edit it. Enter saves, Escape cancels, and Tab
or Shift+Tab saves and moves within the row. Leaving a control cancels
its unsaved value.
</p>
<p>
Names are required, email addresses must be valid, and ages must be
between 0 and 120. Sorting or paging cancels unsaved edits. Saves take
a short time to demonstrate pending requests.
</p>
<p>
For controls displayed directly inside cells, see
<a href="../14_rendered_controls/example14.html">rendered controls and inline editing</a>.
</p>
</header>
<label><input id="fail-next" type="checkbox" /> Fail the next save</label>
<p id="status" role="status" aria-live="polite">Ready to edit.</p>
<section>
<h2>People</h2>
<div
class="example-table"
tabindex="0"
role="region"
aria-label="Editable table 1"
>
<table class="dataTable display" id="people"></table>
</div>
</section>
<section>
<h2>Array rows</h2>
<p>The City column uses numeric data source 0.</p>
<div
class="example-table"
tabindex="0"
role="region"
aria-label="Editable table 2"
>
<table class="dataTable display" id="cities"></table>
</div>
</section>
</main>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/2.3.8/js/dataTables.js"></script>
<script src="../../dist/dataTables.altEditor.js"></script>
<script src="./example13.js"></script>
</body>
</html>