Changeset 2928

Show
Ignore:
Timestamp:
06/04/10 00:29:05
Author:
johnsa
Message:

user client: scheduling grid and grid controls respond to selecting or deselecting "all day" flag in add event form

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl

    r2919 r2928  
    15131513                  <td class="schedDate"> 
    15141514              <!-- force day, hour, minute format --> 
    1515               <input type="text" name="eventDuration.daysStr" size="2" id="durationDaysSched"> 
     1515              <input type="text" name="eventDurationSched.daysStr" size="2" id="durationDaysSched"> 
    15161516                <xsl:attribute name="value"> 
    15171517                  <xsl:choose> 
     
    15251525              <xsl:text> </xsl:text> 
    15261526              <span id="durationHrMinSched"> 
    1527                 <input type="text" name="eventDuration.hoursStr" size="2" id="durationHoursSched"> 
     1527                <input type="text" name="eventDurationSched.hoursStr" size="2" id="durationHoursSched"> 
    15281528                  <xsl:attribute name="value"> 
    15291529                    <xsl:choose> 
     
    15351535                <xsl:copy-of select="$bwStr-AEEF-Hours"/> 
    15361536                <xsl:text> </xsl:text> 
    1537                 <input type="text" name="eventDuration.minutesStr" size="2" id="durationMinutesSched"> 
     1537                <input type="text" name="eventDurationSched.minutesStr" size="2" id="durationMinutesSched"> 
    15381538                  <xsl:attribute name="value"> 
    15391539                    <xsl:choose> 
  • trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkEventForm.js

    r2893 r2928  
    285285    allDayEndDateField.value = "true"; 
    286286    durDays.value = 1; 
     287    bwGrid.allDay(true); 
    287288  } else { 
    288289    changeClass('startTimeFields','timeFields'); 
     
    292293    allDayEndDateField.value = "false"; 
    293294    durDays.value = 0; 
     295    bwGrid.allDay(false); 
    294296  } 
    295297} 
  • trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/javascript/bedeworkScheduling.js

    r2922 r2928  
    436436    this.setFreeTime(); 
    437437  }; 
     438   
     439  // if the "all day" checkbox is clicked,  
     440  // change the duration widgets, the duration in the grid, 
     441  // and recalculate the freetime lookup 
     442  this.allDay = function(isAllDay) { 
     443    if (isAllDay) { 
     444      $(".schedTime").hide(); 
     445      $("#durationHrMinSched").hide(); 
     446      $("#durationDaysSched").val(1); 
     447      $("#durationHoursSched").val(0); 
     448      $("#durationMinutesSched").val(0); 
     449      // set the duration in the bwGrid and recalculate cells  
     450      durationMils = 86400000; 
     451      cellsInDuration = durationMils / incrementMils; 
     452      // repopulate the free time lookup 
     453      this.setFreeTime(); 
     454    } else { 
     455      $(".schedTime").show(); 
     456      $("#durationHrMinSched").show(); 
     457      $("#durationDaysSched").val(0); 
     458      $("#durationHoursSched").val(1); 
     459      $("#durationMinutesSched").val(0); 
     460      // set the duration in the bwGrid and recalculate cells  
     461      durationMils = 3600000; 
     462      cellsInDuration = durationMils / incrementMils; 
     463      // repopulate the free time lookup 
     464      this.setFreeTime(); 
     465    } 
     466  } 
    438467   
    439468  this.display = function() {