diff options
author | Zachary Sloan | 2012-10-10 14:50:23 -0500 |
---|---|---|
committer | Zachary Sloan | 2012-10-10 14:50:23 -0500 |
commit | 8c91843b58e7534ea0070357ca53e28d6beb84d2 (patch) | |
tree | b578d6578ab3b567ee17e7bd778c354c0e0abb67 | |
parent | 2b3aaf9b9da45d6a4c4bb461edb4a2d4247ed8ea (diff) | |
download | genenetwork2-8c91843b58e7534ea0070357ca53e28d6beb84d2.tar.gz |
Committing before removing some attempted validation code for the trait data page
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.coffee | 26 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 8 |
2 files changed, 29 insertions, 5 deletions
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.coffee b/wqflask/wqflask/static/new/javascript/show_trait.coffee index 5e47dedc..9498a1bb 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.coffee +++ b/wqflask/wqflask/static/new/javascript/show_trait.coffee @@ -237,14 +237,34 @@ $ -> else if $('#block_group').val() == "other" $('#Other_'+index.toString()).find('.trait_value_input').val("x") - $('#remove_samples_field').validate( + $('#block_by_index').click(block_by_index) + + #validate_block_index = -> + # $('#remove_samples_field').valid( + # rules: + # field: + # required: true + # number: true + # messages: + # field: + # "Please check that your input is valid." + # ) + + $('#trait_data_form').validate() + + $('#remove_samples_field').valid( rules: field: required: true number: true - ) + messages: + field: + "Please check that your input is valid." + ) + + #$('#remove_samples_field').change(validate_block_index) + - $('#block_by_index').click(block_by_index) ##End Block Samples By Index Code diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 7af60fae..5704e183 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -280,15 +280,19 @@ } return _results; }; - $('#remove_samples_field').validate({ + $('#block_by_index').click(block_by_index); + $('#trait_data_form').validate(); + $('#remove_samples_field').valid({ rules: { field: { required: true, number: true } + }, + messages: { + field: "Please check that your input is valid." } }); - $('#block_by_index').click(block_by_index); hide_no_value = function() { var _this = this; return $('.value_se').each(function(index, element) { |