[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 29 Nov 2004 22:45:52 -0000


albertel		Mon Nov 29 17:45:52 2004 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  BUG#3634, don't emit the fullpage plugin load commands if htmlarea isn't being used.
  
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.346 loncom/xml/lonxml.pm:1.347
--- loncom/xml/lonxml.pm:1.346	Wed Oct 20 22:43:34 2004
+++ loncom/xml/lonxml.pm	Mon Nov 29 17:45:51 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.346 2004/10/21 02:43:34 albertel Exp $
+# $Id: lonxml.pm,v 1.347 2004/11/29 22:45:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1157,7 +1157,10 @@
       if ($filetype eq 'html') {
 	  my $addbuttons=&Apache::lonhtmlcommon::htmlareaaddbuttons();
 	  $initialize=&Apache::lonhtmlcommon::htmlareaheaders().
-	      &Apache::lonhtmlcommon::spellheader().(<<FULLPAGE);
+	      &Apache::lonhtmlcommon::spellheader();
+	  if (!&Apache::lonhtmlcommon::htmlareablocked() &&
+	      &Apache::lonhtmlcommon::htmlareabrowser()) {
+	      $initialize.=(<<FULLPAGE);
 <script type="text/javascript">
 $addbuttons
 
@@ -1170,6 +1173,15 @@
     }
 </script>
 FULLPAGE
+          } else {
+	      $initialize.=(<<FULLPAGE);
+<script type="text/javascript">
+$addbuttons
+    function initDocument() {
+    }
+</script>
+FULLPAGE
+	  }
           $result=~s/\<body([^\>]*)\>/\<body onload="initDocument()" $1\>/i;
 	  $xml_help=&Apache::loncommon::helpLatexCheatsheet();
       }