⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendarforworkplan.htc

📁 企业办公自动化管理系统 asp+sql server 2005
💻 HTC
📖 第 1 页 / 共 5 页
字号:
      if (gsGridCellEffect == 'raised') return
      gsGridCellEffect = 'raised'
      fnUpdateGridColors()
      break
    case "flat" : 
      if (gsGridCellEffect == 'flat') return
      gsGridCellEffect = 'flat'
      fnUpdateGridColors()
      break
    case "sunken" : 
      if (gsGridCellEffect == 'sunken') return
      gsGridCellEffect = 'sunken'
      fnUpdateGridColors()
      break
    default :
      throw 450
  }
}

//------------------------------------------------------------------------
//
//  Function:  fnGetGridLinesColor / fnPutGridLinesColor
//
//  Synopsis:  The gridLinesColor property is used to change the color of 
//             the calendar grid when the gridCellEffect property is set 
//             to 'flat'.  It can be any valid HTML color value.  
//             
//  Arguments: The put method requires a HTML color value
//
//  Returns:   The get method will return a HTML color value
//
//  Notes:     No error checking is performed.  Invalid values may result
//             in unexpected rendering.
//
//------------------------------------------------------------------------

function fnGetGridLinesColor()
{
  return gsGridLinesColor
}

function fnPutGridLinesColor(sGridLinesColor)
{
  if (gbLoading) return  // return if the behavior is loading

  gsGridLinesColor = sGridLinesColor
  fnUpdateGridColors()
}

//------------------------------------------------------------------------
//
//  Function:  fnGetShowVerticalGrid / fnPutShowVerticalGrid
//
//  Synopsis:  The showVerticalGrid property is used to toggle the 
//             visibility of vertical lines in the calendar grid.
//             
//  Arguments: The put method requires true or false value for visibility
//
//  Returns:   The get method will return a true or false value
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetShowVerticalGrid()
{
  return gbShowVerticalGrid
}

function fnPutShowVerticalGrid(bShowVerticalGrid)
{
  if (gbLoading) return  // return if the behavior is loading

  if ((bShowVerticalGrid) != gbShowVerticalGrid)
  {
    gbShowVerticalGrid = (bShowVerticalGrid) ? true : false
    fnFireOnPropertyChange("propertyName", "showVerticalGrid")
    fnUpdateGridColors()
  }
}


//------------------------------------------------------------------------
//
//  Function:  fnGetShowHorizontalGrid / fnPutShowHorizontalGrid
//
//  Synopsis:  The showHorizontalGrid property is used to toggle the 
//             visibility of horizontal lines in the calendar grid.
//             
//  Arguments: The put method requires true or false value for visibility
//
//  Returns:   The get method will return a true or false value
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetShowHorizontalGrid()
{
  return gbShowHorizontalGrid
}

function fnPutShowHorizontalGrid(bShowHorizontalGrid)
{
  if (gbLoading) return  // return if the behavior is loading

  if ((bShowHorizontalGrid) != gbShowHorizontalGrid)
  {
    gbShowHorizontalGrid = (bShowHorizontalGrid) ? true : false
    fnFireOnPropertyChange("propertyName", "showHorizontalGrid")
    fnUpdateGridColors()
  }
}

//------------------------------------------------------------------------
//
//  Function:  fnGetShowDateSelectors / fnPutShowDateSelectors
//
//  Synopsis:  The showDateSelectors property toggles the visibility of
//             the month and year select controls.
//             
//  Arguments: The put method requires true or false value for visibility
//
//  Returns:   The get method will return a true or false value
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetShowDateSelectors()
{
  return gbShowDateSelectors
}

function fnPutShowDateSelectors(bShowDateSelectors)
{
  if (gbLoading) return  // return if the behavior is loading

  gbShowDateSelectors = (bShowDateSelectors) ? true : false
  element.children[0].rows[0].cells[1].style.display = (gbShowDateSelectors) ? '' : 'none'

  element.children[0].rows[0].style.display = (gbShowDateSelectors || gbShowTitle) ? '' : 'none'
}

//------------------------------------------------------------------------
//
//  Function:  fnGetShowDays / fnPutShowDays
//
//  Synopsis:  The showDays property toggles the visibility of
//             the day of the week titles row in the calendar grid.
//             
//  Arguments: The put method requires true or false value for visibility
//
//  Returns:   The get method will return a true or false value
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetShowDays()
{
  return gbShowDays
}

function fnPutShowDays(bShowDays)
{
  if (gbLoading) return  // return if the behavior is loading

  gbShowDays = (bShowDays) ? true : false
  goDayTitleRow.style.display = (gbShowDays) ? '' : 'none'
}

//------------------------------------------------------------------------
//
//  Function:  fnGetShowTitle / fnPutShowTitle
//
//  Synopsis:  the showTitle property toggles the visibility of the month
//             and year title at the top of the calendar.
//             
//  Arguments: The put method requires true or false value for visibility
//
//  Returns:   The get method will return a true or false value
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetShowTitle()
{
  return gbShowTitle
}

