3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/489e80f86187/ changeset: 489e80f86187 user: jmchilton date: 2012-09-26 04:49:22 summary: Ease tool development by reducing clicking/keystorkes required by developers to repeatedly reload the same tool via admin console. affected #: 2 files diff -r 20144ac9ffa7d15a9738cee2a5c8cb2b4cf1c401 -r 489e80f8618766c5ea3d655adaaea5e6b13d3bc2 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -1578,10 +1578,12 @@ message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) toolbox = self.app.toolbox + tool_id = None if params.get( 'reload_tool_button', False ): tool_id = params.tool_id message, status = toolbox.reload_tool_by_id( tool_id ) return trans.fill_template( '/admin/reload_tool.mako', + tool_id=tool_id, toolbox=toolbox, message=message, status=status ) diff -r 20144ac9ffa7d15a9738cee2a5c8cb2b4cf1c401 -r 489e80f8618766c5ea3d655adaaea5e6b13d3bc2 templates/admin/reload_tool.mako --- a/templates/admin/reload_tool.mako +++ b/templates/admin/reload_tool.mako @@ -1,6 +1,17 @@ <%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" /> +<script type="text/javascript"> +$().ready(function() { +%if tool_id: + var focus_el = $("input[name=reload_tool_button]"); +%else: + var focus_el = $("select[name=tool_id]"); +%endif + focus_el.focus(); +}); +</script> + %if message: ${render_msg( message, status )} %endif @@ -22,7 +33,11 @@ <% section = val %> %for section_key, section_val in section.elems.items(): %if section_key.startswith( 'tool' ): - <option value="${section_val.id}">${section_val.name}</option> + <% selected_str = "" %> + %if section_val.id == tool_id: + <% selected_str = " selected=\"selected\"" %> + %endif + <option value="${section_val.id}"${selected_str}>${section_val.name}</option> %endif %endfor %endif https://bitbucket.org/galaxy/galaxy-central/changeset/a0b1af3a160f/ changeset: a0b1af3a160f user: jmchilton date: 2012-09-29 03:15:56 summary: Merge with galaxy-central changes. affected #: 232 files Diff too large to display. https://bitbucket.org/galaxy/galaxy-central/changeset/869bcca8756a/ changeset: 869bcca8756a user: dannon date: 2012-10-24 16:54:37 summary: Merged in jmchilton/galaxy-central-reload-tool-improvements (pull request #72) affected #: 3 files diff -r 10342b1b167a6f7290b8f3dc1d00c2d2b77e046f -r 869bcca8756a32b0b2c482f1ea67623cce110051 lib/galaxy/web/base/controllers/admin.py --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -56,10 +56,12 @@ message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) toolbox = self.app.toolbox + tool_id = None if params.get( 'reload_tool_button', False ): tool_id = params.tool_id message, status = toolbox.reload_tool_by_id( tool_id ) return trans.fill_template( '/admin/reload_tool.mako', + tool_id=tool_id, toolbox=toolbox, message=message, status=status ) @@ -1110,4 +1112,4 @@ # Load user from database id = trans.security.decode_id( id ) quota = trans.sa_session.query( trans.model.Quota ).get( id ) - return quota \ No newline at end of file + return quota diff -r 10342b1b167a6f7290b8f3dc1d00c2d2b77e046f -r 869bcca8756a32b0b2c482f1ea67623cce110051 templates/admin/reload_tool.mako --- a/templates/admin/reload_tool.mako +++ b/templates/admin/reload_tool.mako @@ -1,6 +1,17 @@ <%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" /> +<script type="text/javascript"> +$().ready(function() { +%if tool_id: + var focus_el = $("input[name=reload_tool_button]"); +%else: + var focus_el = $("select[name=tool_id]"); +%endif + focus_el.focus(); +}); +</script> + %if message: ${render_msg( message, status )} %endif @@ -22,7 +33,11 @@ <% section = val %> %for section_key, section_val in section.elems.items(): %if section_key.startswith( 'tool' ): - <option value="${section_val.id}">${section_val.name}</option> + <% selected_str = "" %> + %if section_val.id == tool_id: + <% selected_str = " selected=\"selected\"" %> + %endif + <option value="${section_val.id}"${selected_str}>${section_val.name}</option> %endif %endfor %endif Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.