summaryrefslogtreecommitdiffstats
path: root/toolkit/components/alerts/alert.xhtml
blob: 5c2f5e369e7a603927d439e8dd7c8c4eb0def62f (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
<?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 window>

<?xml-stylesheet href="chrome://global/content/alerts/alert.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/alert.css" type="text/css"?>

<window
  id="alertNotification"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  windowtype="alert:alert"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  role="alert"
  pack="start"
  onload="onAlertLoad();"
  onclick="onAlertClick();"
  onbeforeunload="onAlertBeforeUnload();"
>
  <linkset>
    <xhtml:link rel="localization" href="toolkit/global/alert.ftl" />
  </linkset>

  <script src="chrome://global/content/alerts/alert.js" />

  <vbox id="alertBox">
    <box id="alertTitleBox">
      <image id="alertIcon" />
      <label id="alertTitleLabel" class="alertTitle plain" crop="end" />
      <vbox>
        <toolbarbutton
          class="close-icon"
          data-l10n-id="alert-close"
          onclick="event.stopPropagation();"
          oncommand="onAlertClose();"
        />
      </vbox>
    </box>
    <box>
      <hbox
        id="alertImageBox"
        class="alertImageBox"
        align="center"
        pack="center"
      >
        <image id="alertImage" />
      </hbox>

      <vbox id="alertTextBox" class="alertTextBox">
        <label id="alertTextLabel" class="alertText plain" />
        <spacer flex="1" />
        <box id="alertFooter">
          <label id="alertSourceLabel" class="alertSource plain" />
          <button
            type="menu"
            id="alertSettings"
            data-l10n-id="alert-settings-title"
          >
            <menupopup position="after_end">
              <menuitem id="doNotDisturbMenuItem" oncommand="doNotDisturb();" />
              <menuseparator />
              <menuitem
                id="disableForOriginMenuItem"
                oncommand="disableForOrigin();"
              />
              <menuitem id="openSettingsMenuItem" oncommand="openSettings();" />
            </menupopup>
          </button>
        </box>
      </vbox>
    </box>
  </vbox>

  <!-- This method is called inline because we want to make sure we establish the width
       and height of the alert before we fire the onload handler. -->
  <script>
    /* eslint-disable no-undef */
    prefillAlertInfo();
  </script>
</window>