-
Notifications
You must be signed in to change notification settings - Fork 38
/
index.html
120 lines (79 loc) · 3.26 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
/*
* examples/mysql/index.html
*
* This file is part of EditableGrid.
* http://editablegrid.net
*
* Copyright (c) 2011 Webismymind SPRL
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://editablegrid.net/license
*/
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>EditableGrid Demo - Database Link</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/responsive.css" type="text/css" media="screen">
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" href="css/font-awesome-4.7.0/css/font-awesome.min.css" type="text/css" media="screen">
</head>
<body>
<div id="message"></div>
<div id="wrap">
<h1>EditableGrid Demo - Database Link</h1>
<!-- Feedback message zone -->
<div id="toolbar">
<input type="text" id="filter" name="filter" placeholder="Filter :type any text here" />
<a id="showaddformbutton" class="button green"><i class="fa fa-plus"></i> Add new row</a>
</div>
<!-- Grid contents -->
<div id="tablecontent"></div>
<!-- Paginator control -->
<div id="paginator"></div>
</div>
<script src="js/jquery-1.11.1.min.js" ></script>
<script src="js/editablegrid-2.1.0-49.js"></script>
<!-- EditableGrid test if jQuery UI is present. If present, a datepicker is automatically used for date type -->
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script src="js/demo.js" ></script>
<script type="text/javascript">
var datagrid;
window.onload = function() {
datagrid = new DatabaseGrid();
// key typed in the filter field
$("#filter").keyup(function() {
datagrid.editableGrid.filter( $(this).val());
// To filter on some columns, you can set an array of column index
//datagrid.editableGrid.filter( $(this).val(), [0,3,5]);
});
$("#showaddformbutton").click( function() {
showAddForm();
});
$("#cancelbutton").click( function() {
showAddForm();
});
$("#addbutton").click(function() {
datagrid.addRow();
});
}
$(function () {
});
</script>
<!-- simple form, used to add a new row -->
<div id="addform">
<div class="row">
<input type="text" id="name" name="name" placeholder="name" />
</div>
<div class="row">
<input type="text" id="firstname" name="firstname" placeholder="firstname" />
</div>
<div class="row tright">
<a id="addbutton" class="button green" ><i class="fa fa-save"></i> Apply</a>
<a id="cancelbutton" class="button delete">Cancel</a>
</div>
</div>
</body>
</html>