зеркало из https://github.com/mozilla/pjs.git
Get address book to work with Necko.
This commit is contained in:
Родитель
b16c24f10d
Коммит
2cf8d80a70
|
@ -1,9 +1,12 @@
|
|||
function AbNewCardDialog()
|
||||
{
|
||||
var myURI = GetResultTreeDirectory().getAttribute('ref');
|
||||
dump("myURI = " + myURI + "\n");
|
||||
|
||||
var dialog = window.openDialog("chrome://addressbook/content/newcardDialog.xul",
|
||||
"abNewCard",
|
||||
"chrome",
|
||||
{abURI:GetResultTreeDirectory().getAttribute('id')});
|
||||
{abURI:GetResultTreeDirectory().getAttribute('ref')});
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
@ -13,7 +16,7 @@ function AbEditCardDialog(card, okCallback)
|
|||
var dialog = window.openDialog("chrome://addressbook/content/editcardDialog.xul",
|
||||
"abEditCard",
|
||||
"chrome",
|
||||
{abURI:GetResultTreeDirectory().getAttribute('id'),
|
||||
{abURI:GetResultTreeDirectory().getAttribute('ref'),
|
||||
card:card, okCallback:okCallback});
|
||||
|
||||
return dialog;
|
||||
|
@ -42,22 +45,20 @@ function AbDelete()
|
|||
function GetDirectoryTree()
|
||||
{
|
||||
var directoryTree = frames["directoryFrame"].document.getElementById('dirTree');
|
||||
dump("directoryTree = " + directoryTree + "\n");
|
||||
return directoryTree;
|
||||
}
|
||||
|
||||
function GetResultTree()
|
||||
{
|
||||
var cardTree = frames["resultsFrame"].document.getElementById('resultTree');
|
||||
dump("cardTree = " + cardTree + "\n");
|
||||
return cardTree;
|
||||
}
|
||||
|
||||
function GetResultTreeDirectory()
|
||||
{
|
||||
var tree = GetResultTree();
|
||||
var treechildrenList = tree.getElementsByTagName('treechildren');
|
||||
|
||||
if ( treechildrenList.length == 1 )
|
||||
return(treechildrenList[0]);
|
||||
return(GetResultTree());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY directoryColumn.label "Directory">
|
||||
]>
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="width:100%; height:100%; background-color:white"
|
||||
align="vertical">
|
||||
|
||||
<html:script language="javascript" src="chrome://addressbook/content/dirPane.js"/>
|
||||
|
||||
|
||||
<tree class="abDirectory" rdf:datasources="rdf:addressdirectory" id="dirTree" onclick="return ChangeDirectoryByDOMNode(event.target.parentNode.parentNode)">
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treerow >
|
||||
<treecell>
|
||||
<treeindentation />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#DirName" align="left" />
|
||||
</treecell>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol rdf:resource="http://home.netscape.com/NC-rdf#DirName"/>
|
||||
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&directoryColumn.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
<treechildren rdf:containment="http://home.netscape.com/NC-rdf#child"
|
||||
rdf:ignore="http://home.netscape.com/NC-rdf#CardChild"
|
||||
open="true">
|
||||
<treeitem ref="abdirectory://" open="true">
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</tree>
|
||||
|
||||
</window>
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY nameColumn.label "Name">
|
||||
<!ENTITY emailColumn.label "Email">
|
||||
<!ENTITY phoneColumn.label "Phone#">
|
||||
]>
|
||||
|
||||
<window xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="background-color:white"
|
||||
align="vertical">
|
||||
|
||||
<html:div flex="100%">
|
||||
<tree style="height:100%" class="abResults" id="resultTree"
|
||||
rdf:datasources="rdf:addressdirectory rdf:addresscard"
|
||||
onchange="top.ResultsPaneSelectionChange()"
|
||||
ondblclick="top.EditCard()"
|
||||
rdf:containment="http://home.netscape.com/NC-rdf#CardChild">
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treerow >
|
||||
<treecell>
|
||||
<treeindentation />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#DisplayName" align="left" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#PrimaryEmail" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#WorkPhone" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
|
||||
<treecol style="width:20%" id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#DisplayName"/>
|
||||
<treecol style="width:21%" id="EmailColumn" rdf:resource="http://home.netscape.com/NC-rdf#PrimaryEmail"/>
|
||||
<treecol style="width:20%" id="WorkPhoneColumn" rdf:resource="http://home.netscape.com/NC-rdf#WorkPhone"/>
|
||||
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&nameColumn.label;</treecell>
|
||||
<treecell>&emailColumn.label;</treecell>
|
||||
<treecell>&phoneColumn.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
<treechildren id="" name="cardTreeBody" open="true"/>
|
||||
</tree>
|
||||
</html:div>
|
||||
|
||||
</window>
|
|
@ -1,179 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
|
||||
<!ENTITY selectAddressWindow.title "Select Addresses">
|
||||
|
||||
<!-- Buttons -->
|
||||
<!ENTITY toButton.label "To:">
|
||||
<!ENTITY ccButton.label "Cc:">
|
||||
<!ENTITY bccButton.label "Bcc:">
|
||||
<!ENTITY stopButton.label ".Stop">
|
||||
<!ENTITY searchButton.label ".Search...">
|
||||
<!ENTITY newButton.label "New...">
|
||||
<!ENTITY editButton.label "Edit...">
|
||||
<!ENTITY viewButton.label ".View">
|
||||
<!ENTITY removeButton.label "Remove">
|
||||
<!ENTITY okButton.label "OK">
|
||||
<!ENTITY cancelButton.label "Cancel">
|
||||
<!ENTITY helpButton.label ".Help">
|
||||
|
||||
<!-- Directory Pane -->
|
||||
<!ENTITY directoryColumn.label "Directory">
|
||||
|
||||
<!-- menu items: the . means that the menu item isn't implemented yet -->
|
||||
<!-- File menu items -->
|
||||
|
||||
<!-- Toolbar items -->
|
||||
<!ENTITY search.label "Show names containing:">
|
||||
]>
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&selectAddressWindow.title;"
|
||||
class="dialog"
|
||||
width="640" height="480"
|
||||
style="width:100%; height:100%; padding:0px"
|
||||
onload="OnLoadSelectAddress()"
|
||||
align="vertical">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/addressbook.js"/>
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/selectaddress.js"/>
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/resultPane.js"/>
|
||||
<html:script language="JavaScript" src="chrome://messengercompose/content/MsgComposeCommands.js"/>
|
||||
<!--
|
||||
<html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/>
|
||||
-->
|
||||
<!-- Thin box across top, show names containing & stop, search buttons -->
|
||||
<box align="horizontal" style="width:100%; padding:0px; padding-top:2px; padding-bottom:2px">
|
||||
<html:div flex="100%" style="vertical-align: middle;">
|
||||
<html:label for="searchtext" tabindex="0">&search.label;</html:label>
|
||||
<html:input type="text" id="searchtext" flex="100%"/>
|
||||
</html:div>
|
||||
|
||||
<spring style="width: 1em;"/>
|
||||
|
||||
<titledbutton id="stop" value="&stopButton.label;" class="push" onclick="SelectAddressStopButton()"/>
|
||||
<spring style="width:5px"/>
|
||||
<titledbutton id="search" value="&searchButton.label;" class="push" onclick="SelectAddressSearchButton()"/>
|
||||
</box>
|
||||
|
||||
<!-- Main box, 3 pane and majority of buttons -->
|
||||
<box align="horizontal" flex="100%">
|
||||
<!-- 3 Pane box -->
|
||||
<box align="horizontal" flex="100%" style="border:thin solid">
|
||||
|
||||
<!-- Directory List box -->
|
||||
<box align="vertical" style="width:190px; background-color:white">
|
||||
<tree id="dirTree" class="abDirectory" flex="100%"
|
||||
rdf:datasources="rdf:addressdirectory"
|
||||
onclick="return saChangeDirectoryByDOMNode(event.target.parentNode.parentNode)">
|
||||
<template>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treerow>
|
||||
<treecell><text value="http://home.netscape.com/NC-rdf#DirName" /></treecell>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</template>
|
||||
|
||||
<treecol style="width:100%" rdf:resource="http://home.netscape.com/NC-rdf#DirName" />
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&directoryColumn.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
<treechildren rdf:containment="http://home.netscape.com/NC-rdf#child" rdf:ignore="http://home.netscape.com/NC-rdf#CardChild">
|
||||
<treeitem ref="abdirectory://" open="true">
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</tree>
|
||||
</box>
|
||||
|
||||
<!-- Fake gripper box -->
|
||||
<box align="vertical" style="width:6px; background-color:#9999CC; border-left:thin solid; border-right:thin solid"/>
|
||||
|
||||
<!-- Box that holds results pane, (to,cc,bcc buttons), and address bucket -->
|
||||
<box align="vertical" flex="100%">
|
||||
<!-- Box that holds results pane and (to,cc,bcc buttons) -->
|
||||
<box align="vertical" flex="50%">
|
||||
<!-- Results pane -->
|
||||
<html:iframe flex="100%" style="border:none; border-bottom:thin solid"
|
||||
name="resultsFrame"
|
||||
src="chrome://addressbook/content/resultPane.xul"/>
|
||||
|
||||
<!-- Box that holds (to,cc,bcc buttons) -->
|
||||
<box align="horizontal" style="padding: .3em">
|
||||
<spring flex="50%"/>
|
||||
<titledbutton id="toButton" value="&toButton.label;" class="push" onclick="SelectAddressToButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
<titledbutton id="ccButton" value="&ccButton.label;" class="push" onclick="SelectAddressCcButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
<titledbutton id="bccButton" value="&bccButton.label;" class="push" onclick="SelectAddressBccButton()"/>
|
||||
<spring flex="50%"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<!-- Address bucket -->
|
||||
<box align="vertical" flex="50%">
|
||||
<!-- Fake gripper box -->
|
||||
<box align="vertical" style="height:6px; background-color:#9999CC; border-top:thin solid; border-bottom:thin solid"/>
|
||||
|
||||
<!-- The bucket -->
|
||||
<html:iframe flex="100%" style="border:none"
|
||||
name="addressbucket"
|
||||
src="chrome://addressbook/content/addressbucket.xul"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<!-- Box with buttons on right edge of window -->
|
||||
<box align="vertical" style="padding: .5em; padding-right: 0px">
|
||||
<box align="vertical" flex="50%">
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="new" value="&newButton.label;" class="push" onclick="SelectAddressNewButton()"/>
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="edit" value="&editButton.label;" class="push" onclick="SelectAddressEditButton()"/>
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="view" value="&viewButton.label;" class="push" onclick="SelectAddressViewButton()"/>
|
||||
<spring flex="100%"/>
|
||||
</box>
|
||||
<box align="vertical" flex="50%">
|
||||
<spring flex="50%"/>
|
||||
<titledbutton id="remove" value="&removeButton.label;" class="push" onclick="RemoveSelectedFromBucket()"/>
|
||||
<spring flex="50%"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<!-- OK & Cancel buttons -->
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</window>
|
Загрузка…
Ссылка в новой задаче