Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check LA's species variable correctly #180

Merged
merged 1 commit into from
Jan 2, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check LA's species variable correctly
This variable is only defined by select instances

Fixes gitlab issue 664
  • Loading branch information
ahinz committed Dec 20, 2013
commit 13b036a75349adc3c9c910f5f7802123d0262f38
3 changes: 2 additions & 1 deletion static/js/page_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,11 @@ tm.generateLocationDropdown = function(locations) {

tm.generateSpeciesDropdown = function(speciesData) {
//TODO - use css for striping
var show_all_species = typeof tm_show_all_species !== 'undefined' && tm_show_all_species;
var ul = $("<ul id='s_list' style='max-height:180px; overflow:auto;'></ul>");
$("#searchSpeciesList").append(ul).hide();
for(var i=0; i<speciesData.length;i++) {
if (!tm_show_all_species && speciesData[i].count == 0) {continue;}
if (!show_all_species && speciesData[i].count == 0) {continue;}
var c = "ac_odd";
if (i%2 == 0) {c = 'ac-even';}
ul.append("<li id='" + speciesData[i].id + "' class='" + c + "'>" + tm.formatTreeName(speciesData[i]) + "</li>")
Expand Down