<?xml version='1.0' standalone='yes'?>
<!DOCTYPE var:component>
<var:component
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:var="http://www.skyrix.com/od/binding"
  xmlns:const="http://www.skyrix.com/od/constant"
  xmlns:uix="OGo:uix"
  xmlns:rsrc="OGo:url"
  xmlns:label="OGo:label"
  className="UIxPageFrame"
  const:popup="YES"
  title="name"
  var:toolbar="toolbar"
  const:cssFiles="datepicker.css,SOGoTimePicker.css,UIxComponentEditor.css"
  const:jsFiles="datepicker.js,UIxComponentEditor.js,SOGoAutoCompletion.js,SOGoTimePicker.js">

  <script type="text/javascript">
    var activeCalendar = '<var:string value="componentCalendar.nameInContainer"/>';
    var activeComponent = '<var:if condition="isChildOccurence"><var:string value="clientObject.container.nameInContainer"/>/</var:if><var:string value="clientObject.nameInContainer"/>';
    var readOnly = <var:if condition="eventIsReadOnly">true</var:if><var:if condition="eventIsReadOnly"
    const:negate="YES">false</var:if>;
    var attendees = <var:string value="jsonAttendees" const:escapeHTML="NO"/>;
    var ownerLogin = '<var:string value="ownerLogin"/>';
    var emailAlarmsEnabled = <var:string value="emailAlarmsEnabled"/>;
    var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
    <var:if condition="eventIsReadOnly" const:negate="YES"
	    ><var:if condition="hasOrganizer">var organizer = <var:string value="jsonOrganizer" const:escapeHTML="NO"/>;</var:if
	    >var owners = <var:string value="calendarOwnerList.jsonRepresentation" const:escapeHTML="NO"/>;</var:if
  ></script>

  <var:if condition="eventIsReadOnly" const:negate="YES">
  <div class="menu" id="classification-menu">
    <ul id="itemClassificationList" class="choiceMenu">
      <var:foreach list="classificationClasses" item="item">
	<li var:classification="item"><var:string
	    var:value="itemClassificationText" /></li>
      </var:foreach>
    </ul>
  </div>

  <form var:href="saveURL" name="editform">
    <div id="eventView">
      <label><var:string label:value="Title" /><span class="content"
          ><input type="text" name="summary" id="summary"
            class="textField"
            var:value="title"
            /></span></label>
      <label><var:string label:value="Location" /><span class="content"
          ><input type="text" name="location" id="location"
            class="textField"
            var:value="location"
            /></span></label>
      <span class="checkBoxList"><var:string label:value="Category" />
        <span class="content"><var:popup const:id="categoryList"
	    list="categoryList" item="item"
            label:noSelectionString="category_none"
            string="item" selection="category"
            /> <var:string label:value="Calendar" />
          <var:popup const:id="calendarList"
	    var:disabled="isChildOccurence"
	    list="calendarList" item="item"
            string="calendarDisplayName"
	    var:selection="componentCalendar"
	    /></span></span>
      <span class="checkBoxList"><var:string label:value="Priority" />
         <span class="content"><var:popup const:id="priorityList" list="priorities" item="item"
            label:noSelectionString="prio_0"
            string="itemPriorityText" selection="priority"/>
      </span></span>
      <var:if condition="hasOrganizer"
	><label id="organizerLabel"><var:string label:value="Organizer"
	    /><span class="content"><a var:href="organizer.email" var:email="organizer.email.rfc822Email"
              ><var:string value="organizerName" /></a
              ></span></label>
      </var:if>
      <var:if condition="hasCreatedBy"
	><label id="createdByLabel"><var:string label:value="Created by"
	    /><span class="content"><a var:href="createdByLink" var:email="createdBy"
	      ><var:string value="createdByName" /></a
	      ></span></label>
      </var:if>
      <!--<var:if condition="canBeOrganizer"
	><label id="organizerListLabel"><var:string label:value="Organizer"
	    /><span class="content"><var:popup list="organizerList"
	      item="item" string="itemOrganizerText"
	      var:selection="organizerIdentity"/>
	  </span></label></var:if>-->
      <var:component-content />
      <hr />
      <label><var:string label:value="Repeat" />
       <span class="content"><var:popup list="repeatList" item="item"
          label:noSelectionString="repeat_NEVER"
	  var:disabled="isChildOccurence"
          const:disabledValue="-"
          const:name="repeatList"
	  const:id="repeatList"
          string="itemRepeatText" var:selection="repeat"
          /> <a href="#" id="repeatHref" style="display: none;"
             ><var:string label:value="Edit"/></a></span></label>
      <hr />
      <label><var:string label:value="Reminder" />
      <span class="content"><var:popup list="reminderList" item="item"
         const:disabledValue="-"
         label:noSelectionString="reminder_NONE"
          const:name="reminderList"
	 const:id="reminderList"
         string="itemReminderText" var:selection="reminder"
         /> <a href="#" id="reminderHref" style="display: none;"
             ><var:string label:value="Edit"/></a></span></label>
      <hr />
      <label id="commentArea"><var:string label:value="Description"
	  /><span class="content"><textarea rows="20" name="comment" var:value="comment" /></span></label>
      <label id="documentLabel" style="display: none;"><var:string label:value="Document"
	  /><span class="content"
	  ><a href="#" id="documentHref"><!-- space --></a
	    ><a id="changeAttachButton" class="button" var:href="#"
	    ><span><var:string label:value="Change..."/></span></a
	    ></span></label>

      <!-- hidden -->
      <input type="hidden" name="attach" id="attach" var:value="attach"/>
      <input type="hidden" name="classification" id="classification"
	var:value="classification"/>
      <input type="hidden" name="attendees" id="attendees" />
      <input type="hidden" name="calendarFoldersList"
	id="calendarFoldersList"
	var:value="calendarsFoldersList"/>

      <input type="hidden" name="repeatType"
	id="repeatType"
	var:value="repeatType"/>
      <input type="hidden" name="repeat1"
	id="repeat1"
	var:value="repeat1"/>
      <input type="hidden" name="repeat2"
	id="repeat2"
	var:value="repeat2"/>
      <input type="hidden" name="repeat3"
	id="repeat3"
	var:value="repeat3"/>
      <input type="hidden" name="repeat4"
	id="repeat4"
	var:value="repeat4"/>
      <input type="hidden" name="repeat5"
	id="repeat5"
	var:value="repeat5"/>
      <input type="hidden" name="repeat6"
	id="repeat6"
	var:value="repeat6"/>
      <input type="hidden" name="repeat7"
	id="repeat7"
	var:value="repeat7"/>

     <input type="hidden" name="range1"
	id="range1"
	var:value="range1"/>
     <input type="hidden" name="range2"
	id="range2"
	var:value="range2"/>

     <input type="hidden" name="reminderQuantity"
	    id="reminderQuantity"
	    var:value="reminderQuantity"/>
     <input type="hidden" name="reminderUnit"
	    id="reminderUnit"
	    var:value="reminderUnit"/>
     <input type="hidden" name="reminderRelation"
	    id="reminderRelation"
	    var:value="reminderRelation"/>
     <input type="hidden" name="reminderReference"
	    id="reminderReference"
	    var:value="reminderReference"/>
     <input type="hidden" name="reminderAction"
	    id="reminderAction"
	    var:value="reminderAction"/>
     <input type="hidden" name="reminderEmailOrganizer"
	    id="reminderEmailOrganizer"
	    var:value="reminderEmailOrganizer"/>
     <input type="hidden" name="reminderEmailAttendees"
	    id="reminderEmailAttendees"
	    var:value="reminderEmailAttendees"/>
    </div>
  </form>
  </var:if>

  <var:if condition="eventIsReadOnly">
  <div class="popupMenu" id="contactsMenu">
    <ul></ul>
  </div>
  <div id="eventView">
    <label class="calendarName"><var:string var:value="componentCalendarName" /></label>
    <div id="generalDiv">
    <label class="title titleNoSpace"><var:string label:value="General" />
      <span class="content headerContent"><!-- line --></span>
    </label>
  <label><var:string label:value="Title" />
    <span class="content"><var:string var:value="title"/></span>
  </label>
  <var:if condition="hasLocation">
    <label><var:string label:value="Location" />
      <span class="content"><var:string var:value="location" /></span>
    </label>
  </var:if>
  <var:if condition="hasCategory">
    <label><var:string label:value="Category" />
      <span class="content"><var:string var:value="category" /></span>
    </label>
  </var:if>
  <var:if condition="hasPriority">
    <label><var:string label:value="Priority" />
      <span class="content"><var:string var:value="priority"/></span>
    </label>
  </var:if>
  <var:component-content />
  <var:if condition="hasRepeat">
    <label><var:string label:value="Repeat" />
      <span class="content"><var:string var:value="repeatLabel" /></span>
    </label>
  </var:if>
  <label id="documentLabel" style="display: none;"><var:string label:value="Document" />
    <span class="content"><a href="#" id="documentHref"><!-- space --></a></span>
  </label>
  <var:if condition="hasAttendees">
    <label id="organizerLabel"><var:string label:value="Organizer"/>
    <span class="content"><a var:href="organizer.email" var:email="organizer.email.rfc822Email"
      ><var:string value="organizerName" /></a
    ></span>
    </label>
  </var:if>
  <var:if condition="hasCreatedBy">
    <label id="createdByLabel"><var:string label:value="Created by"/>
    <span class="content"><a var:href="createdBy" var:email="createdBy"
      ><var:string value="createdByName" /></a
    ></span>
    </label>
  </var:if>
   
  <var:if condition="userHasRSVP">
    <form var:href="rsvpURL" name="rsvpform">

    <label><var:string label:value="Reply" />
      <span class="content"><var:popup list="replyList" item="item"
          const:name="replyList"
          const:id="replyList"
          string="itemReplyText"
          var:selection="reply" /></span>
    </label>
    <label id="delegateEditor" style="display: none;">
      <span class="content">
        <input name="delegatedTo" id="delegatedTo" type="text" const:value=""/>
                <!--
                <br />
                <input type="checkbox" name="delegateReceiveUpdates" /> <var:string label:value="Keep sending me updates" /> -->
      </span>
    </label>

     <input type="hidden" name="reminderQuantity"
	    id="reminderQuantity"
	    var:value="reminderQuantity"/>
     <input type="hidden" name="reminderUnit"
	    id="reminderUnit"
	    var:value="reminderUnit"/>
     <input type="hidden" name="reminderRelation"
	    id="reminderRelation"
	    var:value="reminderRelation"/>
     <input type="hidden" name="reminderReference"
	    id="reminderReference"
	    var:value="reminderReference"/>
     <input type="hidden" name="reminderAction"
	    id="reminderAction"
	    var:value="reminderAction"/>
     <input type="hidden" name="reminderEmailOrganizer"
	    id="reminderEmailOrganizer"
	    var:value="reminderEmailOrganizer"/>
     <input type="hidden" name="reminderEmailAttendees"
	    id="reminderEmailAttendees"
	    var:value="reminderEmailAttendees"/>
    
    <label><var:string label:value="Reminder" />
    <span class="content"><var:popup list="reminderList" item="item"
         const:disabledValue="-"
         label:noSelectionString="reminder_NONE"
          const:name="reminderList"
	 const:id="reminderList"
         string="itemReminderText" var:selection="reminder"
         /> <a href="#" id="reminderHref" style="display: none;"
             ><var:string label:value="Edit"/></a></span></label>
    </form>
    </var:if>
    </div>
    <var:if condition="hasAttendees">
    <div id="attendeesDiv">
      <label class="title"><var:string label:value="Attendees" />
        <span class="content headerContent"><!-- line --></span>
      </label>
      <label id="attendeesLabel">
        <span class="content"><div id="attendeesMenu" class="fakeTextArea">
	  <var:foreach list="component.attendees" item="attendee"
                  ><var:if condition="attendee.delegatedTo" const:negate="YES"
                    ><div var:class="currentAttendeeClasses"
                      ><div const:class="statusIcon"><!-- space --></div
                        ><a var:href="attendee.email" var:email="attendee.email.rfc822Email"
                        ><var:string value="attendeeForDisplay" /></a
                        ></div
                      ></var:if>
	  </var:foreach>
        </div></span>
      </label>
    </div>
    </var:if>
    <var:if condition="hasComment">
      <div id="descriptionDiv">
        <label class="title"><var:string label:value="Description" />
          <span class="content headerContent"><!-- line --></span>
        </label>
        <label><span class="content">
            <div class="fakeTextArea"><var:string var:value="comment" /></div>
          </span>
        </label>
    </div>
  </var:if>

      <input type="hidden" name="attach" id="attach" var:value="attach"/>
      <input type="hidden" name="classification" id="classification"
	var:value="classification"/>
      <input type="hidden" name="attendeesNames" id="attendeesNames"
	var:value="attendeesNames"/>
      <input type="hidden" name="attendeesUIDs" id="attendeesUIDs"
	var:value="attendeesUIDs"/>
      <input type="hidden" name="attendeesEmails" id="attendeesEmails"
	var:value="attendeesEmails"/>
      <input type="hidden" name="attendeesStates" id="attendeesStates"
	var:value="attendeesStates"/>
      <input type="hidden" name="calendarFoldersList"
	id="calendarFoldersList"
	var:value="calendarsFoldersList"/>

      <input type="hidden" name="repeatType"
	id="repeatType"
	var:value="repeatType"/>
      <input type="hidden" name="repeat1"
	id="repeat1"
	var:value="repeat1"/>
      <input type="hidden" name="repeat2"
	id="repeat2"
	var:value="repeat2"/>
      <input type="hidden" name="repeat3"
	id="repeat3"
	var:value="repeat3"/>
      <input type="hidden" name="repeat4"
	id="repeat4"
	var:value="repeat4"/>
      <input type="hidden" name="repeat5"
	id="repeat5"
	var:value="repeat5"/>
      <input type="hidden" name="repeat6"
	id="repeat6"
	var:value="repeat6"/>
      <input type="hidden" name="repeat7"
	id="repeat7"
	var:value="repeat7"/>

     <input type="hidden" name="range1"
	id="range1"
	var:value="range1"/>
     <input type="hidden" name="range2"
	id="range2"
	var:value="range2"/>

     <input type="hidden" name="reminderQuantity"
	    id="reminderQuantity"
	    var:value="reminderQuantity"/>
     <input type="hidden" name="reminderUnit"
	    id="reminderUnit"
	    var:value="reminderUnit"/>
     <input type="hidden" name="reminderRelation"
	    id="reminderRelation"
	    var:value="reminderRelation"/>
     <input type="hidden" name="reminderReference"
	    id="reminderReference"
	    var:value="reminderReference"/>

     <input type="hidden" name="reminderAction"
	    id="reminderAction"
	    var:value="reminderAction"/>
     <input type="hidden" name="reminderEmailOrganizer"
	    id="reminderEmailOrganizer"
	    var:value="reminderEmailOrganizer"/>
     <input type="hidden" name="reminderEmailAttendees"
	    id="reminderEmailAttendees"
	    var:value="reminderEmailAttendees"/>

    <div id="windowButtons">
      <var:if condition="userHasRSVP"><a id="okButton" href="#" class="button actionButton"
        ><span><var:string label:value="OK"/></span></a></var:if>
      <a id="cancelButton" href="#" class="button"
        ><span><var:string label:value="Cancel"/></span></a>
    </div>
  </div>
  </var:if>
</var:component>
