Skip to content

Commit

Permalink
Implementation for issue #271
Browse files Browse the repository at this point in the history
  • Loading branch information
craigsapp committed Feb 11, 2024
1 parent 1c169d4 commit 486d8e6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 57 deletions.
14 changes: 7 additions & 7 deletions _includes/browse/filterBySearchFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ POPC2.prototype.filterBySearchFlags = function (input) {
}

// Flags expected to be in alphabetical order:
// Figured Bass
// BASSOCONTINUO
// IIIF
// MODERN
// SINGLE
// TEXT
let pattern = "";
let count = 0;
let count2 = 0;
if (fields.FIGUREDBASS) { pattern += ".*F"; count++; }
if (fields.IIIF) { pattern += ".*I"; count++; }
if (fields.MODERN) { pattern += ".*M"; count++; }
if (fields.SINGLE) { pattern += ".*S"; count++; }
if (fields.TEXT == 1) { pattern += ".*T"; count++; }
if (fields.TEXT == 2) { count2++; }
if (fields.BASSOCONTINUO) { pattern += ".*F"; count++; }
if (fields.IIIF) { pattern += ".*I"; count++; }
if (fields.MODERN) { pattern += ".*M"; count++; }
if (fields.SINGLE) { pattern += ".*S"; count++; }
if (fields.TEXT == 1) { pattern += ".*T"; count++; }
if (fields.TEXT == 2) { count2++; }

if ((count == 0) && (count2 == 0)) {
return input;
Expand Down
2 changes: 1 addition & 1 deletion _includes/browse/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{% include browse/toggleBrowseStyle.js %}
{% include browse/toggleComposerSort.js %}
{% include browse/toggleDateSorting.js %}
{% include browse/toggleFiguredBassScores.js %}
{% include browse/toggleBassoContinuoScores.js %}
{% include browse/toggleIiifScores.js %}
{% include browse/toggleModernScores.js %}
{% include browse/toggleShelfmarkSort.js %}
Expand Down
36 changes: 0 additions & 36 deletions _includes/browse/toggleFiguredBassScores.js

This file was deleted.

16 changes: 8 additions & 8 deletions _includes/initialize/POPC2.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ function POPC2() {
//

this.VARS.SEARCH_FLAGS = {};
this.VARS.SEARCH_FLAGS.MODERN = false; // Search only files with modernized scores.
this.VARS.SEARCH_FLAGS.IIIF = false; // Search only files with IIIF bounding boxes.
this.VARS.SEARCH_FLAGS.FIGUREDBASS = false; // Search only files with figured bass.
this.VARS.SEARCH_FLAGS.TEXT = 0; // Search only files containg lyrical text.
// 0 = search both texted and textless works.
// 1 = search texted works.
// 2 = search textles works.
this.VARS.SEARCH_FLAGS.SINGLE = false; // Search only files that contain single-layer parts.
this.VARS.SEARCH_FLAGS.MODERN = false; // Search only files with modernized scores.
this.VARS.SEARCH_FLAGS.IIIF = false; // Search only files with IIIF bounding boxes.
this.VARS.SEARCH_FLAGS.BASSOCONTINUO = false; // Search only files with basso continuo figures.
this.VARS.SEARCH_FLAGS.TEXT = 0; // Search only files containg lyrical text.
// 0 = search both texted and textless works.
// 1 = search texted works.
// 2 = search textles works.
this.VARS.SEARCH_FLAGS.SINGLE = false; // Search only files that contain single-layer parts.


//////////////////////////////
Expand Down
9 changes: 4 additions & 5 deletions _includes/navigator/toolbar-browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
{% endcomment %}



<div id="info-browse-button" class="tab trans worknav-tool fas fa-question-circle"
role="button" tabindex="0"
data-transatt="title:info" onclick="popc2.displayInfoPage();">
Expand All @@ -24,14 +23,14 @@
data-transatt="title:accessibility" onclick="popc2.displayInfoPage('access');">
</div>

<div id="date-browse-button" class="tab trans worknav-tool fas fa-d"
<div id="basso-continuo-browse-button" class="tab trans worknav-tool fas fa-b"
role="button" tabindex="0"
data-transatt="title:date_sort" onclick="popc2.toggleDateSorting();">
data-transatt="title:basso_continuo_scores" onclick="popc2.toggleBassoContinuoScores();">
</div>

<div id="figured-bass-browse-button" class="tab trans worknav-tool fas fa-f"
<div id="date-browse-button" class="tab trans worknav-tool fas fa-d"
role="button" tabindex="0"
data-transatt="title:figured_bass_scores" onclick="popc2.toggleFiguredBassScores();">
data-transatt="title:date_sort" onclick="popc2.toggleDateSorting();">
</div>

<div id="iiif-browse-button" class="tab trans worknav-tool fas fa-i"
Expand Down
6 changes: 6 additions & 0 deletions _includes/translations/basic.aton
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
@PL: Wyświetl listę partytur zawierających tekst liryczny
@@END: ENTRY

@@BEGIN: ENTRY
@TAG: basso_continuo_scores
@EN: Toggle list of scores with basso continuo figures
@PL: Toggle list of scores with basso continuo figures
@@END: ENTRY

@@BEGIN: ENTRY
@TAG: date_sort
@EN: Toggle ordering of scores by upload/revision date
Expand Down

0 comments on commit 486d8e6

Please sign in to comment.