fix for #126331. add "Compose" button to address book advanced search dialog.

r=ssu, sr=bienvenu, a=asa.
This commit is contained in:
sspitzer%netscape.com 2002-03-14 23:39:57 +00:00
Родитель aad3bf2f53
Коммит 36cb0a8abd
3 изменённых файлов: 24 добавлений и 4 удалений

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

@ -49,6 +49,7 @@ var gAddressBookBundle;
var gSearchStopButton;
var gPropertiesButton;
var gComposeButton;
var gRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
@ -87,6 +88,7 @@ function initializeSearchWindowWidgets()
{
gSearchStopButton = document.getElementById("search-button");
gPropertiesButton = document.getElementById("propertiesButton");
gComposeButton = document.getElementById("composeButton");
gStatusText = document.getElementById('statusText');
}
@ -97,6 +99,7 @@ function onSearchStop()
function onAbSearchReset(event)
{
gPropertiesButton.setAttribute("disabled","true");
gComposeButton.setAttribute("disabled","true");
CloseAbView();
@ -161,6 +164,7 @@ function onSearch()
{
gStatusText.setAttribute("label", "");
gPropertiesButton.setAttribute("disabled","true");
gComposeButton.setAttribute("disabled","true");
gSearchSession.clearScopes();
@ -294,6 +298,11 @@ function onProperties()
AbEditSelectedCard();
}
function onCompose()
{
AbNewMessage();
}
function AbResultsPaneDoubleClick(card)
{
AbEditCard(card);
@ -301,12 +310,20 @@ function AbResultsPaneDoubleClick(card)
function UpdateCardView()
{
if (GetNumSelectedCards() == 1) {
gPropertiesButton.removeAttribute("disabled");
}
else {
var numSelected = GetNumSelectedCards();
if (!numSelected) {
gPropertiesButton.setAttribute("disabled","true");
gComposeButton.setAttribute("disabled","true");
return;
}
gComposeButton.removeAttribute("disabled");
if (numSelected == 1)
gPropertiesButton.removeAttribute("disabled");
else
gPropertiesButton.setAttribute("disabled","true");
}
function onChooseDirectory(event)

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

@ -109,6 +109,7 @@ Rights Reserved.
</vbox>
<hbox align="start">
<button label="&propertiesButton.label;" id="propertiesButton" oncommand="onProperties()" accesskey="&propertiesButton.accesskey;" disabled="true"/>
<button label="&composeButton.label;" id="composeButton" oncommand="onCompose()" accesskey="&composeButton.accesskey;" disabled="true"/>
<spacer flex="1" />
</hbox>
</vbox>

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

@ -30,5 +30,7 @@
<!ENTITY abSearchHeading.accesskey "S">
<!ENTITY propertiesButton.label "Properties">
<!ENTITY propertiesButton.accesskey "P">
<!ENTITY composeButton.label "Compose">
<!ENTITY composeButton.accesskey "C">
<!ENTITY abSearchDialogTitle.label "Advanced Address Book Search">