From 5b26284d86552491f57fc3a2477a2d97adcba9d7 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 20 Dec 2012 17:46:42 -0600 Subject: Changed layout of marker regression options --- .../new/javascript/show_trait_mapping_tools.coffee | 24 ++-- .../new/javascript/show_trait_mapping_tools.js | 16 ++- .../templates/show_trait_mapping_tools.html | 126 ++++++++------------- 3 files changed, 70 insertions(+), 96 deletions(-) (limited to 'wqflask') 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 2cfc1c5b..b1f5b186 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee @@ -5,19 +5,23 @@ $ -> $("#trait_data_form").attr("action", url); $("#trait_data_form").submit() - $("#marker_regression_btn").click(run_marker_regression) - - - - + $("#do_marker_regression").click(run_marker_regression) + + composite_mapping_fields = -> $(".composite_fields").toggle() - + $("#use_composite_choice").change(composite_mapping_fields) + + + toggle_enable_disable = (elem) -> + $(elem).prop("disabled", !$(elem.prop("disabled"))) - - + $("#choose_closet_control").change(-> - elem = "#control_locus" - $(elem).prop("disabled", !$(elem).prop("disabled")) + toggle_enable_disable("#control_locus") + ) + + $("#display_all_lrs").change(-> + toggle_enable_disable("#suggestive_lrs") ) \ 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 3923ebb7..c8328498 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 composite_mapping_fields, run_marker_regression; + var composite_mapping_fields, run_marker_regression, toggle_enable_disable; run_marker_regression = function() { var url; console.log("In marker regression"); @@ -10,15 +10,19 @@ $("#trait_data_form").attr("action", url); return $("#trait_data_form").submit(); }; - $("#marker_regression_btn").click(run_marker_regression); + $("#do_marker_regression").click(run_marker_regression); composite_mapping_fields = function() { return $(".composite_fields").toggle(); }; $("#use_composite_choice").change(composite_mapping_fields); - return $("#choose_closet_control").change(function() { - var elem; - elem = "#control_locus"; - return $(elem).prop("disabled", !$(elem).prop("disabled")); + toggle_enable_disable = function(elem) { + return $(elem).prop("disabled", !$(elem.prop("disabled"))); + }; + $("#choose_closet_control").change(function() { + return toggle_enable_disable("#control_locus"); + }); + return $("#display_all_lrs").change(function() { + return toggle_enable_disable("#suggestive_lrs"); }); }); diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index bbca2400..8436703d 100644 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -9,9 +9,9 @@
-
- - - - - - |
- ||||
Pair-Scan searches for pairs of chromosomal regions
- that are - involved in two-locus epistatic interactions. |
-