summaryrefslogtreecommitdiff
path: root/views/predict.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2015-09-21 10:01:55 +0200
committergebele <gebele@in-silico.ch>2015-09-21 10:01:55 +0200
commit020cdb5c7974815a7ebe7cf976f026010acd6ef2 (patch)
treec00e103da6b3f8156d5d187453bff925df801afe /views/predict.haml
parent44e2641783d4d4ef82479b4be3a37b177698fc97 (diff)
batch selection by tab
Diffstat (limited to 'views/predict.haml')
-rw-r--r--views/predict.haml28
1 files changed, 15 insertions, 13 deletions
diff --git a/views/predict.haml b/views/predict.haml
index 917a04a..5528a6e 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -1,19 +1,21 @@
%link{ :href=>"/jsme/jsa.css", :rel=>"stylesheet"}
%script{:src=>"/jsme/jsme.nocache.js"}
:javascript
+ $(function() {
+ $('a[data-toggle="tab"]').on('click', function (e) {
+ localStorage.setItem('lastTab', $(e.target).attr('href'));
+ });
+ var lastTab = localStorage.getItem('lastTab');
+ if (lastTab) {
+ $('a[href="'+lastTab+'"]').click();
+ }
+ });
+
function getTab(){
t = $('.nav-tabs li.active').text();
return t.trim();
};
function showcircle() {
- /*if (checksmiles() && checkboxes()){
- button = document.getElementById("submit");
- image = document.getElementById("circle");
- button.parentNode.replaceChild(image, button);
- $("img.circle").show();
- return true;
- };
- return false;*/
switch (getTab()){
case "single":
if (checksmiles() && checkboxes()){
@@ -92,11 +94,11 @@
%ul.nav.nav-tabs{:role=>"tablist"}
- ["single", "batch"].each do |select|
%li{:class => ("active" if select == "single")}
- %a{:href => "div##{select}", :id => "linkTab#{select}", :data=> {:toggle=>"tab"}}
+ %a{:href => "##{select}", :id => "linkTab#{select}", :aria=>{:controls=>"#{select}"}, :data=> {:toggle=>"tab"}}
= select
- %div.tab-content
- #single.tab-pane.fade-in.active
+ %div.tab-content{:id=>"predict"}
+ #single.tab-pane.fade-in.active{:role=>"tabpanel"}
%h2 1. Draw a chemical structure
#insert
%p
@@ -110,12 +112,12 @@
%br
%input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
- #batch.tab-pane.fade-in
+ #batch.tab-pane.fade-in{:role=>"tabpanel"}
%h2 1. Select a file to upload
Browse (csv):
%span.btn.btn-default.btn-file
%input{:type=>"file", :name=> "fileselect", :id=>"fileselect"}
-
+
%fieldset#middle.well
%h2 2. Select one or more endpoints