datatracker/ietf/static/js/ipr-search.js
Lars Eggert 9c05373699 More fixes.
- Legacy-Id: 19856
2022-01-18 20:04:55 +00:00

37 lines
1.2 KiB
JavaScript

$(document)
.ready(function () {
// hack the "All States" check box
$("#id_state")
.addClass("list-inline");
$("#id_state input[value!=all]")
.on("change", function (e) {
if (this.checked) {
$("#id_state input[value=all]")
.prop('checked', false);
}
});
$("#id_state_0")
.on("change", function (e) {
if (this.checked) {
$("#id_state input[value!=all]")
.prop('checked', false);
}
});
// make enter presses submit through the nearby button
// FIXME: this seems to be broken
$("form.ipr-search input,select")
.on("keyup", function (e) {
var submitButton = $(this)
.closest(".mb-3")
.find('button[type=submit]');
if (e.which == 13 && submitButton.length > 0) {
submitButton.trigger("click");
return false;
} else {
return true;
}
});
});