diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-11-21 10:09:48 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-11-21 10:09:48 +0100 |
commit | c38f9f2e4c2dec4ef163c6c76d64f5dbf4974a5a (patch) | |
tree | 4f4b71056b1e8728720fb2a5f6886dc2dfe634cd /views/neighbors.haml | |
parent | 9661a67983ffc93ee02bc12b20b9afb38e199d79 (diff) |
Initial GUI
Diffstat (limited to 'views/neighbors.haml')
-rw-r--r-- | views/neighbors.haml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/views/neighbors.haml b/views/neighbors.haml new file mode 100644 index 0000000..54905ce --- /dev/null +++ b/views/neighbors.haml @@ -0,0 +1,43 @@ +%script{:type => "text/javascript", :src => "sorttable.js"} +%table{:class => "sortable"} + - session[:compound].neighbors[0..10].each do |compound| + %tr + %td{:valign => "top"} + %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); + } + }); + %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); + } + }); + %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); + } + }); + %td |