summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/base/prefs/content/AccountManager.xhtml
blob: 7769ff730b916eeeb726c4e67e8b61ab727177b5 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?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 html [
  <!ENTITY % accountManagerDTD SYSTEM "chrome://messenger/locale/AccountManager.dtd">
  %accountManagerDTD;
  <!ENTITY % utilityDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
  %utilityDTD;
]>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
      xmlns:html="http://www.w3.org/1999/xhtml"
      scrolling="false">
<head>
  <title>&accountManagerTitle.label;</title>

  <meta http-equiv="Content-Security-Policy" content="default-src chrome:; script-src chrome: 'unsafe-inline'; img-src chrome: moz-icon: https: data:; style-src chrome: data: 'unsafe-inline'; object-src 'none'" />
  <meta name="color-scheme" content="light dark" />

  <link rel="icon" href="chrome://messenger/skin/icons/new/compact/account-settings.svg" />

  <link rel="stylesheet" href="chrome://messenger/skin/inContentDialog.css" />
  <link rel="stylesheet" href="chrome://messenger/skin/icons.css" />
  <link rel="stylesheet" href="chrome://messenger/skin/folderPane.css" />
  <link rel="stylesheet" href="chrome://messenger/skin/shared/tree-listbox.css" />
  <link rel="stylesheet" href="chrome://messenger/skin/shared/accountManager.css" />

  <link rel="localization" href="branding/brand.ftl" />
  <link rel="localization" href="messenger/accountManager.ftl" />
  <link rel="localization" href="messenger/addressbook/aboutAddressBook.ftl" />

  <script defer="defer" src="chrome://messenger/content/mailCore.js"></script>
  <script defer="defer" src="chrome://communicator/content/utilityOverlay.js"></script>
  <script defer="defer" src="chrome://messenger/content/accountUtils.js"></script>
  <script defer="defer" src="chrome://messenger/content/am-prefs.js"></script>
  <script defer="defer" src="chrome://messenger/content/AccountManager.js"></script>
  <script defer="defer" src="chrome://messenger/content/amUtils.js"></script>
  <script defer="defer" src="chrome://messenger/content/tree-listbox.js"></script>
  <script>
    // FIXME: move to script file.
    window.addEventListener("load", event => { onLoad(event); });
    window.addEventListener("unload", event => { onUnload(); });
  </script>
</head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
  <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
  <html:aside id="accountTreeBox">
    <html:ol is="orderable-tree-listbox" id="accounttree" class="no-overscroll"
             role="tree"
             flex="1"
             onselect="onAccountTreeSelect(null, null);">
    </html:ol>
    <template id="accountTreeItem" xmlns="http://www.w3.org/1999/xhtml">
      <li>
        <div draggable="true">
          <div class="twisty">
            <img class="twisty-icon" alt=""
                 src="chrome://global/skin/icons/arrow-down-12.svg" />
          </div>
          <div class="icon"></div>
          <span class="name" tabindex="-1"></span>
        </div>
        <ul></ul>
      </li>
    </template>

    <button id="accountActionsButton" type="menu"
            label="&accountActionsButton.label;"
            accesskey="&accountActionsButton.accesskey;">
      <menupopup id="accountActionsDropdown"
                 onpopupshowing="initAccountActionsButtons(this);">
        <menuitem id="accountActionsAddMailAccount"
                  label="&addMailAccountButton.label;"
                  accesskey="&addMailAccountButton.accesskey;"
                  prefstring="mail.disable_new_account_addition"
                  oncommand="openAccountSetupTab();"/>
        <menuitem id="accountActionsAddIMAccount"
                  label="&addIMAccountButton.label;"
                  accesskey="&addIMAccountButton.accesskey;"
                  prefstring="mail.disable_new_account_addition"
                  oncommand="AddIMAccount(event); event.stopPropagation();"/>
        <menuitem id="accountActionsAddFeedAccount"
                  label="&addFeedAccountButton.label;"
                  accesskey="&addFeedAccountButton.accesskey;"
                  prefstring="mail.disable_new_account_addition"
                  oncommand="AddFeedAccount(event); event.stopPropagation();"/>
        <menuitem id="accountActionsAddOtherAccount"
                  data-l10n-id="account-action-add-newsgroup-account"
                  prefstring="mail.disable_new_account_addition"
                  oncommand="openNewsgroupAccountWizard(); event.stopPropagation();"/>
        <menuseparator id="accountActionsDropdownSep1"/>
        <menuitem id="accountActionsDropdownSetDefault"
                  label="&setDefaultButton.label;"
                  accesskey="&setDefaultButton.accesskey;"
                  prefstring="mail.disable_button.set_default_account"
                  oncommand="onSetDefault(event); event.stopPropagation();"/>
        <menuitem id="accountActionsDropdownRemove"
                  label="&removeButton.label;"
                  accesskey="&removeButton.accesskey;"
                  prefstring="mail.disable_button.delete_account"
                  oncommand="onRemoveAccount(event); event.stopPropagation();"/>
      </menupopup>
    </button>

    <vbox class="sidebar-footer-list">
      <html:a id="prefsButton" class="sidebar-footer-link"
              onclick="openOptionsDialog();">
        <html:img class="sidebar-footer-icon"
                  src="chrome://messenger/skin/icons/new/compact/settings.svg" alt="" />
        <label class="sidebar-footer-label"
               data-l10n-id="open-preferences-sidebar-button2"
               flex="1"/>
      </html:a>

      <html:a id="addonsButton" class="sidebar-footer-link"
              onclick="window.browsingContext.topChromeWindow.openAddonsMgr();">
        <html:img class="sidebar-footer-icon"
                  src="chrome://messenger/skin/icons/new/compact/extension.svg"
                  alt="" />
        <label class="sidebar-footer-label"
               data-l10n-id="open-addons-sidebar-button"
               flex="1"/>
      </html:a>
    </vbox>
  </html:aside>
  <html:aside>
    <iframe id="contentFrame" name="contentFrame" />
  </html:aside>

  <stack id="dialogStack" hidden="true"/>
  <vbox id="dialogTemplate"
        class="dialogOverlay"
        align="center"
        pack="center"
        topmost="true"
        hidden="true">
    <vbox class="dialogBox"
          pack="end"
          role="dialog"
          aria-labelledby="dialogTitle">
      <hbox class="dialogTitleBar" align="center">
        <label class="dialogTitle" flex="1"/>
        <button class="dialogClose close-icon"
                aria-label="&accountManagerCloseButton.label;"/>
      </hbox>
      <browser class="dialogFrame"
               autoscroll="false"
               disablehistory="true"/>
    </vbox>
  </vbox>

  <dialog xmlns="http://www.w3.org/1999/xhtml" id="editVCardDialog">
    <form autocomplete="off">
#include ../../../../mail/components/addrbook/content/vcard-edit/vCardTemplates.inc.xhtml
      <vcard-edit class="edit"/>
      <menu class="dialog-menu-container">
        <button type="reset" class="cancel"
                data-l10n-id="edit-vcard-dialog-cancel-button"
                data-l10n-attrs="accesskey"></button>
        <button type="submit" class="accept primary"
                data-l10n-id="edit-vcard-dialog-accept-button"
                data-l10n-attrs="accesskey"></button>
      </menu>
    </form>
  </dialog>
</html:body>
</html>