summaryrefslogtreecommitdiff
path: root/views/neighbors.haml
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 /views/neighbors.haml
parentd530d85556380be317147ed75a18e44cd2fde729 (diff)
several changes for html validation
Diffstat (limited to 'views/neighbors.haml')
-rw-r--r--views/neighbors.haml11
1 files changed, 7 insertions, 4 deletions
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) {