Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clarify what the code is for
  • Loading branch information
zoffixznet committed Nov 14, 2015
1 parent a247df0 commit 965f0c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mojo-app/public/js/main.js
Expand Up @@ -3,6 +3,8 @@ $(function(){
});

function setup_table() {
var filter_container, filter;

$('#dists').DataTable({
paging: false,
autoWidth: false,
Expand All @@ -20,14 +22,14 @@ function setup_table() {
]
});

// Mess around with markup to accomodate the table plugin and marry
// it nicely with both our JS-less version of the site and Bootstrap
$('#dists_wrapper').addClass('table-responsive').unwrap();
$('#search').remove();

var filter_container = $('#dists_filter');
var filter = filter_container.addClass('form-group').find('[type=search]')
filter_container = $('#dists_filter');
filter = filter_container.addClass('form-group').find('[type=search]')
.addClass('form-control').attr('placeholder', 'Search');
filter_container.append(filter);
filter_container.find('label').remove();

filter.focus();
}

0 comments on commit 965f0c6

Please sign in to comment.