зеркало из https://github.com/mozilla/pjs.git
Collapse overlays for a bunch of address book dialogs. Thanks to Stephen Walker for the patch.
This commit is contained in:
Родитель
0fff9614f0
Коммит
1ad0faa786
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
var okCallback = 0;
|
||||||
|
var gCanRename = true;
|
||||||
|
|
||||||
|
function abNameOnLoad()
|
||||||
|
{
|
||||||
|
var abName = "";
|
||||||
|
|
||||||
|
// look in arguments[0] for parameters
|
||||||
|
if ("arguments" in window && window.arguments[0])
|
||||||
|
{
|
||||||
|
if ("title" in window.arguments[0])
|
||||||
|
{
|
||||||
|
var title = window.arguments[0].title;
|
||||||
|
top.window.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("okCallback" in window.arguments[0])
|
||||||
|
top.okCallback = window.arguments[0].okCallback;
|
||||||
|
|
||||||
|
if ("name" in window.arguments[0])
|
||||||
|
abName = window.arguments[0].name;
|
||||||
|
|
||||||
|
if ("canRename" in window.arguments[0])
|
||||||
|
gCanRename = window.arguments[0].canRename;
|
||||||
|
}
|
||||||
|
|
||||||
|
// focus on input
|
||||||
|
var name = document.getElementById('name');
|
||||||
|
if (name) {
|
||||||
|
if (abName)
|
||||||
|
name.value = abName;
|
||||||
|
|
||||||
|
if (gCanRename)
|
||||||
|
name.focus();
|
||||||
|
else
|
||||||
|
name.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
moveToAlertPosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
function abNameOKButton()
|
||||||
|
{
|
||||||
|
if (top.okCallback && gCanRename)
|
||||||
|
top.okCallback(document.getElementById('name').value);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
c
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abAddressBookNameDialog.dtd">
|
||||||
|
|
||||||
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
title="&name.label;"
|
||||||
|
onload="abNameOnLoad();"
|
||||||
|
ondialogaccept="return abNameOKButton();">
|
||||||
|
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abAddressBookNameDialog.js"/>
|
||||||
|
|
||||||
|
<hbox align="center">
|
||||||
|
<label control="name" value="&name.label;"/>
|
||||||
|
<textbox tabindex="0" id="name"/>
|
||||||
|
</hbox>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,536 @@
|
||||||
|
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
|
||||||
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the Netscape Public License
|
||||||
|
* Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
* compliance with the License. You may obtain a copy of the License at
|
||||||
|
* http://www.mozilla.org/NPL/
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing rights and limitations under the
|
||||||
|
* License.
|
||||||
|
*
|
||||||
|
* The Original Code is mozilla.org code.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is
|
||||||
|
* Netscape Communications Corporation.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Seth Spitzer <sspitzer@netscape.com>
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the NPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
var editCard;
|
||||||
|
var gOnSaveListeners = new Array;
|
||||||
|
var gOkCallback = null;
|
||||||
|
var gAddressBookBundle;
|
||||||
|
|
||||||
|
function OnLoadNewCard()
|
||||||
|
{
|
||||||
|
InitEditCard();
|
||||||
|
|
||||||
|
var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(Components.interfaces.nsIAbCard);
|
||||||
|
|
||||||
|
editCard.card = cardproperty;
|
||||||
|
editCard.titleProperty = "newCardTitle";
|
||||||
|
editCard.selectedAB = "";
|
||||||
|
|
||||||
|
if ("arguments" in window && window.arguments[0])
|
||||||
|
{
|
||||||
|
if ("selectedAB" in window.arguments[0]) {
|
||||||
|
// check if selected ab is a mailing list
|
||||||
|
var abURI = window.arguments[0].selectedAB;
|
||||||
|
|
||||||
|
var directory = GetDirectoryFromURI(abURI);
|
||||||
|
if (directory.isMailList) {
|
||||||
|
var parentURI = GetParentDirectoryFromMailingListURI(abURI);
|
||||||
|
if (parentURI) {
|
||||||
|
editCard.selectedAB = parentURI;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// it's a mailing list, but we failed to determine the parent directory
|
||||||
|
// use the personal addressbook
|
||||||
|
editCard.selectedAB = kPersonalAddressbookURI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!(directory.operations & directory.opWrite)) {
|
||||||
|
editCard.selectedAB = kPersonalAddressbookURI;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
editCard.selectedAB = window.arguments[0].selectedAB;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
editCard.selectedAB = kPersonalAddressbookURI;
|
||||||
|
}
|
||||||
|
|
||||||
|
// we may have been given properties to pre-initialize the window with....
|
||||||
|
// we'll fill these in here...
|
||||||
|
if ("primaryEmail" in window.arguments[0])
|
||||||
|
editCard.card.primaryEmail = window.arguments[0].primaryEmail;
|
||||||
|
if ("displayName" in window.arguments[0]) {
|
||||||
|
editCard.card.displayName = window.arguments[0].displayName;
|
||||||
|
// if we've got a display name, don't generate
|
||||||
|
// a display name (and stomp on the existing display name)
|
||||||
|
// when the user types a first or last name
|
||||||
|
if (editCard.card.displayName.length)
|
||||||
|
editCard.generateDisplayName = false;
|
||||||
|
}
|
||||||
|
if ("aimScreenName" in window.arguments[0])
|
||||||
|
editCard.card.aimScreenName = window.arguments[0].aimScreenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set popup with address book names
|
||||||
|
var abPopup = document.getElementById('abPopup');
|
||||||
|
if ( abPopup )
|
||||||
|
{
|
||||||
|
var menupopup = document.getElementById('abPopup-menupopup');
|
||||||
|
|
||||||
|
if ( editCard.selectedAB && menupopup && menupopup.childNodes )
|
||||||
|
{
|
||||||
|
for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- )
|
||||||
|
{
|
||||||
|
if ( menupopup.childNodes[index].getAttribute('value') == editCard.selectedAB )
|
||||||
|
{
|
||||||
|
abPopup.label = menupopup.childNodes[index].getAttribute('label');
|
||||||
|
abPopup.value = menupopup.childNodes[index].getAttribute('value');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Default to the first valid addressbook when none is
|
||||||
|
// selected. (the 0th is an empty/invalid entry)
|
||||||
|
abPopup.label = menupopup.childNodes[1].getAttribute('label');
|
||||||
|
abPopup.value = menupopup.childNodes[1].getAttribute('value');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GetCardValues(editCard.card, document);
|
||||||
|
|
||||||
|
// FIX ME - looks like we need to focus on both the text field and the tab widget
|
||||||
|
// probably need to do the same in the addressing widget
|
||||||
|
|
||||||
|
// focus on first or last name based on the pref
|
||||||
|
var focus;
|
||||||
|
if (editCard.displayLastNameFirst)
|
||||||
|
focus = document.getElementById('LastName');
|
||||||
|
else
|
||||||
|
focus = document.getElementById('FirstName');
|
||||||
|
if ( focus ) {
|
||||||
|
// XXX Using the setTimeout hack until bug 103197 is fixed
|
||||||
|
setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus );
|
||||||
|
}
|
||||||
|
moveToAlertPosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the index in addressLists for the card that is being saved.
|
||||||
|
function findCardIndex(directory)
|
||||||
|
{
|
||||||
|
var index = -1;
|
||||||
|
var listCardsCount = directory.addressLists.Count();
|
||||||
|
for ( var i = 0; i < listCardsCount; i++ ) {
|
||||||
|
var card = directory.addressLists.QueryElementAt(i, Components.interfaces.nsIAbCard);
|
||||||
|
if (editCard.card.equals(card)) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
function EditCardOKButton()
|
||||||
|
{
|
||||||
|
|
||||||
|
// See if this card is in any mailing list
|
||||||
|
// if so then we need to update the addresslists of those mailing lists
|
||||||
|
var index = -1;
|
||||||
|
var directory = GetDirectoryFromURI(editCard.abURI);
|
||||||
|
|
||||||
|
// if the directory is a mailing list we need to search all the mailing lists
|
||||||
|
// in the parent directory if the card exists.
|
||||||
|
if (directory.isMailList) {
|
||||||
|
var parentURI = GetParentDirectoryFromMailingListURI(editCard.abURI);
|
||||||
|
directory = GetDirectoryFromURI(parentURI);
|
||||||
|
}
|
||||||
|
|
||||||
|
var listDirectoriesCount = directory.addressLists.Count();
|
||||||
|
var foundDirectories = new Array();
|
||||||
|
var foundDirectoriesCount = 0;
|
||||||
|
var i;
|
||||||
|
// create a list of mailing lists and the index where the card is at.
|
||||||
|
for ( i=0; i < listDirectoriesCount; i++ ) {
|
||||||
|
var subdirectory = directory.addressLists.QueryElementAt(i, Components.interfaces.nsIAbDirectory);
|
||||||
|
index = findCardIndex(subdirectory);
|
||||||
|
if (index > -1)
|
||||||
|
{
|
||||||
|
foundDirectories[foundDirectoriesCount] = {directory:subdirectory, index:index};
|
||||||
|
foundDirectoriesCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SetCardValues(editCard.card, document);
|
||||||
|
|
||||||
|
editCard.card.editCardToDatabase(editCard.abURI);
|
||||||
|
|
||||||
|
for (i=0; i<foundDirectoriesCount; i++) {
|
||||||
|
// Update the addressLists item for this card
|
||||||
|
foundDirectories[i].directory.addressLists.
|
||||||
|
SetElementAt(foundDirectories[i].index, editCard.card);
|
||||||
|
}
|
||||||
|
NotifySaveListeners();
|
||||||
|
|
||||||
|
// callback to allow caller to update
|
||||||
|
if (gOkCallback)
|
||||||
|
gOkCallback();
|
||||||
|
|
||||||
|
return true; // close the window
|
||||||
|
}
|
||||||
|
|
||||||
|
function OnLoadEditCard()
|
||||||
|
{
|
||||||
|
InitEditCard();
|
||||||
|
|
||||||
|
editCard.titleProperty = "editCardTitle";
|
||||||
|
|
||||||
|
if (window.arguments && window.arguments[0])
|
||||||
|
{
|
||||||
|
if ( window.arguments[0].card )
|
||||||
|
editCard.card = window.arguments[0].card;
|
||||||
|
if ( window.arguments[0].okCallback )
|
||||||
|
gOkCallback = window.arguments[0].okCallback;
|
||||||
|
if ( window.arguments[0].abURI )
|
||||||
|
editCard.abURI = window.arguments[0].abURI;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set global state variables
|
||||||
|
// if first or last name entered, disable generateDisplayName
|
||||||
|
if ( editCard.generateDisplayName && (editCard.card.firstName.length +
|
||||||
|
editCard.card.lastName.length +
|
||||||
|
editCard.card.displayName.length > 0) )
|
||||||
|
{
|
||||||
|
editCard.generateDisplayName = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetCardValues(editCard.card, document);
|
||||||
|
|
||||||
|
var displayName = editCard.card.displayName;
|
||||||
|
top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
|
||||||
|
[ displayName ]);
|
||||||
|
// check if selectedAB is a writeable
|
||||||
|
// if not disable all the fields
|
||||||
|
if ("arguments" in window && window.arguments[0])
|
||||||
|
{
|
||||||
|
if ("abURI" in window.arguments[0]) {
|
||||||
|
var abURI = window.arguments[0].abURI;
|
||||||
|
var directory = GetDirectoryFromURI(abURI);
|
||||||
|
|
||||||
|
if (!(directory.operations & directory.opWrite))
|
||||||
|
{
|
||||||
|
var disableElements = document.getElementsByAttribute("disableforreadonly", "true");
|
||||||
|
for (var i=0; i<disableElements.length; i++)
|
||||||
|
disableElements[i].setAttribute('disabled', 'true');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is used by people who extend the ab card dialog
|
||||||
|
// like Netscape does for screenname
|
||||||
|
function RegisterSaveListener(func)
|
||||||
|
{
|
||||||
|
var length = gOnSaveListeners.length;
|
||||||
|
gOnSaveListeners[length] = func;
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is used by people who extend the ab card dialog
|
||||||
|
// like Netscape does for screenname
|
||||||
|
function NotifySaveListeners()
|
||||||
|
{
|
||||||
|
for ( var i = 0; i < gOnSaveListeners.length; i++ )
|
||||||
|
gOnSaveListeners[i]();
|
||||||
|
|
||||||
|
if (gOnSaveListeners.length) {
|
||||||
|
// the save listeners might have tweaked the card
|
||||||
|
// in which case we need to commit it.
|
||||||
|
editCard.card.editCardToDatabase(editCard.abURI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function InitPhoneticFields()
|
||||||
|
{
|
||||||
|
var showPhoneticFields =
|
||||||
|
gPrefs.getComplexValue("mail.addr_book.show_phonetic_fields",
|
||||||
|
Components.interfaces.nsIPrefLocalizedString).data;
|
||||||
|
|
||||||
|
// hide phonetic fields if indicated by the pref
|
||||||
|
if (showPhoneticFields == "true")
|
||||||
|
{
|
||||||
|
var element = document.getElementById("PhoneticLastName");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
element = document.getElementById("PhoneticLabel1");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
element = document.getElementById("PhoneticSpacer1");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
|
||||||
|
element = document.getElementById("PhoneticFirstName");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
element = document.getElementById("PhoneticLabel2");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
element = document.getElementById("PhoneticSpacer2");
|
||||||
|
element.setAttribute("hidden", "false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function InitEditCard()
|
||||||
|
{
|
||||||
|
InitPhoneticFields();
|
||||||
|
|
||||||
|
gAddressBookBundle = document.getElementById("bundle_addressBook");
|
||||||
|
// create editCard object that contains global variables for editCard.js
|
||||||
|
editCard = new Object;
|
||||||
|
|
||||||
|
editCard.prefs = gPrefs;
|
||||||
|
|
||||||
|
// get specific prefs that editCard will need
|
||||||
|
try {
|
||||||
|
var displayLastNameFirst =
|
||||||
|
gPrefs.getComplexValue("mail.addr_book.displayName.lastnamefirst",
|
||||||
|
Components.interfaces.nsIPrefLocalizedString).data;
|
||||||
|
editCard.displayLastNameFirst = (displayLastNameFirst == "true");
|
||||||
|
editCard.generateDisplayName = gPrefs.getBoolPref("mail.addr_book.displayName.autoGeneration");
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
dump("ex: failed to get pref" + ex + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function NewCardOKButton()
|
||||||
|
{
|
||||||
|
var popup = document.getElementById('abPopup');
|
||||||
|
if ( popup )
|
||||||
|
{
|
||||||
|
var uri = popup.getAttribute('value');
|
||||||
|
|
||||||
|
// FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template
|
||||||
|
// should be able to just remove this if we are not seeing blank lines in the ab popup
|
||||||
|
if ( !uri )
|
||||||
|
return false; // don't close window
|
||||||
|
// -----
|
||||||
|
|
||||||
|
if ( editCard.card )
|
||||||
|
{
|
||||||
|
SetCardValues(editCard.card, document);
|
||||||
|
|
||||||
|
var directory = GetDirectoryFromURI(uri);
|
||||||
|
|
||||||
|
// replace editCard.card with the card we added
|
||||||
|
// so that save listeners can get / set attributes on
|
||||||
|
// the card that got created.
|
||||||
|
var addedCard = directory.addCard(editCard.card);
|
||||||
|
editCard.card = addedCard;
|
||||||
|
NotifySaveListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // close the window
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the data from the cardproperty to the dialog
|
||||||
|
function GetCardValues(cardproperty, doc)
|
||||||
|
{
|
||||||
|
if ( cardproperty )
|
||||||
|
{
|
||||||
|
doc.getElementById('FirstName').value = cardproperty.firstName;
|
||||||
|
doc.getElementById('LastName').value = cardproperty.lastName;
|
||||||
|
doc.getElementById('DisplayName').value = cardproperty.displayName;
|
||||||
|
doc.getElementById('NickName').value = cardproperty.nickName;
|
||||||
|
|
||||||
|
doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail;
|
||||||
|
doc.getElementById('SecondEmail').value = cardproperty.secondEmail;
|
||||||
|
doc.getElementById('ScreenName').value = cardproperty.aimScreenName;
|
||||||
|
|
||||||
|
var popup = document.getElementById('PreferMailFormatPopup');
|
||||||
|
if ( popup )
|
||||||
|
popup.value = cardproperty.preferMailFormat;
|
||||||
|
|
||||||
|
doc.getElementById('WorkPhone').value = cardproperty.workPhone;
|
||||||
|
doc.getElementById('HomePhone').value = cardproperty.homePhone;
|
||||||
|
doc.getElementById('FaxNumber').value = cardproperty.faxNumber;
|
||||||
|
doc.getElementById('PagerNumber').value = cardproperty.pagerNumber;
|
||||||
|
doc.getElementById('CellularNumber').value = cardproperty.cellularNumber;
|
||||||
|
|
||||||
|
doc.getElementById('HomeAddress').value = cardproperty.homeAddress;
|
||||||
|
doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2;
|
||||||
|
doc.getElementById('HomeCity').value = cardproperty.homeCity;
|
||||||
|
doc.getElementById('HomeState').value = cardproperty.homeState;
|
||||||
|
doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode;
|
||||||
|
doc.getElementById('HomeCountry').value = cardproperty.homeCountry;
|
||||||
|
doc.getElementById('WebPage2').value = cardproperty.webPage2;
|
||||||
|
|
||||||
|
doc.getElementById('JobTitle').value = cardproperty.jobTitle;
|
||||||
|
doc.getElementById('Department').value = cardproperty.department;
|
||||||
|
doc.getElementById('Company').value = cardproperty.company;
|
||||||
|
doc.getElementById('WorkAddress').value = cardproperty.workAddress;
|
||||||
|
doc.getElementById('WorkAddress2').value = cardproperty.workAddress2;
|
||||||
|
doc.getElementById('WorkCity').value = cardproperty.workCity;
|
||||||
|
doc.getElementById('WorkState').value = cardproperty.workState;
|
||||||
|
doc.getElementById('WorkZipCode').value = cardproperty.workZipCode;
|
||||||
|
doc.getElementById('WorkCountry').value = cardproperty.workCountry;
|
||||||
|
doc.getElementById('WebPage1').value = cardproperty.webPage1;
|
||||||
|
|
||||||
|
doc.getElementById('Custom1').value = cardproperty.custom1;
|
||||||
|
doc.getElementById('Custom2').value = cardproperty.custom2;
|
||||||
|
doc.getElementById('Custom3').value = cardproperty.custom3;
|
||||||
|
doc.getElementById('Custom4').value = cardproperty.custom4;
|
||||||
|
doc.getElementById('Notes').value = cardproperty.notes;
|
||||||
|
|
||||||
|
// get phonetic fields if exist
|
||||||
|
try {
|
||||||
|
doc.getElementById('PhoneticFirstName').value = cardproperty.phoneticFirstName;
|
||||||
|
doc.getElementById('PhoneticLastName').value = cardproperty.phoneticLastName;
|
||||||
|
}
|
||||||
|
catch (ex) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the data from the dialog to the cardproperty to be stored in the database
|
||||||
|
function SetCardValues(cardproperty, doc)
|
||||||
|
{
|
||||||
|
if (cardproperty)
|
||||||
|
{
|
||||||
|
cardproperty.firstName = doc.getElementById('FirstName').value;
|
||||||
|
cardproperty.lastName = doc.getElementById('LastName').value;
|
||||||
|
cardproperty.displayName = doc.getElementById('DisplayName').value;
|
||||||
|
cardproperty.nickName = doc.getElementById('NickName').value;
|
||||||
|
|
||||||
|
cardproperty.primaryEmail = doc.getElementById('PrimaryEmail').value;
|
||||||
|
cardproperty.secondEmail = doc.getElementById('SecondEmail').value;
|
||||||
|
cardproperty.aimScreenName = doc.getElementById('ScreenName').value;
|
||||||
|
|
||||||
|
var popup = document.getElementById('PreferMailFormatPopup');
|
||||||
|
if ( popup )
|
||||||
|
cardproperty.preferMailFormat = popup.value;
|
||||||
|
|
||||||
|
cardproperty.workPhone = doc.getElementById('WorkPhone').value;
|
||||||
|
cardproperty.homePhone = doc.getElementById('HomePhone').value;
|
||||||
|
cardproperty.faxNumber = doc.getElementById('FaxNumber').value;
|
||||||
|
cardproperty.pagerNumber = doc.getElementById('PagerNumber').value;
|
||||||
|
cardproperty.cellularNumber = doc.getElementById('CellularNumber').value;
|
||||||
|
|
||||||
|
cardproperty.homeAddress = doc.getElementById('HomeAddress').value;
|
||||||
|
cardproperty.homeAddress2 = doc.getElementById('HomeAddress2').value;
|
||||||
|
cardproperty.homeCity = doc.getElementById('HomeCity').value;
|
||||||
|
cardproperty.homeState = doc.getElementById('HomeState').value;
|
||||||
|
cardproperty.homeZipCode = doc.getElementById('HomeZipCode').value;
|
||||||
|
cardproperty.homeCountry = doc.getElementById('HomeCountry').value;
|
||||||
|
cardproperty.webPage2 = CleanUpWebPage(doc.getElementById('WebPage2').value);
|
||||||
|
|
||||||
|
cardproperty.jobTitle = doc.getElementById('JobTitle').value;
|
||||||
|
cardproperty.department = doc.getElementById('Department').value;
|
||||||
|
cardproperty.company = doc.getElementById('Company').value;
|
||||||
|
cardproperty.workAddress = doc.getElementById('WorkAddress').value;
|
||||||
|
cardproperty.workAddress2 = doc.getElementById('WorkAddress2').value;
|
||||||
|
cardproperty.workCity = doc.getElementById('WorkCity').value;
|
||||||
|
cardproperty.workState = doc.getElementById('WorkState').value;
|
||||||
|
cardproperty.workZipCode = doc.getElementById('WorkZipCode').value;
|
||||||
|
cardproperty.workCountry = doc.getElementById('WorkCountry').value;
|
||||||
|
cardproperty.webPage1 = CleanUpWebPage(doc.getElementById('WebPage1').value);
|
||||||
|
|
||||||
|
cardproperty.custom1 = doc.getElementById('Custom1').value;
|
||||||
|
cardproperty.custom2 = doc.getElementById('Custom2').value;
|
||||||
|
cardproperty.custom3 = doc.getElementById('Custom3').value;
|
||||||
|
cardproperty.custom4 = doc.getElementById('Custom4').value;
|
||||||
|
cardproperty.notes = doc.getElementById('Notes').value;
|
||||||
|
|
||||||
|
// set phonetic fields if exist
|
||||||
|
try {
|
||||||
|
cardproperty.phoneticFirstName = doc.getElementById('PhoneticFirstName').value;
|
||||||
|
cardproperty.phoneticLastName = doc.getElementById('PhoneticLastName').value;
|
||||||
|
}
|
||||||
|
catch (ex) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function CleanUpWebPage(webPage)
|
||||||
|
{
|
||||||
|
// no :// yet so we should add something
|
||||||
|
if ( webPage.length && webPage.search("://") == -1 )
|
||||||
|
{
|
||||||
|
// check for missing / on http://
|
||||||
|
if ( webPage.substr(0, 6) == "http:/" )
|
||||||
|
return( "http://" + webPage.substr(6) );
|
||||||
|
else
|
||||||
|
return( "http://" + webPage );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return(webPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function NewCardCancelButton()
|
||||||
|
{
|
||||||
|
top.window.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function EditCardCancelButton()
|
||||||
|
{
|
||||||
|
top.window.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function GenerateDisplayName()
|
||||||
|
{
|
||||||
|
if ( editCard.generateDisplayName )
|
||||||
|
{
|
||||||
|
var displayName;
|
||||||
|
|
||||||
|
var firstNameField = document.getElementById('FirstName');
|
||||||
|
var lastNameField = document.getElementById('LastName');
|
||||||
|
var displayNameField = document.getElementById('DisplayName');
|
||||||
|
|
||||||
|
if (lastNameField.value && firstNameField.value) {
|
||||||
|
if ( editCard.displayLastNameFirst )
|
||||||
|
displayName = gAddressBookBundle.getFormattedString("lastFirstFormat",[ lastNameField.value, firstNameField.value ]);
|
||||||
|
else
|
||||||
|
displayName = gAddressBookBundle.getFormattedString("firstLastFormat",[ firstNameField.value, lastNameField.value ]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// one (or both) of these is empty, so this works.
|
||||||
|
displayName = firstNameField.value + lastNameField.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
displayNameField.value = displayName;
|
||||||
|
top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
|
||||||
|
[ displayName ]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function DisplayNameChanged()
|
||||||
|
{
|
||||||
|
// turn off generateDisplayName if the user changes the display name
|
||||||
|
editCard.generateDisplayName = false;
|
||||||
|
|
||||||
|
var displayName = document.getElementById('DisplayName').value;
|
||||||
|
var title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
|
||||||
|
[ displayName ]);
|
||||||
|
if ( top.window.title != title )
|
||||||
|
top.window.title = title;
|
||||||
|
}
|
|
@ -0,0 +1,351 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
|
||||||
|
|
||||||
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
id="abcardDialog"
|
||||||
|
onload="OnLoadEditCard();"
|
||||||
|
ondialogaccept="return EditCardOKButton();">
|
||||||
|
|
||||||
|
<stringbundleset id="stringbundleset">
|
||||||
|
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<!-- move needed functions into a single js file -->
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCardOverlay.js"/>
|
||||||
|
|
||||||
|
<vbox id="editcard">
|
||||||
|
|
||||||
|
<tabbox>
|
||||||
|
<tabs id="abTabs">
|
||||||
|
<tab label="&Contact.tab;"/>
|
||||||
|
<tab label="&Address.tab;"/>
|
||||||
|
<tab label="&Other.tab;"/>
|
||||||
|
</tabs>
|
||||||
|
|
||||||
|
<tabpanels id="abTabPanels" flex="1">
|
||||||
|
|
||||||
|
<!-- Name Tab -->
|
||||||
|
<vbox index="name" flex="1">
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Name.box;"/>
|
||||||
|
<vbox>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
NameField1, NameField2, PhoneticField1, PhoneticField2
|
||||||
|
those fields are either LN or FN depends on the target country.
|
||||||
|
They are configurable in the .dtd file.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="&NameField1.id;" value="&NameField1.label;" accesskey="&NameField1.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="&NameField1.id;" flex="1" oninput="GenerateDisplayName()" disableforreadonly="true"/>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
Fields for phonetic are disabled as default and can be enabled by
|
||||||
|
editing "mail.addr_book.show_phonetic_fields"
|
||||||
|
-->
|
||||||
|
|
||||||
|
<spacer id="PhoneticSpacer1" flex="1" hidden="true"/>
|
||||||
|
<label id="PhoneticLabel1" control="&PhoneticField1.id;" value="&PhoneticField1.label;" class="CardEditLabel" hidden="true"/>
|
||||||
|
<textbox id="&PhoneticField1.id;" flex="1" disableforreadonly="true" hidden="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="&NameField2.id;" value="&NameField2.label;" accesskey="&NameField2.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="&NameField2.id;" flex="1" oninput="GenerateDisplayName()" disableforreadonly="true"/>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
Fields for phonetic are disabled as default and can be enabled by
|
||||||
|
editing "mail.addr_book.show_phonetic_fields"
|
||||||
|
-->
|
||||||
|
|
||||||
|
<spacer id="PhoneticSpacer2" flex="1" hidden="true"/>
|
||||||
|
<label id="PhoneticLabel2" control="&PhoneticField2.id;" value="&PhoneticField2.label;" class="CardEditLabel" hidden="true"/>
|
||||||
|
<textbox id="&PhoneticField2.id;" flex="1" disableforreadonly="true" hidden="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="DisplayName" value="&DisplayName.label;" accesskey="&DisplayName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="DisplayName" flex="1" oninput="DisplayNameChanged()" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="NickName" value="&NickName.label;" accesskey="&NickName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="NickName" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Internet.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="PrimaryEmail" value="&PrimaryEmail.label;" accesskey="&PrimaryEmail.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="PrimaryEmail" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="SecondEmail" value="&SecondEmail.label;" accesskey="&SecondEmail.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="SecondEmail" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<vbox valign="middle">
|
||||||
|
<label control="PreferMailFormatPopup" value="&PreferMailFormat.label;" accesskey="&PreferMailFormat.accesskey;"/>
|
||||||
|
</vbox>
|
||||||
|
<menulist id="PreferMailFormatPopup" disableforreadonly="true">
|
||||||
|
<menupopup>
|
||||||
|
<menuitem value="0" label="&Unknown.label;"/>
|
||||||
|
<menuitem value="1" label="&PlainText.label;"/>
|
||||||
|
<menuitem value="2" label="&HTML.label;"/>
|
||||||
|
</menupopup>
|
||||||
|
</menulist>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ScreenName" value="&ScreenName.label;" accesskey="&ScreenName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ScreenName" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Phones.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkPhone" value="&WorkPhone.label;" accesskey="&WorkPhone.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkPhone" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomePhone" value="&HomePhone.label;" accesskey="&HomePhone.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomePhone" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="FaxNumber" value="&FaxNumber.label;" accesskey="&FaxNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="FaxNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="PagerNumber" value="&PagerNumber.label;" accesskey="&PagerNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="PagerNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="CellularNumber" value="&CellularNumber.label;" accesskey="&CellularNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="CellularNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<!-- Address Tab -->
|
||||||
|
<vbox index="address" flex="1">
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Home.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeAddress" value="&HomeAddress.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeAddress" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeAddress2" value="&HomeAddress2.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeAddress2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeCity" value="&HomeCity.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeCity" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeState" value="&HomeState.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeState" flex="1" disableforreadonly="true"/>
|
||||||
|
<spacer class="stateZipSpacer"/>
|
||||||
|
<label control="HomeZipCode" value="&HomeZipCode.label;" class="CardEditLabel"/>
|
||||||
|
<textbox id="HomeZipCode" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeCountry" value="&HomeCountry.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeCountry" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WebPage2" value="&HomeWebPage.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WebPage2" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Work.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="JobTitle" value="&JobTitle.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="JobTitle" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="Department" value="&Department.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="Department" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="Company" value="&Company.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="Company" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkAddress" value="&WorkAddress.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkAddress" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkAddress2" value="&WorkAddress2.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkAddress2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkCity" value="&WorkCity.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkCity" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkState" value="&WorkState.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkState" flex="1" disableforreadonly="true"/>
|
||||||
|
<spacer class="stateZipSpacer"/>
|
||||||
|
<label control="WorkZipCode" value="&WorkZipCode.label;" class="CardEditLabel"/>
|
||||||
|
<textbox id="WorkZipCode" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkCountry" value="&WorkCountry.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkCountry" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WebPage1" value="&WorkWebPage.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WebPage1" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<!-- Other Tab -->
|
||||||
|
<vbox index="other" flex="1">
|
||||||
|
<vbox class="alignBoxWithFieldset">
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom1" value="&Custom1.label;" accesskey="&Custom1.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom1" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom2" value="&Custom2.label;" accesskey="&Custom2.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom3" value="&Custom3.label;" accesskey="&Custom3.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom3" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom4" value="&Custom4.label;" accesskey="&Custom4.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom4" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Notes.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<textbox id="Notes" multiline="true" rows="20" wrap="virtual" disableforreadonly="true"/>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
</vbox>
|
||||||
|
</dialog>
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressingWidget.css" type="text/css"?>
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abMailListDialog.dtd">
|
||||||
|
|
||||||
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
title="&mailListWindow.title;"
|
||||||
|
onload="OnLoadEditList();"
|
||||||
|
ondialogaccept="return EditListOKButton();"
|
||||||
|
ondragover="DragOverAddressListTree(event);"
|
||||||
|
ondragdrop="DropOnAddressListTree(event);">
|
||||||
|
|
||||||
|
<stringbundleset id="stringbundleset">
|
||||||
|
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<!-- move needed functions into a single js file -->
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
|
||||||
|
|
||||||
|
<vbox id="editlist">
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListName" value="&ListName.label;" accesskey="&ListName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListName" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListNickName" value="&ListNickName.label;" accesskey="&ListNickName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListNickName" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListDescription" value="&ListDescription.label;" accesskey="&ListDescription.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListDescription" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<spacer style="height:1em"/>
|
||||||
|
<label value="&AddressTitle.label;"/>
|
||||||
|
<spacer style="height:0.1em"/>
|
||||||
|
|
||||||
|
<listbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
|
||||||
|
<listitem class="addressingWidgetItem">
|
||||||
|
<listcell class="addressingWidgetCell">
|
||||||
|
<textbox id="addressCol1#1" class="plain textbox-addressingWidget"
|
||||||
|
type="autocomplete" allowevents="true" flex="1"
|
||||||
|
searchSessions="addrbook" timeout="300" maxrows="4"
|
||||||
|
autoFill="true" autoFillAfterMatch="true" forceComplete="true"
|
||||||
|
minResultsForPopup="3"
|
||||||
|
ontextcommand="awRecipientTextCommand(eventParam, this)"
|
||||||
|
onkeypress="handleKeyPress(this, event);"
|
||||||
|
onkeydown="awRecipientKeyDown(event, this);"
|
||||||
|
onclick="awNotAnEmptyArea(event);">
|
||||||
|
<image onclick="awNotAnEmptyArea(event)" class="person-icon"/>
|
||||||
|
</textbox>
|
||||||
|
</listcell>
|
||||||
|
</listitem>
|
||||||
|
</listbox>
|
||||||
|
</vbox>
|
||||||
|
</dialog>
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressingWidget.css" type="text/css"?>
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abMailListDialog.dtd">
|
||||||
|
|
||||||
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
title="&mailListWindow.title;"
|
||||||
|
ondialogaccept="return MailListOKButton();"
|
||||||
|
onload="OnLoadNewMailList();"
|
||||||
|
ondragover="DragOverAddressListTree(event);"
|
||||||
|
ondragdrop="DropOnAddressListTree(event);">
|
||||||
|
|
||||||
|
<stringbundleset id="stringbundleset">
|
||||||
|
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<!-- move needed functions into a single js file -->
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
|
||||||
|
|
||||||
|
<hbox align="center">
|
||||||
|
<label control="abPopup" value="&addToAddressBook.label;" accesskey="&addToAddressBook.accesskey;"/>
|
||||||
|
<menulist id="abPopup">
|
||||||
|
<menupopup id="abPopup-menupopup"
|
||||||
|
ref="moz-abdirectory://"
|
||||||
|
datasources="rdf:addressdirectory"
|
||||||
|
sortActive="true"
|
||||||
|
sortDirection="ascending"
|
||||||
|
sortResource="http://home.netscape.com/NC-rdf#DirTreeNameSort">
|
||||||
|
<template>
|
||||||
|
<rule nc:IsWriteable="false"/>
|
||||||
|
<rule nc:IsMailList="false">
|
||||||
|
<menuitem uri="..."
|
||||||
|
label="rdf:http://home.netscape.com/NC-rdf#DirName"
|
||||||
|
value="rdf:http://home.netscape.com/NC-rdf#DirUri"/>
|
||||||
|
</rule>
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
</menulist>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<spacer style="height:1em"/>
|
||||||
|
|
||||||
|
<vbox id="editlist">
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListName" value="&ListName.label;" accesskey="&ListName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListName" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListNickName" value="&ListNickName.label;" accesskey="&ListNickName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListNickName" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ListDescription" value="&ListDescription.label;" accesskey="&ListDescription.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ListDescription" flex="1"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<spacer style="height:1em"/>
|
||||||
|
<label value="&AddressTitle.label;"/>
|
||||||
|
<spacer style="height:0.1em"/>
|
||||||
|
|
||||||
|
<listbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
|
||||||
|
<listitem class="addressingWidgetItem">
|
||||||
|
<listcell class="addressingWidgetCell">
|
||||||
|
<textbox id="addressCol1#1" class="plain textbox-addressingWidget"
|
||||||
|
type="autocomplete" allowevents="true" flex="1"
|
||||||
|
searchSessions="addrbook" timeout="300" maxrows="4"
|
||||||
|
autoFill="true" autoFillAfterMatch="true" forceComplete="true"
|
||||||
|
minResultsForPopup="3"
|
||||||
|
ontextcommand="awRecipientTextCommand(eventParam, this)"
|
||||||
|
onkeypress="handleKeyPress(this, event);"
|
||||||
|
onkeydown="awRecipientKeyDown(event, this);"
|
||||||
|
onclick="awNotAnEmptyArea(event);">
|
||||||
|
<image onclick="awNotAnEmptyArea(event)" class="person-icon"/>
|
||||||
|
</textbox>
|
||||||
|
</listcell>
|
||||||
|
</listitem>
|
||||||
|
</listbox>
|
||||||
|
</vbox>
|
||||||
|
</dialog>
|
|
@ -0,0 +1,378 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
|
||||||
|
<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
|
||||||
|
|
||||||
|
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
|
||||||
|
|
||||||
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
|
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
id="abcardDialog"
|
||||||
|
title="&editcardWindow.title;"
|
||||||
|
onload="OnLoadNewCard();"
|
||||||
|
ondialogaccept="return NewCardOKButton();">
|
||||||
|
|
||||||
|
<stringbundleset id="stringbundleset">
|
||||||
|
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<!-- move needed functions into a single js file -->
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCardOverlay.js"/>
|
||||||
|
|
||||||
|
<hbox align="center">
|
||||||
|
|
||||||
|
<label control="abPopup" value="&chooseAddressBook.label;" accesskey="&chooseAddressBook.accesskey;"/>
|
||||||
|
<menulist id="abPopup">
|
||||||
|
<menupopup id="abPopup-menupopup"
|
||||||
|
ref="moz-abdirectory://"
|
||||||
|
datasources="rdf:addressdirectory"
|
||||||
|
sortActive="true"
|
||||||
|
sortDirection="ascending"
|
||||||
|
sortResource="http://home.netscape.com/NC-rdf#DirTreeNameSort">
|
||||||
|
<template>
|
||||||
|
<rule nc:IsWriteable="false"/>
|
||||||
|
<rule nc:IsMailList="false">
|
||||||
|
<menuitem uri="..."
|
||||||
|
label="rdf:http://home.netscape.com/NC-rdf#DirName"
|
||||||
|
value="rdf:http://home.netscape.com/NC-rdf#DirUri"/>
|
||||||
|
</rule>
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
</menulist>
|
||||||
|
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<spacer style="height:1em"/>
|
||||||
|
|
||||||
|
<vbox id="editcard">
|
||||||
|
|
||||||
|
<tabbox>
|
||||||
|
<tabs id="abTabs">
|
||||||
|
<tab label="&Contact.tab;"/>
|
||||||
|
<tab label="&Address.tab;"/>
|
||||||
|
<tab label="&Other.tab;"/>
|
||||||
|
</tabs>
|
||||||
|
|
||||||
|
<tabpanels id="abTabPanels" flex="1">
|
||||||
|
|
||||||
|
<!-- Name Tab -->
|
||||||
|
<vbox index="name" flex="1">
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Name.box;"/>
|
||||||
|
<vbox>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
NameField1, NameField2, PhoneticField1, PhoneticField2
|
||||||
|
those fields are either LN or FN depends on the target country.
|
||||||
|
They are configurable in the .dtd file.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="&NameField1.id;" value="&NameField1.label;" accesskey="&NameField1.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="&NameField1.id;" flex="1" oninput="GenerateDisplayName()" disableforreadonly="true"/>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
Fields for phonetic are disabled as default and can be enabled by
|
||||||
|
editing "mail.addr_book.show_phonetic_fields"
|
||||||
|
-->
|
||||||
|
|
||||||
|
<spacer id="PhoneticSpacer1" flex="1" hidden="true"/>
|
||||||
|
<label id="PhoneticLabel1" control="&PhoneticField1.id;" value="&PhoneticField1.label;" class="CardEditLabel" hidden="true"/>
|
||||||
|
<textbox id="&PhoneticField1.id;" flex="1" disableforreadonly="true" hidden="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="&NameField2.id;" value="&NameField2.label;" accesskey="&NameField2.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="&NameField2.id;" flex="1" oninput="GenerateDisplayName()" disableforreadonly="true"/>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
Fields for phonetic are disabled as default and can be enabled by
|
||||||
|
editing "mail.addr_book.show_phonetic_fields"
|
||||||
|
-->
|
||||||
|
|
||||||
|
<spacer id="PhoneticSpacer2" flex="1" hidden="true"/>
|
||||||
|
<label id="PhoneticLabel2" control="&PhoneticField2.id;" value="&PhoneticField2.label;" class="CardEditLabel" hidden="true"/>
|
||||||
|
<textbox id="&PhoneticField2.id;" flex="1" disableforreadonly="true" hidden="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="DisplayName" value="&DisplayName.label;" accesskey="&DisplayName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="DisplayName" flex="1" oninput="DisplayNameChanged()" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="NickName" value="&NickName.label;" accesskey="&NickName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="NickName" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Internet.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="PrimaryEmail" value="&PrimaryEmail.label;" accesskey="&PrimaryEmail.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="PrimaryEmail" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="SecondEmail" value="&SecondEmail.label;" accesskey="&SecondEmail.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="SecondEmail" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<vbox valign="middle">
|
||||||
|
<label control="PreferMailFormatPopup" value="&PreferMailFormat.label;" accesskey="&PreferMailFormat.accesskey;"/>
|
||||||
|
</vbox>
|
||||||
|
<menulist id="PreferMailFormatPopup" disableforreadonly="true">
|
||||||
|
<menupopup>
|
||||||
|
<menuitem value="0" label="&Unknown.label;"/>
|
||||||
|
<menuitem value="1" label="&PlainText.label;"/>
|
||||||
|
<menuitem value="2" label="&HTML.label;"/>
|
||||||
|
</menupopup>
|
||||||
|
</menulist>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="ScreenName" value="&ScreenName.label;" accesskey="&ScreenName.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="ScreenName" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Phones.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkPhone" value="&WorkPhone.label;" accesskey="&WorkPhone.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkPhone" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomePhone" value="&HomePhone.label;" accesskey="&HomePhone.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomePhone" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="FaxNumber" value="&FaxNumber.label;" accesskey="&FaxNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="FaxNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="PagerNumber" value="&PagerNumber.label;" accesskey="&PagerNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="PagerNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="CellularNumber" value="&CellularNumber.label;" accesskey="&CellularNumber.accesskey;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="CellularNumber" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<!-- Address Tab -->
|
||||||
|
<vbox index="address" flex="1">
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Home.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeAddress" value="&HomeAddress.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeAddress" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeAddress2" value="&HomeAddress2.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeAddress2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeCity" value="&HomeCity.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeCity" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeState" value="&HomeState.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeState" flex="1" disableforreadonly="true"/>
|
||||||
|
<spacer class="stateZipSpacer"/>
|
||||||
|
<label control="HomeZipCode" value="&HomeZipCode.label;" class="CardEditLabel"/>
|
||||||
|
<textbox id="HomeZipCode" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="HomeCountry" value="&HomeCountry.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="HomeCountry" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WebPage2" value="&HomeWebPage.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WebPage2" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Work.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="JobTitle" value="&JobTitle.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="JobTitle" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="Department" value="&Department.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="Department" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="Company" value="&Company.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="Company" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkAddress" value="&WorkAddress.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkAddress" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkAddress2" value="&WorkAddress2.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkAddress2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkCity" value="&WorkCity.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkCity" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkState" value="&WorkState.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkState" flex="1" disableforreadonly="true"/>
|
||||||
|
<spacer class="stateZipSpacer"/>
|
||||||
|
<label control="WorkZipCode" value="&WorkZipCode.label;" class="CardEditLabel"/>
|
||||||
|
<textbox id="WorkZipCode" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WorkCountry" value="&WorkCountry.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WorkCountry" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<spacer flex="1"/>
|
||||||
|
<label control="WebPage1" value="&WorkWebPage.label;" class="CardEditLabel"/>
|
||||||
|
<hbox class="CardEditWidth">
|
||||||
|
<textbox id="WebPage1" flex="1" disableforreadonly="true" class="uri-element"/>
|
||||||
|
</hbox>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<!-- Other Tab -->
|
||||||
|
<vbox index="other" flex="1">
|
||||||
|
<vbox class="alignBoxWithFieldset">
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom1" value="&Custom1.label;" accesskey="&Custom1.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom1" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom2" value="&Custom2.label;" accesskey="&Custom2.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom2" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom3" value="&Custom3.label;" accesskey="&Custom3.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom3" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label control="Custom4" value="&Custom4.label;" accesskey="&Custom4.accesskey;" class="CardEditLabel"/>
|
||||||
|
<textbox id="Custom4" flex="1" disableforreadonly="true"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<groupbox flex="1">
|
||||||
|
<caption label="&Notes.box;"/>
|
||||||
|
<vbox>
|
||||||
|
<textbox id="Notes" multiline="true" rows="20" wrap="virtual" disableforreadonly="true"/>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
</vbox>
|
||||||
|
</dialog>
|
|
@ -5,6 +5,14 @@ messenger.jar:
|
||||||
+ content/messenger/addressbook/abCardViewOverlay.js (content/abCardViewOverlay.js)
|
+ content/messenger/addressbook/abCardViewOverlay.js (content/abCardViewOverlay.js)
|
||||||
+ content/messenger/addressbook/addressbook.js (content/addressbook.js)
|
+ content/messenger/addressbook/addressbook.js (content/addressbook.js)
|
||||||
*+ content/messenger/addressbook/addressbook.xul (content/addressbook.xul)
|
*+ content/messenger/addressbook/addressbook.xul (content/addressbook.xul)
|
||||||
|
+ content/messenger/addressbook/abCardOverlay.js (content/abCardOverlay.js)
|
||||||
|
+ content/messenger/addressbook/abAddressBookNameDialog.js (content/abAddressBookNameDialog.js)
|
||||||
|
*+ content/messenger/addressbook/abAddressBookNameDialog.xul (content/abAddressBookNameDialog.xul)
|
||||||
|
*+ content/messenger/addressbook/abEditCardDialog.xul (content/abEditCardDialog.xul)
|
||||||
|
*+ content/messenger/addressbook/abEditListDialog.xul (content/abEditListDialog.xul)
|
||||||
|
*+ content/messenger/addressbook/abMailListDialog.xul (content/abMailListDialog.xul)
|
||||||
|
*+ content/messenger/addressbook/abNewCardDialog.xul (content/abNewCardDialog.xul)
|
||||||
|
|
||||||
en-US.jar:
|
en-US.jar:
|
||||||
+ locale/en-US/messenger/addressbook/abMainWindow.dtd (locale/abMainWindow.dtd)
|
+ locale/en-US/messenger/addressbook/abMainWindow.dtd (locale/abMainWindow.dtd)
|
||||||
|
+ locale/en-US/messenger/addressbook/abNewCardDialog.dtd (locale/abNewCardDialog.dtd)
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
<!--
|
||||||
|
The contents of this file are subject to the Netscape Public
|
||||||
|
License Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License. You may obtain a copy of
|
||||||
|
the License at http://www.mozilla.org/NPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS
|
||||||
|
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
implied. See the License for the specific language governing
|
||||||
|
rights and limitations under the License.
|
||||||
|
|
||||||
|
The Original Code is Mozilla Communicator client code, released
|
||||||
|
March 31, 1998.
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is Netscape
|
||||||
|
Communications Corporation. Portions created by Netscape are
|
||||||
|
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
Rights Reserved.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Title -->
|
||||||
|
<!ENTITY editcardWindow.title "New Card">
|
||||||
|
|
||||||
|
<!-- Labels -->
|
||||||
|
<!ENTITY chooseAddressBook.label "Add to: ">
|
||||||
|
<!ENTITY chooseAddressBook.accesskey "A">
|
||||||
|
|
||||||
|
<!-- Contact Tab -->
|
||||||
|
<!ENTITY Contact.tab "Contact">
|
||||||
|
<!ENTITY Name.box "Name">
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
NameField1, NameField2, PhoneticField1, PhoneticField2
|
||||||
|
those fields are either LN or FN depends on the target country.
|
||||||
|
"FirstName" and "LastName" can be swapped for id to change the order
|
||||||
|
but they should not be translated (same applied to phonetic id).
|
||||||
|
Make sure the translation of label corresponds to the order of id.
|
||||||
|
-->
|
||||||
|
<!-- LOCALIZATION NOTE (NameField1.id) : DONT_TRANSLATE -->
|
||||||
|
<!ENTITY NameField1.id "FirstName">
|
||||||
|
<!-- LOCALIZATION NOTE (NameField2.id) : DONT_TRANSLATE -->
|
||||||
|
<!ENTITY NameField2.id "LastName">
|
||||||
|
<!-- LOCALIZATION NOTE (PhoneticField1.id) : DONT_TRANSLATE -->
|
||||||
|
<!ENTITY PhoneticField1.id "PhoneticFirstName">
|
||||||
|
<!-- LOCALIZATION NOTE (PhoneticField2.id) : DONT_TRANSLATE -->
|
||||||
|
<!ENTITY PhoneticField2.id "PhoneticLastName">
|
||||||
|
<!ENTITY NameField1.label "First:">
|
||||||
|
<!ENTITY NameField1.accesskey "F">
|
||||||
|
<!ENTITY NameField2.label "Last:">
|
||||||
|
<!ENTITY NameField2.accesskey "L">
|
||||||
|
<!ENTITY PhoneticField1.label "Phonetic:">
|
||||||
|
<!ENTITY PhoneticField2.label "Phonetic:">
|
||||||
|
<!ENTITY DisplayName.label "Display:">
|
||||||
|
<!ENTITY DisplayName.accesskey "D">
|
||||||
|
<!ENTITY NickName.label "Nickname:">
|
||||||
|
<!ENTITY NickName.accesskey "N">
|
||||||
|
<!ENTITY Internet.box "Internet">
|
||||||
|
<!ENTITY PrimaryEmail.label "Email:">
|
||||||
|
<!ENTITY PrimaryEmail.accesskey "E">
|
||||||
|
<!ENTITY SecondEmail.label "Additional Email:">
|
||||||
|
<!ENTITY SecondEmail.accesskey "o">
|
||||||
|
<!ENTITY PreferMailFormat.label "Prefers to receive messages formatted as:">
|
||||||
|
<!ENTITY PreferMailFormat.accesskey "r">
|
||||||
|
<!ENTITY PlainText.label "Plain Text">
|
||||||
|
<!ENTITY HTML.label "HTML">
|
||||||
|
<!ENTITY Unknown.label "Unknown">
|
||||||
|
<!ENTITY ScreenName.label "Screen Name:">
|
||||||
|
<!ENTITY ScreenName.accesskey "S">
|
||||||
|
<!ENTITY Phones.box "Phones">
|
||||||
|
<!ENTITY WorkPhone.label "Work:">
|
||||||
|
<!ENTITY WorkPhone.accesskey "W">
|
||||||
|
<!ENTITY HomePhone.label "Home:">
|
||||||
|
<!ENTITY HomePhone.accesskey "H">
|
||||||
|
<!ENTITY FaxNumber.label "Fax:">
|
||||||
|
<!ENTITY FaxNumber.accesskey "x">
|
||||||
|
<!ENTITY PagerNumber.label "Pager:">
|
||||||
|
<!ENTITY PagerNumber.accesskey "P">
|
||||||
|
<!ENTITY CellularNumber.label "Mobile:">
|
||||||
|
<!ENTITY CellularNumber.accesskey "M">
|
||||||
|
|
||||||
|
<!-- Address Tab -->
|
||||||
|
<!ENTITY Address.tab "Address">
|
||||||
|
<!ENTITY Home.box "Home">
|
||||||
|
<!ENTITY HomeAddress.label "Address:">
|
||||||
|
<!ENTITY HomeAddress2.label "">
|
||||||
|
<!ENTITY HomeCity.label "City:">
|
||||||
|
<!ENTITY HomeState.label "State/Province:">
|
||||||
|
<!ENTITY HomeZipCode.label "ZIP/Postal Code:">
|
||||||
|
<!ENTITY HomeCountry.label "Country:">
|
||||||
|
<!ENTITY HomeWebPage.label "Web Page:">
|
||||||
|
<!ENTITY Work.box "Work">
|
||||||
|
<!ENTITY JobTitle.label "Title:">
|
||||||
|
<!ENTITY Department.label "Department:">
|
||||||
|
<!ENTITY Company.label "Organization:">
|
||||||
|
<!ENTITY WorkAddress.label "Address:">
|
||||||
|
<!ENTITY WorkAddress2.label "">
|
||||||
|
<!ENTITY WorkCity.label "City:">
|
||||||
|
<!ENTITY WorkState.label "State/Province:">
|
||||||
|
<!ENTITY WorkZipCode.label "ZIP/Postal Code:">
|
||||||
|
<!ENTITY WorkCountry.label "Country:">
|
||||||
|
<!ENTITY WorkWebPage.label "Web Page:">
|
||||||
|
|
||||||
|
<!-- Other Tab -->
|
||||||
|
<!ENTITY Other.tab "Other">
|
||||||
|
<!ENTITY Custom1.label "Custom 1:">
|
||||||
|
<!ENTITY Custom1.accesskey "1">
|
||||||
|
<!ENTITY Custom2.label "Custom 2:">
|
||||||
|
<!ENTITY Custom2.accesskey "2">
|
||||||
|
<!ENTITY Custom3.label "Custom 3:">
|
||||||
|
<!ENTITY Custom3.accesskey "3">
|
||||||
|
<!ENTITY Custom4.label "Custom 4:">
|
||||||
|
<!ENTITY Custom4.accesskey "4">
|
||||||
|
<!ENTITY Notes.box "Notes">
|
Загрузка…
Ссылка в новой задаче