summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorroot <root@aop.(none)>2012-12-19 17:07:31 +0000
committerroot <root@aop.(none)>2012-12-19 17:07:31 +0000
commit8bf8a6b0494faef24d9c413833d274b152ec0b6e (patch)
tree3d448b00211f269abe331a565bdd8ee06716a4e0 /views
parent19f8eb3261c7e4537173358c6b864fdcc3374db1 (diff)
adjustments for production server
Diffstat (limited to 'views')
-rw-r--r--views/layout.haml4
1 files changed, 4 insertions, 0 deletions
diff --git a/views/layout.haml b/views/layout.haml
index 8ca6a2d..9b423fd 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -3,11 +3,13 @@
%head
%script{:type => "text/javascript", :src => "/jquery-1.8.2.js"}
:javascript
+ $(document).ready(function() { $.ajax({ url: "/cid/#{@cid}/experiments", cache: true }); });
function show(title,element,uri) {
$(element).html("<h4>"+title+"</h4>"+"Retrieving data from PubChem. This may take some time, please be patient."+"<img src=\"/spinning-wait-icons/wait30trans.gif\" alt=\"Searching PubChem\">");
$.ajax({
cache: true,
url: uri,
+ //timeout: 120000;
success: function(data){
data = "<h4>"+title+"</h4>"+"<button onclick='hide(\"" + title + "\",\"" + element + "\",\"" + uri + "\");'>Hide</button>" + data;
$(element).html(data);
@@ -28,6 +30,7 @@
$.ajax({
cache: true,
url: uri,
+ //timeout: 120000;
success: function(data){
$(element).html(data);
},
@@ -44,4 +47,5 @@
%label{:for => 'name'} Compound name:
%input{:type => 'text', :name => 'name', :id => 'name'}
%input{ :type => "submit", :value => "Search" }
+ %em This is an experimental version. Loading data from PubChem can be slow. Please use the "Back" button and retry the offending operation if you have timeout problems.
= yield