mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 06:10:35 +00:00
Added selectaddress.xul, addressbucket.xul. Also modified the addressbook window to have a cardview pane.
This commit is contained in:
parent
c01c3b85b1
commit
a6dea0e31c
@ -5,28 +5,29 @@ function ChangeDirectoryByDOMNode(dirNode)
|
||||
ChangeDirectoryByURI(uri);
|
||||
}
|
||||
|
||||
|
||||
function ChangeDirectoryByURI(uri)
|
||||
{
|
||||
var tree = frames[0].frames[1].document.getElementById('resultTree');
|
||||
tree.childNodes[7].setAttribute('id', uri);
|
||||
}
|
||||
|
||||
|
||||
function EditCard()
|
||||
{
|
||||
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
|
||||
if (!toolkitCore)
|
||||
{
|
||||
toolkitCore = new ToolkitCore();
|
||||
if (toolkitCore)
|
||||
{
|
||||
toolkitCore.Init("ToolkitCore");
|
||||
}
|
||||
}
|
||||
var dialog = window.openDialog("chrome://addressbook/content/editcard.xul",
|
||||
"editCard",
|
||||
"chrome");
|
||||
return dialog;
|
||||
}
|
||||
|
||||
if (toolkitCore)
|
||||
{
|
||||
toolkitCore.ShowWindow("chrome://addressbook/content/editcard.xul", window);
|
||||
}
|
||||
|
||||
function SelectAddress()
|
||||
{
|
||||
var dialog = window.openDialog("chrome://addressbook/content/selectaddress.xul",
|
||||
"selectAddress",
|
||||
"chrome");
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +42,74 @@ function EditCardOKButton()
|
||||
dump("OK Hit\n");
|
||||
}
|
||||
|
||||
|
||||
function EditCardCancelButton()
|
||||
{
|
||||
dump("Cancel Hit\n");
|
||||
}
|
||||
|
||||
function DisplayCardViewPane(messageNode)
|
||||
{
|
||||
/* Setup vars - this should move to a global var */
|
||||
/* data for address book, prefixes: "cvb" = card view box
|
||||
"cvh" = crad view header
|
||||
"cv" = card view (normal fields) */
|
||||
|
||||
var doc = parent.frames["cardViewFrame"].document;
|
||||
|
||||
dump("label: " + parent.entities.search.label + "\n");
|
||||
|
||||
/* Card View - Title */
|
||||
var CardTitle = doc.getElementById("CardTitle");
|
||||
/* Name section */
|
||||
var cvbName = doc.getElementById("cvbName");
|
||||
var cvhName = doc.getElementById("cvhName");
|
||||
var cvNickname = doc.getElementById("cvNickname");
|
||||
var cvEmail1 = doc.getElementById("cvEmail1");
|
||||
var cvEmail2 = doc.getElementById("cvEmail2");
|
||||
/* Home section */
|
||||
var cvbHome = doc.getElementById("cvbHome");
|
||||
var cvHomeAddress = doc.getElementById("cvHomeAddress");
|
||||
var cvHomeCityStZip = doc.getElementById("cvHomeCityStZip");
|
||||
/* Other section */
|
||||
var cvbOther = doc.getElementById("cvbOther");
|
||||
var cvNotes = doc.getElementById("cvNotes");
|
||||
/* Phone section */
|
||||
var cvbPhone = doc.getElementById("cvbPhone");
|
||||
var cvPhWork = doc.getElementById("cvPhWork");
|
||||
var cvPhHome = doc.getElementById("cvPhHome");
|
||||
var cvPhFax = doc.getElementById("cvPhFax");
|
||||
var cvPhCellular = doc.getElementById("cvPhCellular");
|
||||
var cvPhPager = doc.getElementById("cvPhPager");
|
||||
/* Work section */
|
||||
var cvbWork = doc.getElementById("cvbWork");
|
||||
var cvJobTitle = doc.getElementById("cvJobTitle");
|
||||
var cvOrganization = doc.getElementById("cvOrganization");
|
||||
var cvWorkAddress = doc.getElementById("cvWorkAddress");
|
||||
var cvWorkCityStZip = doc.getElementById("cvWorkCityStZip");
|
||||
|
||||
/* set fields in card view pane */
|
||||
CardTitle.childNodes[0].nodeValue = "Card for Winnie the Pooh";
|
||||
|
||||
/* Name section */
|
||||
cvhName.childNodes[0].nodeValue = "Winnie the Pooh";
|
||||
cvNickname.childNodes[0].nodeValue = "\"Pooh\"";
|
||||
cvEmail1.childNodes[0].nodeValue = "wpooh@netscape.com";
|
||||
cvEmail2.childNodes[0].nodeValue = "poohbear@netscape.net";
|
||||
/* Home section */
|
||||
cvHomeAddress.childNodes[0].nodeValue = "123 Treehouse Lane";
|
||||
cvHomeCityStZip.childNodes[0].nodeValue = "Hundred Acre Wood, CA 94087";
|
||||
/* Other section */
|
||||
cvNotes.childNodes[0].nodeValue = "This data is fake. It is inserted into the DOM from JavaScript.";
|
||||
/* Phone section */
|
||||
cvPhWork.childNodes[0].nodeValue = "Work: (650) 937-1234";
|
||||
cvPhHome.childNodes[0].nodeValue = "Home: (408) 732-1212";
|
||||
cvPhFax.childNodes[0].nodeValue = "Fax: (650) 937-3434";
|
||||
cvPhCellular.childNodes[0].nodeValue = "Cellular: (408) 734-9090";
|
||||
cvPhPager.childNodes[0].nodeValue = "Pager: (408) 732-6545";
|
||||
/* Work section */
|
||||
cvJobTitle.childNodes[0].nodeValue = "Interaction Designer";
|
||||
cvOrganization.childNodes[0].nodeValue = "Netscape Communications Corp.";
|
||||
cvWorkAddress.childNodes[0].nodeValue = "501 E Middlefield Road";
|
||||
cvWorkCityStZip.childNodes[0].nodeValue = "Mountain View, CA 94043";
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* Address Book specific style */
|
||||
|
||||
/* CardEdit styles - used in the Card Edit View */
|
||||
|
||||
/* CardEdit styles - used in the Card Edit Dialog */
|
||||
|
||||
box[class="CardEdit"] {
|
||||
margin: 5px;
|
||||
@ -17,6 +18,34 @@ input[class="CardEdit"] {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* CardView styles - used in the Card View Pane*/
|
||||
|
||||
div[class="CardViewHeading"] {
|
||||
padding: 1px;
|
||||
padding-left: 5px;
|
||||
color: white;
|
||||
background-color: #5050ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div[class="CardViewText"] {
|
||||
padding-left: 20px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
box[class="CardView"] {
|
||||
padding: 0px;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 4px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
spring[class="CardViewHeadingSpace"] {
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* General styles */
|
||||
|
||||
spring[class="PromptEditSpacing"] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user