mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-14 06:47:57 -04:00
Report titles scanned
Former-commit-id: e455584b290f1b8aa8f8b756d0fe68f0d10219ff [formerly 215c53efb0d6ab5ca1c3465dde78dff78762f03c] [formerly 672bb487c56bbf084533fdf722ba818c8b3db463] [formerly 121d57b6c0a049a7c57adaf4f355804fa24f503c [formerly 8127e0ec8b664d9d89922eb0efca5116213437e5 [formerly 336c07b765424a2028837a5a4753f5f17a6393ea]]] Former-commit-id: 2a6c97c5bc9d7fd77d478ceebe146a95ca8d3f2b [formerly 6c3f474d30972e9d6256b80bc040e73189c49ec2 [formerly 8cfa3b1a532864be08a0376d64456bebab8e49e5]] Former-commit-id: 0dccfa704c0b3a38bd9fb2640cd1c5983567e21b [formerly 6cbe5ebf247af9221d50921bfed469ecd9c0987c] Former-commit-id: 9d88227f590eab304045ac2ae9cf1b11be0acadc
This commit is contained in:
parent
724695d67a
commit
3ae11f596f
@ -2947,27 +2947,29 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'cache', 'images', 'sett
|
||||
/**
|
||||
* Display the list of articles with the given array of DirEntry
|
||||
* @param {Array} dirEntryArray The array of dirEntries returned from the binary search
|
||||
* @param {Object} reportingSearchStatus The status of the reporting search
|
||||
* @param {Object} reportingSearch The the reporting search object
|
||||
*/
|
||||
function populateListOfArticles(dirEntryArray, reportingSearchStatus) {
|
||||
function populateListOfArticles(dirEntryArray, reportingSearch) {
|
||||
// Do not allow cancelled searches to report
|
||||
if (reportingSearchStatus === 'cancelled') return;
|
||||
if (reportingSearch.status === 'cancelled') return;
|
||||
var stillSearching = appstate.search.status === 'interim';
|
||||
var articleListHeaderMessageDiv = $('#articleListHeaderMessage');
|
||||
var articleListHeaderMessageDiv = document.getElementById('articleListHeaderMessage');
|
||||
var nbDirEntry = dirEntryArray ? dirEntryArray.length : 0;
|
||||
|
||||
var message;
|
||||
if (stillSearching) {
|
||||
message = 'Searching [' + appstate.search.type + ']... found: ' + nbDirEntry;
|
||||
message = 'Searching [' + appstate.search.type + ']... found: ' + nbDirEntry + '...' +
|
||||
(reportingSearch.scanCount ? ' [scanning ' + reportingSearch.scanCount + ' titles]' : '');
|
||||
} else if (nbDirEntry >= params.maxResults) {
|
||||
message = 'First ' + params.maxResults + ' articles found (refine your search).';
|
||||
message = 'First ' + params.maxResults + ' articles found: refine your search.';
|
||||
} else {
|
||||
message = 'Finished. ' + (nbDirEntry ? nbDirEntry : 'No') + ' articles found' + (
|
||||
appstate.search.type === 'basic' ? ': try fewer words for full search.' : '.'
|
||||
);
|
||||
message = 'Finished. ' + (nbDirEntry ? nbDirEntry : 'No') + ' articles found' +
|
||||
(appstate.search.type === 'basic' ? ': try fewer words for full search.' : '.');
|
||||
}
|
||||
if (!stillSearching && reportingSearch.scanCount) message += ' [scanned ' + reportingSearch.scanCount + ' titles]';
|
||||
|
||||
articleListHeaderMessageDiv.html(message);
|
||||
articleListHeaderMessageDiv.innerHTML = message;
|
||||
if (stillSearching && reportingSearch.countReport) return;
|
||||
|
||||
var articleListDiv = document.getElementById('articleList');
|
||||
var articleListDivHtml = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user