From 65bf65223fe0f76f52fe70fa54cda30499080884 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Thu, 17 Jul 2008 19:45:17 -0400 Subject: [PATCH] Handle target = "_parent" in popup menu so that workflow editor doesn't load in the middle frame. --- static/scripts/galaxy.base.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/static/scripts/galaxy.base.js b/static/scripts/galaxy.base.js index a229add18cf..0039604f0ac 100644 --- a/static/scripts/galaxy.base.js +++ b/static/scripts/galaxy.base.js @@ -6,11 +6,16 @@ jQuery(document).ready( function() { jQuery( "div[@popupmenu]" ).each( function() { var options = {}; $(this).find( "a" ).each( function() { - var confirmtext = $(this).attr( "confirm" ); - var target = $(this).attr( "href" ); + var confirmtext = $(this).attr( "confirm" ), + href = $(this).attr( "href" ), + target = $(this).attr( "target" ); options[ $(this).text() ] = function() { if ( !confirmtext || confirm( confirmtext ) ) { - window.location = target; + var f = window; + if ( target == "_parent" ) { + f = window.parent; + } + f.location = href; } }; });