<table class="table-stripped">
<tbody>
<tr>
<td class="width-30">
    <input id="filter" type="search" class="width-100" placeholder="Filter by request name...">
</td>
<td class="width-10">
    <a href="#" id="search-btn" class="" onclick="BuildList('', requests.filter(FilterPattern))">Search</a>
</td>
<td class="width-60 right">
<div class="group">
    <nav class="navbar navbar-right">
        <ul>
        <li><b>Sort</b> by:</li>
        <li class="menu-item underline"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByDate))">Date</a></li>
        <li class="menu-item"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByStatus))">Status</a></li>
        <li class="menu-item"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByRequestor))">User</a></li>
        <li class="menu-item"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByGroup))">Group</a></li>
        </ul>
    </nav>
</div>
</td>
</tr>

<tr>
<td class="width-30">
    <input id="filter_campaign" type="search" class="width-100" placeholder="Filter by campaign ...">
</td>
<td class="width-10">
    <a href="#" id="search-btn" class="" onclick="BuildList('', requests.filter(FilterCampaign))">Search</a>
</td>
<td class="width-60 right">
<div class="group">
    <nav class="navbar navbar-right">
        <ul>
        <li><b>Sort</b> by:</li>
        <li class="menu-item"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByPattern))">Pattern</a></li>
        <li class="menu-item"><a href="#" onclick="BuildList(this, requests.filter(FilterPattern).sort(ByCampaign))">Campaign</a></li>
        </ul>
    </nav>
</div>
</td>
</tr>

</tbody>
</table>

<script>
// use jQuery to trigger press of Enter in search input field
\$("\#filter").keyup(function(event) {
    if(event.keyCode == 13){
        \$("\#search-btn").click();
    }
});
</script>
