From 82a9a8576a59921857a034fe26232873ac05e0ab Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Tue, 29 Jun 2004 07:22:18 +0000 Subject: [PATCH] Bug #244325 --> Port new quick search from the aviary branch to the trunk git-svn-id: svn://10.0.0.236/trunk@158570 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/commandglue.js | 9 - .../mail/base/content/mailWindowOverlay.js | 8 + .../mail/base/content/mailWindowOverlay.xul | 28 +- mozilla/mail/base/content/messenger.css | 92 +++ .../mail/base/content/msgHdrViewOverlay.js | 1 + .../mail/base/content/msgMail3PaneWindow.js | 1 + mozilla/mail/base/content/search.xml | 97 +++ mozilla/mail/base/content/searchBar.js | 688 ++++++++++++++++++ mozilla/mail/base/jar.mn | 5 +- mozilla/mail/base/locale/messenger.dtd | 11 +- mozilla/mail/base/skin/icons/Search-bar.png | Bin 0 -> 718 bytes mozilla/mail/base/skin/icons/search-arrow.gif | Bin 0 -> 67 bytes mozilla/mail/base/skin/jar.mn | 2 + .../mail/base/skin/mac/icons/Search-bar.png | Bin 0 -> 672 bytes .../skin/mac/icons/search-bar-background.png | Bin 0 -> 1123 bytes mozilla/mail/base/skin/mac/jar.mn | 2 + mozilla/mail/base/skin/mac/mailWindow1.css | 67 +- mozilla/mail/base/skin/mailWindow1.css | 29 +- 18 files changed, 989 insertions(+), 51 deletions(-) create mode 100644 mozilla/mail/base/content/messenger.css create mode 100644 mozilla/mail/base/content/search.xml create mode 100644 mozilla/mail/base/content/searchBar.js create mode 100644 mozilla/mail/base/skin/icons/Search-bar.png create mode 100644 mozilla/mail/base/skin/icons/search-arrow.gif create mode 100644 mozilla/mail/base/skin/mac/icons/Search-bar.png create mode 100644 mozilla/mail/base/skin/mac/icons/search-bar-background.png diff --git a/mozilla/mail/base/content/commandglue.js b/mozilla/mail/base/content/commandglue.js index 80fdbb837a9..17942170ea4 100644 --- a/mozilla/mail/base/content/commandglue.js +++ b/mozilla/mail/base/content/commandglue.js @@ -400,7 +400,6 @@ function SwitchView(command) function SetSentFolderColumns(isSentFolder) { var tree = GetThreadTree(); - var searchCriteria = document.getElementById("searchCriteria"); var lastFolderSent = tree.getAttribute("lastfoldersent") == "true"; if (isSentFolder != lastFolderSent) @@ -418,15 +417,9 @@ function SetSentFolderColumns(isSentFolder) } if(isSentFolder) - { tree.setAttribute("lastfoldersent", "true"); - searchCriteria.setAttribute("value", gMessengerBundle.getString("recipientSearchCriteria")); - } else - { tree.setAttribute("lastfoldersent", "false"); - searchCriteria.setAttribute("value", gMessengerBundle.getString("senderSearchCriteria")); - } } function SetNewsFolderColumns() @@ -802,8 +795,6 @@ function FolderPaneSelectionChange() UpdateMailToolbar("gAccountCentralLoaded"); else if (gFakeAccountPageLoaded) UpdateMailToolbar("gFakeAccountPageLoaded"); - else - document.getElementById('advancedButton').setAttribute("disabled" , !(IsCanSearchMessagesEnabled())); if (gDisplayStartupPage) { diff --git a/mozilla/mail/base/content/mailWindowOverlay.js b/mozilla/mail/base/content/mailWindowOverlay.js index 2c983752331..e81eb2a72eb 100644 --- a/mozilla/mail/base/content/mailWindowOverlay.js +++ b/mozilla/mail/base/content/mailWindowOverlay.js @@ -2062,6 +2062,14 @@ function ClearPendingReadTimer() } } +// this is called when layout is actually finished rendering a +// mail message. OnMsgLoaded is called when libmime is done parsing the message +function OnMsgParsed(aUrl) +{ + if ("onQuickSearchNewMsgLoaded" in this) + onQuickSearchNewMsgLoaded(); +} + function OnMsgLoaded(aUrl) { if (!aUrl) diff --git a/mozilla/mail/base/content/mailWindowOverlay.xul b/mozilla/mail/base/content/mailWindowOverlay.xul index 7d275389421..ae4ac96eef5 100644 --- a/mozilla/mail/base/content/mailWindowOverlay.xul +++ b/mozilla/mail/base/content/mailWindowOverlay.xul @@ -1805,13 +1805,29 @@ -