[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonfeedback.pm

www www at source.lon-capa.org
Sun Dec 11 21:46:12 EST 2011


www		Mon Dec 12 02:46:12 2011 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonfeedback.pm 
  Log:
  Cannot have modal help windows inside modal windows
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1036 loncom/interface/loncommon.pm:1.1037
--- loncom/interface/loncommon.pm:1.1036	Mon Dec 12 00:13:43 2011
+++ loncom/interface/loncommon.pm	Mon Dec 12 02:46:12 2011
@@ -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 @@
 
     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 @@
 # 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 = '<span>'.&Apache::loncommon::help_open_topic($topic,&mt($text),
-							       undef, undef, 600).
-								   '</span> ';
+	$addOther = '<span>'.&help_open_topic($topic,&mt($text),$stayOnPage, undef, 600).'</span> ';
     }
     $out = '<span>' # Start cheatsheet
 	  .$addOther
           .'<span>'
-	  .&Apache::loncommon::help_open_topic('Greek_Symbols',&mt('Greek Symbols'),
-					       undef,undef,600)
+	  .&help_open_topic('Greek_Symbols',&mt('Greek Symbols'),$stayOnPage,undef,600)
 	  .'</span> <span>'
-	  .&Apache::loncommon::help_open_topic('Other_Symbols',&mt('Other Symbols'),
-					       undef,undef,600)
+	  .&help_open_topic('Other_Symbols',&mt('Other Symbols'),$stayOnPage,undef,600)
 	  .'</span>';
     unless ($not_author) {
         $out .= ' <span>'
-	       .&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)
 	       .'</span>';
     }
     $out .= '</span>'; # End cheatsheet
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.310 loncom/interface/lonfeedback.pm:1.311
--- loncom/interface/lonfeedback.pm:1.310	Mon Dec 12 00:13:43 2011
+++ loncom/interface/lonfeedback.pm	Mon Dec 12 02:46:12 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.310 2011/12/12 00:13:43 www Exp $
+# $Id: lonfeedback.pm,v 1.311 2011/12/12 02:46:12 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1654,7 +1654,7 @@
       $comment = &unescape($env{'form.comment'});
       &process_attachments(\@currnewattach,\@currdelold,\@keepold);
   }
-  my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1);
+  my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1,'popup');
   my $send=&mt('Send');
   my $alert = &mt('Please select a feedback type.');
   my $js= <<END;




More information about the LON-CAPA-cvs mailing list