Bug 1598050 - Restructure all <xul:dialog> usages such that they are not the top level element in calendar/. r=pmorris
<?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/.
-->
<?xml-stylesheet type="text/css" href="chrome://global/skin/global.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar-common/skin/calendar-alarms.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar-common/skin/calendar-attendees.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/input-fields.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/skin/calendar-event-dialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar-common/skin/dialogs/calendar-event-dialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/primaryToolbar.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/messenger.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/content/calendar-summary-dialog.css"?>
<!DOCTYPE window [
<!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd" >
<!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" >
<!ENTITY % dialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd" >
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%globalDTD;
%calendarDTD;
%dialogDTD;
%brandDTD;
]>
<!-- Dialog id is changed during execution to allow different Window-icons
on this dialog. document.loadOverlay() will not work on this one. -->
<window windowtype="Calendar:EventSummaryDialog"
onload="onLoad()"
onunload="onUnload()"
onresize="rearrangeAttendees();"
persist="screenX screenY width height"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml">
<dialog id="calendar-summary-dialog">
<!-- Javascript includes -->
<script src="chrome://global/content/globalOverlay.js"/>
<script src="chrome://global/content/editMenuOverlay.js"/>
<script src="chrome://calendar/content/calendar-summary-dialog.js"/>
<script src="chrome://calendar/content/calendar-dialog-utils.js"/>
<script src="chrome://calendar/content/calendar-ui-utils.js"/>
<script src="chrome://calendar/content/calendar-item-editing.js"/>
<script src="chrome://calendar/content/calApplicationUtils.js"/>
<script src="chrome://calendar/content/calendar-item-bindings.js"/>
<toolbox id="summary-toolbox"
class="mail-toolbox"
mode="full"
defaultmode="full"
iconsize="small"
defaulticonsize="small"
labelalign="end"
defaultlabelalign="end">
<toolbar id="summary-toolbar"
toolboxid="summary-toolbox"
class="chromeclass-toolbar"
customizable="false"
labelalign="end"
defaultlabelalign="end">
<toolbarbutton id="saveandcloseButton"
tooltiptext="&summary.dialog.saveclose.tooltiptext;"
label="&summary.dialog.saveclose.label;"
oncommand="saveAndClose('NONE');"
class="cal-event-toolbarbutton toolbarbutton-1 saveandcloseButton"/>
<toolbarbutton is="toolbarbutton-menu-button" id="acceptButton"
type="menu-button"
tooltiptext="&summary.dialog.accept.tooltiptext;"
label="&summary.dialog.accept.label;"
oncommand="reply('AUTO', 'ACCEPTED');"
class="cal-event-toolbarbutton toolbarbutton-1 replyButton">
<menupopup id="acceptDropdown">
<menuitem id="acceptButton_Send"
tooltiptext="&summary.dialog.send.tooltiptext;"
label="&summary.dialog.send.label;"
oncommand="reply('AUTO', 'ACCEPTED'); event.stopPropagation();"/>
<menuitem id="acceptButton_DontSend"
tooltiptext="&summary.dialog.dontsend.tooltiptext;"
label="&summary.dialog.dontsend.label;"
oncommand="reply('NONE', 'ACCEPTED'); event.stopPropagation();"/>
</menupopup>
</toolbarbutton>
<toolbarbutton is="toolbarbutton-menu-button" id="tentativeButton"
type="menu-button"
tooltiptext="&summary.dialog.tentative.tooltiptext;"
label="&summary.dialog.tentative.label;"
oncommand="reply('AUTO', 'TENTATIVE');"
class="cal-event-toolbarbutton toolbarbutton-1 replyButton">
<menupopup id="tentativeDropdown">
<menuitem id="tenatativeButton_Send"
tooltiptext="&summary.dialog.send.tooltiptext;"
label="&summary.dialog.send.label;"
oncommand="reply('AUTO', 'TENTATIVE'); event.stopPropagation();"/>
<menuitem id="tenativeButton_DontSend"
tooltiptext="&summary.dialog.dontsend.tooltiptext;"
label="&summary.dialog.dontsend.label;"
oncommand="reply('NONE', 'TENTATIVE'); event.stopPropagation();"/>
</menupopup>
</toolbarbutton>
<toolbarbutton is="toolbarbutton-menu-button" id="declineButton"
type="menu-button"
tooltiptext="&summary.dialog.decline.tooltiptext;"
label="&summary.dialog.decline.label;"
oncommand="reply('AUTO', 'DECLINED');"
class="cal-event-toolbarbutton toolbarbutton-1 replyButton">
<menupopup id="declineDropdown">
<menuitem id="declineButton_Send"
tooltiptext="&summary.dialog.send.tooltiptext;"
label="&summary.dialog.send.label;"
oncommand="reply('AUTO', 'DECLINED'); event.stopPropagation();"/>
<menuitem id="declineButton_DontSend"
tooltiptext="&summary.dialog.dontsend.tooltiptext;"
label="&summary.dialog.dontsend.label;"
oncommand="reply('NONE', 'DECLINED'); event.stopPropagation();"/>
</menupopup>
</toolbarbutton>
</toolbar>
</toolbox>
<hbox id="status-notifications">
<!-- notificationbox will be added here lazily. -->
</hbox>
<!-- General -->
<box id="item-general-box" orient="vertical">
<hbox id="item-general-caption" class="calendar-caption" align="center">
<label value="&read.only.general.label;" class="header"/>
<separator class="groove" flex="1"/>
</hbox>
<hbox flex="1" class="calendar-summary-box">
<html:table class="calendar-summary-table">
<html:tr>
<html:th>
&read.only.title.label;
</html:th>
<html:td>
<html:input id="item-title"
class="selectable-label plain input-inline"
readonly="readonly"/>
</html:td>
</html:tr>
<html:tr>
<html:th>
&read.only.calendar.label;
</html:th>
<html:td>
<html:input id="item-calendar"
class="selectable-label plain input-inline"
readonly="readonly"/>
</html:td>
</html:tr>
<html:tr class="item-date-row">
<html:th>
<label id="item-start-row-label"
taskStartLabel="&read.only.task.start.label;"
eventStartLabel="&read.only.event.start.label;"
control="item-date-row-start-date"/>
</html:th>
<html:td>
<html:input is="calendar-item-date-input" id="item-date-row-start-date"
class="selectable-label plain input-inline"
readonly="readonly"
mode="start"/>
</html:td>
</html:tr>
<html:tr class="item-date-row">
<html:th>
<label id="item-due-row-label"
taskDueLabel="&read.only.task.due.label;"
eventEndLabel="&read.only.event.end.label;"
control="item-date-row-end-date"/>
</html:th>
<html:td>
<html:input is="calendar-item-date-input" id="item-date-row-end-date"
class="selectable-label plain input-inline"
readonly="readonly"
mode="end"/>
</html:td>
</html:tr>
<html:tr id="repeat-row" hidden="hidden">
<html:th>
&read.only.repeat.label;
</html:th>
<html:td>
<box id="repeat-details" orient="vertical">
<html:input readonly="readonly" class="selectable-label plain input-inline"/>
</box>
</html:td>
</html:tr>
<html:tr id="location-row" hidden="hidden">
<html:th for="item-location">
&read.only.location.label;
</html:th>
<html:td>
<html:input id="item-location"
class="selectable-label plain input-inline"
readonly="readonly"/>
</html:td>
</html:tr>
<html:tr id="category-row" hidden="hidden">
<html:th>
&read.only.category.label;
</html:th>
<html:td>
<label id="item-category"/>
</html:td>
</html:tr>
<html:tr id="organizer-row" class="item-attendees-row" hidden="hidden">
<html:th>
&read.only.organizer.label;
</html:th>
<html:td>
<hbox class="item-organizer-cell">
<img class="itip-icon"/>
<label id="item-organizer"
class="text-link item-attendees-cell-label"
crop="end"
onclick="sendMailToOrganizer()"/>
<spacer flex="1"/>
</hbox>
</html:td>
</html:tr>
<html:tr id="status-row" hidden="hidden">
<html:th>
&task.status.label;
</html:th>
<html:td id="status-row-td">
<label value="&newevent.status.tentative.label;" hidden="true" status="TENTATIVE"/>
<label value="&newevent.status.confirmed.label;" hidden="true" status="CONFIRMED"/>
<label value="&newevent.eventStatus.cancelled.label;" hidden="true" status="CANCELLED"/>
<label value="&newevent.todoStatus.cancelled.label;" hidden="true" status="CANCELLED"/>
<label value="&newevent.status.needsaction.label;" hidden="true" status="NEEDS-ACTION"/>
<label value="&newevent.status.inprogress.label;" hidden="true" status="IN-PROCESS"/>
<label value="&newevent.status.completed.label;" hidden="true" status="COMPLETED"/>
</html:td>
</html:tr>
<separator id="item-main-separator" class="groove" flex="1" hidden="true"/>
<html:tr id="reminder-row" hidden="hidden">
<html:th for="item-alarm">
&read.only.reminder.label;
</html:th>
<html:td>
<hbox id="event-grid-alarm-picker-box"
align="center">
<menulist id="item-alarm"
disable-on-readonly="true"
oncommand="updateReminder()">
<menupopup id="item-alarm-menupopup">
<menuitem id="reminder-none-menuitem"
label="&event.reminder.none.label;"
selected="true"
value="none"/>
<menuseparator id="reminder-none-separator"/>
<menuitem id="reminder-0minutes-menuitem"
label="&event.reminder.0minutes.before.label;"
length="0"
origin="before"
relation="START"
unit="minutes"/>
<menuitem id="reminder-5minutes-menuitem"
label="&event.reminder.5minutes.before.label;"
length="5"
origin="before"
relation="START"
unit="minutes"/>
<menuitem id="reminder-15minutes-menuitem"
label="&event.reminder.15minutes.before.label;"
length="15"
origin="before"
relation="START"
unit="minutes"/>
<menuitem id="reminder-30minutes-menuitem"
label="&event.reminder.30minutes.before.label;"
length="30"
origin="before"
relation="START"
unit="minutes"/>
<menuseparator id="reminder-minutes-separator"/>
<menuitem id="reminder-1hour-menuitem"
label="&event.reminder.1hour.before.label;"
length="1"
origin="before"
relation="START"
unit="hours"/>
<menuitem id="reminder-2hours-menuitem"
label="&event.reminder.2hours.before.label;"
length="2"
origin="before"
relation="START"
unit="hours"/>
<menuitem id="reminder-12hours-menuitem"
label="&event.reminder.12hours.before.label;"
length="12"
origin="before"
relation="START"
unit="hours"/>
<menuseparator id="reminder-hours-separator"/>
<menuitem id="reminder-1day-menuitem"
label="&event.reminder.1day.before.label;"
length="1"
origin="before"
relation="START"
unit="days"/>
<menuitem id="reminder-2days-menuitem"
label="&event.reminder.2days.before.label;"
length="2"
origin="before"
relation="START"
unit="days"/>
<menuitem id="reminder-1week-menuitem"
label="&event.reminder.1week.before.label;"
length="7"
origin="before"
relation="START"
unit="days"/>
<menuseparator id="reminder-custom-separator"/>
<menuitem id="reminder-custom-menuitem"
label="&event.reminder.custom.label;"
value="custom"/>
</menupopup>
</menulist>
<hbox id="reminder-details">
<hbox id="reminder-icon-box"
class="alarm-icons-box"
align="center"/>
<!-- TODO oncommand? onkeypress? -->
<label id="reminder-multiple-alarms-label"
class="text-link"
hidden="true"
value="&event.reminder.multiple.label;"
disable-on-readonly="true"
flex="1"
hyperlink="true"
onclick="updateReminder()"/>
<label id="reminder-single-alarms-label"
class="text-link"
hidden="true"
disable-on-readonly="true"
flex="1"
hyperlink="true"
onclick="updateReminder()"/>
</hbox>
</hbox>
</html:td>
</html:tr>
<html:tr id="attachments-row" class="item-attachments-row" hidden="hidden" >
<html:th for="item-attachment-cell">
&read.only.attachments.label;
</html:th>
<html:td>
<vbox id="item-attachment-cell">
<!-- attachment box template -->
<hbox id="attachment-template"
hidden="true"
align="center"
disable-on-readonly="true">
<image class="attachment-icon"/>
<label class="text-link item-attachment-cell-label"
onclick="openAttachment(this.getAttribute('hashid'), event)"
crop="end"
flex="1" />
</hbox>
</vbox>
</html:td>
</html:tr>
</html:table>
</hbox>
</box>
<!-- attendee box template -->
<vbox id="item-attendees-box-template">
<hbox flex="1" class="item-attendees-row" equalsize="always" hidden="true">
<box class="item-attendees-cell" hidden="true" flex="1">
<img class="itip-icon"/>
<label class="item-attendees-cell-label" crop="end" flex="1"/>
</box>
<box hidden="true" flex="1"/>
</hbox>
</vbox>
<!-- Attendees -->
<box id="item-attendees" orient="vertical" hidden="true" flex="1">
<spacer class="default-spacer"/>
<hbox id="item-attendees-caption" class="calendar-caption" align="center">
<label value="&read.only.attendees.label;"
control="item-attendees-box" class="header"/>
<separator class="groove" flex="1"/>
</hbox>
<vbox id="item-attendees-box" flex="1" />
</box>
<!-- Description -->
<box id="item-description-box" hidden="true" orient="vertical" flex="1">
<spacer class="default-spacer"/>
<hbox id="item-description-caption" class="calendar-caption" align="center">
<label value="&read.only.description.label;"
control="item-description" class="header"/>
<separator class="groove" flex="1"/>
</hbox>
<hbox id="item-description-wrapper" flex="1">
<html:textarea id="item-description" rows="6" flex="1"/>
</hbox>
</box>
<!-- URL link -->
<box id="event-grid-link-row" hidden="true" orient="vertical">
<spacer class="default-spacer"/>
<hbox id="event-grid-link-caption" class="calendar-caption" align="center">
<label value="&read.only.link.label;"
control="url-link" class="header"/>
<separator class="groove" flex="1"/>
</hbox>
<label id="url-link"
class="text-link default-indent"
onclick="launchBrowser(this.getAttribute('href'), event)"
oncommand="launchBrowser(this.getAttribute('href'), event)"
crop="end"/>
</box>
</dialog>
</window>