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
Родитель 420108d297
Коммит 200199b07e
2 изменённых файлов: 10 добавлений и 6 удалений

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

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

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

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