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

www lon-capa-cvs@mail.lon-capa.org
Tue, 09 Mar 2004 15:06:48 -0000


www		Tue Mar  9 10:06:48 2004 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  HTMLArea now loads images from the right place.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.60 loncom/interface/lonhtmlcommon.pm:1.61
--- loncom/interface/lonhtmlcommon.pm:1.60	Mon Mar  8 12:31:37 2004
+++ loncom/interface/lonhtmlcommon.pm	Tue Mar  9 10:06:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.60 2004/03/08 17:31:37 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.61 2004/03/09 15:06:48 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -838,9 +838,12 @@
 # ------------------------------------------------- Output headers for HTMLArea
 
 sub htmlareaheaders {
-    unless (&htmlareabrowser()) { return ''; }
+    unless (&htmlareablocked()) { return ''; }
     my $lang='en';
     return (<<ENDHEADERS);
+<script type="text/javascript">
+    _editor_url="/htmlarea/";
+</script>
 <script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
 <script type="text/javascript" src="/htmlarea/lang/$lang.js"></script>
 <script type="text/javascript" src="/htmlarea/dialog.js"></script>
@@ -853,12 +856,19 @@
 # ---------------------------------------------------------- Script to activate
 
 sub htmlareaactive {
-    unless (&htmlareabrowser()) { return ''; }
+    unless (&htmlareablocked()) { return ''; }
     return (<<ENDSCRIPT);
 <script type="text/javascript" defer="1">
     HTMLArea.replaceAll();
 </script>
 ENDSCRIPT
+}
+
+# --------------------------------------------------------------------- Blocked
+
+sub htmlareablocked {
+    unless (&htmlareabrowser()) { return ''; }
+    return 1;
 }
 
 # ---------------------------------------- Browser capable of running HTMLArea?