зеркало из https://github.com/mozilla/gecko-dev.git
#5335 show location in search dialog
#75942 enter in a search term kicks off search #72253 no sort by thread in the search dialog #44341 showing the wrong columns in search dialog #75939 bad row count problems with search remove unused search-widgets.css r=mscott,sr=bienvenu
This commit is contained in:
Родитель
443901857c
Коммит
fd244297e9
|
@ -397,6 +397,13 @@
|
|||
]]>
|
||||
</constructor>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="keypress"><![CDATA[
|
||||
if (event.keyCode == 13) {
|
||||
onSearch();
|
||||
}
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
<binding id="searchterm" name="searchTerm" extends="xul:box">
|
||||
<implementation>
|
||||
|
|
|
@ -56,6 +56,7 @@ Rights Reserved.
|
|||
<outlinercol id="unreadCol" class="outlinercol-header outlinercol-inset-header sortDirectionIndicator" persist="hidden width" flex="1" label="&unreadColumn.label;"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<outlinercol id="totalCol" class="outlinercol-header outlinercol-inset-header sortDirectionIndicator" persist="hidden width" flex="1" label="&totalColumn.label;"/>
|
||||
<outlinercol id="locationCol" class="outlinercol-header outlinercol-inset-header sortDirectionIndicator" persist="width" flex="1" hidden="true" ignoreincolumnpicker="true" label="&locationColumn.label;"/>
|
||||
<outlinerbody flex="1" onselect="this.parentNode.outlinerBoxObject.view.selectionChanged();"/>
|
||||
</outliner>
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ Rights Reserved.
|
|||
<!ENTITY orderReceivedColumn.label "Order Received">
|
||||
<!ENTITY readColumn.label "Read">
|
||||
<!ENTITY flagColumn.label "Flag">
|
||||
<!ENTITY locationColumn.label "Location">
|
||||
|
||||
<!--Tooltips-->
|
||||
<!ENTITY threadColumnHeader.tooltip "Click to display message threads">
|
||||
|
|
|
@ -191,10 +191,20 @@ function searchOnLoad()
|
|||
// hide the thread related columns. you can't thread search results
|
||||
var threadCol = document.getElementById("threadCol");
|
||||
threadCol.setAttribute("hidden","true");
|
||||
threadCol.setAttribute("ignoreincolumnpicker","true");
|
||||
|
||||
var totalCol = document.getElementById("totalCol");
|
||||
totalCol.setAttribute("hidden","true");
|
||||
totalCol.setAttribute("ignoreincolumnpicker","true");
|
||||
|
||||
var unreadCol = document.getElementById("unreadCol");
|
||||
unreadCol.setAttribute("hidden","true");
|
||||
unreadCol.setAttribute("ignoreincolumnpicker","true");
|
||||
|
||||
// we want to show this column for search
|
||||
var locationCol = document.getElementById("locationCol");
|
||||
locationCol.removeAttribute("hidden");
|
||||
locationCol.removeAttribute("ignoreincolumnpicker");
|
||||
}
|
||||
|
||||
function searchOnUnload()
|
||||
|
@ -288,8 +298,17 @@ function onChooseFolder(event) {
|
|||
}
|
||||
}
|
||||
|
||||
function onSearch(event)
|
||||
function onSearch()
|
||||
{
|
||||
// set the view. do this on every search, to
|
||||
// allow the outliner to reset itself
|
||||
var outlinerView = gSearchView.QueryInterface(Components.interfaces.nsIOutlinerView);
|
||||
if (outlinerView)
|
||||
{
|
||||
var outliner = GetThreadOutliner();
|
||||
outliner.boxObject.QueryInterface(Components.interfaces.nsIOutlinerBoxObject).view = outlinerView;
|
||||
}
|
||||
|
||||
gSearchSession.clearScopes();
|
||||
// tell the search session what the new scope is
|
||||
if (!gCurrentFolder.isServer)
|
||||
|
@ -396,13 +415,6 @@ function setupDatasource() {
|
|||
gSearchView.init(messenger, msgWindow, cmdupdator);
|
||||
gSearchView.open(null, nsMsgViewSortType.byId, nsMsgViewSortOrder.ascending, nsMsgViewFlagsType.kNone, count);
|
||||
|
||||
var outlinerView = gSearchView.QueryInterface(Components.interfaces.nsIOutlinerView);
|
||||
if (outlinerView)
|
||||
{
|
||||
var outliner = GetThreadOutliner();
|
||||
outliner.boxObject.QueryInterface(Components.interfaces.nsIOutlinerBoxObject).view = outlinerView;
|
||||
}
|
||||
|
||||
// the thread pane needs to use the search datasource (to get the
|
||||
// actual list of messages) and the message datasource (to get any
|
||||
// attributes about each message)
|
||||
|
@ -480,9 +492,9 @@ function setMsgDatasourceWindow(ds, msgwindow)
|
|||
function onSearchButton(event)
|
||||
{
|
||||
if (event.target.label == gSearchBundle.getString("labelForSearchButton"))
|
||||
onSearch(event);
|
||||
onSearch();
|
||||
else
|
||||
onSearchStop(event);
|
||||
onSearchStop();
|
||||
}
|
||||
|
||||
// threadPane.js will be needing this, too
|
||||
|
@ -565,8 +577,6 @@ function HandleDeleteOrMoveMessageCompleted(folder)
|
|||
|
||||
function SetDatasources()
|
||||
{
|
||||
dump("XXX SetDatasources\n");
|
||||
|
||||
var button = document.getElementById("fileMessageButton");
|
||||
var datasourceContractIDPrefix = "@mozilla.org/rdf/datasource;1?name=";
|
||||
var accountManagerDSContractID = datasourceContractIDPrefix + "msgaccountmanager";
|
||||
|
|
|
@ -20,7 +20,6 @@ Communications Corporation. Portions created by Netscape are
|
|||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://communicator/skin/search-widgets.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://messenger/content/threadPane.xul"?>
|
||||
<?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?>
|
||||
|
@ -41,8 +40,6 @@ Rights Reserved.
|
|||
class="color-dialog"
|
||||
orient="vertical">
|
||||
|
||||
<keyset id="dialogKeys"/>
|
||||
|
||||
<stringbundle id="bundle_search" src="chrome://messenger/locale/search.properties"/>
|
||||
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
|
||||
|
|
|
@ -92,22 +92,23 @@ NS_IMETHODIMP nsMsgSearchDBView::Close()
|
|||
|
||||
NS_IMETHODIMP nsMsgSearchDBView::GetCellText(PRInt32 aRow, const PRUnichar * aColID, PRUnichar ** aValue)
|
||||
{
|
||||
nsresult rv;
|
||||
if (aColID[0] == 'l') // location
|
||||
{
|
||||
nsCOMPtr <nsIMsgDBHdr> msgHdr;
|
||||
rv = GetMsgHdrForViewIndex(aRow, getter_AddRefs(msgHdr));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return FetchLocation(msgHdr, aValue);
|
||||
return FetchLocation(aRow, aValue);
|
||||
}
|
||||
else
|
||||
return nsMsgDBView::GetCellText(aRow, aColID, aValue);
|
||||
|
||||
}
|
||||
|
||||
nsresult nsMsgSearchDBView::FetchLocation(nsIMsgDBHdr * aHdr, PRUnichar ** aSizeString)
|
||||
nsresult nsMsgSearchDBView::FetchLocation(PRInt32 aRow, PRUnichar ** aLocationString)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
nsCOMPtr <nsIMsgFolder> folder;
|
||||
nsresult rv = GetFolderForViewIndex(aRow, getter_AddRefs(folder));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
rv = folder->GetPrettiestName(aLocationString);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr)
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
NS_IMETHOD GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **folder);
|
||||
virtual nsresult GetFolders(nsISupportsArray **aFolders);
|
||||
protected:
|
||||
nsresult FetchLocation(nsIMsgDBHdr * aHdr, PRUnichar ** aSizeString);
|
||||
nsresult FetchLocation(PRInt32 aRow, PRUnichar ** aLocationString);
|
||||
virtual nsresult GetDBForViewIndex(nsMsgViewIndex index, nsIMsgDatabase **db);
|
||||
virtual nsresult RemoveByIndex(nsMsgViewIndex index);
|
||||
virtual nsresult CopyMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, PRInt32 numIndices, PRBool isMove, nsIMsgFolder *destFolder);
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
/**
|
||||
* styles for search widgets used by Mail Filter dialog and Search
|
||||
* and hopefully one day Bookmarks/History...
|
||||
**/
|
||||
|
||||
.search-menulist, .search-value-menulist, .search-value-textbox
|
||||
{
|
||||
margin : 0px;
|
||||
}
|
|
@ -3,7 +3,6 @@ classic.jar:
|
|||
skin/classic/editor/contents.rdf (editor/contents.rdf)
|
||||
skin/classic/messenger/contents.rdf (messenger/contents.rdf)
|
||||
skin/classic/navigator/contents.rdf (navigator/contents.rdf)
|
||||
skin/classic/communicator/search-widgets.css (communicator/win/search-widgets.css)
|
||||
skin/classic/communicator/broken.gif (communicator/broken.gif)
|
||||
skin/classic/communicator/lock.gif (communicator/lock.gif)
|
||||
skin/classic/communicator/unlock.gif (communicator/unlock.gif)
|
||||
|
|
Загрузка…
Ссылка в новой задаче