diff --git a/skin/feedview-header.css b/skin/feedview-header.css index 8d925bafb..d562727c9 100644 --- a/skin/feedview-header.css +++ b/skin/feedview-header.css @@ -165,4 +165,5 @@ font-family: Verdana, Helvetica, Arial, sans-serif; color: #4a6278 !important; font-style: normal !important; + height: 23px; } diff --git a/ui/brief.xhtml b/ui/brief.xhtml index 9839f4015..d5e32ee07 100644 --- a/ui/brief.xhtml +++ b/ui/brief.xhtml @@ -159,7 +159,6 @@ diff --git a/ui/feedview.js b/ui/feedview.js index 7e33c6e5f..fc693d9da 100644 --- a/ui/feedview.js +++ b/ui/feedview.js @@ -849,7 +849,11 @@ FeedView.prototype = { dateQuery.endDate = rangeEndDate; dateQuery.startDate = rangeStartDate; - dateQuery.limit = aCount; + if (dateQuery.searchString) { + dateQuery.searchString = dateQuery.searchString.toUpperCase(); + } else { + dateQuery.limit = aCount; + } let dates = await this._refreshGuard(this.db.query(dateQuery).getValuesOf('date')); if (dates.length) { @@ -865,6 +869,15 @@ FeedView.prototype = { let loadedEntries = await this._refreshGuard(this.db.query(query).getEntries()); for (let entry of loadedEntries) { + if (dateQuery.searchString && + !( + (entry.revisions[0]['title'] && entry.revisions[0]['title'].toUpperCase().indexOf(dateQuery.searchString) !== -1) + || (entry.revisions[0]['content'] && entry.revisions[0]['content'].toUpperCase().indexOf(dateQuery.searchString) !== -1) + || (entry.revisions[0]['authors'] && entry.revisions[0]['authors'].toUpperCase().indexOf(dateQuery.searchString) !== -1) + ) + ) { + continue; + } this._insertEntry(entry, this._loadedEntries.length); this._loadedEntries.push(entry.id); } @@ -1406,6 +1419,9 @@ EntryView.prototype = { }, _highlightSearchTerms: function EntryView__highlightSearchTerms(aElement) { + if (aElement === undefined) { + return; + } for (let term of this.feedView.query.searchString.match(/[^\s:*"-]+/g)) { let baseNode = this.feedView.document.createElement('span'); baseNode.className = 'search-highlight';