Don't show section headers for sections with no results and don't show page

controls if there is only one page of results

This makes the search results display more streamlined.

Make sure that we move the selection to a different section if we are going
from displaying a single section to displaying all and the section that
used to be displayed alone doesn't have any results.
This commit is contained in:
Marina Zhurakhinskaya
2009-09-11 18:59:31 -04:00
parent dfe16f4af6
commit 02c65fab8d
2 changed files with 45 additions and 9 deletions

View File

@ -707,6 +707,9 @@ GenericDisplay.prototype = {
if (resetDisplayControl) {
this.displayControl.remove_all();
let nPages = this._list.n_pages;
// Don't show the page indicator if there is only one page.
if (nPages == 1)
return;
let pageNumber = this._list.page;
for (let i = 0; i < nPages; i++) {
let pageControl = new Link.Link({ color: (i == pageNumber) ? DISPLAY_CONTROL_SELECTED_COLOR : ITEM_DISPLAY_DESCRIPTION_COLOR,