forked from lix-project/hydra
Show visual feedback that the filter is being applied
This commit is contained in:
parent
11acf0be28
commit
10d959a9ff
|
@ -2,10 +2,12 @@
|
||||||
|
|
||||||
<form class="form-search" id="filter-jobs">
|
<form class="form-search" id="filter-jobs">
|
||||||
<input name="filter" type="text" class="input-large search-query" placeholder="Filter jobs..." [% HTML.attributes(value => filter) %]></input>
|
<input name="filter" type="text" class="input-large search-query" placeholder="Filter jobs..." [% HTML.attributes(value => filter) %]></input>
|
||||||
|
<img src="/static/images/ajax-loader.gif" alt="Loading..." style="display: none;" id="filter-loading" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#filter-jobs').submit(function() {
|
$('#filter-jobs').submit(function() {
|
||||||
|
$('#filter-loading').show();
|
||||||
$('#tabs-job-status').load("[% c.uri_for('/jobset' project.name jobset.name "job-status-tab") %]", $('#filter-jobs').serialize(), function(response, status, xhr) {
|
$('#tabs-job-status').load("[% c.uri_for('/jobset' project.name jobset.name "job-status-tab") %]", $('#filter-jobs').serialize(), function(response, status, xhr) {
|
||||||
if (status == "error") {
|
if (status == "error") {
|
||||||
$('#[% tabName %]').html("<div class='alert alert-error'>Error loading tab: " + xhr.status + " " + xhr.statusText + "</div>");
|
$('#[% tabName %]').html("<div class='alert alert-error'>Error loading tab: " + xhr.status + " " + xhr.statusText + "</div>");
|
||||||
|
|
Loading…
Reference in a new issue