calendar/base/content/dialogs/calendar-summary-dialog.xul
author makemyday@gmx-topmail.de
Fri, 16 Sep 2016 11:02:38 +0200
changeset 25214 8f54e69715f50f817ced01988d8b1b236956d093
parent 25109 33a058a610941ba5497c80461047a524e5374f45
child 26843 b746917d68d56a6067ce7159f96be8520b5f213e
permissions -rw-r--r--
Bug 1297449 - Event edit dialog is unusable with a long attendee list;r=paenglab;a=philipp

<?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://calendar/skin/calendar-event-dialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/skin/common/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"?>

<!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()"
        ondialogaccept="return onAccept();"
        ondialogcancel="return onCancel();"
        onresize="rearrangeAttendees();"
        persist="screenX screenY width height"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <!-- 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/calUtils.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"/>

  <!-- General -->
  <box id="item-general-box" orient="vertical">
    <calendar-caption label="&read.only.general.label;"/>
    <box orient="horizontal">
      <spacer class="default-spacer"/>
      <grid flex="1">
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="top">
            <label value="&read.only.title.label;" class="headline"/>
            <label id="item-title" crop="end"/>
          </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="start"/>
          <row class="item-date-row"
               id="item-end-row"
               mode="end"
               taskDueLabel="&read.only.task.due.label;"
               eventEndLabel="&read.only.event.end.label;"
               align="start"/>
          <row id="repeat-row" align="top" hidden="true">
            <label value="&read.only.repeat.label;" class="headline"/>
            <box id="repeat-details" orient="vertical">
              <label/>
            </box>
          </row>
          <row id="location-row" align="top" hidden="true">
            <label value="&read.only.location.label;" class="headline"/>
            <label id="item-location" crop="end"/>
          </row>
          <row id="category-row" align="top" hidden="true">
            <label value="&read.only.category.label;" class="headline"/>
            <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;" class="headline"/>
            <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;" class="headline"/>
            <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="invitation-row" hidden="true" align="center">
            <label value="&read.only.reply.label;" control="item-participation"/>
            <hbox pack="start">
              <menulist id="item-participation" oncommand="updatePartStat()">
                <menupopup>
                  <menuitem label="&read.only.accept.label;" value="ACCEPTED"/>
                  <menuitem label="&read.only.tentative.label;" value="TENTATIVE"/>
                  <menuitem label="&read.only.decline.label;" value="DECLINED"/>
                  <menuitem label="&read.only.needs.action.label;" value="NEEDS-ACTION"
                            hidden="true" id="item-participation-needs-action"/>
                </menupopup>
              </menulist>
            </hbox>
          </row>
          <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"
                         hidden="true"
                         value="&event.reminder.multiple.label;"
                         class="text-link"
                         disable-on-readonly="true"
                         flex="1"
                         hyperlink="true"
                         onclick="updateReminder()"/>
                  <label id="reminder-single-alarms-label"
                         hidden="true"
                         class="text-link"
                         disable-on-readonly="true"
                         flex="1"
                         hyperlink="true"
                         onclick="updateReminder()"/>
                </hbox>
             </hbox>
          </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"/>
    <calendar-caption label="&read.only.attendees.label;"
                      control="item-attendees-box"/>
    <vbox id="item-attendees-box" flex="1">
      <spacer class="default-spacer"/>
    </vbox>
  </box>

  <!-- Description -->
  <box id="item-description-box" hidden="true" orient="vertical" flex="1">
    <spacer class="default-spacer"/>
    <calendar-caption label="&read.only.description.label;"
                      control="item-description"/>
    <box orient="horizontal" flex="1">
      <spacer class="default-spacer"/>
      <textbox id="item-description"
               multiline="true"
               rows="6"
               flex="1"/>
    </box>
  </box>

  <!-- URL link -->
  <box id="event-grid-link-row" hidden="true" orient="vertical">
    <spacer class="default-spacer"/>
    <calendar-caption label="&read.only.link.label;"
                      control="url-link"/>
    <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>