зеркало из https://github.com/mozilla/pjs.git
Bug 76216 - Too many default columns in the mail/news search results window. Also bug 73549 - Remove dead, commented gThreadTree code in SearchDialog.js r=gayatrib@netscape.com sr=sspitzer@netscape.com
This commit is contained in:
Родитель
58f3eab2ff
Коммит
219437b55a
|
@ -134,9 +134,6 @@ var gSearchNotificationListener =
|
||||||
onNewSearch: function()
|
onNewSearch: function()
|
||||||
{
|
{
|
||||||
gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForStopButton"));
|
gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForStopButton"));
|
||||||
// if (gThreadTree)
|
|
||||||
// gThreadTree.clearItemSelection();
|
|
||||||
|
|
||||||
document.commandDispatcher.updateCommands('mail-search');
|
document.commandDispatcher.updateCommands('mail-search');
|
||||||
gStatusFeedback.showProgress(0);
|
gStatusFeedback.showProgress(0);
|
||||||
gStatusFeedback.showStatusString(gSearchBundle.getString("searchingMessage"));
|
gStatusFeedback.showStatusString(gSearchBundle.getString("searchingMessage"));
|
||||||
|
@ -172,6 +169,24 @@ var gFolderListener = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function HideSearchColumn(id)
|
||||||
|
{
|
||||||
|
var col = document.getElementById(id);
|
||||||
|
if (col) {
|
||||||
|
col.setAttribute("hidden","true");
|
||||||
|
col.setAttribute("ignoreincolumnpicker","true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ShowSearchColumn(id)
|
||||||
|
{
|
||||||
|
var col = document.getElementById(id);
|
||||||
|
if (col) {
|
||||||
|
col.removeAttribute("hidden");
|
||||||
|
col.removeAttribute("ignoreincolumnpicker");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function searchOnLoad()
|
function searchOnLoad()
|
||||||
{
|
{
|
||||||
initializeSearchWidgets();
|
initializeSearchWidgets();
|
||||||
|
@ -188,23 +203,18 @@ function searchOnLoad()
|
||||||
document.commandDispatcher.updateCommands('mail-search');
|
document.commandDispatcher.updateCommands('mail-search');
|
||||||
moveToAlertPosition();
|
moveToAlertPosition();
|
||||||
|
|
||||||
// hide the thread related columns. you can't thread search results
|
// hide and remove these columns from the column picker. you can't thread search results
|
||||||
var threadCol = document.getElementById("threadCol");
|
HideSearchColumn("threadCol"); // since you can't thread search results
|
||||||
threadCol.setAttribute("hidden","true");
|
HideSearchColumn("totalCol"); // since you can't thread search results
|
||||||
threadCol.setAttribute("ignoreincolumnpicker","true");
|
HideSearchColumn("unreadCol"); // since you can't thread search results
|
||||||
|
HideSearchColumn("unreadButtonColHeader");
|
||||||
var totalCol = document.getElementById("totalCol");
|
HideSearchColumn("statusCol");
|
||||||
totalCol.setAttribute("hidden","true");
|
HideSearchColumn("sizeCol");
|
||||||
totalCol.setAttribute("ignoreincolumnpicker","true");
|
HideSearchColumn("flaggedCol");
|
||||||
|
HideSearchColumn("totalCol");
|
||||||
var unreadCol = document.getElementById("unreadCol");
|
|
||||||
unreadCol.setAttribute("hidden","true");
|
// we want to show the location column for search
|
||||||
unreadCol.setAttribute("ignoreincolumnpicker","true");
|
ShowSearchColumn("locationCol");
|
||||||
|
|
||||||
// we want to show this column for search
|
|
||||||
var locationCol = document.getElementById("locationCol");
|
|
||||||
locationCol.removeAttribute("hidden");
|
|
||||||
locationCol.removeAttribute("ignoreincolumnpicker");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchOnUnload()
|
function searchOnUnload()
|
||||||
|
@ -215,9 +225,11 @@ function searchOnUnload()
|
||||||
|
|
||||||
gMailSession.RemoveFolderListener(gSearchSessionFolderListener);
|
gMailSession.RemoveFolderListener(gSearchSessionFolderListener);
|
||||||
gSearchSession.removeFolderListener(gFolderListener);
|
gSearchSession.removeFolderListener(gFolderListener);
|
||||||
|
|
||||||
|
if (gSearchView) {
|
||||||
gSearchView.close();
|
gSearchView.close();
|
||||||
gSearchView = null;
|
gSearchView = null;
|
||||||
|
}
|
||||||
|
|
||||||
// release this early because msgWindow holds a weak reference
|
// release this early because msgWindow holds a weak reference
|
||||||
msgWindow.rootDocShell = null;
|
msgWindow.rootDocShell = null;
|
||||||
|
@ -226,7 +238,6 @@ function searchOnUnload()
|
||||||
function initializeSearchWindowWidgets()
|
function initializeSearchWindowWidgets()
|
||||||
{
|
{
|
||||||
gFolderPicker = document.getElementById("searchableFolders");
|
gFolderPicker = document.getElementById("searchableFolders");
|
||||||
// gThreadTree = document.getElementById("threadTree");
|
|
||||||
gSearchStopButton = document.getElementById("search-button");
|
gSearchStopButton = document.getElementById("search-button");
|
||||||
gStatusBar = document.getElementById('statusbar-icon');
|
gStatusBar = document.getElementById('statusbar-icon');
|
||||||
|
|
||||||
|
@ -236,7 +247,6 @@ function initializeSearchWindowWidgets()
|
||||||
|
|
||||||
// functionality to enable/disable buttons using nsSearchResultsController
|
// functionality to enable/disable buttons using nsSearchResultsController
|
||||||
// depending of whether items are selected in the search results thread pane.
|
// depending of whether items are selected in the search results thread pane.
|
||||||
// gThreadTree.controllers.appendController(nsSearchResultsController);
|
|
||||||
top.controllers.insertControllerAt(0, nsSearchResultsController);
|
top.controllers.insertControllerAt(0, nsSearchResultsController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,8 +350,6 @@ function onSearch()
|
||||||
gSearchSession.search(msgWindow);
|
gSearchSession.search(msgWindow);
|
||||||
// refresh the tree after the search starts, because initiating the
|
// refresh the tree after the search starts, because initiating the
|
||||||
// search will cause the datasource to clear itself
|
// search will cause the datasource to clear itself
|
||||||
// gThreadTree.setAttribute("ref", gThreadTree.getAttribute("ref"));
|
|
||||||
// dump("Kicking it off with " + gThreadTree.getAttribute("ref") + "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddSubFolders(folder) {
|
function AddSubFolders(folder) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче