--- loncom/interface/lonmenu.pm 2013/09/07 21:08:58 1.369.2.47 +++ loncom/interface/lonmenu.pm 2014/02/23 22:36:16 1.369.2.51 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.47 2013/09/07 21:08:58 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.51 2014/02/23 22:36:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -303,8 +303,14 @@ sub primary_menu { $menu{$position} .= prep_menuitem($menuitem); } } - return ("
    $menu{'left'}
", - "
    $menu{'right'}
"); + my @output = ('',''); + if ($menu{'left'} ne '') { + $output[0] = "
    $menu{'left'}
"; + } + if ($menu{'right'} ne '') { + $output[1] = "
    $menu{'right'}
"; + } + return @output; } #returns hashref {user=>'',dom=>''} containing: @@ -556,8 +562,11 @@ sub create_submenu { if ($count == $numsub) { $borderbot = 'border-bottom:1px solid black;'; } + unless (($href eq '') || ($href =~ /^\#/)) { + $target = ' target="_top"'; + } $menu .= '
  • '; + $borderbot.'">'; if ($translate) { $menu .= &mt($item->[1]); } else { @@ -851,7 +860,7 @@ ENDMENUITEMS # wishlist is only available for users with access to resource-pool # and links can only be set for resources within the resource-pool $menuitems .= (<