diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-12-07 11:42:12 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-12-07 11:42:12 +0100 |
commit | 17e783b5d159f205f0de59c6c522f5de5b8c9a6e (patch) | |
tree | 0b9f3602770ec9388b109b8c83e832a61216878a /views/neighbors.haml | |
parent | c38f9f2e4c2dec4ef163c6c76d64f5dbf4974a5a (diff) |
working version without proxy
Diffstat (limited to 'views/neighbors.haml')
-rw-r--r-- | views/neighbors.haml | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/views/neighbors.haml b/views/neighbors.haml index 54905ce..7b9c79d 100644 --- a/views/neighbors.haml +++ b/views/neighbors.haml @@ -1,43 +1,37 @@ -%script{:type => "text/javascript", :src => "sorttable.js"} -%table{:class => "sortable"} +%table - session[:compound].neighbors[0..10].each do |compound| %tr + %th Structure + %th Similarity + %th Targets (experimental data) + %th Other active assays (experimental data) + + %tr %td{:valign => "top"} + %br= compound.name %img{:src => compound.image_uri} %td{:id => "sim#{compound.cid}", :valign => "top"} - %img{:src => "/spinning-wait-icons/wait30trans.gif"} :javascript - $.ajax({ - url: "/cid/#{session[:compound].cid}/cosine/#{compound.cid}", - success: function(data){ - $("#sim#{compound.cid}").html(data); - }, - error: function(data,textStatus,message){ - $("#sim#{compound.cid}").html(message); - } - }); + display("#sim#{compound.cid}", "/cid/#{session[:compound].cid}/cosine/#{compound.cid}"); %td{:id => "targets#{compound.cid}", :valign => "top"} - %img{:src => "/spinning-wait-icons/wait30trans.gif"} :javascript - $.ajax({ - url: "/cid/#{compound.cid}/targets", - success: function(data){ - $("#targets#{compound.cid}").html(data); - }, - error: function(data,textStatus,message){ - $("#targets#{compound.cid}").html(message); - } - }); + display("#targets#{compound.cid}", "/cid/#{compound.cid}/targets"); %td{:id => "assays#{compound.cid}", :valign => "top"} - %img{:src => "/spinning-wait-icons/wait30trans.gif"} :javascript - $.ajax({ - url: "/cid/#{compound.cid}/other_active_assays", - success: function(data){ - $("#assays#{compound.cid}").html(data); - }, - error: function(data,textStatus,message){ - $("#assays#{compound.cid}").html(message); - } - }); + display("#assays#{compound.cid}", "/cid/#{compound.cid}/other_active_assays"); + + %tr + %th + %th + %th Non-targets (experimental data) + %th Other inactive assays (experimental data) + + %tr + %td %td + %td{:id => "targets#{compound.cid}", :valign => "top"} + :javascript + display("#targets#{compound.cid}", "/cid/#{compound.cid}/nontargets"); + %td{:id => "assays#{compound.cid}", :valign => "top"} + :javascript + display("#assays#{compound.cid}", "/cid/#{compound.cid}/other_inactive_assays"); |