Bug 392497 - search in history sidebar loses sort, r=mano ui-r=faaborg

This commit is contained in:
Thomas Bertels 2009-01-23 12:52:14 +01:00
parent e362848785
commit 9f309cd8b1

View File

@ -99,32 +99,33 @@ function searchHistory(aInput)
var sortingMode;
var resultType;
switch (gHistoryGrouping) {
case "visited":
resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_VISITCOUNT_DESCENDING;
break;
case "lastvisited":
resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_DATE_DESCENDING;
break;
case "dayandsite":
resultType = NHQO.RESULTS_AS_DATE_SITE_QUERY;
break;
case "site":
resultType = NHQO.RESULTS_AS_SITE_QUERY;
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
break;
case "day":
default:
resultType = NHQO.RESULTS_AS_DATE_QUERY;
break;
}
if (aInput) {
query.searchTerms = aInput;
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
resultType = NHQO.RESULTS_AS_URI;
}
else {
switch (gHistoryGrouping) {
case "visited":
resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_VISITCOUNT_DESCENDING;
break;
case "lastvisited":
resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_DATE_DESCENDING;
break;
case "dayandsite":
resultType = NHQO.RESULTS_AS_DATE_SITE_QUERY;
break;
case "site":
resultType = NHQO.RESULTS_AS_SITE_QUERY;
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
break;
case "day":
default:
resultType = NHQO.RESULTS_AS_DATE_QUERY;
break;
if (gHistoryGrouping != "visited" && gHistoryGrouping != "lastvisited") {
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
resultType = NHQO.RESULTS_AS_URI;
}
}