diff options
author | gebele <gebele@in-silico.ch> | 2013-05-22 14:45:53 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-05-22 14:45:53 +0200 |
commit | 9e4e8531fc1c36a206c964c217b79986f20a32d2 (patch) | |
tree | cc81cddf11e435efe4fe5b151885726f03c1249a /views | |
parent | 3fddff9e92b4523f59d7c0e59776216464e09d5d (diff) |
use jsme plugin instead of jme, position of tooltips edited
Diffstat (limited to 'views')
-rw-r--r-- | views/layout.haml | 11 | ||||
-rw-r--r-- | views/neighbours.haml | 5 | ||||
-rw-r--r-- | views/predict.haml | 32 | ||||
-rw-r--r-- | views/prediction.haml | 11 |
4 files changed, 34 insertions, 25 deletions
diff --git a/views/layout.haml b/views/layout.haml index 12874c4..410d150 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -6,7 +6,9 @@ %title Lazar Toxicity Predictions %link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} %link{ :href=>"/stylesheets/jquery-ui.css", :rel=>"stylesheet"} + %link{ :href=>"/jsme/jsa.css", :rel=>"stylesheet"} %script{:src=>"/javascripts/jquery-1.9.1.min.js", :type=>"text/javascript"} + %script{:src=>"/jsme/jsme.nocache.js", :type=>"text/javascript"} %script{ :src=>"/javascripts/jquery-ui.min.js", :type=>"text/javascript"} %script{ :src=>"/javascripts/lazar-gui.js", :type=>"text/javascript"} %script{:src=>"/javascripts/jquery.tablesorter.min.js", :type=>"text/javascript"} @@ -15,6 +17,9 @@ %body + %noscript + %div{ :style=>"width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif"} + Your web browser must have JavaScript enabled in order for this application to display correctly. .logo %a{:href=> to("/predict")} %img{:src=>"/images/ist_logo.png"} @@ -46,17 +51,17 @@ $('a#confidence').tooltip({ predelay: 800, position: 'bottom center', - offset: [-400, 0], + offset: [-100, 0], }); $('a#similarity').tooltip({ predelay: 800, position: 'bottom center', - offset: [-400, 0], + offset: [-600, 0], }); $('a#measured_activity').tooltip({ predelay: 800, position: 'bottom center', - offset: [-400, 0], + offset: [-450, 0], }); }); #back-top diff --git a/views/neighbours.haml b/views/neighbours.haml index 5993caa..84d9f72 100644 --- a/views/neighbours.haml +++ b/views/neighbours.haml @@ -54,7 +54,10 @@ %th %a{:href=>"#", :title=>"", :id=>"measured_activity"} Measured Activity .tooltip{:style=>"font-weight: normal; font-size: 1em; text-align: left;"} - Experimental result(s) from the training dataset. + %dt + Measured Activity + %dd + Experimental result(s) from the training dataset. %th %a{:href=>"#", :title=>"", :id=>"similarity"} Similarity .tooltip{:style=>"font-weight: normal; font-size: 1em; text-align: left;"} 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 - .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%"} - © - %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 diff --git a/views/prediction.haml b/views/prediction.haml index 4646513..20be935 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -45,10 +45,13 @@ %br %a{:href=>"#", :title=>"", :id=>"confidence"} Confidence .tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"} - Indicates the applicability domain of a model. - Predictions with a high confidence can be expected to be more reliable than predictions with low confidence. - Confidence values may take any value between 0 and 1. - For most models confidence > 0.025 is a sensible (hard) cutoff to distiguish between reliable and unreliable predictions. + %dt + Confidence + %dd + Indicates the applicability domain of a model. + Predictions with a high confidence can be expected to be more reliable than predictions with low confidence. + Confidence values may take any value between 0 and 1. + For most models confidence > 0.025 is a sensible (hard) cutoff to distiguish between reliable and unreliable predictions. = p.data_entries[0][1].round(3) %br %a{:href=> "#tabs", :id=>"link#{count}"} |