mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
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:
@@ -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 -----------------------------------------------------
|
||||
|
||||
|
||||
@@ -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' )
|
||||
%>
|
||||
|
||||
@@ -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}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user