Source code

Revision control

Line Code
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
<?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 bindings [
<!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
%notificationDTD;
]>

<bindings id="notificationBindings"
          xmlns="http://www.mozilla.org/xbl"
          xmlns:xbl="http://www.mozilla.org/xbl"
          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:html = "http://www.w3.org/1999/xhtml">

  <binding id="popup-notification">
    <content orient="vertical">
      <xul:hbox class="popup-notification-header-container">
        <children includes="popupnotificationheader"/>
      </xul:hbox>
      <xul:hbox align="start" class="popup-notification-body-container">
        <xul:image class="popup-notification-icon"
                   xbl:inherits="popupid,src=icon,class=iconclass"/>
        <xul:vbox flex="1" pack="start"
                  class="popup-notification-body" xbl:inherits="popupid">
          <xul:hbox align="start">
            <xul:vbox flex="1">
              <xul:label class="popup-notification-origin header"
                         xbl:inherits="value=origin,tooltiptext=origin"
                         crop="center"/>
              <!-- These need to be on the same line to avoid creating
                   whitespace between them (whitespace is added in the
                   localization file, if necessary). -->
              <xul:description class="popup-notification-description" xbl:inherits="popupid"><html:span
                xbl:inherits="xbl:text=label,popupid"/><html:b xbl:inherits="xbl:text=name,popupid"/><html:span
              xbl:inherits="xbl:text=endlabel,popupid"/><html:b xbl:inherits="xbl:text=secondname,popupid"/><html:span
              xbl:inherits="xbl:text=secondendlabel,popupid"/></xul:description>
            </xul:vbox>
            <xul:toolbarbutton anonid="closebutton"
                               class="messageCloseButton close-icon popup-notification-closebutton tabbable"
                               xbl:inherits="oncommand=closebuttoncommand,hidden=closebuttonhidden"
                               tooltiptext="&closeNotification.tooltip;"/>
          </xul:hbox>
          <children includes="popupnotificationcontent"/>
          <xul:label class="text-link popup-notification-learnmore-link"
                     xbl:inherits="onclick=learnmoreclick,href=learnmoreurl">&learnMore;</xul:label>
          <xul:checkbox anonid="checkbox"
                        xbl:inherits="hidden=checkboxhidden,checked=checkboxchecked,label=checkboxlabel,oncommand=checkboxcommand" />
          <xul:description class="popup-notification-warning" xbl:inherits="hidden=warninghidden,xbl:text=warninglabel"/>
        </xul:vbox>
      </xul:hbox>
      <xul:hbox class="popup-notification-footer-container">
        <children includes="popupnotificationfooter"/>
      </xul:hbox>
      <xul:hbox class="popup-notification-button-container panel-footer">
        <children includes="button"/>
        <xul:button anonid="secondarybutton"
                    class="popup-notification-button popup-notification-secondary-button"
                    xbl:inherits="oncommand=secondarybuttoncommand,label=secondarybuttonlabel,accesskey=secondarybuttonaccesskey,hidden=secondarybuttonhidden"/>
        <xul:toolbarseparator xbl:inherits="hidden=dropmarkerhidden"/>
        <xul:button anonid="menubutton"
                    type="menu"
                    class="popup-notification-button popup-notification-dropmarker"
                    aria-label="&moreActionsButton.accessibleLabel;"
                    xbl:inherits="onpopupshown=dropmarkerpopupshown,hidden=dropmarkerhidden">
          <xul:menupopup anonid="menupopup"
                         position="after_end"
                         aria-label="&moreActionsButton.accessibleLabel;"
                         xbl:inherits="oncommand=menucommand">
            <children/>
          </xul:menupopup>
        </xul:button>
        <xul:button anonid="button"
                    class="popup-notification-button popup-notification-primary-button"
                    label="&defaultButton.label;"
                    accesskey="&defaultButton.accesskey;"
                    xbl:inherits="oncommand=buttoncommand,label=buttonlabel,accesskey=buttonaccesskey,default=buttonhighlight,disabled=mainactiondisabled"/>
      </xul:hbox>
    </content>
    <implementation>
      <field name="checkbox" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "checkbox");
      </field>
      <field name="closebutton" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "closebutton");
      </field>
      <field name="button" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "button");
      </field>
      <field name="secondaryButton" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "secondarybutton");
      </field>
      <field name="menubutton" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "menubutton");
      </field>
      <field name="menupopup" readonly="true">
        document.getAnonymousElementByAttribute(this, "anonid", "menupopup");
      </field>
    </implementation>
  </binding>
</bindings>