summaryrefslogtreecommitdiff
path: root/views/prediction.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2015-03-10 16:58:49 +0100
committergebele <gebele@in-silico.ch>2015-03-10 16:58:49 +0100
commit12002a6390b10c3c12462936484ba967da2478e4 (patch)
treef8d7ef0f8253a11a5232a5d0a3823e548e3ccbe7 /views/prediction.haml
parent941ef6c04f98195a571920f2daf66b41a763ff22 (diff)
marked links >;resize body if large table;setup sdf
Diffstat (limited to 'views/prediction.haml')
-rw-r--r--views/prediction.haml15
1 files changed, 11 insertions, 4 deletions
diff --git a/views/prediction.haml b/views/prediction.haml
index 0bd0ea9..99b7527 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -1,3 +1,10 @@
+:javascript
+ // increase body width if more than 2 models selected
+ window.onload = function(){
+ var plusSize = ("#{@predictions.size}" > 2 ) ? ("#{@predictions.size}" * 100) : 0;
+ var width = $(window).width() + plusSize;
+ $("body").width(width);
+ };
.predictions
.back
%h1
@@ -14,9 +21,9 @@
%tbody
%tr
- %td{:id=>"compound", :style=>"width: 200px;vertical-align:top;"}
+ %td{:id=>"compound", :style=>"vertical-align:top;"}
%a{:href => to("/prediction/#{CGI.escape(@compound.uri)}/details"), :id=>"linkCompound", :target=>"details_overview"}
- Names and synonyms
+ Names and synonyms >
%img{:src=>"#{@compound.uri}/image", :alt=>"Compound image not available", :title=>"#{@compound.smiles}", :width=>"150", :height=>"150"}
%p
:javascript
@@ -118,7 +125,7 @@
/TODO add tooltip for significant ftagments and descriptors
- if @model_type[count] =~ /classification/i && (p.data_entries[0][1] != nil && p.data_entries[0][1] != 0.0)
/ Significant fragments:
- %a{:href => to("/prediction/#{CGI.escape(@model_uri)}/#{@model_type[count]}/#{CGI.escape(@compound.uri)}/fingerprints"), :id=>"linkPredictionSf", :title=>"", :target=>"details_overview"}Significant fragments
+ %a{:href => to("/prediction/#{CGI.escape(@model_uri)}/#{@model_type[count]}/#{CGI.escape(@compound.uri)}/fingerprints"), :id=>"linkPredictionSf", :title=>"", :target=>"details_overview"}Significant fragments >
:javascript
$(function() {
$("a#linkPredictionSf").on('click', function(e) {
@@ -137,7 +144,7 @@
%p
- if c != ''
%a{:href=> "#tabs", :id=>"link#{count}"}
- %b Neighbors
+ %b Neighbors >
:javascript
$("a#link#{count}").click(function () {
$(".results").show();