summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-06-27 17:49:58 +0200
committergebele <gebele@in-silico.ch>2013-06-27 17:49:58 +0200
commit8f60b2a316de06cf3878b9fe4ef406bd47bf2ce1 (patch)
treed0ebc35cd0ca1024229e07223b41fb79c0752e32
parentd530d85556380be317147ed75a18e44cd2fde729 (diff)
several changes for html validation
-rw-r--r--views/details.haml2
-rw-r--r--views/error.haml2
-rw-r--r--views/layout.haml3
-rw-r--r--views/lazar_description.haml28
-rw-r--r--views/neighbors.haml11
-rw-r--r--views/predict.haml20
-rw-r--r--views/prediction.haml10
7 files changed, 26 insertions, 50 deletions
diff --git a/views/details.haml b/views/details.haml
index fc57d5e..0855bac 100644
--- a/views/details.haml
+++ b/views/details.haml
@@ -7,7 +7,7 @@
.details
%h2{:style=>"margin-top:0px"}
Details:
- %img{:src=>"#{@compound_uri.uri}/image", :alt=>"", :width=>"300px", :heigth=>"300px"}
+ %img{:src=>"#{@compound_uri.uri}/image", :alt=>"Compound image not available", :width=>"300px", :heigth=>"300px"}
%br
%br
%b
diff --git a/views/error.haml b/views/error.haml
index cdaee5a..e9a892e 100644
--- a/views/error.haml
+++ b/views/error.haml
@@ -1,7 +1,7 @@
.error
.back
%h1
- %img{:src=>"/images/arrow_left_float.png", :alt=>"arrow"}
+ %img{:src=>"/images/arrow_left_float.png", :alt=>"<"}
%a{:href => to('/predict')} New Prediction
.message
= @error_report
diff --git a/views/layout.haml b/views/layout.haml
index d926d29..c1b2ac0 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -2,7 +2,6 @@
%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
%head
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=UTF-8'}
- %meta{'http-equiv' => "X-UA-Compatible", :content => "chrome=1"}
%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"}
@@ -21,7 +20,7 @@
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"}
+ %img{:src=>"/images/ist_logo.png", :alt=>"logo"}
%h1 Lazar Toxicity Predictions
%hr
diff --git a/views/lazar_description.haml b/views/lazar_description.haml
deleted file mode 100644
index 9240cae..0000000
--- a/views/lazar_description.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-%dl#lazar_description
- %dt
- %code lazar
- (
- = hide_link "#lazar_description"
- )
- %dd
- %code lazar
- searches the training dataset for
- = toggle_link "#similarity", "similar"
- compounds
- %em (neighbors)
- and calculates the prediction from their measured activities.
- %code lazar
- calculates predictions using
- %ul
- %li
- a majority vote (weighted by compound similarity) for
- %em= toggle_link("#classification","classification")
- (
- %a{:href => "http://www.in-silico.de/articles/modi020905.pdf", :rel => "external"} original publication
- )
- %li
- a local QSAR model based on neighbors for
- %em= toggle_link("#regression","regression")
- (
- %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf", :rel => "external"} original publication
- )
diff --git a/views/neighbors.haml b/views/neighbors.haml
index 926ddfe..51ddb9d 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -12,9 +12,10 @@
/ each endpoint becomes a tab head ;
- @@prediction_models.each do |m|
- count_m += 1
+ - m_title = m.title.split(" ").first
%li
- %a{:href => "#results_#{count_m}", :id => "link#{m.title}"}
- = m.title
+ %a{:href => "#results_#{count_m}", :id => "link#{m_title}"}
+ = m_title
- count_rs = 0
/ unpack to single arrays
- @@predictions.each do |pa|
@@ -46,6 +47,7 @@
Compound
%th
%b Measured Activity
+ / title must be empty for tooltip
%a{:href=>"#", :title=>"", :id=>"measured_activity"}
%img{:src=>"/images/info_white.png"}
.tooltip{:style=>"font-weight: normal; font-size: 1em; text-align: left;"}
@@ -55,6 +57,7 @@
Experimental result(s) from the training dataset.
%th
%b Similarity
+ / title must be empty for tooltip
%a{:href=>"#", :title=>"", :id=>"similarity"}
%img{:src=>"/images/info_white.png"}
.tooltip{:style=>"font-weight: normal; font-size: 1em; text-align: left;"}
@@ -88,14 +91,14 @@
- c = "carcinogen"
%tr
%td.compound
- %img{:src=>"#{neighbor_compound.uri}/image", :alt=>"", :width=>"100px"}
+ %img{:src=>"#{neighbor_compound.uri}/image", :alt=>"Compound image not available", :width=>"150px"}
%td{:class => c[0]}
= c #p.data_entries[count][2]
%td{:class => c[0]}
= p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset."
%td
%a{:href => to("/prediction/#{CGI.escape(neighbor_compound.uri)}/details"), :id=>"link#{count_rs}#{count}", :target=>"details"}
- %img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"}
+ %img{:src=>"/images/arrow_right_float.png", :alt=>">"}
:javascript
$(function() {
$("a#link#{count_rs}#{count}").on('click', function(e) {
diff --git a/views/predict.haml b/views/predict.haml
index af601b0..12c3f26 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -51,7 +51,7 @@
%input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
.arrow
- %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow", :class=> "arrow"}
+ %img{:src=>"/images/arrow_down_float.png", :alt=>"v", :class=> "arrow"}
%fieldset#middle
%a{:href => "#models", :id => "linkModels"}
@@ -71,18 +71,18 @@
%b= "Carcinogenicity:"
- @models.each do |model|
#model
- %input{:type => "checkbox", :name => "selection[#{model.title}]", :id => "selection[#{model.title}]", :value => true, :disabled => false}
- %label{:for => "selection[#{model.title}]"}
- = "DSSTox Carcinogenic Potency DBS "+model.title.split(" ").first
- %a{:href=>"#", :alt=>"#{model.title} validation"}
+ - model_title = model.title.split(" ").first
+ %input{:type => "checkbox", :name => "selection[#{model_title}]", :id => "selection[#{model_title}]", :value => true, :disabled => false}
+ %label{:for => "selection[#{model_title}]"}
+ = "DSSTox Carcinogenic Potency DBS "+model_title
+ %a{:href=>"#", :title=>"#{model_title} validation"}
%i ( Validation report )
%br
.arrow
- %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow", :class=> "arrow"}
+ %img{:src=>"/images/arrow_down_float.png", :alt=>"v", :class=> "arrow"}
%fieldset#bottom
- %a{:href => "#predict", :id => "linkPredict"}
- %label{:for => "submit"}
- %h1 3. Predict
- %input{ :type => "submit", :id => "submit", :value=>">>", :onclick => "getsmiles()"}
+ %h1
+ 3. Predict
+ %input{ :type => "submit", :id => "submit", :value=>">>", :onclick => "getsmiles()"}
diff --git a/views/prediction.haml b/views/prediction.haml
index 8ee5cdd..3fd1586 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -1,7 +1,7 @@
.predictions
.back
%h1
- %img{:src=>"/images/arrow_left_float.png", :alt=>"arrow"}
+ %img{:src=>"/images/arrow_left_float.png", :alt=>"<"}
%a{:href => to('/predict')} New Prediction
/ displays all prediction results
@@ -16,10 +16,10 @@
%tr
%td{:id=>"compound"}
%a{:href => to("/prediction/#{CGI.escape(@compound.uri)}/details"), :id=>"linkCompound", :target=>"details_overview"}
- %img{:src=>"#{@compound.uri}/image", :alt=>"Compound image not available", :width=>"100"}
+ %img{:src=>"#{@compound.uri}/image", :alt=>"Compound image not available", :width=>"150", :height=>"150"}
%br
%br
- %img{:src=>"/images/arrow_up_float.png", :alt=>"arrow"}
+ %img{:src=>"/images/arrow_up_float.png", :alt=>"^"}
:javascript
$(function() {
$("a#linkCompound").on('click', function(e) {
@@ -49,6 +49,7 @@
%b Result:
%b{:class => c[0]}
= (c != '' ? c : "No prediction result.")
+ / title must be empty for tooltip
%a{:href=>"#result", :title=>"", :id=>"result"}
%img{:src=>"/images/info_white.png"}
.tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"}
@@ -75,6 +76,7 @@
.confidence
%b Confidence:
= p.data_entries[0][1] != nil ? p.data_entries[0][1].round(3) : ""
+ / title must be empty for tooltip
%a{:href=>"#confidence", :title=>"", :id=>"confidence"}
%img{:src=>"/images/info_white.png"}
.tooltip{:style=>"font-weight: normal; font-size: 1em; width: 50%; text-align: left;"}
@@ -89,7 +91,7 @@
reliable and unreliable predictions.
%br
%a{:href=> "#tabs", :id=>"link#{count}"}
- %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow"}
+ %img{:src=>"/images/arrow_down_float.png", :alt=>"v"}
:javascript
$("a#link#{count}").click(function () {
$(".results").show();