--- loncom/interface/lonsearchcat.pm 2016/04/22 17:22:29 1.348 +++ loncom/interface/lonsearchcat.pm 2016/08/04 20:59:22 1.349 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.348 2016/04/22 17:22:29 musolffc Exp $ +# $Id: lonsearchcat.pm,v 1.349 2016/08/04 20:59:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3528,17 +3528,17 @@ sub display_url { } elsif ($url=~m{^(http://|/uploaded/)}) { $link=''.$url.''; } else { + # replace the links to open in a new window + # (because the search opens in a new window, it gets + # confusing when the links open a tab in the + # parent window; ideally we should not force windows) + my $onclick = " onclick=\"window.open(this.href, '_blank', 'toolbar=1,location=1,menubar=0');return false;\""; $link=&Apache::lonhtmlcommon::crumbs( $url, 'preview', '', '', - $skiplast).' '; - # replace the links to open in a new window - # (because the search opens in a new window, it gets - # confusing when the links open a tab in the - # parent window; ideally we should not force windows) - $link =~ s/(href="[^"]*")/\1 onclick="window.open(this.href, '_blank', 'toolbar=1,location=1,menubar=0');return false;"/g; + $skiplast,$onclick).' '; } return $link; }