function fnPutShowTitle(bShowTitle)
{
  if (gbLoading) return  // return if the behavior is loading

  gbShowTitle = (bShowTitle) ? true : false
  element.children[0].rows[0].style.display = (gbShowDateSelectors || gbShowTitle) ? '' : 'none'
  fnUpdateTitle()
}

//------------------------------------------------------------------------
//
//  Function:  fnGetValue / fnPutValue
//
//  Synopsis:  The value property returns the day, month, and year in the
//             format:     {day}/{month}/{year}
//             example:    25/02/1998
//             An invalid value will cause an exception.
//             
//  Arguments: The put method requires a string in the format described 
//             above
//
//  Returns:   The get method will return the current date value
//
//  Notes:     The day and month are returned in the two digit format.
//             The year is returned in a four digit format.
//
//------------------------------------------------------------------------

function fnGetValue()
{
  var sValue

  if (gbValueIsNull) return null
  sValue = ((giDay < 10) ? '0' + giDay : giDay) + '/' +
           ((giMonth < 10) ? '0' + giMonth : giMonth) + '/'
  if (giYear < 10) return sValue + '000' + giYear
  if (giYear < 100) return sValue + '00' + giYear
  if (giYear < 1000) return sValue + '0' + giYear
  return sValue + giYear
}

function fnPutValue(sValue)
{
  if (gbLoading) return  // return if the behavior is loading

  var aValue = sValue.split('/')

  // ensure valid valuse for month, day, and year
  aValue[0]++ ; aValue[0]-- ; aValue[1]++ ; aValue[1]-- ; aValue[2]++ ; aValue[2]-- ;
  if ( isNaN(aValue[0]) || isNaN(aValue[1]) || isNaN(aValue[2]) ) throw 450

  fnSetDate(aValue[0], aValue[1], aValue[2])
}


//------------------------------------------------------------------------
//
//  Function:  fnGetValueIsNull / fnPutValueIsNull
//
//  Synopsis:  The valueIsNull property set the calendar so that no day
//             is selected.  Changing any date property, setting one of 
//             the date select controls, or clicking on a day will result 
//             in the valueIsNull property getting set to false.
//             
//  Arguments: The put method requires a string in the format described 
//             above
//
//  Returns:   The get method will return the current date value
//
//  Notes:     The day and month are returned in the two digit format.
//             The year is returned in a four digit format.
//
//------------------------------------------------------------------------

function fnGetValueIsNull() 
{ 
  return gbValueIsNull 
}

function fnPutValueIsNull(bValueIsNull)
{
  if (gbLoading) return  // return if the behavior is loading

  if ((bValueIsNull) != gbValueIsNull)
  {
    gbValueIsNull = (bValueIsNull) ? true : false
    fnFireOnPropertyChange("propertyName", "readOnly")
  }

  goCurrentDayCell.className = (bValueIsNull) ? 
    'Day_' + uniqueID : 'DaySelected_' + uniqueID
}

//------------------------------------------------------------------------
//
//  Function:  fnGetReadOnly / fnPutReadOnly
//
//  Synopsis:  The readOnly property can be set to true or false to 
//             disable a_user date selection by clicking on days or through
//             the select controls
//
//  Arguments: The put method requires a true/false value
//
//  Returns:   The get method will return true or false
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetReadOnly()
{
  return (gbReadOnly) ? true : false
}

function fnPutReadOnly(bReadOnly)
{
  if (gbLoading) return  // return if the behavior is loading

  if ((bReadOnly) != gbReadOnly)
  {
    gbReadOnly = (bReadOnly) ? true : false
    fnFireOnPropertyChange("propertyName", "readOnly")
  }

  element.children[0].rows[0].cells[1].children[0].children[0].disabled = gbReadOnly
  element.children[0].rows[0].cells[1].children[0].children[1].disabled = gbReadOnly
}

// **********************************************************************
//                       CALENDAR INITIALIZATION FUNCTIONS
// **********************************************************************

//------------------------------------------------------------------------
//
//  Function:  fnCreateCalendarHTML
//
//  Synopsis:  This function adds the HTML code to the main document that
//             is required to display the calendar.  It contains nested
//             tables and all style information is inherited from the 
//             style sheet properties.
//
//  Arguments: none
//
//  Returns:   none
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnCreateCalendarHTML()
{
  var row, cell

  element.innerHTML = 
  '<table border=0 class=WholeCalendar_' + uniqueID + '> ' +
  '  <tr>                                          ' +
  '      <td class=Title_' + uniqueID + '></td>    ' +
  '      <td class=DateControls_' + uniqueID + '>  ' +
  '        <nobr> <select></select>                ' +
  '               <select></select> </nobr> </td>  ' +
  '  </tr>                                         ' +
  '  <tr> <td colspan=2>                           ' +
  '    <table class=CalTable_' + uniqueID + ' cellspacing=0 border=0> ' +
  '      <tr><td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td>' +
  '          <td class=DayTitle_' + uniqueID + '></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>' +
  '    </table> ' +
  '    </td>    ' +	
  '  </tr>      ' +
  '</table>     ';

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -