mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -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 tvimer = 0;
|
||||
|
||||
$("#movieSearchContent").keypress(function () {
|
||||
// Type in movie search
|
||||
$("#movieSearchContent").on("input", function () {
|
||||
if (movieTimer) {
|
||||
clearTimeout(movieTimer);
|
||||
}
|
||||
$('#movieSearchButton').attr("class","fa fa-spinner fa-spin");
|
||||
movieTimer = setTimeout(movieSearch, 400);
|
||||
|
||||
});
|
||||
|
||||
$("#tvSearchContent").keypress(function () {
|
||||
// Type in TV search
|
||||
$("#tvSearchContent").on("input", function () {
|
||||
if (tvimer) {
|
||||
clearTimeout(tvimer);
|
||||
}
|
||||
$('#tvSearchButton').attr("class", "fa fa-spinner fa-spin");
|
||||
tvimer = setTimeout(tvSearch, 400);
|
||||
});
|
||||
|
||||
|
@ -31,7 +36,6 @@ $(document).on("click", ".dropdownTv", function (e) {
|
|||
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
var $form = $('#form' + buttonId);
|
||||
var data = $form.serialize();
|
||||
var seasons = $(this).attr("season-select");
|
||||
|
@ -103,6 +107,7 @@ function movieSearch() {
|
|||
$("#movieList").append(html);
|
||||
});
|
||||
}
|
||||
$('#movieSearchButton').attr("class","fa fa-search");
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -118,6 +123,7 @@ function tvSearch() {
|
|||
$("#tvList").append(html);
|
||||
});
|
||||
}
|
||||
$('#tvSearchButton').attr("class", "fa fa-search");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue