[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
From:       www <lon-capa-cvs () mail ! lon-capa ! org>
Date:       2005-05-28 0:35:49
Message-ID: cvswww1117240549 () cvsserver
[Download RAW message or body]

www		Fri May 27 20:35:49 2005 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Bug #4114: spellchecker not working on Mac, because somebody decided
  that typeof(null)='object' ... null an object???
  Anyway, works now.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.104 \
                loncom/interface/lonhtmlcommon.pm:1.105
--- loncom/interface/lonhtmlcommon.pm:1.104	Thu Apr  7 02:56:23 2005
+++ loncom/interface/lonhtmlcommon.pm	Fri May 27 20:35:47 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.104 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.105 2005/05/28 00:35:47 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -932,13 +932,14 @@
 
 sub spellheader {
     my $html=&Apache::lonxml::xmlbegin();
+    my $nothing=&javascript_nothing();
     return (<<ENDCHECK);
 <script type="text/javascript"> 
 //<!-- BEGIN LON-CAPA Internal
 var checkwin;
 
 function spellcheckerwindow() {
-    checkwin=window.open('/adm/rat/empty.html','spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
 +    checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
  checkwin.document.writeln('$html<head></head><body bgcolor="#DDDDDD"><form \
name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" \
name="text" value="" /></form></body></html>');  checkwin.document.close();
 }
@@ -953,7 +954,7 @@
     my ($form,$field)=@_;
     my $linktext=&mt('Check Spelling');
     return (<<ENDLINK);
-<a href="javascript:if (typeof(document.$form.onsubmit)!='undefined') { \
document.$form.onsubmit();};spellcheckerwindow();checkwin.document.forms.spellcheckfor \
m.text.value=this.document.forms.$form.$field.value;checkwin.document.forms.spellcheckform.submit();">$linktext</a>
 +<a href="javascript:if (typeof(document.$form.onsubmit)!='undefined') { if \
(document.$form.onsubmit!=null) { \
document.$form.onsubmit();}};spellcheckerwindow();checkwin.document.forms.spellcheckfo \
rm.text.value=this.document.forms.$form.$field.value;checkwin.document.forms.spellcheckform.submit();">$linktext</a>
  ENDLINK
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic