From 99ee8aff28a4de0d4b5e48153f6fe4a14d10a9bf Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Thu, 24 Aug 2023 16:42:54 -0400 Subject: [PATCH] Modify display of queried string for volpiano and mode searches --- .../app/search/chant-search/ChantSearchProvider.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js b/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js index ca8e03d9..c9c4ec36 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js @@ -101,7 +101,18 @@ export default Marionette.Object.extend({ // Modify query returned by solr so it is ready for display. // Remove escaping backslashes from the displayed string. let query = this.searchParameters.get('query'); - let displayedQuery = (fieldName === "volpiano" || fieldName === "volpiano_literal") ? query.replaceAll("\\-", "-") : query; + let displayedQuery; + switch (fieldName){ + case "volpiano": + case "volpiano_literal": + displayedQuery = query.replaceAll("\\-", "-"); + break; + case "mode": + displayedQuery = query.join(", "); + break; + default: + displayedQuery = query; + } return { fieldName: fieldName, query: query,