--- loncom/interface/loncommon.pm 2011/12/12 00:13:43 1.1036 +++ loncom/interface/loncommon.pm 2011/12/12 02:46:12 1.1037 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1036 2011/12/12 00:13:43 www Exp $ +# $Id: loncommon.pm,v 1.1037 2011/12/12 02:46:12 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1198,6 +1198,8 @@ sub help_open_topic { if (!$stayOnPage) { $link = "javascript:openMyModal('/adm/help/${filename}.hlp',$width,$height,'yes');"; + } elsif ($stayOnPage eq 'popup') { + $link = "javascript:void(open('/adm/help/${filename}.hlp', 'Help_for_$topic', 'menubar=0,toolbar=1,scrollbars=1,width=$width,height=$height,resizable=yes'))"; } else { $link = "/adm/help/${filename}.hlp"; } @@ -1230,27 +1232,22 @@ sub help_open_topic { # This is a quicky function for Latex cheatsheet editing, since it # appears in at least four places sub helpLatexCheatsheet { - my ($topic,$text,$not_author) = @_; + my ($topic,$text,$not_author,$stayOnPage) = @_; my $out; my $addOther = ''; if ($topic) { - $addOther = ''.&Apache::loncommon::help_open_topic($topic,&mt($text), - undef, undef, 600). - ' '; + $addOther = ''.&help_open_topic($topic,&mt($text),$stayOnPage, undef, 600).' '; } $out = '' # Start cheatsheet .$addOther .'' - .&Apache::loncommon::help_open_topic('Greek_Symbols',&mt('Greek Symbols'), - undef,undef,600) + .&help_open_topic('Greek_Symbols',&mt('Greek Symbols'),$stayOnPage,undef,600) .' ' - .&Apache::loncommon::help_open_topic('Other_Symbols',&mt('Other Symbols'), - undef,undef,600) + .&help_open_topic('Other_Symbols',&mt('Other Symbols'),$stayOnPage,undef,600) .''; unless ($not_author) { $out .= ' ' - .&Apache::loncommon::help_open_topic('Authoring_Output_Tags',&mt('Output Tags'), - undef,undef,600) + .&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) .''; } $out .= ''; # End cheatsheet