Display only first page of search results by default and display a total results count

Display only first page of search results by default for each section and
allow clicking on the section header to view all the results for a given
section. This design will allow us to easily move from paging to scrolling
without having to stack multiple scrollbars in a single pane.

Display a total results count next to the section name. This serves as an
indicator that there are more results. The section header pre-lights to
indicate that it can be clicked on.

Make sure we go back to the first page of results when we exit a single
section mode. Make sure we re-instate all result sections if the search
mode is left.

Close the only section search mode on Esc, and only close the search
when Esc is hit again.
This commit is contained in:
Marina Zhurakhinskaya
2009-08-26 18:46:58 -04:00
parent ecc1f964c9
commit cdbb7f8f5f
2 changed files with 127 additions and 19 deletions

View File

@ -430,6 +430,10 @@ GenericDisplay.prototype = {
return this._list.displayedCount > 0;
},
getMatchedItemsCount: function() {
return this._matchedItems.length;
},
// Load the initial state
load: function() {
this._redisplay(true);
@ -452,6 +456,11 @@ GenericDisplay.prototype = {
return item.createDetailsActor();
},
// Displays the page specified by the pageNumber argument.
displayPage: function(pageNumber) {
this._list.page = pageNumber;
},
//// Protected methods ////
/*
@ -680,11 +689,6 @@ GenericDisplay.prototype = {
}));
},
// Displays the page specified by the pageNumber argument.
_displayPage: function(pageNumber) {
this._list.page = pageNumber;
},
/*
* Updates the display control to reflect the matched items set and the page selected.
*
@ -711,7 +715,7 @@ GenericDisplay.prototype = {
pageControl.connect('clicked',
Lang.bind(this,
function(o, event) {
this._displayPage(pageNumberLocalScope);
this.displayPage(pageNumberLocalScope);
}));
}
} else {