summaryrefslogtreecommitdiff
path: root/static/js/kosten.js
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2016-01-11 21:42:45 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2016-07-08 23:36:35 +0200
commit667a7a4285d4e97ed5242e60df909f3ecdd35d59 (patch)
treea0cf7d1301a58b96ac602a205b44cd721242e93f /static/js/kosten.js
parent0d3591f913b36a1e19fae06a2d2e17e62631130d (diff)
downloadkosten-667a7a4285d4e97ed5242e60df909f3ecdd35d59.tar.gz
kosten-667a7a4285d4e97ed5242e60df909f3ecdd35d59.tar.bz2
kosten-667a7a4285d4e97ed5242e60df909f3ecdd35d59.zip
Started to include const expense groups
Diffstat (limited to 'static/js/kosten.js')
-rw-r--r--static/js/kosten.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/static/js/kosten.js b/static/js/kosten.js
index 7d6582c..b1ce683 100644
--- a/static/js/kosten.js
+++ b/static/js/kosten.js
@@ -1,6 +1,6 @@
// Generated by LiveScript 1.4.0
(function(){
- var jq, setLang, extendDate, addJS, showJS, statJS, catsJS, out$ = typeof exports != 'undefined' && exports || this;
+ var jq, setLang, editConstsJS, extendDate, addJS, showJS, statJS, catsJS, out$ = typeof exports != 'undefined' && exports || this;
jQuery.fn.extend({
copy: function(){
return this.clone().removeAttr('id class');
@@ -59,6 +59,24 @@
$('form.search').hide();
});
});
+ out$.editConstJS = editConstJS = jq(function(){
+ var group, category;
+ group = $('select#group');
+ category = $('select#category');
+ group.change(function(){
+ var val, x$;
+ val = group.find('option:selected').val();
+ if (category_data[val] === void 8) {
+ category.prop('disabled', false);
+ } else {
+ x$ = category;
+ x$.find('option:selected').prop('selected', false);
+ x$.find("option[value=" + category_data[val] + "]").prop('selected', true);
+ x$.prop('disabled', true);
+ }
+ });
+ group.change();
+ });
out$.addJS = addJS = jq(function(){
var x$;
x$ = $('input[name=date]');