Allow loading a specific controller/action in the root middle frame, and use

this to allow the workflow editor to return to the workflow management page.
This commit is contained in:
James Taylor
2008-07-17 20:40:20 -04:00
parent a633e8cd25
commit d6607906d4
3 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -20,8 +20,10 @@ class RootController( BaseController ):
return 'This link may not be followed from within Galaxy.'
@web.expose
def index(self, trans, id=None, tool_id=None, mode=None, **kwd):
return trans.fill_template( "root/index.mako", tool_id=tool_id )
def index(self, trans, id=None, tool_id=None, mode=None, m_c=None, m_a=None, **kwd):
return trans.fill_template( "root/index.mako",
tool_id=tool_id,
m_c=m_c, m_a=m_a )
## ---- Tool related -----------------------------------------------------
+2
View File
@@ -15,6 +15,8 @@
<%
if tool_id is not None:
center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True )
elif m_c is not None:
center_url = h.url_for( controller=m_c, action=m_a )
else:
center_url = h.url_for( '/static/welcome.html' )
%>
+3 -2
View File
@@ -258,10 +258,11 @@
}
var close_editor = function() {
<% next_url = h.url_for( controller='root', m_c='workflow' ) %>
if ( workflow && workflow.has_changes ) {
do_close = function() {
window.onbeforeunload = undefined;
window.document.location = "${h.url_for( controller='root' )}"
window.document.location = "${next_url}"
};
show_modal( "Close workflow editor",
"There are unsaved changes to your workflow which will be lost.",
@@ -274,7 +275,7 @@
"Don't Save": do_close,
} );
} else {
window.document.location = "${h.url_for( controller='root' )}"
window.document.location = "${next_url}"
}
}