Changeset 148

Show
Ignore:
Timestamp:
02/10/06 11:06:29
Author:
johnsa
Message:

debugging event time date javascript;
no longer hiding "no date time" durationtype when adding all day events.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl

    r143 r148  
    387387  <xsl:template name="eventList"> 
    388388    <h2>Edit Events</h2> 
    389     <p>Select the event that you would like to update  
     389    <p>Select the event that you would like to update 
    390390    (or <a href="{$event-initAddEvent}">add a new event</a>):</p> 
    391391 
     
    568568                  </xsl:choose> 
    569569                </xsl:variable> 
     570                <xsl:variable name="durationHrMinClass"> 
     571                  <xsl:choose> 
     572                    <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when> 
     573                    <xsl:otherwise>shown</xsl:otherwise> 
     574                  </xsl:choose> 
     575                </xsl:variable> 
    570576                <div class="{$endDurationClass}" id="endDuration"> 
    571577                  <div class="durationBox"> 
    572578                    <input type="radio" name="eventDuration.type" value="daytime" checked="checked"/> 
    573579                    <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/days/*"/>days 
    574                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/hours/*"/>hours 
    575                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/minutes/*"/>minutes 
     580                    <span id="durationHrMin" class="{$durationHrMinClass}"> 
     581                      <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/hours/*"/>hours 
     582                      <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/minutes/*"/>minutes 
     583                    </span> 
    576584                  </div> 
    577585                  <span class="durationSpacerText">or</span> 
     
    582590                </div> 
    583591              </div><br/> 
    584               <xsl:variable name="noDurationClass"> 
    585                 <xsl:choose> 
    586                   <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when> 
    587                   <xsl:otherwise>dateFields</xsl:otherwise> 
    588                 </xsl:choose> 
    589               </xsl:variable> 
    590               <div class="{$noDurationClass}" id="noDuration"> 
     592              <div class="dateFields" id="noDuration"> 
    591593                <xsl:choose> 
    592594                  <xsl:when test="/bedeworkadmin/formElements/form/end/type='N'"> 
  • trunk/calendar3/deployment/webadmin/webapp/resources/resources/includes.js

    r122 r148  
    55function swapAllDayEvent(obj) { 
    66  if (obj.checked) { 
     7    //lets keep it simple for now: just show or hide time fields 
    78    changeClass('startTimeFields','hidden'); 
    89    changeClass('endTimeFields','hidden'); 
    9     changeClass('noDuration','hidden'); 
    10     changeClass('endDateTime','shown'); 
    11     changeClass('endDuration','hidden'); 
    12     // set the end date time fields = start date time fields 
    13     window.document.peForm.endType[0].checked = true; 
    14     // window.document.peForm['eventEndDate.month'].value = window.document.peForm['eventStartDate.month'].value; 
    15     // window.document.peForm['eventEndDate.day'].value = window.document.peForm['eventStartDate.day'].value; 
    16     // window.document.peForm['eventEndDate.year'].value = window.document.peForm['eventStartDate.year'].value; 
    17     // window.document.peForm['eventEndDate.hour'].value = window.document.peForm['eventStartDate.hour'].value; 
    18     // window.document.peForm['eventEndDate.minute'].value = window.document.peForm['eventStartDate.minute'].value; 
    19     // set the duration (hidden by default on first click of all day event checkbox) to 1 day 
    20     window.document.peForm.durationType[0].checked = true; 
    21     window.document.peForm['duration.day'].value = 1; 
    22     window.document.peForm['duration.hour'].value = 0; 
    23     window.document.peForm['duration.minute'].value = 0; 
    24     window.document.peForm['duration.weeks'].value = 0; 
     10    changeClass('durationHrMin','hidden'); 
    2511  } else { 
    2612    changeClass('startTimeFields','timeFields'); 
    2713    changeClass('endTimeFields','timeFields'); 
    28     changeClass('noDuration','shown'); 
    29     changeClass('endDateTime','shown'); 
    30     changeClass('endDuration','hidden'); 
    31     window.document.peForm.endType[0].checked = true; 
     14    changeClass('durationHrMin','shown'); 
    3215  } 
    3316}