summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-10-14 16:13:55 +0200
committergebele <gebele@in-silico.ch>2013-10-14 16:13:55 +0200
commit87a55e23a3c061b3b4bf612d9e97c1be361eb3ec (patch)
tree337ccec24df5960166c01dbcf945f4a6bb97051b /views
parentb2885c33206c2771ef2244097b08b8b2b2e3c62e (diff)
code clean up, added prediction wait animation
Diffstat (limited to 'views')
-rw-r--r--views/predict.haml12
1 files changed, 9 insertions, 3 deletions
diff --git a/views/predict.haml b/views/predict.haml
index fbc8d53..ad3d0cb 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -2,6 +2,7 @@
function checksmiles () {
if (document.form.identifier.value == "") {
alert("Please draw or insert a chemical structure.");
+ $("img.circle").hide();
document.form.identifier.focus();
return false;
};
@@ -15,7 +16,8 @@
};
});
if (checked == false){
- alert("Please select an endpoint.")
+ alert("Please select an endpoint.");
+ $("img.circle").hide();
return false;
};
return true;
@@ -32,6 +34,9 @@
document.form.identifier.value = document.JME.smiles() ;
};
};
+ function showcircle(){
+ $("img.circle").show();
+ };
// whole site content needs to be in one form. Input and checkboxes are proofed by js functions.
%form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(checksmiles() & checkboxes())" }
@@ -182,6 +187,7 @@
%img{:src=>"/images/arrow_down_float.png", :alt=>"v", :class=> "arrow"}
%fieldset#bottom
- %h1
+ %h1
3. Predict
- %input{ :type => "submit", :id => "submit", :value=>">>", :onclick => "getsmiles()"}
+ %input{ :type => "submit", :id => "submit", :value=>">>", :onclick => "(getsmiles() & showcircle())", :style=>"height:30px;width:30px;"}
+ %img{:src=>"/images/wait30trans.gif", :class=>"circle", :style=>"display:none;background-color:white;margin-left:10%;border:solid 1px;vertical-align:middle;"}