Skip to content

Commit

Permalink
Display instrument list after instrument translations have been downl…
Browse files Browse the repository at this point in the history
…oaded.
  • Loading branch information
craigsapp committed Feb 12, 2022
1 parent c00fe64 commit 81266e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _includes/browse/buildInstrumentFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ POPC2.prototype.buildInstrumentFilter = function (index, target) {
}
output += '>';
output += displayInstrument;
if (instruments[instrument]) {
output += ` (${instruments[instrument]})`;
if (instrument.count) {
output += ` (${instrument.count})`;
}
output += "</option>\n";
}
Expand Down
4 changes: 4 additions & 0 deletions _includes/browse/resetBrowseSearchFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ POPC2.prototype.resetBrowseSearchFields = function () {
var composerElement = document.querySelector("select.filter.composer");
var siglumElement = document.querySelector("select.filter.siglum");
var genreElement = document.querySelector("select.filter.genre");
var instrumentElement = document.querySelector("select.filter.instrument");
var nationalityElement = document.querySelector("select.filter.nationality");
var titleElement = document.querySelector("input.filter.title");
var lyricsElement = document.querySelector("input.filter.lyrics");
Expand All @@ -46,6 +47,9 @@ POPC2.prototype.resetBrowseSearchFields = function () {
if (genreElement) {
genreElement.value = "";
}
if (instrumentElement) {
instrumentElement.value = "";
}
if (tonicElement) {
tonicElement.value = "";
}
Expand Down
2 changes: 1 addition & 1 deletion _includes/listeners/downloadInstrumentIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ POPC2.prototype.downloadInstrumentIndex = function () {
this.VARS.TRANSLATIONS[entry.TAG] = entry;
}
}

that.buildInstrumentFilter();
that.DebugMessage("DOWNLOADED INSTRUMENT INDEX FROM " + url, "lightblue");
})
.catch(err => { console.error("downloadInstrumentIndex:", err); });
Expand Down

0 comments on commit 81266e5

Please sign in to comment.