Skip to content

Commit

Permalink
BuildVu 2022.01 (1.14.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonatherton committed Jan 20, 2022
1 parent c06d7ab commit f995fbb
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idrviewer",
"version": "1.14.0",
"version": "1.14.1",
"description": "The IDRViewer is a viewer designed for documents converted using BuildVu",
"keywords": [
"idrsolutions",
Expand Down
3 changes: 3 additions & 0 deletions src/examples/complete/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Complete UI Changelog
---------------------

2.4.0 (25 Jan 2022)
- Improved search snippet appearance (bold search term within snippets)

2.3.0 (14 Dec 2021)
- Improved the print behavior (now prints the loaded pages)

Expand Down
17 changes: 13 additions & 4 deletions src/examples/complete/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- v2.3.0 -->
<!-- v2.4.0 -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -254,6 +254,10 @@
e.preventDefault();
};

const htmlEncode = function(string) {
return string.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;');
};

const doSearch = function () {
const resultDiv = document.getElementById('searchResults');
resultDiv.innerText = '';
Expand All @@ -262,7 +266,7 @@
const matchCase = matchCaseCheckbox.checked;
const limitOnePerPage = limitResultsCheckbox.checked;

const results = IDRViewer.search(searchTerm, matchCase, limitOnePerPage);
const results = IDRViewer.search(searchTerm, matchCase, limitOnePerPage, true);

resultsCountEle.innerText = String(results.length) + (LanguageHelper.getTranslation('search.results-count') || ' results');

Expand All @@ -272,7 +276,7 @@

const link = document.createElement('a');
link.href = '?page=' + pg;
link.innerText = results[i].snippet;
link.innerHTML = pg + " - " + htmlEncode(results[i].preSnippet) + "<b>" + htmlEncode(results[i].result) + "</b>" + htmlEncode(results[i].postSnippet);
link.className = 'result';
link.dataset.page = pg;
link.addEventListener('click', clickHandler);
Expand Down Expand Up @@ -1090,6 +1094,10 @@
}
#search-panel * {
color: #333;
}
#search-panel .searchOption *,
#search-panel #searchResults,
#search-panel #searchResults a {
margin: 5px;
}
#search-panel #searchInput {
Expand All @@ -1105,11 +1113,12 @@
display: block;
}
#search-panel hr {
margin-top: 18px;
margin: 18px 5px 5px;
}
#search-panel #searchResultsCount {
text-align: center;
display: block;
margin: 5px;
}
#search-panel .result {
text-decoration: none;
Expand Down
3 changes: 3 additions & 0 deletions src/js/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
IDRViewer Changelog
-------------------

1.14.1 (25 Dec 2022)
- Fix search result highlighting not working for quotation marks

1.14.0 (14 Dec 2021)
- Add support for the Sound annotation subtype
- Tweak the implementation of annotations that play sounds to allow the sound to be paused
Expand Down
2 changes: 1 addition & 1 deletion src/js/idrviewer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f995fbb

Please sign in to comment.