mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
added the spinners #3
This commit is contained in:
parent
895558218a
commit
723993b099
2 changed files with 11 additions and 5 deletions
|
@ -10,17 +10,22 @@ var searchTemplate = Handlebars.compile(searchSource);
|
||||||
var movieTimer = 0;
|
var movieTimer = 0;
|
||||||
var tvimer = 0;
|
var tvimer = 0;
|
||||||
|
|
||||||
$("#movieSearchContent").keypress(function () {
|
// Type in movie search
|
||||||
|
$("#movieSearchContent").on("input", function () {
|
||||||
if (movieTimer) {
|
if (movieTimer) {
|
||||||
clearTimeout(movieTimer);
|
clearTimeout(movieTimer);
|
||||||
}
|
}
|
||||||
|
$('#movieSearchButton').attr("class","fa fa-spinner fa-spin");
|
||||||
movieTimer = setTimeout(movieSearch, 400);
|
movieTimer = setTimeout(movieSearch, 400);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#tvSearchContent").keypress(function () {
|
// Type in TV search
|
||||||
|
$("#tvSearchContent").on("input", function () {
|
||||||
if (tvimer) {
|
if (tvimer) {
|
||||||
clearTimeout(tvimer);
|
clearTimeout(tvimer);
|
||||||
}
|
}
|
||||||
|
$('#tvSearchButton').attr("class", "fa fa-spinner fa-spin");
|
||||||
tvimer = setTimeout(tvSearch, 400);
|
tvimer = setTimeout(tvSearch, 400);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -31,7 +36,6 @@ $(document).on("click", ".dropdownTv", function (e) {
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
||||||
var $form = $('#form' + buttonId);
|
var $form = $('#form' + buttonId);
|
||||||
var data = $form.serialize();
|
var data = $form.serialize();
|
||||||
var seasons = $(this).attr("season-select");
|
var seasons = $(this).attr("season-select");
|
||||||
|
@ -103,6 +107,7 @@ function movieSearch() {
|
||||||
$("#movieList").append(html);
|
$("#movieList").append(html);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$('#movieSearchButton').attr("class","fa fa-search");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +123,7 @@ function tvSearch() {
|
||||||
$("#tvList").append(html);
|
$("#tvList").append(html);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$('#tvSearchButton').attr("class", "fa fa-search");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="movieSearchContent" type="text" class="form-control">
|
<input id="movieSearchContent" type="text" class="form-control">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-search"></i>
|
<i id="movieSearchButton" class="fa fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="tvSearchContent" type="text" class="form-control">
|
<input id="tvSearchContent" type="text" class="form-control">
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<i class="fa fa-search"></i>
|
<i id="tvSearchButton" class="fa fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue