-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiot0_place.html
60 lines (58 loc) · 3.19 KB
/
iot0_place.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Build CRUD DataGrid with jQuery EasyUI - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.3/themes/icon.css">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.3/demo/demo.css">
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.5.3/jquery.edatagrid.js"></script>
</head>
<body>
<h2>CRUD DataGrid</h2>
<p>Double click the row to begin editing.</p>
<table id="dg" title="Places" style="width:700px;height:250px"
toolbar="#toolbar" pagination="true" idField="id"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="plant" width="50" editor="text">Plant</th>
<th field="workshop" width="50" editor="text">Workshop</th>
<th field="region" width="50" editor="text">region</th>
<th field="line" width="50" editor="text">line</th>
<th field="station" width="50" editor="text">station</th>
<th field="channel" width="50" editor="text">channel</th>
<!-- <th field="region" width="50" editor="{type:'validatebox',options:{required:true}}">Region</th>
<th field="line" width="50" editor="{type:'validatebox',options:{required:true}}">Line</th>
<th field="station" width="50" editor="{type:'validatebox',options:{required:true}}">Station</th>
<th field="channel" width="50" editor="{type:'validatebox',options:{required:true}}">Channel</th> -->
<!-- <th field="email" width="50" editor="{type:'validatebox',options:{required:true,validType:'email'}}">Email</th> -->
</tr>
</thead>
</table>
<div id="toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:$('#dg').edatagrid('addRow')">New</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:$('#dg').edatagrid('destroyRow')">Destroy</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#dg').edatagrid('saveRow')">Save</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#dg').edatagrid('cancelRow')">Cancel</a>
</div>
<script type="text/javascript">
$(function(){
$('#dg').edatagrid({
url: 'get_places.php',
saveUrl: 'save_place.php',
updateUrl: 'update_user.php',
destroyUrl: 'destroy_place.php',
onSuccess: function(index, row) {
alert(row.msg);
},
onError: function(index, row) {
alert(row.msg);
}
});
});
</script>
</body>
</html>