calendar/base/content/dialogs/calendar-summary-dialog.xul
author Geoff Lankow <geoff@darktrojan.net>
Fri, 15 Mar 2019 16:25:27 +1300
changeset 26102 11f46ea9ea725e9ca1734c99653de83b18d68e3f
parent 26024 994cd1a152ed9637e38686000b0dc3409a80855f
child 26110 34babfc74629df3f92a65b6817634e3b3a0fca2e
permissions -rw-r--r--
Bug 1532595 - Fix display of textareas in calendar. r=Paenglab

<?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://messenger/content/bindings.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://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://calendar/content/datetimepickers/datetimepickers.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/content/calendar-bindings.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/primaryToolbar.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/messenger.css"?>

<!DOCTYPE dialog [
  <!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 excution to allow different Window-icons
     on this dialog. document.loadOverlay() will not work on this one. -->
<dialog id="calendar-summary-dialog"
        windowtype="Calendar:EventSummaryDialog"
        onload="onLoad()"
        onunload="onUnload()"
        ondialogaccept="return onAccept();"
        ondialogcancel="return onCancel();"
        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">

  <!-- Javascript includes -->
  <script type="application/javascript"
          src="chrome://calendar/content/calendar-summary-dialog.js"/>
  <script type="application/javascript"
          src="chrome://calendar/content/calendar-dialog-utils.js"/>
  <script type="application/javascript"
          src="chrome://calendar/content/calendar-ui-utils.js"/>
  <script type="application/javascript"
          src="chrome://calendar/content/calendar-item-editing.js"/>
  <script type="application/javascript"
          src="chrome://calendar/content/calApplicationUtils.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();"
                     class="cal-event-toolbarbutton toolbarbutton-1 saveandcloseButton"/>
      <toolbarbutton id="acceptButton"
                     tooltiptext="&summary.dialog.accept.tooltiptext;"
                     label="&summary.dialog.accept.label;"
                     oncommand="if (event.target.id == this.id) reply('AUTO', 'ACCEPTED');"
                     value="ACCEPTED"
                     type="menu-button"
                     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');"/>
          <menuitem id="acceptButton_DontSend"
                    tooltiptext="&summary.dialog.dontsend.tooltiptext;"
                    label="&summary.dialog.dontsend.label;"
                    oncommand="reply('NONE', 'ACCEPTED');"/>
        </menupopup>
      </toolbarbutton>
      <toolbarbutton id="tentativeButton"
                     tooltiptext="&summary.dialog.tentative.tooltiptext;"
                     label="&summary.dialog.tentative.label;"
                     oncommand="if (event.target.id == this.id) reply('AUTO', 'TENTATIVE');"
                     value="TENTATIVE"
                     type="menu-button"
                     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');"/>
          <menuitem id="tenativeButton_DontSend"
                    tooltiptext="&summary.dialog.dontsend.tooltiptext;"
                    label="&summary.dialog.dontsend.label;"
                    oncommand="reply('NONE', 'TENTATIVE');"/>
        </menupopup>
      </toolbarbutton>
      <toolbarbutton id="declineButton"
                     tooltiptext="&summary.dialog.decline.tooltiptext;"
                     label="&summary.dialog.decline.label;"
                     oncommand="if (event.target.id == this.id) reply('AUTO', 'DECLINED');"
                     type="menu-button"
                     value="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');"/>
          <menuitem id="declineButton_DontSend"
                    tooltiptext="&summary.dialog.dontsend.tooltiptext;"
                    label="&summary.dialog.dontsend.label;"
                    oncommand="reply('NONE', 'DECLINED');"/>
        </menupopup>
      </toolbarbutton>
    </toolbar>
  </toolbox>

  <notificationbox id="status-notification"/>

  <!-- 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>
    <box orient="horizontal">
      <grid flex="1">
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="center">
            <label value="&read.only.title.label;"/>
            <textbox id="item-title" class="selectable-label plain" readonly="true"/>
          </row>
          <row align="center">
            <label value="&read.only.calendar.label;"/>
            <textbox id="item-calendar" class="selectable-label plain" readonly="true"/>
          </row>
          <row class="item-date-row"
               id="item-start-row"
               mode="start"
               taskStartLabel="&read.only.task.start.label;"
               eventStartLabel="&read.only.event.start.label;"
               align="center"/>
          <row class="item-date-row"
               id="item-end-row"
               mode="end"
               taskDueLabel="&read.only.task.due.label;"
               eventEndLabel="&read.only.event.end.label;"
               align="center"/>
          <row id="repeat-row" align="top" hidden="true">
            <label value="&read.only.repeat.label;"/>
            <box id="repeat-details" orient="vertical">
              <textbox readonly="true" class="selectable-label plain"/>
            </box>
          </row>
          <row id="location-row" align="center" hidden="true">
            <label value="&read.only.location.label;"/>
            <textbox id="item-location" class="selectable-label plain" readonly="true"/>
          </row>
          <row id="category-row" align="top" hidden="true">
            <label value="&read.only.category.label;"/>
            <label id="item-category" crop="end"/>
          </row>
          <row id="organizer-row" align="top" hidden="true" class="item-attendees-row">
            <label value="&read.only.organizer.label;"/>
            <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>
          </row>
          <row id="status-row" align="top" hidden="true">
            <label value="&task.status.label;"/>
            <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"/>
          </row>
          <separator id="item-main-separator" flex="1" class="groove" hidden="true"/>
          <row id="reminder-row" hidden="true" align="center">
            <label value="&read.only.reminder.label;" control="item-alarm"/>
            <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>
          </row>
          <row id="attachments-row"
               align="top"
               hidden="true"
               class="item-attachments-row">
            <label value="&read.only.attachments.label;"
                   control="item-attachment-cell" />
            <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>
          </row>
        </rows>
      </grid>
    </box>
  </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>