diff options
author | gebele <gebele@in-silico.ch> | 2013-03-14 17:58:24 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-03-14 17:58:24 +0100 |
commit | d5649c3bb4eb992c722c24c7fa96a912df2cbf8f (patch) | |
tree | 0567fed6a6567364c37c9766e562ea2cfb500607 /views | |
parent | c609abf8157210a75790b54ef53569c07bf851d4 (diff) |
working with iframes
Diffstat (limited to 'views')
-rw-r--r-- | views/details.haml | 4 | ||||
-rw-r--r-- | views/layout.haml | 2 | ||||
-rw-r--r-- | views/neighbours.haml | 71 | ||||
-rw-r--r-- | views/predict.haml | 17 | ||||
-rw-r--r-- | views/prediction.haml | 88 |
5 files changed, 86 insertions, 96 deletions
diff --git a/views/details.haml b/views/details.haml new file mode 100644 index 0000000..824da91 --- /dev/null +++ b/views/details.haml @@ -0,0 +1,4 @@ +%link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} + +.details + info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken diff --git a/views/layout.haml b/views/layout.haml index 3487bba..7bb62c3 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -8,7 +8,7 @@ %link{:rel=>"stylesheet", :href=>"http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css"} %script{:src=>"http://code.jquery.com/jquery-1.9.1.js"} %script{ :src=>"http://code.jquery.com/ui/1.10.0/jquery-ui.js"} - + %body .logo diff --git a/views/neighbours.haml b/views/neighbours.haml new file mode 100644 index 0000000..0a266b5 --- /dev/null +++ b/views/neighbours.haml @@ -0,0 +1,71 @@ +%link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} +%link{:rel=>"stylesheet", :href=>"http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css"} +%script{:src=>"http://code.jquery.com/jquery-1.9.1.js"} +%script{ :src=>"http://code.jquery.com/ui/1.10.0/jquery-ui.js"} +%script{:src=>"/javascripts/jquery.tablesorter.min.js"} + +.results + - count_m = 0 + :javascript + $(function() { + $("#tabs").tabs(); + }); + #tabs + %ul + - @@prediction_models.each do |m| + - count_m += 1 + %li + %a{:href => "#results_#{count_m}", :id => "link#{m.title}"} + = m.title + - count_rs = 0 + - @@predictions.each do |pa| + - count_rs += 1 + #results{:id=>"#{count_m}"} + - pa.each do |p| + / get prediction OpenTox::Dataset + - p.get + / prepare dataset for neighbours table + - p.data_entries.shift + - p.compounds.shift + + :javascript + $(document).ready(function(){ + // call the tablesorter plugin + $("table##{count_rs}").tablesorter({ + // debug for development + debug: true, + widgets: ['zebra'], + // disable first column + headers: {0: {sorter: false},3: {sorter: false}}, + // presort similarity asc + sortList: [[2,0]] + }); + }); + / TODO catch table error if tbody is empty + %h3= "Neighbours: " + %table{:id=>"#{count_rs}", :class=>"tablesorter", :cellspacing=>"1"} + %thead + %tr + %th + Compound + %th + Measured Activity + %th + Similarity + %th + Details + -#%tbody + - count = 0 + - p.compounds.each do |neighbour_compound| + %tr + %td + %img{:src=>"#{neighbour_compound.uri}/image", :alt=>neighbour_compound.uri, :width=>"100px"} + %td= p.data_entries[count][0] + %td + = p.data_entries[count][3].round(3) + + %td + %a{:href => to('/prediction/neighbours/details'), :id=>"link#{neighbour_compound.uri}/#{count}", :target=>"details"} + %img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"} + - count += 1 + diff --git a/views/predict.haml b/views/predict.haml index 60817da..be2134b 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -69,19 +69,4 @@ %fieldset#bottom - %a{:href => "#predict", :id => "linkPredict"} - %h1 3. Predict - - :javascript - $("a#linkPredict").click(function () { - $("#predict").toggle(); - document.location = document.location + "#" + "predict"; - }); - - #predict{ :style => "display: none;"} - %p Display the prediction including neighbours and sort mechanism - %br - %input{ :type => "submit", :value => "Predict", :onclick => "getsmiles();"} - - .close - = hide_link "#predict" + %input{ :type => "submit", :value=>"3. Predict", :onclick => "getsmiles();"} diff --git a/views/prediction.haml b/views/prediction.haml index ef928fa..623275d 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -1,8 +1,3 @@ -:javascript - $(function() { - $("#tabs").tabs(); - }); - .predictions .back %h1 @@ -21,11 +16,11 @@ %td{:id=>"compound"} %img{:src=>"#{@compound.uri}/image", :alt=>@compound.uri, :width=>"100px"} - count=0 - - @predictions.each do |pa| + - @@predictions.each do |pa| - pa.each do |p| - p.get %td - %b= @prediction_models[count].title + %b= @@prediction_models[count].title - count+=1 %br = "Result:\n" @@ -33,77 +28,12 @@ %br = "Confidence:\n" = p.data_entries[0][2].round(3) - - %script{:src=>"/javascripts/jquery.tablesorter.min.js"} - - .results - #tabs - %ul - - count_m = 0 - - @prediction_models.each do |m| - - count_m += 1 - %li - %a{:href => "#results_#{count_m}", :id => "link#{m.title}"} - = m.title - - count_rs = 0 - - @predictions.each do |pa| - - count_rs += 1 - #results{:id=>"#{count_rs}"} - - pa.each do |p| - / get prediction OpenTox::Dataset - - p.get - / prepare dataset for neighbours table - - p.data_entries.shift - - p.compounds.shift - - :javascript - $(document).ready(function(){ - // call the tablesorter plugin - $("table##{count_rs}").tablesorter({ - // debug for development - debug: true, - widgets: ['zebra'], - // disable first column - headers: {0: {sorter: false},3: {sorter: false}}, - // presort similarity asc - sortList: [[2,0]] - }); - }); - / TODO catch table error if tbody is empty - %h3= "Neighbours: " - %table{:id=>"#{count_rs}", :class=>"tablesorter", :cellspacing=>"1"} - %thead - %tr - %th - Compound - %th - Measured Activity - %th - Similarity - %th - Details - -#%tbody - - count = 0 - - p.compounds.each do |neighbour_compound| - %tr - %td - %img{:src=>"#{neighbour_compound.uri}/image", :alt=>neighbour_compound.uri, :width=>"100px"} - %td= p.data_entries[count][0] - %td - = p.data_entries[count][3].round(3) - - %td - %a{:href => "#info_#{count}", :id=>"linkNeighbour#{count}"} - %img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"} - #info{:id=>"#{count}", :style => "display: none;"} - info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken - - :javascript - $("a#linkNeighbour#{count}").click(function () { - $("#info_#{count}").toggle(); - document.location = document.location + "#" + "linkNeighbour#{count}"; - }); - - - count += 1 + %br + %a{:href=> to("/prediction/neighbours"), :target=> "neighbours"} + %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow"} + + + %iframe{:name=>"neighbours", :width=>"50%", :height=>"400px", :style=>"float:left; border:0px"} + %iframe{:name=>"details", :width=>"50%", :height=>"400px", :style=>"border:0px"} |