Skip to content

Commit

Permalink
Fix bug with "Add Primers to Database" button
Browse files Browse the repository at this point in the history
  • Loading branch information
themisteryang committed Aug 30, 2023
1 parent 4816921 commit 0f638f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/primer-design/web/geneFeatures.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ <h1 id="pageHeading"></h1>
</button>
<button
type="button"
id="primer-design-button"
class="btn btn-sm btn-primary bordered-button"
onclick="RunPrimerDesignScript()"
disabled
>
Design Primers
</button>
Expand Down
6 changes: 4 additions & 2 deletions src/primer-design/web/js/loadingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ var GENOME = getUrlVars()["org"];
document.title = geneName + " Info";
var existingPrimersCount = 0;

let forcastEnsemblRelease;

// Check if FORCAST is using the most up-to-date Ensembl release
const checkRelease = () => {
let ensemblRelease;
let forcastEnsemblRelease;
$.when(
$.ajax({
type: "POST",
Expand All @@ -25,6 +26,7 @@ const checkRelease = () => {
url: "./ajaxCalls/fetchRelease.py",
success: function (html) {
forcastEnsemblRelease = html.toString().trim();
$("#primer-design-button").prop("disabled", false);
},
}),
$.ajax({
Expand Down Expand Up @@ -309,7 +311,7 @@ function addPrimersToDatabase() {
var values = getSelected();
var data = {};
data["gene"] = geneName;
data["release"] = RELEASE;
data["release"] = forcastEnsemblRelease;
data["wtPair"] = values[0];
data["emPair"] = values[1];
data["genome"] = GENOME;
Expand Down

0 comments on commit 0f638f7

Please sign in to comment.