[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sun, 26 Jun 2005 22:18:34 -0000


albertel		Sun Jun 26 18:18:34 2005 EDT

  Modified files:              
    /loncom/homework	chemresponse.pm 
  Log:
  - BUG#4159, remove Insert Answr button in answer mode
             - window.colse() with out javascript: apparently annoyed Firefox
  
  
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.56 loncom/homework/chemresponse.pm:1.57
--- loncom/homework/chemresponse.pm:1.56	Thu May 26 17:26:25 2005
+++ loncom/homework/chemresponse.pm	Sun Jun 26 18:18:32 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.56 2005/05/26 21:26:25 albertel Exp $
+# $Id: chemresponse.pm,v 1.57 2005/06/26 22:18:32 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -81,6 +81,12 @@
     }
 
     if ($molecule) { $molecule='<param name="jme" value="'.$molecule.'" />'; }
+    my $insert_answer;
+    if ($shown_text ne '') { 
+	$insert_answer=
+	    '<input type="button" name="submit" value="Insert Answer" onclick="javascript:submitSmiles();" />';
+    }
+
     my $body=<<CHEMPAGE;
 <html>
 <head>
@@ -110,11 +116,11 @@
 </applet><br />
 <font face="arial,helvetica,sans-serif" size="-1"><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font>
 <form>
-<input type="button" name="submit" value="Insert Answer" onclick = "submitSmiles();" />
+$insert_answer
 <br />
-<input type="button" value="  Close  " onclick = "window.close()" />
+<input type="button" value="  Close  " onclick = "javascript:window.close()" />
 &nbsp;&nbsp;
-<input type="button" value="  Help  " onclick = "openHelpWindow()" />
+<input type="button" value="  Help  " onclick = "javascript:openHelpWindow()" />
 </form>
 </center>
 </body>