зеркало из https://github.com/mozilla/pjs.git
Implement an addressbook sidebar panel (30454). r=ben sr=sspitzer
This commit is contained in:
Родитель
140986085a
Коммит
632b0e8e60
|
@ -180,7 +180,6 @@ function AbNewMessage()
|
|||
var msgComposFormat = Components.interfaces.nsIMsgCompFormat;
|
||||
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
|
||||
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
|
||||
|
||||
msgComposeService.OpenComposeWindowWithValues(null, msgComposeType.New, msgComposFormat.Default,
|
||||
GetSelectedAddresses(), null, null,
|
||||
null, null, null, null, null);
|
||||
|
@ -247,7 +246,6 @@ function DirPaneSelectionChange()
|
|||
function ChangeDirectoryByDOMNode(dirNode)
|
||||
{
|
||||
var uri = dirNode.getAttribute("id");
|
||||
|
||||
if (resultsTree) {
|
||||
if (uri != resultsTree.getAttribute("ref")) {
|
||||
ClearResultsTreeSelection();
|
||||
|
|
|
@ -20,25 +20,26 @@ Rights Reserved.
|
|||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/addressbook/abResultsTreeOverlay.dtd">
|
||||
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
|
||||
<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
|
||||
<!-- FIX ME - remove document.commandDispatcher.updateCommands() when tree selection calls this automatically -->
|
||||
<tree id="resultsTree"
|
||||
class="abResults"
|
||||
datasources="rdf:addressdirectory rdf:addresscard"
|
||||
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('tree-select');"
|
||||
onblur="goOnEvent(this,'blur')"
|
||||
onclick="clickResultsTree(event);"
|
||||
containment="http://home.netscape.com/NC-rdf#CardChild"
|
||||
allownegativeassertions="false"
|
||||
coalesceduplicatearcs="false"
|
||||
ondragover="return DragOverTree(event);"
|
||||
ondraggesture="return BeginDragResultTree(event);"
|
||||
ondragdrop="return DropOnResultTree(event);"
|
||||
multiple="true">
|
||||
class="abResults"
|
||||
datasources="rdf:addressdirectory rdf:addresscard"
|
||||
onselect="ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('tree-select');"
|
||||
onblur="goOnEvent(this,'blur')"
|
||||
onclick="clickResultsTree(event);"
|
||||
containment="http://home.netscape.com/NC-rdf#CardChild"
|
||||
allownegativeassertions="false"
|
||||
coalesceduplicatearcs="false"
|
||||
ondragover="return DragOverTree(event);"
|
||||
ondraggesture="return BeginDragResultTree(event);"
|
||||
ondragdrop="return DropOnResultTree(event);"
|
||||
multiple="true">
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
|
@ -67,10 +68,10 @@ Rights Reserved.
|
|||
|
||||
<treehead>
|
||||
<treerow id="headRow">
|
||||
<treecell id="NameColumnHeader" label="&nameColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return top.SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#Name');"/>
|
||||
<treecell id="EmailColumnHeader" label="&emailColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return top.SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail');"/>
|
||||
<treecell id="WorkPhoneColumnHeader" label="&workPhoneColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return top.SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone');"/>
|
||||
<treecell id="OrganizationColumnHeader" label="&organizationColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return top.SortResultPane('OrganizationColumn', 'http://home.netscape.com/NC-rdf#Company');"/>
|
||||
<treecell id="NameColumnHeader" label="&nameColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#Name');"/>
|
||||
<treecell id="EmailColumnHeader" label="&emailColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail');"/>
|
||||
<treecell id="WorkPhoneColumnHeader" label="&workPhoneColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone');"/>
|
||||
<treecell id="OrganizationColumnHeader" label="&organizationColumn.label;" class="sortDirectionIndicator treecell-header treecell-inset-header" onclick="return SortResultPane('OrganizationColumn', 'http://home.netscape.com/NC-rdf#Company');"/>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: xml; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
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 Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/addressbook/addressbook.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://messenger/content/addressbook/abDirTreeOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://messenger/content/addressbook/abResultsTreeOverlay.xul"?>
|
||||
|
||||
<window id="addressbook-panel"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="InitCommonJS(); abPanelStartup();"
|
||||
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/addressbook.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
function abPanelStartup() {
|
||||
var abList = document.getElementById('addressbookList');
|
||||
abList.selectedIndex = 1;
|
||||
ChangeDirectoryByDOMNode(abList.selectedItem);
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
<vbox id="results_box" flex="1">
|
||||
<hbox id="panel-bar" class="toolbar">
|
||||
<menulist id="addressbookList" oncommand="ChangeDirectoryByDOMNode(event.target);" flex="1">
|
||||
<menupopup id="addressbookPopup" datasources="rdf:addressdirectory" ref="moz-abdirectory://">
|
||||
<template>
|
||||
<rule nc:IsMailList="false">
|
||||
<menuitem label="rdf:http://home.netscape.com/NC-rdf#DirName" uri="..."/>
|
||||
</rule>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<tree id="resultsTree" flex="1" style="height:0px" ondblclick="AbNewMessage();">
|
||||
<treecolgroup id="theColumns">
|
||||
<treecol persist="hidden width" flex="2" id="NameColumn" resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<splitter class="tree-splitter" hidden="true"/>
|
||||
<treecol persist="hidden width" hidden="true" flex="3" id="EmailColumn" resource="http://home.netscape.com/NC-rdf#PrimaryEmail"/>
|
||||
<splitter class="tree-splitter" hidden="true"/>
|
||||
<treecol persist="hidden width" hidden="true" flex="2" id="WorkPhoneColumn" resource="http://home.netscape.com/NC-rdf#WorkPhone"/>
|
||||
<splitter class="tree-splitter" hidden="true"/>
|
||||
<treecol persist="hidden width" hidden="true" flex="2" id="OrganizationColumn" resource="http://home.netscape.com/NC-rdf#Company"/>
|
||||
</treecolgroup>
|
||||
</tree>
|
||||
</vbox>
|
||||
</window>
|
|
@ -21,7 +21,6 @@ Rights Reserved.
|
|||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/addressbook/addressbook.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
|
||||
|
@ -65,7 +64,6 @@ Rights Reserved.
|
|||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/addressbook.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/msgPrintEngine.js"/>
|
||||
|
||||
<commandset id="tasksCommands">
|
||||
|
|
|
@ -133,10 +133,9 @@ function CompFields2Recipients(msgCompFields, msgType)
|
|||
awSetInputAndPopup(msgCompFields.otherRandomHeaders, "addr_other", newTreeChildrenNode, templateNode);
|
||||
awSetInputAndPopup(msgCompFields.newsgroups, "addr_newsgroups", newTreeChildrenNode, templateNode);
|
||||
awSetInputAndPopup(msgCompFields.followupTo, "addr_followup", newTreeChildrenNode, templateNode);
|
||||
|
||||
//If it's a new message, we need to add an extrat empty recipient.
|
||||
var msgComposeType = Components.interfaces.nsIMsgCompType;
|
||||
if ((msgType == msgComposeType.New) || (msgType == msgComposeType.ForwardAsAttachment) || (msgType == msgComposeType.ForwardInline) || (top.MAX_RECIPIENTS == 0))
|
||||
if ((top.MAX_RECIPIENTS == 0 && ((msgType == msgComposeType.New) || (msgType == msgComposeType.ForwardAsAttachment) || (msgType == msgComposeType.ForwardInline))) || top.MAX_RECIPIENTS == 0)
|
||||
_awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode);
|
||||
dump("replacing child in comp fields 2 recips \n");
|
||||
var parent = treeChildren.parentNode;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
<rdf:li resource="urn:sidebar:panel:search"/>
|
||||
<rdf:li resource="urn:sidebar:panel:bookmarks"/>
|
||||
<rdf:li resource="urn:sidebar:panel:history"/>
|
||||
<rdf:li resource="urn:sidebar:panel:addressbook"/>
|
||||
</rdf:Seq>
|
||||
</nc:panel-list>
|
||||
</rdf:Description>
|
||||
|
@ -51,4 +52,8 @@
|
|||
<nc:title>&sidebar.client-history.label;</nc:title>
|
||||
<nc:content>chrome://communicator/content/history/history-panel.xul</nc:content>
|
||||
</rdf:Description>
|
||||
<rdf:Description about="urn:sidebar:panel:addressbook">
|
||||
<nc:title>&sidebar.client-addressbook.label;</nc:title>
|
||||
<nc:content>chrome://messenger/content/addressbook/addressbook-panel.xul</nc:content>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
|
|
|
@ -28,3 +28,4 @@
|
|||
<!ENTITY sidebar.tinderbox-ports.label "Tinderbox: SeaMonkey-Ports">
|
||||
<!ENTITY sidebar.client-bookmarks.label "Bookmarks">
|
||||
<!ENTITY sidebar.client-history.label "History">
|
||||
<!ENTITY sidebar.client-addressbook.label "Address Book">
|
||||
|
|
Загрузка…
Ссылка в новой задаче