details: http://www.bx.psu.edu/hg/galaxy/rev/ab7877640903 changeset: 3172:ab7877640903 user: jeremy goecks <jeremy.goecks@emory.edu> date: Thu Dec 10 15:37:00 2009 -0500 description: Replace dbkey select boxes in library interface with search+select boxes. diffstat: templates/admin/library/ldda_edit_info.mako | 17 +++++++++++++++++ templates/admin/library/upload.mako | 10 ++++++++++ templates/library/ldda_edit_info.mako | 17 +++++++++++++++++ templates/library/library_dataset_common.mako | 7 +++++++ templates/library/upload.mako | 10 ++++++++++ templates/tool_form.mako | 7 ++----- 6 files changed, 63 insertions(+), 5 deletions(-) diffs (128 lines): diff -r 97226da136bf -r ab7877640903 templates/admin/library/ldda_edit_info.mako --- a/templates/admin/library/ldda_edit_info.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/admin/library/ldda_edit_info.mako Thu Dec 10 15:37:00 2009 -0500 @@ -3,6 +3,23 @@ <%namespace file="/admin/library/common.mako" import="render_template_info" /> <% from galaxy import util %> +<%def name="javascripts()"> + ${parent.javascripts()} + ${h.js("jquery.autocomplete", "autocomplete_tagging" )} + ## Script to replace dbkey select with select+search. + <script type="text/javascript"> + // Replace dbkey select with search+select. + jQuery(document).ready( function() { + replace_dbkey_select(); + }); + </script> +</%def> + +<%def name="stylesheets()"> + ${parent.stylesheets()} + ${h.css( "autocomplete_tagging" )} +</%def> + %if ldda == ldda.library_dataset.library_dataset_dataset_association: <b><i>This is the latest version of this library dataset</i></b> %else: diff -r 97226da136bf -r ab7877640903 templates/admin/library/upload.mako --- a/templates/admin/library/upload.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/admin/library/upload.mako Thu Dec 10 15:37:00 2009 -0500 @@ -11,6 +11,16 @@ replace_id = 'None' %> +<%def name="javascripts()"> + ${parent.javascripts()} + ${h.js("jquery.autocomplete", "autocomplete_tagging" )} +</%def> + +<%def name="stylesheets()"> + ${parent.stylesheets()} + ${h.css( "autocomplete_tagging" )} +</%def> + <b>Create new data library datasets</b> %if replace_dataset in [ None, 'None' ]: ## Don't allow multiple datasets to be uploaded when replacing a dataset with a new version diff -r 97226da136bf -r ab7877640903 templates/library/ldda_edit_info.mako --- a/templates/library/ldda_edit_info.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/library/ldda_edit_info.mako Thu Dec 10 15:37:00 2009 -0500 @@ -3,6 +3,23 @@ <%namespace file="/library/common.mako" import="render_template_info" /> <% from galaxy import util %> +<%def name="javascripts()"> + ${parent.javascripts()} + ${h.js("jquery.autocomplete", "autocomplete_tagging" )} + ## Script to replace dbkey select with select+search. + <script type="text/javascript"> + // Replace dbkey select with search+select. + jQuery(document).ready( function() { + replace_dbkey_select(); + }); + </script> +</%def> + +<%def name="stylesheets()"> + ${parent.stylesheets()} + ${h.css( "autocomplete_tagging" )} +</%def> + <% user, roles = trans.get_user_and_roles() %> %if ldda == ldda.library_dataset.library_dataset_dataset_association: diff -r 97226da136bf -r ab7877640903 templates/library/library_dataset_common.mako --- a/templates/library/library_dataset_common.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/library/library_dataset_common.mako Thu Dec 10 15:37:00 2009 -0500 @@ -223,6 +223,13 @@ </form> </div> </div> + ## Script to replace dbkey select with select+search. + <script type="text/javascript"> + // Replace dbkey select with search+select. + jQuery(document).ready( function() { + replace_dbkey_select(); + }); + </script> %elif upload_option == 'import_from_history': <div class="toolForm"> <div class="toolFormTitle">Active datasets in your current history (${history.name})</div> diff -r 97226da136bf -r ab7877640903 templates/library/upload.mako --- a/templates/library/upload.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/library/upload.mako Thu Dec 10 15:37:00 2009 -0500 @@ -11,6 +11,16 @@ replace_id = 'None' %> +<%def name="javascripts()"> + ${parent.javascripts()} + ${h.js("jquery.autocomplete", "autocomplete_tagging" )} +</%def> + +<%def name="stylesheets()"> + ${parent.stylesheets()} + ${h.css( "autocomplete_tagging" )} +</%def> + <b>Create new data library datasets</b> %if replace_dataset in [ None, 'None' ]: ## Don't allow multiple datasets to be uploaded when replacing a dataset with a new version diff -r 97226da136bf -r ab7877640903 templates/tool_form.mako --- a/templates/tool_form.mako Thu Dec 10 14:44:05 2009 -0500 +++ b/templates/tool_form.mako Thu Dec 10 15:37:00 2009 -0500 @@ -50,11 +50,8 @@ } }); - var cur_value = null; - var select_elt = $('select[name=dbkey]'); - if (select_elt.length != 0) - cur_value = select_elt.attr('last_selected_value'); - replace_dbkey_select(cur_value); + // Replace dbkey select with search+select. + replace_dbkey_select(); }); %if not add_frame.debug: if( window.name != "galaxy_main" ) {