diff options
author | Marius Halden <marius.h@lden.org> | 2015-11-16 11:15:10 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2015-11-16 11:15:10 +0100 |
commit | 1339a64632c441e4d7858bd5946738c9840c624d (patch) | |
tree | 0b1393ca9af05d1af690fbf6c569c195f4136e4c /web/js/fixmystreet.js | |
parent | 17cc40a8a2387669984ae4a36bb0d30d889d1a07 (diff) | |
parent | 4fb5331abd2fa4c89ebeb89bc92a245fadd0aa19 (diff) |
Merge branch 'fiksgatami-dev' into fiksgatami-prod
Oppgrader prod til 1.7
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r-- | web/js/fixmystreet.js | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 78372d68c..51fa01559 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -31,16 +31,16 @@ $(function(){ // Questionnaire hide/showings if (!$('#been_fixed_no').prop('checked') && !$('#been_fixed_unknown').prop('checked')) { - $('#another_qn').hide(); + $('.js-another-questionnaire').hide(); } - $('#been_fixed_no').click(function() { - $('#another_qn').show('fast'); + $('#been_fixed_no').on('click', function() { + $('.js-another-questionnaire').show('fast'); }); - $('#been_fixed_unknown').click(function() { - $('#another_qn').show('fast'); + $('#been_fixed_unknown').on('click', function() { + $('.js-another-questionnaire').show('fast'); }); - $('#been_fixed_yes').click(function() { - $('#another_qn').hide('fast'); + $('#been_fixed_yes').on('click', function() { + $('.js-another-questionnaire').hide('fast'); }); // Form validation @@ -177,13 +177,8 @@ $(function(){ category: $(this).val() }; - if ( typeof fixmystreet !== 'undefined' ) { - args.latitude = fixmystreet.latitude; - args.longitude = fixmystreet.longitude; - } else { - args.latitude = $('input[name="latitude"]').val(); - args.longitude = $('input[name="longitude"]').val(); - } + args.latitude = $('input[name="latitude"]').val(); + args.longitude = $('input[name="longitude"]').val(); $.getJSON('/report/new/category_extras', args, function(data) { var $category_meta = $('#category_meta'); |