Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
isaak committed Jul 19, 2023
2 parents cec6eee + 8352055 commit a9f196f
Show file tree
Hide file tree
Showing 49 changed files with 6,265 additions and 5,256 deletions.
2,249 changes: 0 additions & 2,249 deletions Search.pm

This file was deleted.

2 changes: 1 addition & 1 deletion js/source/entries/heritability.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function listGenCorPopulations () {
var listTypeSelPops = jQuery("#list_type_selection_pops_table").length;

if (listTypeSelPops) {
var selPopsList = solGS.sIndex.getListTypeSelPopulations();
var selPopsList = solGS.listTypeSelectionPopulation.getListTypeSelPopulations();

if (selPopsList) {
jQuery("#h2_select_a_population_div ul").append(selPopsList);
Expand Down
2 changes: 1 addition & 1 deletion js/source/legacy/CXGN/BreedersToolbox/Accessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ jQuery(document).ready(function ($) {
},
complete: function (r) {
//alert("DONE WITH UPLOAD "+r);
var clean_r = r.replace('<pre>', '');
var clean_r = r.replace(/^<pre[^>]*>/, '');
clean_r = clean_r.replace('</pre>', '');
response = JSON.parse(clean_r); //decodeURIComponent(clean_r));
console.log(response);
Expand Down
57 changes: 50 additions & 7 deletions js/source/legacy/CXGN/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,15 @@ CXGN.List.prototype = {
return addeditems;
},

/* listSelect: Creates an html select with lists of requested types.

/* getLists: Creates a js object with private and public lists of the requested list types.
Parameters:
div_name: The div_name where the select should appear
types: a list of list types that should be listed in the menu
add_empty_element: text. if present, add an empty element with the
provided text as description
types: a list of list types e.g. ['accessions', 'trials']
Returns:
a js object with 'private_lists' and public_lists, each with arrays of the requested list types
*/

listSelect: function(div_name, types, empty_element, refresh, hide_public_lists) {
getLists: function(types) {
var lists = new Array();
var public_lists = new Array();

Expand All @@ -706,6 +705,50 @@ CXGN.List.prototype = {
public_lists = this.publicLists();
}

return {
'private_lists': lists,
'public_lists': public_lists
}
},

/*
converts an array of list data arrays into an array of list data objects (named values)
*/
convertArrayToJson: function (listsArray) {

var jsonArray = [];
if (listsArray) {
listsArray.forEach(function (array) {

var listObj = {
id: array[0],
name: array[1],
type:array[5],
count: array[3]
}

jsonArray.push(listObj);
});
}

return jsonArray;
},

/* listSelect: Creates an html select with lists of requested types.
Parameters:
div_name: The div_name where the select should appear
types: a list of list types that should be listed in the menu
add_empty_element: text. if present, add an empty element with the
provided text as description
*/

listSelect: function(div_name, types, empty_element, refresh, hide_public_lists) {

var allLists = this.getLists(types);
var lists = allLists.private_lists;
var public_lists = allLists.public_lists;

var html = '<select class="form-control input-sm" id="'+div_name+'_list_select" name="'+div_name+'_list_select" >';
if (empty_element) {
html += '<option value="" >'+empty_element+'</option>\n';
Expand Down
2 changes: 1 addition & 1 deletion js/source/legacy/heritability/heritability.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function listGenCorPopulations () {
var listTypeSelPops = jQuery("#list_type_selection_pops_table").length;

if (listTypeSelPops) {
var selPopsList = solGS.sIndex.getListTypeSelPopulations();
var selPopsList = solGS.listTypeSelectionPopulation.getListTypeSelPopulations();

if (selPopsList) {
jQuery("#h2_select_a_population_div ul").append(selPopsList);
Expand Down
2 changes: 1 addition & 1 deletion js/source/legacy/qualityControl/qualityControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function listGenCorPopulations () {
var listTypeSelPops = jQuery("#list_type_selection_pops_table").length;

if (listTypeSelPops) {
var selPopsList = solGS.sIndex.getListTypeSelPopulations();
var selPopsList = solGS.listTypeSelectionPopulation.getListTypeSelPopulations();

if (selPopsList) {
jQuery("#qc_select_a_population_div ul").append(selPopsList);
Expand Down
Loading

0 comments on commit a9f196f

Please sign in to comment.