details: http://www.bx.psu.edu/hg/galaxy/rev/90fa86a7b4e3 changeset: 3525:90fa86a7b4e3 user: Dan Blankenberg <dan@bx.psu.edu> date: Fri Mar 12 12:17:36 2010 -0500 description: Tweaks for flow control in Display applications: Display Applications now use trans.response.send_redirect instead of javascript when redirecting users to prepared display applications. Display Applications now use a <meta> refresh instead of a javascript based refresh when notifying users that the display application is being prepared. diffstat: lib/galaxy/web/controllers/dataset.py | 3 ++- templates/dataset/display_application/display.mako | 9 ++------- templates/dataset/display_application/launch_display.mako | 15 --------------- 3 files changed, 4 insertions(+), 23 deletions(-) diffs (55 lines): diff -r 5f967426f33f -r 90fa86a7b4e3 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py Fri Mar 12 12:03:25 2010 -0500 +++ b/lib/galaxy/web/controllers/dataset.py Fri Mar 12 12:17:36 2010 -0500 @@ -557,7 +557,8 @@ trans.response.headers[ 'Content-Length' ] = content_length return rval elif app_action == None: - return trans.fill_template_mako( "dataset/display_application/launch_display.mako", display_link = display_link ) + #redirect user to url generated by display link + return trans.response.send_redirect( display_link.display_url() ) else: msg.append( ( 'Invalid action provided: %s' % app_action, 'error' ) ) else: diff -r 5f967426f33f -r 90fa86a7b4e3 templates/dataset/display_application/display.mako --- a/templates/dataset/display_application/display.mako Fri Mar 12 12:03:25 2010 -0500 +++ b/templates/dataset/display_application/display.mako Fri Mar 12 12:17:36 2010 -0500 @@ -1,17 +1,12 @@ <%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> <%def name="title()">Display Application: ${display_link.link.display_application.name} ${display_link.link.name}</%def> -<% refresh_rate = 10 %> -%if refresh: -<script type="text/javascript"> - setTimeout( "location.reload(true);", ${ refresh_rate * 1000 } ); -</script> -%endif %for message, message_type in msg: ${render_msg( message, message_type )} %endfor %if refresh: +<%def name="metas()"><meta http-equiv="refresh" content="10" /></%def> <p> -This page will <a href="javascript:location.reload(true);">refresh</a> after ${refresh_rate} seconds. +This page will <a href="javascript:location.reload(true);">refresh</a> after 10 seconds. </p> %endif diff -r 5f967426f33f -r 90fa86a7b4e3 templates/dataset/display_application/launch_display.mako --- a/templates/dataset/display_application/launch_display.mako Fri Mar 12 12:03:25 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">Launching Display Application: ${display_link.link.display_application.name} ${display_link.link.name}</%def> - -<script type="text/javascript"> - location.href = '${display_link.display_url()}'; -</script> -<p> -All data has been prepared for the external display application: ${display_link.link.display_application.name} ${display_link.link.name}. -</p> -<p> -You are now being automatically forwarded to the external application. -</p> -<p> -Click <a href="${display_link.display_url()}">here</a> if this redirect has failed. -</p>