aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/static/new/javascript/get_traits_from_collection.js18
1 files changed, 3 insertions, 15 deletions
diff --git a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
index 8f6f389f..a55ab356 100644
--- a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
+++ b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
@@ -2,10 +2,6 @@
var add_trait_data, assemble_into_json, back_to_collections, collection_click, collection_list, color_by_trait, create_trait_data_csv, get_this_trait_vals, get_trait_data, process_traits, selected_traits, submit_click, this_trait_data, trait_click,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
-console.log("before get_traits_from_collection");
-
-//collection_list = null;
-
this_trait_data = null;
selected_traits = {};
@@ -69,7 +65,7 @@ if ( ! $.fn.DataTable.isDataTable( '#collection_table' ) ) {
collection_click = function() {
var this_collection_url;
- //console.log("Clicking on:", $(this));
+
this_collection_url = $(this).find('.collection_name').prop("href");
this_collection_url += "&json";
collection_list = $("#collections_holder").html();
@@ -87,9 +83,7 @@ submit_click = function() {
$('#collections_holder').find('input[type=checkbox]:checked').each(function() {
var this_dataset, this_trait, this_trait_url;
this_trait = $(this).parents('tr').find('.trait').text();
- console.log("this_trait is:", this_trait);
this_dataset = $(this).parents('tr').find('.dataset').text();
- console.log("this_dataset is:", this_dataset);
this_trait_url = "/trait/get_sample_data?trait=" + this_trait + "&dataset=" + this_dataset;
return $.ajax({
dataType: "json",
@@ -147,7 +141,7 @@ create_trait_data_csv = function(selected_traits) {
}
all_vals.push(this_trait_vals);
}
- console.log("all_vals:", all_vals);
+
trait_vals_csv = trait_names.join(",");
trait_vals_csv += "\n";
for (index = _k = 0, _len2 = samples.length; _k < _len2; index = ++_k) {
@@ -168,7 +162,7 @@ create_trait_data_csv = function(selected_traits) {
trait_click = function() {
var dataset, this_trait_url, trait;
- console.log("Clicking on:", $(this));
+
trait = $(this).parent().find('.trait').text();
dataset = $(this).parent().find('.dataset').text();
this_trait_url = "/trait/get_sample_data?trait=" + trait + "&dataset=" + dataset;
@@ -182,7 +176,6 @@ trait_click = function() {
trait_row_click = function() {
var dataset, this_trait_url, trait;
- console.log("Clicking on:", $(this));
trait = $(this).find('.trait').text();
dataset = $(this).find('.dataset').data("dataset");
this_trait_url = "/trait/get_sample_data?trait=" + trait + "&dataset=" + dataset;
@@ -256,7 +249,6 @@ populate_cofactor_info = function(trait_info) {
get_trait_data = function(trait_data, textStatus, jqXHR) {
var sample, samples, this_trait_vals, trait_sample_data, vals, _i, _len;
trait_sample_data = trait_data[1];
- console.log("IN GET TRAIT DATA")
if ( $('input[name=allsamples]').length ) {
samples = $('input[name=allsamples]').val().split(" ");
} else {
@@ -362,13 +354,11 @@ assemble_into_json = function(this_trait_vals) {
};
color_by_trait = function(trait_sample_data, textStatus, jqXHR) {
- console.log('in color_by_trait:', trait_sample_data);
return root.bar_chart.color_by_trait(trait_sample_data);
};
process_traits = function(trait_data, textStatus, jqXHR) {
var the_html, trait, _i, _len;
- console.log('in process_traits with trait_data:', trait_data);
the_html = "<button id='back_to_collections' class='btn btn-inverse btn-small'>";
the_html += "<i class='icon-white icon-arrow-left'></i> Back </button>";
the_html += " <button id='submit' class='btn btn-primary btn-small'> Submit </button>";
@@ -397,13 +387,11 @@ process_traits = function(trait_data, textStatus, jqXHR) {
};
back_to_collections = function() {
- console.log("collection_list:", collection_list);
$("#collections_holder").html(collection_list);
$(document).on("click", ".collection_line", collection_click);
return $('#collections_holder').colorbox.resize();
};
-console.log("inside get_traits_from_collection");
$(".collection_line").on("click", collection_click);
$("#submit").on("click", submit_click);
if ($('#scatterplot2').length){