Skip to content
Snippets Groups Projects
Commit 572c9649 authored by Rachel TORCHET's avatar Rachel TORCHET
Browse files

CompoundForm - Fix placeholder empty compound (FIX #137)

parent 10ea846a
No related branches found
No related tags found
No related merge requests found
Pipeline #31996 passed
......@@ -91,17 +91,3 @@ function showCanvas(Compound){
y.style.display = "flex";
}
};
function showCanvas_onload(Compound){
var z = Compound.value;
var x = document.getElementById('canvas_window-'.concat(Compound.name));
var y = document.getElementById('canvas_placeholder-'.concat(Compound.name));
console.log("test onload",Compound);
if (z!="") {
x.style.display = "flex";
y.style.display = "none";
} else {
x.style.display = "none";
y.style.display = "flex";
}
};
\ No newline at end of file
......@@ -61,6 +61,11 @@
src="/static/images/Other/SMILESIcon.png" width="35" height="35" />
<p style="margin:5px;">Paste SMILE code</p>
</a>
<script type="text/javascript">
$(document).ready(function () {
showCanvas(document.getElementById('{{form.molecule_smiles.id_for_label}}'));
});
</script>
<div class="molecule_code_button" onclick="showModalFromMe(this);return false;">
<a><i class="fas fa-pencil-alt fa-2x"></i>
<p style="margin:5px;">Sketch your compound</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment