bitbake: toaster: All Machines fix reset search link

In firefox this link wasn't valid as it was inside a button element.
Remove this and add a click handler for the button.

(Bitbake rev: 97366eae1d5c2c84b03b3e019480e56e03f812da)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood 2015-02-05 14:26:10 +00:00 committed by Richard Purdie
parent 9e8798fd37
commit a7ab4d0314
2 changed files with 7 additions and 2 deletions

View File

@ -90,4 +90,9 @@ function machinesPageInit (ctx) {
window.location.replace(ctx.projectPageUrl);
}, null);
});
$("#show-all-btn").click(function(){
$("#search").val("")
$("#searchform").submit();
});
}

View File

@ -34,7 +34,7 @@
{% if objects.paginator.count != 0 %}
{{objects.paginator.count}} machines found
{% else %}
No Machines found
No machines found
{% endif %}
{% else %}
@ -54,7 +54,7 @@
<input type="hidden" name="orderby" value="">
<input type="hidden" name="page" value="1">
<button class="btn" type="submit" value="Search">Search</button>
<button type="submit" class="btn btn-link"><a href="{%url 'machines' %}">Show all machines</a></button>
<button type="submit" class="btn btn-link" id="show-all-btn">Show all machines</button>
</form>
</div>
{% else %}