[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonhtmlcommon.pm

raeburn raeburn@source.lon-capa.org
Thu, 13 Aug 2009 16:19:13 -0000


raeburn		Thu Aug 13 16:19:13 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - Add missing linefeeds.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.182.4.5 loncom/interface/lonhtmlcommon.pm:1.182.4.6
--- loncom/interface/lonhtmlcommon.pm:1.182.4.5	Thu Aug 13 16:12:51 2009
+++ loncom/interface/lonhtmlcommon.pm	Thu Aug 13 16:19:13 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.182.4.5 2009/08/13 16:12:51 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.182.4.6 2009/08/13 16:19:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -978,8 +978,8 @@
 
 	#the whole function called through timeout is due to issues
 	#in mozilla Read BUG #2665 if you want to know the whole story
-	&r_print($r,'<script type="text/javascript">'.
-        '// <![CDATA['.
+	&r_print($r,'<script type="text/javascript">'."\n".
+        '// <![CDATA['."\n".
         "var popwin;
          function openpopwin () {
          popwin=open(\'\',\'popwin\',\'width=400,height=100\');".
@@ -990,8 +990,8 @@
 	      &mt('Starting').'" /><\\/form>'.$end_page.
               "\');".
         "popwin.document.close();}".
-        "\nwindow.setTimeout(openpopwin,0).
-        '// ]]>'.
+        "\nwindow.setTimeout(openpopwin,0)."\n".
+        '// ]]>'."\n".
         '</script>");
 	$prog_state{'formname'}='popremain';
 	$prog_state{'inputname'}="remaining";
@@ -1025,13 +1025,13 @@
 # update progress
 sub Update_PrgWin {
     my ($r,$prog_state,$displayString)=@_;
-    &r_print($r,'<script type="text/javascript">'.
-             '// <![CDATA['.
+    &r_print($r,'<script type="text/javascript">'."\n".
+             '// <![CDATA['."\n".
              $$prog_state{'window'}.'.document.'.
 	     $$prog_state{'formname'}.'.'.
 	     $$prog_state{'inputname'}.'.value="'.
-	     $displayString.'";'.
-             '// ]]>'.
+	     $displayString.'";'."\n".
+             '// ]]>'."\n".
              '</script>');
     $$prog_state{'laststart'}=&Time::HiRes::time();
 }
@@ -1085,14 +1085,14 @@
     if ($user_browser eq 'explorer' && $user_os =~ 'mac') {
         $lasttime = '';
     }
-    &r_print($r,'<script>'.
-             '// <![CDATA['.
+    &r_print($r,'<script>'."\n".
+             '// <![CDATA['."\n".
              $$prog_state{'window'}.'.document.'.
 	     $$prog_state{'formname'}.'.'.
 	     $$prog_state{'inputname'}.'.value="'.
 	     $$prog_state{'done'}.'/'.$$prog_state{'max'}.
-	     ': '.$time_est.' '.&mt('remaining').' '.$lasttime.'";'.
-             '// ]]>'.
+	     ': '.$time_est.' '.&mt('remaining').' '.$lasttime.'";'."\n".
+             '// ]]>'."\n".
              '</script>');
     $$prog_state{'laststart'}=&Time::HiRes::time();
 }
@@ -1101,10 +1101,10 @@
 sub Close_PrgWin {
     my ($r,$prog_state)=@_;
     if ($$prog_state{'type'} eq 'popup') {
-	&r_print($r,'<script>'.
-                 '// <![CDATA['.
-                 'popwin.close()'.
-                 '// ]]>'.
+	&r_print($r,'<script>'."\n".
+                 '// <![CDATA['."\n".
+                 'popwin.close()'."n".
+                 '// ]]>'."\n".
                  '</script>'."\n");
     } elsif ($$prog_state{'type'} eq 'inline') {
 	&Update_PrgWin($r,$prog_state,&mt('Done'));
@@ -1287,7 +1287,7 @@
 }";
     }
     $output.="\nwindow.status='Activated Editfields';\n".
-             '// ]]>'.
+             '// ]]>'."\n".
              '</script><br />'.
 	&disablelink(@fields);
     return $output;