<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Sun Microsystems code.
   -
   - The Initial Developer of the Original Code is Sun Microsystems.
   - Portions created by the Initial Developer are Copyright (C) 2006
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Michael Buettner <michael.buettner@sun.com>
   -   Simon Vaillancourt <simon.at.orcl@gmail.com>   
   -   Stefan Sitter <ssitter@gmail.com>
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

<?xml-stylesheet type="text/css" href="chrome://global/skin/global.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/skin/calendar-event-dialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/content/calendar-event-dialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/content/datetimepickers/datetimepickers.css"?>

<!DOCTYPE dialog [
  <!ENTITY % dtd1 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd1;
  <!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd" > %dtd2;
]>

<dialog id="calendar-event-dialog-attendees-v2"
        title="&invite.title.label;"
        windowtype="Calendar:EventDialog:Attendees"
        onload="onLoad()"
        ondialogaccept="return onAccept();"
        ondialogcancel="return onCancel();"
        persist="screenX screenY height width"
        orient="vertical"
        style="padding-top: 8px; padding-bottom: 10px; -moz-padding-start: 8px; -moz-padding-end: 10px;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <!-- Javascript includes -->
  <script type="application/javascript" src="chrome://calendar/content/calendar-event-dialog-attendees.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-statusbar.js"/>
  <script type="application/javascript" src="chrome://calendar/content/calendar-ui-utils.js"/>

  <hbox align="center" pack="end">
    <spacer flex="1"/>
    <label value="&event.freebusy.suggest.slot;"/>
    <button label="&event.freebusy.previous.slot;"
            dir="normal"
            class="left-icon"
            id="previous-slot"
            oncommand="onPreviousSlot();"/>
    <button label="&event.freebusy.next.slot;"
            dir="reverse"
            class="right-icon"
            id="next-slot"
            oncommand="onNextSlot();"/>
    <spacer style="width: 10em"/>
    <label value="&event.freebusy.zoom;" control="zoom-menulist"/>
    <toolbarbutton id="zoom-out-button"
                   class="zoom-out-icon"
                   oncommand="zoomWithButtons(true);"/>
    <menulist id="zoom-menulist"
              oncommand="setZoomFactor(this.value);"
              persist="value">
      <menupopup>
        <menuitem label="400%" value="25"/>
        <menuitem label="200%" value="50"/>
        <menuitem label="100%" value="100"/>
        <menuitem label="50%" value="200"/>
        <menuitem label="25%" value="400"/>
      </menupopup>
    </menulist>
    <toolbarbutton id="zoom-in-button"
                   class="zoom-in-icon"
                   oncommand="zoomWithButtons(false);"/>
  </hbox>
  <hbox flex="1">
    <vbox id="attendees-container" flex="1" persist="width">
      <box class="attendee-spacer-top"/>
      <attendees-list flex="1" id="attendees-list"/>
      <box class="attendee-spacer-bottom"/>
    </vbox>
    <splitter id="splitter"/>
    <vbox id="freebusy-container" persist="width">
      <stack flex="1">
        <vbox flex="1">
          <freebusy-timebar id="timebar"
                            range="16"/>
          <freebusy-grid flex="1"
                         id="freebusy-grid"
                         range="16"/>
        </vbox>
        <selection-bar id="selection-bar"
                       range="16"/>
      </stack>
      <scrollbar orient="horizontal"
                 id="horizontal-scrollbar"
                 maxpos="100"/>
    </vbox>
    <vbox
         id="vertical-scrollbar-box"
         collapsed="true">
      <box class="attendee-spacer-top"/>
      <scrollbar orient="vertical"
                 flex="1"
                 id="vertical-scrollbar"
                 maxpos="100"/>
      <box class="attendee-spacer-bottom"/>
    </vbox>
  </hbox>
  <hbox>
    <vbox>
      <hbox>
        <grid>
          <columns>
            <column/><!-- role icon -->
            <column/><!-- role description -->
            <column/><!-- status color -->
            <column/><!-- status description -->
            <column/><!-- status color -->
            <column/><!-- status description -->
          </columns>
          <rows>
            <row align="center">
              <image class="role-icon" role="REQ-PARTICIPANT"/>
              <label value="&event.attendee.role.required;"/>
              <box class="legend" status="FREE"/>
              <label value="&event.freebusy.legend.free;"/>
              <box class="legend" status="UNKNOWN"/>
              <label value="&event.freebusy.legend.unknown;"/>
            </row>
            <row align="center">
              <image class="role-icon" role="OPT-PARTICIPANT"/>
              <label value="&event.attendee.role.optional;"/>
              <box class="legend" status="BUSY_TENTATIVE"/>
              <label value="&event.freebusy.legend.busy_tentative;"/>
            </row>
            <row align="center">
              <image class="role-icon" role="CHAIR"/>
              <label value="&event.attendee.role.chair;"/>
              <box class="legend" status="BUSY"/>
              <label value="&event.freebusy.legend.busy;"/>
            </row>
            <row align="center">
              <image class="role-icon" role="NON-PARTICIPANT"/>
              <label value="&event.attendee.role.nonparticipant;"/>
              <box class="legend" status="BUSY_UNAVAILABLE"/>
              <label value="&event.freebusy.legend.busy_unavailable;"/>
            </row>
          </rows>
        </grid>
      </hbox>
      <hbox align="center">
          <button label="&event.freebusy.minus;" oncommand="onMinus();"/>
          <button label="&event.freebusy.plus;"  oncommand="onPlus();"/>
          <spacer/>
          <label value="&event.organizer.label;"
                 collapsed="true"
                 disabled="true"
                 control="event-organizer"/>
          <textbox id="event-organizer"
                   collapsed="true"
                   disabled="true"
                   flex="true"/>
      </hbox>
    </vbox>
    <spacer flex="1"/>
    <vbox>
      <grid>
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="center">
            <spacer/>
            <checkbox id="all-day"
                      oncommand="changeAllDay();"
                      label="&event.alldayevent.label;"/>
          </row>
          <row align="center">
            <label value="&newevent.from.label;" control="event-starttime"/>
            <datetimepicker id="event-starttime"
                            onchange="updateStartTime();"/>
            <label id="timezone-starttime"
                   crop="right"
                   class="text-link"
                   flex="1"
                   collapsed="true"
                   hyperlink="true"
                   onclick="editStartTimezone()"/>
          </row>
          <row align="center">
            <label value="&newevent.to.label;" control="event-endtime"/>
            <datetimepicker id="event-endtime"
                            onchange="updateEndTime();"/>
            <label id="timezone-endtime"
                   crop="right"
                   class="text-link"
                   flex="1"
                   collapsed="true"
                   hyperlink="true"
                   onclick="editEndTimezone()"/>
          </row>
        </rows>
      </grid>
    </vbox>
  </hbox>
  <separator class="groove"/>
</dialog>
