forked from TheJLifeX/HTMLTableEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
235 lines (221 loc) · 11.3 KB
/
index.html
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="html table editable and sortable">
<meta name="keywords" content="HTML,table,editor,sortable,insert,delete,edit,row,column,JavaScript,JQuery">
<meta name="author" content="Ulrich Tiofack">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table Editor</title>
<!-- Favicons -->
<link href="icon-table-editor.png" rel="shortcut icon" type="image/x-icon">
<link href="icon-table-editor.png" rel="apple-touch-icon" type="image/x-icon">
<!-- datatables CSS -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<!-- fontawesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- datatables JS -->
<script type="text/javascript" charset="utf8"
src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<script src="main.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-139212587-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-139212587-1');
</script>
</head>
<body>
<div class="page-header">
<h1 style="text-align: center">Table Editor</h1>
</div>
<div class="container">
<div class="row justify-content-end">
<div>
<button id="save-data" class="btn btn-primary" data-toggle="tooltip" data-placement="right"
data-trigger="hover" title="Export all created data as JSON."><i
class="fas fa-download"></i></button>
</div>
</div>
</div>
<div class="container jumbotron create-row">
<h3>Create row</h3>
<form>
<div class="form-row">
</div>
<button type="submit" class="btn btn-primary" id="add-row">add row</button>
<span><i class="fas fa-check text-success"></i></span>
</form>
</div>
<div class="container">
<table class="table table-striped table-bordered" id="table_id" class="display">
<thead class="thead-dark">
<tr>
<th scope="col" class="default" data-toggle="popover" data-placement="top" title="Tipps">#</th>
</tr>
</thead>
</table>
</div>
<!-- edit row modal -->
<div class="modal fade edit-row-modal" tabindex="-1" role="dialog" aria-labelledby="editRowModal"
aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content jumbotron">
<h3>Edit row</h3>
<form>
<div class="form-row">
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" id="edit-row-confirm">Confirm</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<!-- add column modal -->
<div style="z-index: 4000;" class="modal fade add-column-modal" tabindex="-2" role="dialog"
aria-labelledby="addColumnModal" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content jumbotron">
<h3>Add column</h3>
<form>
<div class="form-row">
<div class="col-md-2 mb-3">
<label>Name</label>
<input type="text" class="form-control" id="create-column-input01" placeholder="column name"
required>
</div>
<div class="col-md-2 mb-3">
<label>Entry type</label>
<select class="form-control" id="create-column-input02">
<option value="drop-down">drop-down</option>
<option value="text">text</option>
<option value="number">number</option>
<!-- Todo -->
<!-- <option value="date">date</option> -->
</select>
</div>
</div>
<h5>Constrains</h5>
<div class="form-row type01 constrains">
<div class="col-md-6 mb-3">
<label>drop-down options</label>
<input type="text" class="form-control" id="type01-input01"
placeholder="option1,option2,..." required>
</div>
<div class="col-md-2 mb-3">
<label>default option</label>
<select type="text" class="form-control" id="type01-input02" placeholder="option value"
required> </select>
</div>
</div>
<div style="display: none;" class="form-row type02 constrains">
<div class="col-md-2 mb-3">
<label>placeholder</label>
<input type="text" class="form-control" id="type02-input01" placeholder="Product ...">
</div>
<!-- <div class="col-md-4 mb-3">
<label>pattern</label>
<input type="text" class="form-control" id="type02-input02" placeholder="^Product">
</div> -->
<div class="col-md-2 mb-3">
<label>default value</label>
<input type="text" class="form-control" id="type02-input03" required>
</div>
</div>
<div style="display: none;" class="form-row type03 constrains">
<div class="col-md-2 mb-3">
<label>placeholder</label>
<input type="text" class="form-control" id="type03-input01" placeholder="0.00">
</div>
<!-- <div class="col-md-4 mb-3">
<label>pattern</label>
<input type="text" class="form-control" id="type03-input02"
placeholder="^([0-9]+)(.)([0-9]{2})$">
</div> -->
<div class="col-md-2 mb-3">
<label>min value</label>
<input type="number" class="form-control" id="type03-input03">
</div>
<div class="col-md-2 mb-3">
<label>min max</label>
<input type="number" class="form-control" id="type03-input04">
</div>
<div class="col-md-2 mb-3">
<label>default value</label>
<input type="number" class="form-control" id="type03-input05" placeholder="0.50" required>
</div>
</div>
<!-- Todo -->
<!-- <div style="display: none;" class="form-row type04 constrains">
<div class="col-md-2 mb-3">
<label>starting at</label>
<input type="date" class="form-control" id="type04-input01">
</div>
<div class="col-md-2 mb-3">
<label>between</label>
<input type="date" class="form-control" id="type04-input02">and
<input type="date" class="form-control" id="type04-input03">
</div>
<div class="col-md-2 mb-3">
<label>default value</label>
<input type="date" class="form-control" id="type04-input04" required>
</div>
</div> -->
<div class="modal-footer">
<button type="submit" class="btn btn-primary" id="add-column">confirm</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<!-- confirm delete column modal -->
<div class="modal fade" id="delete-column-modal" tabindex="-1" role="dialog" aria-labelledby="deleteColumn"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Are you sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Do you really want to delete this column? This process cannot be undone.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger" id="delete-column-confirm">Delete</button>
</div>
</div>
</div>
</div>
<div class="container">
<a href="https://github.com/TheJLifeX" target="_blank"><i class="fab fa-github"></i></a>
View <strong> <a href="https://github.com/TheJLifeX" target="_blank">@TheJLifeX</a> </strong> on
GitHub for open-source projects such as
<strong><a href="https://github.com/TheJLifeX/HTMLTableEditor">HTMLTableEditor</a></strong>,
<strong><a href="https://github.com/TheJLifeX/KI_Wumpus">AI in the Wumpus game</a></strong> and
<strong><a href="https://github.com/TheJLifeX/DataVolumeCheck">DataVolumeCheck</a></strong>.
</div>
<!-- popper js-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<!-- bootstrap js-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>