diff options
author | emkael <emkael@tlen.pl> | 2019-08-01 14:16:52 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-08-01 14:19:26 +0200 |
commit | 2cf067473e78844aa616de98bcf0cfcadada2431 (patch) | |
tree | d28970628cd8b4ad0b07607606bf498d97377294 /http/dealconvert.js | |
parent | 05d8c2a8b6801533144e1c0aa7e550ec44e0d946 (diff) |
DD hand analysis optional in API version
Fixes #3
Diffstat (limited to 'http/dealconvert.js')
-rw-r--r-- | http/dealconvert.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/http/dealconvert.js b/http/dealconvert.js index 2478fe9..ab8e90b 100644 --- a/http/dealconvert.js +++ b/http/dealconvert.js @@ -3,8 +3,14 @@ $(document).ready(function() { $('input[name="output"]').change(function() { if ($('input[name="output"]:checked').length > 0) { $('#submit-btn').removeAttr('disabled'); + if ($('input[name="output"][value="pbn"]').is(':checked')) { + $('#analyze-boards').removeAttr('disabled'); + } else { + $('#analyze-boards').attr('disabled', 'disabled').prop('checked', false); + } } else { $('#submit-btn').attr('disabled', 'disabled'); + $('#analyze-boards').attr('disabled', 'disabled').prop('checked', false); } }); $('#input-files').change(function() { @@ -17,6 +23,7 @@ $(document).ready(function() { output.push(this.value); }); var display = that.find('input[name="display"]').is(':checked'); + var analyze = that.find('input[name="analyze"]').is(':checked'); var files = {}; var formFiles = this['input-files'].files; if (formFiles.length) { @@ -42,7 +49,8 @@ $(document).ready(function() { 'name': file, 'content': files[file], 'output': output, - 'display_deals': display + 'display_deals': display, + 'analyze_deals': analyze }; $.ajax( 'api/upload/', |