-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (56 loc) · 2.45 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>jquery.bootstrapgridjs demo</title>
<meta charset="UTF-8" />
<script src="http://code.jquery.com/jquery.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<script src="jquery.bootstrapgrid.js"></script>
<script src="js/bootstrap.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div id="gridContainer">
<h1>jQuery BootstrapGridJS Demo</h1>
</div>
<!--templates-->
<script type="text/template" id="item-template">
<input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
</script>
<!--templates-->
<script type="text/javascript">
$(function(){
var data = [
{name:"Alan", height:171, weight:9, school:{name:'teste'}, done: true},
{name:"Aline", height:171, weight:1, school:{name:'teste'}, done: true},
{name:"Ben",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Benur",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Chris",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Robert Plant",height:182, weight:90, school:{name:'teste'}, done: false},
{name:"Gabriel",height:182, weight:90, school:{name:'teste'}, done: false},
{name:"Bernard",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Sandra",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Gabriela",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Alessandro",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Charles",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Priscilla Amorzinho",height:182, weight:90, school:{name:'teste'}, done: true},
{name:"Débora",height:182, weight:90, school:{name:'teste'}, done: false}
];
var columns = [{ header: 'Name', key: 'name', classHeader: 'span6'},
{ header: 'Height', key: 'height', classHeader: 'span2'},
{ header: 'Weight', key: 'weight', classHeader: 'span2'},
{ header: 'Done?', key: 'done', classHeader: 'span2'}
];
var rowClick = function(e){
alert(JSON.stringify(e));
};
$('#gridContainer').BootstrapGridJS({ data: data,
columns: columns,
rowClick: rowClick,
pageSize: 10,
contentClass: 'span6',
allowFilter: false });
});
</script>
</body>
</html>