diff options
author | Sam Ockman | 2012-06-14 06:02:11 -0400 |
---|---|---|
committer | Sam Ockman | 2012-06-14 06:02:11 -0400 |
commit | 02e022348c5b865d03a446cdd19c7c920bb3c2c5 (patch) | |
tree | 3bbc0ab41e0690bead1692205d1b2ebdead3cc5e /wqflask | |
parent | e054dc538873ce5f500494aa26ffa50e0ec35e06 (diff) | |
download | genenetwork2-02e022348c5b865d03a446cdd19c7c920bb3c2c5.tar.gz |
Changing tabs now works in data trait and analysis
Diffstat (limited to 'wqflask')
3 files changed, 73 insertions, 5 deletions
diff --git a/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.coffee b/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.coffee new file mode 100644 index 00000000..118be8ec --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.coffee @@ -0,0 +1,26 @@ +console.log("start_b") + +$ -> + hide_tabs = (start) -> + for x in [start..10] + $("#stats_tabs" + x).hide() + console.log("hidden:", x) + + console.log("start_a") + hide_tabs(1) + + + console.log("hidden?") + + + stats_mdp_change = -> + console.log("In stats_mdp_change") + selected = $(this).val() + console.log("Change was:", selected) + hide_tabs(0) + $("#stats_tabs" + selected).show() + + $(".stats_mdp").change(stats_mdp_change) + + console.log("tape") + diff --git a/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.js b/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.js new file mode 100644 index 00000000..e59edbdb --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/trait_data_and_analysis.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.3.3 +(function() { + + console.log("start_b"); + + $(function() { + var hide_tabs, stats_mdp_change; + hide_tabs = function(start) { + var x, _i, _results; + _results = []; + for (x = _i = start; start <= 10 ? _i <= 10 : _i >= 10; x = start <= 10 ? ++_i : --_i) { + $("#stats_tabs" + x).hide(); + _results.push(console.log("hidden:", x)); + } + return _results; + }; + console.log("start_a"); + hide_tabs(1); + console.log("hidden?"); + stats_mdp_change = function() { + var selected; + console.log("In stats_mdp_change"); + selected = $(this).val(); + console.log("Change was:", selected); + hide_tabs(0); + return $("#stats_tabs" + selected).show(); + }; + $(".stats_mdp").change(stats_mdp_change); + return console.log("tape"); + }); + +}).call(this); diff --git a/wqflask/wqflask/templates/trait_data_and_analysis.html b/wqflask/wqflask/templates/trait_data_and_analysis.html index ca191313..39174425 100644 --- a/wqflask/wqflask/templates/trait_data_and_analysis.html +++ b/wqflask/wqflask/templates/trait_data_and_analysis.html @@ -537,7 +537,7 @@ <div class="ui-tabs" id="stats_tabs2"> - #} + <ul> <li><a href="#statstabs-1" class="stats_tab">Basic Table</a></li> @@ -675,6 +675,7 @@ </td> </tr> </table> + #} <p class="sectionheader" id="title3" style="border-radius: 5px;"> Calculate Correlations</p> @@ -1266,7 +1267,7 @@ <tr> <td><span class="ffl fwb fs12">Return:</span></td> - <td><select name="criteria1" size="1" onmouseover="if (NS4 || IE4) activateEl('criterias', event);"> + <td><select name="criteria1" size="1"> <option value="100"> top 100 </option> @@ -1906,7 +1907,7 @@ <tr> <td><span class="ffl fwb fs12">Return:</span></td> - <td><select name="criteria2" size="1" onmouseover="if (NS4 || IE4) activateEl('criterias', event);"> + <td><select name="criteria2" size="1"> <option value="100"> top 100 </option> @@ -2545,7 +2546,7 @@ <tr> <td><span class="ffl fwb fs12">Return:</span></td> - <td><select name="criteria3" size="1" onmouseover="if (NS4 || IE4) activateEl('criterias', event);"> + <td><select name="criteria3" size="1"> <option value="100"> top 100 </option> @@ -5040,5 +5041,14 @@ </tr> </table> </td> - </tr><!-- End of body --> + </tr> + <script> + console.log("test inline") + </script> + <script type="text/javascript" src="/static/new/javascript/trait_data_and_analysis.js"></script> + <script> + console.log("test inline - after") + </script> + + <!-- End of body --> {% endblock %} |