This commit is contained in:
noririty%jcom.home.ne.jp 2003-08-01 14:57:58 +00:00
Родитель 9948746008
Коммит 92d312079c
2 изменённых файлов: 19 добавлений и 7 удалений

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

@ -88,21 +88,21 @@
<toolbarbutton id="viewButton" type="menu" label="&view.label;" selectedsort="day" persist="selectedsort">
<menupopup>
<menuitem id="bydayandsite" label="&byDayAndSite.label;" accesskey="&byDayAndSite.accesskey;" type="radio"
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'dayandsite'); GroupBy('dayandsite'); SortBy('dayandsite');"/>
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'dayandsite'); GroupBy('dayandsite');"/>
<menuitem id="bysite" label="&bySite.label;" accesskey="&bySite.accesskey;" type="radio"
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'site'); GroupBy('none'); SortBy('name');"/>
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'site'); GroupBy('site');"/>
<menuitem id="byday" label="&byDate.label;" accesskey="&byDate.accesskey;"
type="radio"
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'day');
GroupBy('day'); SortBy('day');"/>
GroupBy('day');"/>
<menuitem id="byvisited" label="&byMostVisited.label;" accesskey="&byMostVisited.accesskey;"
type="radio"
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'visited');
GroupBy('none'); SortBy('visited');"/>
GroupBy('visited');"/>
<menuitem id="bylastvisited" label="&byLastVisited.label;" accesskey="&byLastVisited.accesskey;"
type="radio"
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'lastvisited');
GroupBy('none'); SortBy('lastvisited');"/>
GroupBy('lastvisited');"/>
</menupopup>
</toolbarbutton>
</hbox>

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

@ -60,6 +60,7 @@ function HistoryCommonInit()
else
document.getElementById("byday").setAttribute("checked", "true");
gHistoryTree.focus();
SortInNewDirection(find_sort_direction(find_sort_column()));
gHistoryTree.treeBoxObject.view.selection.select(0);
}
@ -162,14 +163,25 @@ function GroupBy(groupingType)
break;
case "site":
// xxx for now
gHistoryTree.setAttribute("ref", "NC:HistoryByDate");
gHistoryTree.setAttribute("ref", "NC:HistoryRoot");
SortBy("name");
break;
case "dayandsite":
gHistoryTree.setAttribute("ref", "NC:HistoryByDateAndSite");
SortBy("dayandsite");
break;
case "visited":
gHistoryTree.setAttribute("ref", "NC:HistoryRoot");
SortBy("visited");
break;
case "lastvisited":
gHistoryTree.setAttribute("ref", "NC:HistoryRoot");
SortBy("lastvisited");
break;
case "day":
default:
gHistoryTree.setAttribute("ref", "NC:HistoryByDate");
SortBy("day");
break;
}
gSearchBox.value = "";
@ -254,5 +266,5 @@ function searchHistory(aInput)
function onUnload()
{
GroupBy(gHistoryGrouping);
return;
}