Handle target = "_parent" in popup menu so that workflow editor doesn't load

in the middle frame.
This commit is contained in:
James Taylor
2008-07-17 19:45:17 -04:00
parent 8cb0cc1edd
commit 65bf65223f
+8 -3
View File
@@ -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;
}
};
});