form searching
parent
803574a799
commit
5efceed10f
|
@ -17,7 +17,7 @@ object user {
|
|||
import commons._
|
||||
st.form(
|
||||
rel := "nofollow",
|
||||
cls := "search realtime",
|
||||
cls := "search",
|
||||
action := routes.User.games(u.username, "search"),
|
||||
method := "GET"
|
||||
)(dataReqs)(
|
||||
|
|
|
@ -85,14 +85,6 @@ $(function() {
|
|||
|
||||
$form.submit(function() {
|
||||
$form.find("input,select").filter(function() { return !this.value; }).attr("disabled", "disabled");
|
||||
$(this).addClass('searching');
|
||||
$form.addClass('searching');
|
||||
});
|
||||
|
||||
if ($form.hasClass('realtime')) {
|
||||
var submit = function() {
|
||||
$form.submit();
|
||||
};
|
||||
$form.find("select, input[type=checkbox]").change(submit);
|
||||
$usernames.on("keyup", lichess.debounce(submit, 1500));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
color: red;
|
||||
}
|
||||
|
||||
.action {
|
||||
text-align: center;
|
||||
}
|
||||
.button {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -71,7 +74,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.searching {
|
||||
&.searching {
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
|
Loading…
Reference in New Issue