[hg] galaxy 3632: Enable user to change dbkey from a known key b...
details: http://www.bx.psu.edu/hg/galaxy/rev/0dc1fc63c945 changeset: 3632:0dc1fc63c945 user: jeremy goecks <jeremy.goecks@emory.edu> date: Tue Apr 13 10:22:27 2010 -0400 description: Enable user to change dbkey from a known key back to unspecified. This is a hack, but there's no straightforward way to accomplish this without modifying the jquery autocomplete script. diffstat: static/scripts/galaxy.base.js | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diffs (30 lines): diff -r 968161f35d50 -r 0dc1fc63c945 static/scripts/galaxy.base.js --- a/static/scripts/galaxy.base.js Tue Apr 13 10:16:46 2010 -0400 +++ b/static/scripts/galaxy.base.js Tue Apr 13 10:22:27 2010 -0400 @@ -149,10 +149,10 @@ var select_mapping = {}; select_elt.children('option').each( function() { // Get text, value for option. - var text = $(this).text(); + var text = $(this).text(); var value = $(this).attr('value'); - // Ignore values that are '?' + // HACK: dbkey-specific: ignore values that are '?' if (value == '?') { return; } @@ -169,6 +169,13 @@ } }); + // HACK: dbkey-specific: add an unspecified option. We need to add this at the end b/c adding it first mucks + // up the autocomplete sorting for some reason. (I.e. All options that start with the first character of the + // first option are listed before the other, alphabetized options.) + select_options.push( "unspecified (?)" ); + select_mapping[ "unspecified (?)" ] = "?"; + select_mapping[ "?" ] = "?"; + // Set initial text if it's empty. if ( text_input_elt.attr('value') == '' ) { text_input_elt.attr('value', 'Click to Search or Select');
participants (1)
-
Greg Von Kuster