Bug 144158 No Group by Site option in History r=timeless sr=alecf

This commit is contained in:
neil%parkwaycc.co.uk 2006-07-27 14:57:33 +00:00
parent ec7f2bfa87
commit 795733738a
2 changed files with 10 additions and 6 deletions

View File

@ -97,6 +97,9 @@ function HistoryCommonInit()
case "none":
document.getElementById("groupByNone").setAttribute("checked", "true");
break;
case "site":
document.getElementById("groupBySite").setAttribute("checked", "true");
break;
case "day":
default:
document.getElementById("groupByDay").setAttribute("checked", "true");
@ -145,10 +148,10 @@ function historyOnSelect()
gLastDomain = "";
var match;
var currentIndex = gHistoryTree.currentIndex;
var rowIsContainer = gHistoryGrouping == "day" ? isContainer(gHistoryTree, currentIndex) : false;
var url = gHistoryTree.treeBoxObject.view.getCellText(currentIndex, "URL");
var rowIsContainer = gHistoryGrouping != "none" && currentIndex >= 0 && isContainer(gHistoryTree, currentIndex);
var url = rowIsContainer ? gHistoryTree.treeBoxObject.view.getCellText(currentIndex, "URL") : null;
if (url && !rowIsContainer) {
if (url) {
// matches scheme://(hostname)...
match = url.match(/^.*?:\/\/(?:([^\/:]*)(?::([^\/:]*))?@)?([^\/:]*)(?::([^\/:]*))?(.*)$/);
@ -327,8 +330,7 @@ function GroupBy(groupingType)
tree.setAttribute("ref", "NC:HistoryRoot");
break;
case "site":
// xxx for now
tree.setAttribute("ref", "NC:HistoryByDate");
tree.setAttribute("ref", "find:datasource=history&groupby=Hostname");
break;
case "day":
default:
@ -386,7 +388,7 @@ function updateItems()
var collapseExpandItem = document.getElementById("miCollapseExpand");
if (count > 1) {
var hasContainer = false;
if (gHistoryGrouping == "day") {
if (gHistoryGrouping != "none") {
var min = new Object();
var max = new Object();
var rangeCount = gHistoryTree.treeBoxObject.view.selection.getRangeCount();

View File

@ -20,6 +20,8 @@
<!ENTITY groupBy.accesskey "G">
<!ENTITY groupByDay.label "Day">
<!ENTITY groupByDay.accesskey "D">
<!ENTITY groupBySite.label "Site">
<!ENTITY groupBySite.accesskey "S">
<!ENTITY groupByNone.label "None">
<!ENTITY groupByNone.accesskey "N">
<!ENTITY historyWindowTitle.label "History">