summaryrefslogtreecommitdiff
path: root/views/predict.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-05-22 14:45:53 +0200
committergebele <gebele@in-silico.ch>2013-05-22 14:45:53 +0200
commit9e4e8531fc1c36a206c964c217b79986f20a32d2 (patch)
treecc81cddf11e435efe4fe5b151885726f03c1249a /views/predict.haml
parent3fddff9e92b4523f59d7c0e59776216464e09d5d (diff)
use jsme plugin instead of jme, position of tooltips edited
Diffstat (limited to 'views/predict.haml')
-rw-r--r--views/predict.haml32
1 files changed, 15 insertions, 17 deletions
diff --git a/views/predict.haml b/views/predict.haml
index 64be9df..ea090c1 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -1,10 +1,4 @@
:javascript
-
- function getsmiles() {
- if (document.JME.smiles() != '') {
- document.form.identifier.value = document.JME.smiles() ;
- };
- };
function checksmiles () {
if (document.form.identifier.value == "") {
alert("Please insert a compound.");
@@ -21,6 +15,19 @@
};
return true;
};
+ function jsmeOnLoad() {
+ jsmeApplet = new JSApplet.JSME("appletContainer", "380px", "340px", {
+ //optional parameters
+ "options" : "polarnitro"
+ });
+ document.JME = jsmeApplet;
+ };
+ function getsmiles() {
+ if (document.JME.smiles() != '') {
+ document.form.identifier.value = document.JME.smiles() ;
+ };
+ };
+
/ whole site content needs to be in one form. Input and checkboxes are checked by js functions.
%form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(checksmiles() & checkboxes())" }
@@ -32,19 +39,10 @@
$("#insert").toggle();
document.location = document.location + "#" + "insert";
});
- #insert{:style=>"display: none"}
+ #insert
%p
%label &nbsp;
- .jme
- %applet{:code => "JME.class", :name => "JME", :archive => "JME.jar", :width => "500", :height => "360"}
- %param{ :name => "progressbar", :value => "true"}
- %param{ :name => "options", :value => "polarnitro"}
- Please enable Java and JavaScript in your browser to use the JME editor.
- %a{:href => "jme_help", :rel => "external"} (help)
- %span{:style=>"font-size:75%"}
- &copy;
- %a{:href => 'http://www.molinspiration.com/jme/index.html', :rel => "external"} JME Editor
- courtesy of Peter Ertl, Novartis
+ #appletContainer
%br
%label{:for => 'identifier'}
or enter the