Added datatables to web interface

This commit is contained in:
Chris Sexton 2013-06-16 23:23:58 -04:00
parent 76e6644b8b
commit bddd4038bb
1 changed files with 19 additions and 1 deletions

View File

@ -9,6 +9,16 @@ var factoidIndex string = `
<head>
<title>Factoids</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.1.0/pure-min.css">
<!-- DataTables CSS -->
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
<!-- jQuery -->
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<!-- DataTables -->
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
</head>
<div>
<form action="/factoid" method="GET" class="pure-form">
@ -62,7 +72,7 @@ var factoidIndex string = `
{{if .Entries}}
<div style="padding-top: 1em;">
<table class="pure-table">
<table class="pure-table" id="factTable">
<thead>
<tr>
<th>Trigger</th>
@ -86,5 +96,13 @@ var factoidIndex string = `
</div>
{{end}}
<script>
$(document).ready(function(){
$('#factTable').dataTable({
"bPaginate": false
});
});
</script>
</html>
`