details: http://www.bx.psu.edu/hg/galaxy/rev/f550290ed5ad changeset: 3754:f550290ed5ad user: jeremy goecks <jeremy.goecks@emory.edu> date: Fri May 07 09:16:51 2010 -0400 description: Replace large selects w/o refresh_on_change with search+select. diffstat: static/scripts/galaxy.base.js | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diffs (24 lines): diff -r e42d0ae7b789 -r f550290ed5ad static/scripts/galaxy.base.js --- a/static/scripts/galaxy.base.js Fri May 07 08:52:43 2010 -0400 +++ b/static/scripts/galaxy.base.js Fri May 07 09:16:51 2010 -0400 @@ -145,12 +145,16 @@ } // Replace select box with a text input box + autocomplete. -// TODO: make work with dynamic tool inputs and then can replace all big selects. +// TODO: make work with selects where refresh_on_change=True and refresh_on_change_values="..." function replace_big_select_inputs(min_length) { - $('select[name=dbkey]').each( function() { + // Set default for min_length. + if (min_length === undefined) + min_length = 20; + + $('select[refresh_on_change!="true"]').each( function() { var select_elt = $(this); - // Skip if # of options < threshold - if (min_length !== undefined && select_elt.find('option').length < min_length) + // Skip if # of options < min length. + if (select_elt.find('option').length < min_length) return; // Replace select with text + autocomplete.