aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-05-12 18:12:52 +0000
committerzsloan2021-05-12 18:12:52 +0000
commit1efc014dd5efc34d95b536f51f8a1de914069e20 (patch)
tree319613ebb81eb6e22fc663c199bfb96060dcd394
parent55f23731f66a8445635c8c3195b18369aa740626 (diff)
downloadgenenetwork2-1efc014dd5efc34d95b536f51f8a1de914069e20.tar.gz
Remove maxlength from value/SE input fields and base the width off of the max digits for that sample group's vals
-rw-r--r--wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
index 05e4d547..f9369fb9 100644
--- a/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
+++ b/wqflask/wqflask/static/new/javascript/initialize_show_trait_tables.js
@@ -40,9 +40,9 @@ build_columns = function() {
'data': null,
'render': function(data, type, row, meta) {
if (data.value == null) {
- return '<input type="text" data-value="x" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_value" value="x" size=6 maxlength=6>'
+ return '<input type="text" data-value="x" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_value" value="x" size=' + js_data.max_digits[0] + '>'
} else {
- return '<input type="text" data-value="' + data.value.toFixed(3) + '" data-qnorm="' + js_data['qnorm_values'][0][parseInt(data.this_id) - 1] + '" data-zscore="' + js_data['zscore_values'][0][parseInt(data.this_id) - 1] + '" name="value:' + data.name + '" class="trait_value_input edit_sample_value" value="' + data.value.toFixed(3) + '" size=6 maxlength=6>'
+ return '<input type="text" data-value="' + data.value.toFixed(3) + '" data-qnorm="' + js_data['qnorm_values'][0][parseInt(data.this_id) - 1] + '" data-zscore="' + js_data['zscore_values'][0][parseInt(data.this_id) - 1] + '" name="value:' + data.name + '" class="trait_value_input edit_sample_value" value="' + data.value.toFixed(3) + '" size=' + js_data.max_digits[0] + '>'
}
}
}
@@ -66,9 +66,9 @@ build_columns = function() {
'data': null,
'render': function(data, type, row, meta) {
if (data.variance == null) {
- return '<input type="text" data-value="x" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" class="trait_value_input edit_sample_se" value="x" size=6 maxlength=6>'
+ return '<input type="text" data-value="x" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" class="trait_value_input edit_sample_se" value="x" size=6>'
} else {
- return '<input type="text" data-value="' + data.variance.toFixed(3) + '" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" class="trait_value_input edit_sample_se" value="' + data.variance.toFixed(3) + '" size=6 maxlength=6>'
+ return '<input type="text" data-value="' + data.variance.toFixed(3) + '" data-qnorm="x" data-zscore="x" name="value:' + data.name + '" class="trait_value_input edit_sample_se" value="' + data.variance.toFixed(3) + '" size=6>'
}
}
}