1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/33bdfafacc00/ changeset: 33bdfafacc00 user: jgoecks date: 2011-10-25 21:23:45 summary: Set URL for visualization when it is first saved. affected #: 2 files diff -r 8c7f2c84bbbd084bfbc3edfe64e5a159080145dd -r 33bdfafacc0064e3975beb10dd2694d8240bf23a lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -663,7 +663,8 @@ vis.latest_revision = vis_rev session.add( vis_rev ) session.flush() - return trans.security.encode_id(vis.id) + encoded_id = trans.security.encode_id(vis.id) + return { "id": encoded_id, "url": url_for( action='browser', id=encoded_id ) } @web.expose @web.require_login( "see all available libraries" ) diff -r 8c7f2c84bbbd084bfbc3edfe64e5a159080145dd -r 33bdfafacc0064e3975beb10dd2694d8240bf23a templates/tracks/browser.mako --- a/templates/tracks/browser.mako +++ b/templates/tracks/browser.mako @@ -212,10 +212,14 @@ 'dbkey': view.dbkey, 'payload': JSON.stringify(payload) }, - success: function(vis_id) { - view.vis_id = vis_id; + dataType: "json", + success: function(vis_info) { + hide_modal(); + view.vis_id = vis_info.vis_id; view.has_changes = false; - hide_modal(); + + // Needed to set URL when first saving a visualization. + window.history.pushState({}, "", vis_info.url); }, error: function() { alert("Could not save visualization"); } }); 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.