Better datatable ordering options

v0.1.7
Dan Krieger 2016-07-19 11:16:50 -07:00
parent 9099e5fbf4
commit 04c3264dd6
1 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,7 @@
<table class="table table-striped" id="main_table"> <table class="table table-striped" id="main_table">
<thead> <thead>
<tr> <tr>
<th>#</th>
<th>Name</th> <th>Name</th>
<th>Job</th> <th>Job</th>
<th>Time</th> <th>Time</th>
@ -63,6 +64,10 @@
<td> <td>
<%= index %>. <%= index %>.
<% index += 1 %> <% index += 1 %>
</td>
<td>
<% if (crontab.name) { %> <% if (crontab.name) { %>
<%= crontab.name %> <%= crontab.name %>
@ -111,7 +116,17 @@
<% include popup.ejs %> <% include popup.ejs %>
<script> <script>
jQuery(function($) { jQuery(function($) {
$('#main_table').DataTable(); $('#main_table').DataTable({
order: [1, 'asc'],
columns: [
{orderable: false},
null,
null,
null,
{orderable: false},
{orderable: false}
]
});
}); });
</script> </script>
</body> </body>