mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 83968 Allow local searches even when online r=Mnyromyr sr=bienvenu a=asa
This commit is contained in:
parent
aabd02b15d
commit
2a9c9cdac6
@ -367,9 +367,17 @@ function updateSearchFolderPicker(folderURI)
|
||||
gCurrentFolder =
|
||||
RDF.GetResource(folderURI).QueryInterface(nsIMsgFolder);
|
||||
|
||||
var searchLocalSystem = document.getElementById("checkSearchLocalSystem");
|
||||
if (searchLocalSystem)
|
||||
searchLocalSystem.disabled = gCurrentFolder.server.searchScope == nsMsgSearchScope.offlineMail;
|
||||
setSearchScope(GetScopeForFolder(gCurrentFolder));
|
||||
}
|
||||
|
||||
function updateSearchLocalSystem()
|
||||
{
|
||||
setSearchScope(GetScopeForFolder(gCurrentFolder));
|
||||
}
|
||||
|
||||
function UpdateAfterCustomHeaderChange()
|
||||
{
|
||||
updateSearchAttributes();
|
||||
@ -510,7 +518,8 @@ function AddSubFoldersToURI(folder)
|
||||
|
||||
function GetScopeForFolder(folder)
|
||||
{
|
||||
return folder.server.searchScope;
|
||||
var searchLocalSystem = document.getElementById("checkSearchLocalSystem");
|
||||
return searchLocalSystem && searchLocalSystem.checked ? nsMsgSearchScope.offlineMail : folder.server.searchScope;
|
||||
}
|
||||
|
||||
var nsMsgViewSortType = Components.interfaces.nsMsgViewSortType;
|
||||
|
@ -111,11 +111,12 @@
|
||||
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<checkbox id="checkSearchSubFolders" label="&searchSubfolders.label;" checked="true" accesskey="&searchSubfolders.accesskey;"/>
|
||||
<spacer flex="2"/>
|
||||
<button label="&resetButton.label;" oncommand="onResetSearch(event);" accesskey="&resetButton.accesskey;"/>
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<checkbox id="checkSearchSubFolders" label="&searchSubfolders.label;" checked="true" accesskey="&searchSubfolders.accesskey;"/>
|
||||
<checkbox id="checkSearchLocalSystem" label="&searchLocalSystem.label;" persist="checked" accesskey="&searchLocalSystem.accesskey;" oncommand="updateSearchLocalSystem();"/>
|
||||
<spacer flex="2"/>
|
||||
<button label="&helpButton.label;" align="end" oncommand="openHelp('search_messages');" accesskey="&helpButton.accesskey;"/>
|
||||
</hbox>
|
||||
|
@ -4,6 +4,8 @@
|
||||
<!ENTITY searchHeading.accesskey "h">
|
||||
<!ENTITY searchSubfolders.label "Search subfolders">
|
||||
<!ENTITY searchSubfolders.accesskey "e">
|
||||
<!ENTITY searchLocalSystem.label "Search local system">
|
||||
<!ENTITY searchLocalSystem.accesskey "y">
|
||||
<!ENTITY resetButton.label "Clear">
|
||||
<!ENTITY resetButton.accesskey "C">
|
||||
<!ENTITY helpButton.label "Help">
|
||||
|
Loading…
Reference in New Issue
Block a user