diff options
Diffstat (limited to '')
-rw-r--r-- | static/js/kosten.ls | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/static/js/kosten.ls b/static/js/kosten.ls index ea433a4..f9876f8 100644 --- a/static/js/kosten.ls +++ b/static/js/kosten.ls @@ -58,6 +58,24 @@ $ !-> $ \input.search .focusout !-> $ \form.search .hide! +# Consts +export editConstJS = jq !-> + group = $ \select#group + category = $ \select#category + + group .change !-> + val = group .find \option:selected .val! + if category_data[val] == void # no group selected + category .prop \disabled false + else + category + ..find \option:selected .prop \selected false + ..find "option[value=#{category_data[val]}]" .prop \selected true + ..prop \disabled true + + # initial + group .change! + # Add export addJS = jq !-> $ 'input[name=date]' |