-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (86 loc) · 2.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="container">
<div>
</div>
</div>
<script src="smartpag.js"></script>
<script>
let items = [
{
name: "Guga",
age: 21,
comment: "ddd",
idPrdo: 123
},
{
name: "Gio",
age: 20,
comment: "ddd",
idPrdo: 123
},
{
name: "Levan",
age: 25,
comment: "ddd",
idPrdo: 123
},
{
name: "nika",
age: 26,
comment: "ddd",
idPrdo: 123
},
{
name: "tato",
age: 27,
comment: "ddd",
idPrdo: 123
},
{
name: "dato",
age: 65,
comment: "ddd",
idPrdo: 123
}
];
let config = {
keys: [
// {header: "შემოწმება", name: "checkBox", edit: true, hide: false, searchable: true},
{header: "სახელი" ,name: "name", edit: false, hide: false, searchable: true},
{header: "ასაკი", name: "age", edit: false, hide: false, searchable: true},
{header: "კომენტარი", name: "comment", edit: true, hide: false, searchable: true},
{header: "კომენტარი", name: "idPrdo", edit: false, hide: false, searchable: true}
],
pageSize: 3,
id: 1,
parentDiv: "container"
};
// function act (me) {
// console.log(me.innerHTML);
// me.classList.toggle("smart-pag-active");
// }
let pagination = new SmartPag(items, config, logThis);
function logThis (es) {
// console.log(es);
let items = [...es.slice()];
let newItems = [];
for (let item of items) {
if (parseInt(item.age) > 21) {
newItems.push(item);
}
}
// console.log(newItems);
// console.log(es);
}
// document.getElementsByClassName("smart-header-new-class1")[document.getElementsByClassName("smart-header-new-class1").length-1].colSpan = "3";
</script>
<script src="./script.js"></script>
</body>
</html>