Bug 620655 - Hide 'See More Add-ons' button after installing all extra add-ons [r=vingtetun]

This commit is contained in:
Mark Finkle 2010-12-22 15:13:39 -05:00
Родитель 4b5c314adb
Коммит 9a29d567d1
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -570,7 +570,7 @@ var ExtensionsView = {
item = item.nextSibling;
}
// Hide the "See More" button if there are no more to show
// Hide the "Show More" button if there are no more to show
if (item == this._list.lastChild)
item.setAttribute("hidepage", "true");
},
@ -619,14 +619,17 @@ var ExtensionsView = {
aBrowseAddons.sort(ratingCompare);
// We only show extra browse add-ons if the recommended count is small. Otherwise, the user
// can see more by pressing the "See More" button
// can see more by pressing the "Show More" button
this.appendSearchResults(aRecommendedAddons, false, aRecommendedAddons.length);
this.appendSearchResults(aBrowseAddons, true, (aRecommendedAddons.length >= kAddonPageSize ? 0 : kAddonPageSize));
let totalAddons = aRecommendedAddons.length + aBrowseAddons.length;
let showmore = document.createElement("richlistitem");
showmore.setAttribute("typeName", "showmore");
showmore.setAttribute("pagelabel", strings.getString("addonsBrowseAll.seeMore"));
showmore.setAttribute("onpagecommand", "ExtensionsView.showMoreSearchResults();");
showmore.setAttribute("hidepage", totalAddons > kAddonPageSize ? "false" : "true");
showmore.setAttribute("sitelabel", strings.getString("addonsBrowseAll.browseSite"));
showmore.setAttribute("onsitecommand", "ExtensionsView.showMoreResults('" + browseURL + "');");
this._list.appendChild(showmore);