summaryrefslogtreecommitdiff
path: root/views/layout.haml
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2012-12-11 12:22:52 +0100
committerChristoph Helma <helma@in-silico.ch>2012-12-11 12:22:52 +0100
commit610aaaf543fbc06ed3173011750b48001dc5003c (patch)
tree3ad4ee095234a04711118beb378b28a7e10ccd95 /views/layout.haml
parent17e783b5d159f205f0de59c6c522f5de5b8c9a6e (diff)
working version with proxy
Diffstat (limited to 'views/layout.haml')
-rw-r--r--views/layout.haml22
1 files changed, 21 insertions, 1 deletions
diff --git a/views/layout.haml b/views/layout.haml
index 40c6747..1abb7a8 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -3,6 +3,26 @@
%head
%script{:type => "text/javascript", :src => "jquery-1.8.2.js"}
:javascript
+ function show(title,element,uri) {
+ $(element).html("<h4>"+title+"</h4>"+"<img src=\"/spinning-wait-icons/wait30trans.gif\" alt=\"Searching PubChem\">");
+ $.ajax({
+ cache: true,
+ url: uri,
+ success: function(data){
+ data = "<h4>"+title+"</h4>"+"<button onclick='hide(\"" + title + "\",\"" + element + "\",\"" + uri + "\");'>Hide</button>" + data;
+ $(element).html(data);
+ },
+ error: function(data,textStatus,message){
+ $(element).html(message);
+ }
+ });
+ }
+
+ function hide(title,element,uri) {
+ data = "<h4>"+title+"</h4>"+"<button onclick='show(\"" + title + "\",\"" + element + "\",\"" + uri + "\");'>Show</button>";
+ $(element).html(data);
+ }
+
function display(element,uri) {
$(element).html("<img src=\"/spinning-wait-icons/wait30trans.gif\" alt=\"Searching PubChem\">");
$.ajax({
@@ -18,7 +38,7 @@
}
%body
- %h1 adverse outcome pathways
+ %h1 AOP read across
%form{:name => "form", :action => '/search', :method => "GET"}
%fieldset
%label{:for => 'name'} Compound name: