DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (47b55c578f95)

VCS Links

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 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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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 [
    <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
    %lightningDTD;
]>

<!-- Use the Thunderbird Notification bar style for our iMIP warning -->
<?xml-stylesheet href="chrome://messenger/skin/primaryToolbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/messageHeader.css" type="text/css"?>

<?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>
<?xml-stylesheet href="chrome://lightning/content/lightning-widgets.css" type="text/css"?>

<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <script type="application/javascript"
            src="chrome://lightning/content/lightning-utils.js"/>
    <script type="application/javascript"
            src="chrome://calendar/content/calUtils.js"/>
    <script type="application/javascript"
            src="chrome://lightning/content/imip-bar.js"/>
    <script type="application/javascript"
            src="chrome://calendar/content/calendar-management.js"/>
    <script type="application/javascript"
            src="chrome://calendar/content/calendar-ui-utils.js"/>

    <vbox id="messagepanebox">
      <vbox id="singlemessage" insertbefore="msgHeaderView">
        <lightning-notification-bar id="imip-bar"
                                    collapsed="true"
                                    insertbefore="msgHeaderView"
                                    label="&lightning.imipbar.description;">

          <!-- Some Toolbox implementation notes:
             -
             - css style:
             - classes within toolbox are making use of existing TB css definitions - as used in
             - /comm-central/source/mail/base/content/msgHdrViewOverlay.xul, only icon defining
             - classes like imipAcceptButton are noted separately and OS specific within
             - skin/lightning.css (resp. the OS-specific theme folders)
             -
             - The toolbarbuttons will be adjusted dynamically in imip-bar.js based on their
             - content of menuitems. To avoid breaking this, the following should be considered
             - if adding/changing toolbarbutton definitions.
             - general:
             -    * the toolbarbuttons will appear in order of definition
             -      within the toolbar if visible
             -    * must be hidden by default
             -    * menuitem inside must not be hidden by default
             - simple button:
             -    * must not have a type attribute
             -    * may have menupopup/menuitem within (not displayed though)
             - dropdown only:
             -    * must have type=menu
             -    * should have a menupopup with at least one menuitem
             - smart-dropdown:
             -    * must have type=menu-button
             -    * should have a menupopup with at least one menuitem
             -    * bubbling up of events from menuitems to toolbarbutton must be prevented
             -      by adding a trailing "if (event.target.id == this.id) " to the respective
             -      ltnImipBar.executeAction(...)
             -    * toolbarbutton's oncommand should end with the first menuitem's oncommand
             -      to not break automated conforming
             -      e.g. "if (event.target.id == this.id) ltnImipBar.executeAction('ACCEPTED');"
             -      and "ltnImipBar.executeAction('ACCEPTED');"
             //-->
          <toolbox id="imip-view-toolbox"
                   class="inline-toolbox"
                   defaulticonsize="small"
                   minwidth="50px"
                   defaultlabelalign="end"
                   labelalign="end"
                   defaultmode="full"
                   inlinetoolbox="true">
            <toolbar id="imip-view-toolbar" class="inline-toolbar" align="start"
                     customizable="false" mode="full"
                     defaulticonsize="small" defaultmode="full">

              <!-- show event/invitation details -->
              <toolbarbutton id="imipDetailsButton"
                             label="&lightning.imipbar.btnDetails.label;"
                             tooltiptext="&lightning.imipbar.btnDetails.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipDetailsButton"
                             oncommand="ltnImipBar.executeAction('X-SHOWDETAILS')"
                             hidden="true"/>

              <!-- add published events -->
              <toolbarbutton id="imipAddButton"
                             label="&lightning.imipbar.btnAdd.label;"
                             tooltiptext="&lightning.imipbar.btnAdd.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipAddButton"
                             oncommand="ltnImipBar.executeAction()"
                             hidden="true"/>

              <!-- update published events and invitations -->
              <toolbarbutton id="imipUpdateButton"
                             label="&lightning.imipbar.btnUpdate.label;"
                             tooltiptext="&lightning.imipbar.btnUpdate.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipUpdateButton"
                             oncommand="ltnImipBar.executeAction()"
                             hidden="true"/>

              <!-- delete cancelled events from calendar -->
              <toolbarbutton id="imipDeleteButton"
                             label="&lightning.imipbar.btnDelete.label;"
                             tooltiptext="&lightning.imipbar.btnDelete.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipDeleteButton"
                             oncommand="ltnImipBar.executeAction()"
                             hidden="true"/>

              <!-- re-confirm partstat -->
              <toolbarbutton id="imipReconfirmButton"
                             label="&lightning.imipbar.btnReconfirm2.label;"
                             tooltiptext="&lightning.imipbar.btnReconfirm.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipReconfirmButton"
                             oncommand="ltnImipBar.executeAction()"
                             hidden="true"/>

              <!-- accept -->
              <toolbarbutton id="imipAcceptButton"
                             tooltiptext="&lightning.imipbar.btnAccept2.tooltiptext;"
                             label="&lightning.imipbar.btnAccept.label;"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('ACCEPTED');"
                             type="menu-button"
                             class="imip-button toolbarbutton-1 msgHeaderView-button imipAcceptButton"
                             hidden="true">
                <menupopup id="imipAcceptDropdown">
                  <menuitem id="imipAcceptButton_Accept"
                            tooltiptext="&lightning.imipbar.btnAccept2.tooltiptext;"
                            label="&lightning.imipbar.btnAccept.label;"
                            oncommand="ltnImipBar.executeAction('ACCEPTED');"/>
                  <menuitem id="imipAcceptButton_Tentative"
                            tooltiptext="&lightning.imipbar.btnTentative2.tooltiptext;"
                            label="&lightning.imipbar.btnTentative.label;"
                            oncommand="ltnImipBar.executeAction('TENTATIVE');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- accept recurrences -->
              <toolbarbutton id="imipAcceptRecurrencesButton"
                             tooltiptext="&lightning.imipbar.btnAcceptRecurrences2.tooltiptext;"
                             label="&lightning.imipbar.btnAcceptRecurrences.label;"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('ACCEPTED');"
                             type="menu-button"
                             class="imip-button toolbarbutton-1 msgHeaderView-button imipAcceptRecurrencesButton"
                             hidden="true">
                <menupopup id="imipAcceptRecurrencesDropdown">
                  <menuitem id="imipAcceptRecurrencesButton_Accept"
                            tooltiptext="&lightning.imipbar.btnAcceptRecurrences2.tooltiptext;"
                            label="&lightning.imipbar.btnAcceptRecurrences.label;"
                            oncommand="ltnImipBar.executeAction('ACCEPTED');"/>
                  <menuitem id="imipAcceptRecurrencesButton_Tentative"
                            tooltiptext="&lightning.imipbar.btnTentativeRecurrences2.tooltiptext;"
                            label="&lightning.imipbar.btnTentativeRecurrences.label;"
                            oncommand="ltnImipBar.executeAction('TENTATIVE');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- tentative; should only be used, if no imipMoreButton is used and
                 - imipDeclineButton/imipAcceptButton have no visible menuitems //-->
              <toolbarbutton id="imipTentativeButton"
                             label="&lightning.imipbar.btnTentative.label;"
                             tooltiptext="&lightning.imipbar.btnTentative2.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipTentativeButton"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('TENTATIVE');"
                             type="menu-button"
                             hidden="true">
                <menupopup id="imipTentativeDropdown">
                  <menuitem id="imipTentativeButton_Tentative"
                            tooltiptext="&lightning.imipbar.btnTentative2.tooltiptext;"
                            label="&lightning.imipbar.btnTentative.label;"
                            oncommand="ltnImipBar.executeAction('TENTATIVE');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- tentative recurrences; should only be used, if no imipMoreButton is used and
                 - imipDeclineRecurrencesButton/imipAcceptRecurrencesButton have no visible menuitems //-->
              <toolbarbutton id="imipTentativeRecurrencesButton"
                             label="&lightning.imipbar.btnTentativeRecurrences.label;"
                             tooltiptext="&lightning.imipbar.btnTentativeRecurrences2.tooltiptext;"
                             class="toolbarbutton-1 msgHeaderView-button imipTentativeRecurrencesButton"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('TENTATIVE');"
                             type="menu-button"
                             hidden="true">
                <menupopup id="imipTentativeRecurrencesDropdown">
                  <menuitem id="imipTentativeRecurrencesButton_Tentative"
                            tooltiptext="&lightning.imipbar.btnTentativeRecurrences2.tooltiptext;"
                            label="&lightning.imipbar.btnTentativeRecurrences.label;"
                            oncommand="ltnImipBar.executeAction('TENTATIVE');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- decline -->
              <toolbarbutton id="imipDeclineButton"
                             tooltiptext="&lightning.imipbar.btnDecline2.tooltiptext;"
                             label="&lightning.imipbar.btnDecline.label;"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('DECLINED');"
                             type="menu-button"
                             class="toolbarbutton-1 msgHeaderView-button imipDeclineButton"
                             hidden="true">
                <menupopup id="imipDeclineDropdown">
                  <menuitem id="imipDeclineButton_Decline"
                            tooltiptext="&lightning.imipbar.btnDecline2.tooltiptext;"
                            label="&lightning.imipbar.btnDecline.label;"
                            oncommand="ltnImipBar.executeAction('DECLINED');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- decline recurrences -->
              <toolbarbutton id="imipDeclineRecurrencesButton"
                             tooltiptext="&lightning.imipbar.btnDeclineRecurrences2.tooltiptext;"
                             label="&lightning.imipbar.btnDeclineRecurrences.label;"
                             oncommand="if (event.target.id == this.id) ltnImipBar.executeAction('DECLINED');"
                             type="menu-button"
                             class="toolbarbutton-1 msgHeaderView-button imipDeclineRecurrencesButton"
                             hidden="true">
                <menupopup id="imipDeclineRecurrencesDropdown">
                  <menuitem id="imipDeclineRecurrencesButton_DeclineAll"
                            tooltiptext="&lightning.imipbar.btnDeclineRecurrences2.tooltiptext;"
                            label="&lightning.imipbar.btnDeclineRecurrences.label;"
                            oncommand="ltnImipBar.executeAction('DECLINED');"/>
                  <!-- add here more menuitem as needed -->
                </menupopup>
              </toolbarbutton>

              <!-- more options -->
              <toolbarbutton id="imipMoreButton"
                             type="menu"
                             tooltiptext="&lightning.imipbar.btnMore.tooltiptext;"
                             label="&lightning.imipbar.btnMore.label;"
                             class="toolbarbutton-1 msgHeaderView-button imipMoreButton"
                             hidden="true">
                <menupopup id="imipMoreDropdown">
                  <!-- add here a menuitem as needed -->
                </menupopup>
              </toolbarbutton>
            </toolbar>
          </toolbox>
        </lightning-notification-bar>
      </vbox>
    </vbox>
</overlay>