Subversion Repositories wimsdev

Rev

Rev 7293 | Rev 7307 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7246 schaersvoo 1
11/2013 new version of WIMSchem based on SketchEl 1.21: (08/Nov/2008) 
3662 schaersvoo 2
 
7246 schaersvoo 3
NOTES:
3662 schaersvoo 4
 
7246 schaersvoo 5
-- I've not used the latest version (2013) because it is approx. 700 kB and all extra functionality 
6
   centered on the standalone application , and not the applet version.
3662 schaersvoo 7
 
7246 schaersvoo 8
IMPLEMENTED:
9
17/11: 
10
    - top menubar and left buttonbar configurable via applet params (of course same syntax as WIMSchem)
11
    - added public function getSVG(type_or_url) ; works again
12
    - param "file" works again
13
    - param "template1"..."template_n" works again
14
    - param "atoms" works again
15
    - param "show_carbon" and "show_hydrogen" works again
16
    - param "user_selection" of bonds and atoms works
17
    - param "select_atoms" , "select_bonds" , "select_atom_color1..n" , "select_bond_color1..n" work again
18
    - translation of tooltips via properties  (to do menu translation)
19
    - added param 'atom_button_row' to add an extra row of buttons for atom selection (only if <param name="TOOL_SETATOM" value="yes">)
20
    - atom_button_row (SOUTH) and button_row (WEST) may be separated from main window
21
    - SetMoleculeNative(molecule_native_string)  restored
7293 schaersvoo 22
    - added <param name="zoomfactor" value="1.2345"> : click on structure --> zoom in ; click on structure --> normal
7246 schaersvoo 23
    - changed depreciated API (URLencode)
24
    - restored javascript:readApplet() returns --> molweight+"\n"+plainformula+"\n"+htmlformula+"\n"+plainformula+"\n"+latexformula;
25
    (skipped the 'smiles export' : no good)
26
    - corrected template loading (load template as unkown format, eg MDLmol or Native *.el)
27
    - in case <param name="color_alpha" value="255" /> I overrule and set alpha=140 : otherwise marking of atoms will  be solid disks...
28
    - compatibility: corrected public functions : old_name <-- new_name  (many public functions were renamed ,pffff)
29
    - compatibility: (default) settings of 'show_carbon' 'show_hydrogen'  ( MainApplet.java : boolean viewC = viewH = true) Disable using params 
7293 schaersvoo 30
    - force virtual machine to use Locale.US (e.g. decimal point and not a decimal commma...)
7246 schaersvoo 31
26/11 - Finished !!
32
WIMSchem.svg is 100% (I hope) compatible with WIMSchem.old
33
Just copy it into '~/public_html/java/WIMSchem/'
34
If you don't want SVG...no need to change your exercises / checkfiles / answertypes
35
If you do want SVG, follow the instructions below.
3662 schaersvoo 36
 
7246 schaersvoo 37
 
38
SENDING TO SERVER LARGE FILES INCLUDING SVG
39
Use the next html/javscript to send HUGE files to wims (no other method will post bigger strings !)
40
 
41
<form action="http://$wims_ref_name?form-data$session" method="post" enctype="multipart/form-data" >
42
 <input type="hidden" name="session" value="$session" />
43
 <input type="hidden" name="lang" value="$lang" />
44
 <input type="hidden" name="cmd" value="reply" />
45
 <input type="hidden" name="module" value="$module" />
46
 <input type="hidden" id="reply_input"  name="reply$i" value="" />
47
</form>
48
  <!-- the exercise + applet id=WIMSchem -->
3662 schaersvoo 49
 
7246 schaersvoo 50
<input type="submit"  value="OK and SEND" onclick="javascipt:sendanswer();" />
3662 schaersvoo 51
 
7246 schaersvoo 52
<script  type="text/javascript">
53
 function sendanswer(){
54
  var wimschem = document.getElementById('WIMSchem');
7297 bpr 55
  var your_svg = wimschem.getSVG("1"); 		// the student drawing in single line SVG/XML
7246 schaersvoo 56
  var my_svg = wimschem.getSVG("2");   		// the correct molecule in single line SVG/XML 
57
				    		// ...use applet param "file2" for url to correct answer mdlmol file 
58
  var your_mdmol = wimschem.GetMoleculeMDLMol();// the student drawing MDLmol file in multiline format
59
  wimschem.stop();wimschem.destroy();		// optional
60
  var reply_input  = document.getElementById("reply_input");
61
  reply_input.value = my_svg+"\n"+your_svg+"\n"+your_mdmol; // this scheme is advised
62
  return;
63
 }
64
</script>
3662 schaersvoo 65
 
66
 
67