Add notes about min/max, and hide invalid options

This commit is contained in:
rubenwardy
2019-01-28 22:28:47 +00:00
parent 5cd8b35d1f
commit 034315d421
5 changed files with 81 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
var min = $("#min_rel");
var max = $("#max_rel");
var none = $("#min_rel option:first-child").attr("value");
var warning = $("#minmax_warning");
function ver_check() {
var minv = min.val();
var maxv = max.val();
if (minv != none && maxv != none && minv > maxv) {
warning.show();
} else {
warning.hide();
}
}
min.change(ver_check);
max.change(ver_check);