summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-03-25 12:21:39 +0100
committergebele <gebele@in-silico.ch>2013-03-25 12:21:39 +0100
commit2b02d8fdafe4ea4d4027d5aa18d56fc77ec5ef9a (patch)
tree2ecf9ed0acdc6df4a3fbd0fc5a29264968e5e584 /views
parent61d24d4825325b2e2bcd0c707c0bd37ec32483e5 (diff)
large neighbours table;popup for details
Diffstat (limited to 'views')
-rw-r--r--views/details.haml6
-rw-r--r--views/layout.haml9
-rw-r--r--views/neighbours.haml9
3 files changed, 13 insertions, 11 deletions
diff --git a/views/details.haml b/views/details.haml
index 9c0a0c2..448e8a8 100644
--- a/views/details.haml
+++ b/views/details.haml
@@ -7,12 +7,12 @@
%img{:src=>"#{@compound_uri.uri}/image", :alt=>@compound_uri.uri, :width=>"100px"}
%p
SMILES:
- = @compound_uri.smiles
+ = @compound_uri.smiles if @compound_uri.smiles
%p
// TODO handle OpenTox::ResourceNotFoundError
Names:
- = @compound_uri.names
+ = @compound_uri.names if @compound_uri.names
%p
- = @compound_uri.inchi.gsub("InChI=", "InChI: ")
+ = @compound_uri.inchi.gsub("InChI=", "InChI: ") if @compound_uri.inchi
diff --git a/views/layout.haml b/views/layout.haml
index 9cc2ed3..2269a34 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -6,10 +6,11 @@
%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"}
- %script{:src=>"/javascripts/jquery-1.9.1.min.js"}
- %script{ :src=>"/javascripts/jquery-ui.js"}
- %script{ :src=>"/javascripts/lazar-gui.js"}
- %script{:src=>"/javascripts/jquery.tablesorter.min.js"}
+ %script{:src=>"/javascripts/jquery-1.9.1.min.js", :type=>"text/javascript"}
+ %script{ :src=>"/javascripts/jquery-ui.js", :type=>"text/javascript"}
+ %script{ :src=>"/javascripts/lazar-gui.js", :type=>"text/javascript"}
+ %script{:src=>"/javascripts/jquery.tablesorter.min.js", :type=>"text/javascript"}
+ %script{:src=>"/javascripts/jquery.bpopup.min.js", :type=>"text/javascript"}
%body
diff --git a/views/neighbours.haml b/views/neighbours.haml
index e89fc7b..eec7d39 100644
--- a/views/neighbours.haml
+++ b/views/neighbours.haml
@@ -74,11 +74,12 @@
%a{:href => to("/prediction/#{CGI.escape(neighbour_compound.uri)}/details"), :id=>"link#{count_rs}#{count}", :target=>"details"}
%img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"}
:javascript
- $("a#link#{count_rs}#{count}").click(function () {
- $("#iframe").show();
- document.getElementById('iframe').focus();
+ $(function() {
+ $("a#link#{count_rs}#{count}").on('click', function(e) {
+ $('#iframe').bPopup();
+ });
});
- count += 1
-%iframe{:id=>"iframe", :name=>"details", :height=>"400px", :width=>"100%", :style=>"display:none;border:0px"}
+%iframe{:id=>"iframe", :name=>"details", :height=>"80%", :width=>"80%", :style=>"display:none;border:0px"}