diff options
3 files changed, 48 insertions, 34 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee index cd6dc1d8..03048c5d 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee @@ -4,5 +4,13 @@ $ -> url = "/marker_regression" $("#trait_data_form").attr("action", url); $("#trait_data_form").submit() + + $("#marker_regression_btn").click(run_marker_regression) + + + + + composite_mapping_fields = -> + $(".composite_fields").toggle() - $("#marker_regression_btn").click(run_marker_regression)
\ No newline at end of file + $("#use_composite_choice").change(composite_mapping_fields)
\ No newline at end of file diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js index cca396a9..20e379df 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js @@ -2,7 +2,7 @@ (function() { $(function() { - var run_marker_regression; + var composite_mapping_fields, run_marker_regression; run_marker_regression = function() { var url; console.log("In marker regression"); @@ -10,7 +10,11 @@ $("#trait_data_form").attr("action", url); return $("#trait_data_form").submit(); }; - return $("#marker_regression_btn").click(run_marker_regression); + $("#marker_regression_btn").click(run_marker_regression); + composite_mapping_fields = function() { + return $(".composite_fields").toggle(); + }; + return $("#use_composite_choice").change(composite_mapping_fields); }); }).call(this); diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index b6215fca..1119d619 100644 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -59,39 +59,41 @@ </div> {% endif %} - <div class="well well-small"> - <div class="control-group"> - <label class="control-label"><b>Composite Mapping</b></label> - <div class="controls"> - <label class="radio inline"> - <input type="radio" name="scale" id="scale" value="megabase"> - Yes - </label> - <label class="radio inline"> - <input type="radio" name="scale" id="scale" value="centimorgan" checked> - No - </label> - </div> + <div class="control-group"> + <label class="control-label"><b>Composite Mapping</b></label> + <div class="controls" id="use_composite_choice"> + <label class="radio inline"> + <input type="radio" name="use_composite" + id="use_composite" value="yes"> + Yes + </label> + <label class="radio inline"> + <input type="radio" name="use_composite" + id="use_composite" value="no" checked> + No + </label> </div> - <div class="control-group"> - <label class="control-label">Choose Closest Control</label> - <div class="controls"> - <label class="radio inline"> - <input type="radio" name="scale" id="scale" value="megabase"> - Yes - </label> - <label class="radio inline"> - <input type="radio" name="scale" id="scale" value="centimorgan" checked> - No - </label> - </div> + </div> + <div class="control-group composite_fields" style="display: none;"> + <label class="control-label">Choose Closest Control</label> + <div class="controls"> + <label class="radio inline"> + <input type="radio" name="default_control_locus" + id="default_control_locus" value="yes"> + Yes + </label> + <label class="radio inline"> + <input type="radio" name="default_control_locus" + id="default_control_locus" value="no" checked> + No + </label> </div> - <div class="control-group"> - <label for="mapping_bootstraps" class="control-label" - title="Bootstrapping Resamples">Control Locus</label> - <div class="controls"> - <input name="mapping_bootstraps" value="2000" type="text" /> - </div> + </div> + <div class="control-group composite_fields" style="display: none;"> + <label for="mapping_bootstraps" class="control-label" + title="Bootstrapping Resamples">Control Locus</label> + <div class="controls"> + <input name="mapping_bootstraps" value="2000" type="text" /> </div> </div> |