summaryrefslogtreecommitdiffstats
path: root/comm/suite/mailnews/components/compose/content/addressingWidgetOverlay.xul
blob: e937050ae91122ccf887566d0e6b8b43d56eccfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/messengercompose/addressingWidgetOverlay.dtd">


<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/javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>
<script type="application/javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>

  <!-- Addressing Widget -->
  <listbox id="addressingWidget" seltype="multiple" rows="4"
    onkeydown="awKeyDown(event, this)"
    onclick="awClickEmptySpace(event.originalTarget, true)"
    ondragover="DragAddressOverTargetControl(event);"
    ondrop="DropAddressOverTargetControl(event);">

    <listcols>
      <listcol id="typecol-addressingWidget"/>
      <listcol id="textcol-addressingWidget" flex="1"/>
    </listcols>

    <listitem class="addressingWidgetItem" allowevents="true">
      <listcell class="addressingWidgetCell" align="stretch">
        <menulist id="addressCol1#1" disableonsend="true"
                  class="aw-menulist menulist-compact" flex="1"
                  onkeypress="awMenulistKeyPress(event, this)"
                  oncommand="gContentChanged=true; awSetAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
          <menupopup>
            <menuitem value="addr_to" label="&toAddr.label;"/>
            <menuitem value="addr_cc" label="&ccAddr.label;"/>
            <menuitem value="addr_bcc" label="&bccAddr.label;"/>
            <menuitem value="addr_reply" label="&replyAddr.label;"/>
            <menuitem value="addr_newsgroups" label="&newsgroupsAddr.label;"/>
            <menuitem value="addr_followup" label="&followupAddr.label;"/>
          </menupopup>
        </menulist>
      </listcell>

      <listcell class="addressingWidgetCell">
        <textbox id="addressCol2#1" class="plain textbox-addressingWidget uri-element"
                 aria-labelledby="addressCol1#1"
                 type="autocomplete" flex="1" maxrows="4"
                 newlines="replacewithcommas"
                 autocompletesearch="mydomain addrbook ldap news" timeout="300"
                 autocompletesearchparam="{}"
                 completedefaultindex="true" forcecomplete="true"
                 minresultsforpopup="2" ignoreblurwhilesearching="true"
                 ontextentered="awRecipientTextCommand(eventParam, this)"
                 onerrorcommand="awRecipientErrorCommand(eventParam, this)"
                 oninput="gContentChanged=true; setupAutocomplete();" disableonsend="true"
                 onkeypress="awRecipientKeyPress(event, this)"
                 onkeydown="awRecipientKeyDown(event, this)">
          <image class="person-icon" onclick="this.parentNode.select();"/>
        </textbox>
      </listcell>
    </listitem>

  </listbox>

</overlay>