--- loncom/interface/lonsearchcat.pm 2015/06/16 20:24:39 1.346 +++ loncom/interface/lonsearchcat.pm 2015/06/18 15:10:52 1.347 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.346 2015/06/16 20:24:39 damieng Exp $ +# $Id: lonsearchcat.pm,v 1.347 2015/06/18 15:10:52 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3332,7 +3332,7 @@ sub detailed_citation_view { ''.$prefix. ''.' '. ''.$values{'title'}."\n". + 'target="preview" onclick="openMyModal(this.href, 500, 500, \'yes\');return false;">'.$values{'title'}."\n". &display_tools($values{'title'}, $jumpurl). "

\n". ''.$values{'author'}.','. @@ -3465,7 +3465,7 @@ sub summary_view { my $link = '
'.&display_url($jumpurl,1).'
'; $result .= ''.$values{'title'}.''. + ' target="preview" onclick="openMyModal(this.href, 500, 500, \'yes\');return false;">'.$values{'title'}.''. &display_tools($values{'title'}, $jumpurl).< $link
@@ -3511,7 +3511,7 @@ sub compact_view { } $jumpurl = &HTML::Entities::encode($jumpurl,'<>&"'); $result.=' '. - ''. + ''. &HTML::Entities::encode($values{'title'},'<>&"').' '. &display_tools($values{'title'}, $jumpurl). $link.' '.$values{'author'}.' ('.$values{'domain'}.')'; @@ -3531,8 +3531,13 @@ sub display_url { $url, 'preview', '', - (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''), + '', $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; } return $link; }