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

📄 calendarforworkplan.htc

📁 企业办公自动化管理系统 asp+sql server 2005
💻 HTC
📖 第 1 页 / 共 5 页
字号:
  goDayTitleRow = element.children[0].rows[1].cells[0].children[0].rows[0]
  goMonthSelect = element.children[0].rows[0].cells[1].children[0].children[0]
  goYearSelect = element.children[0].rows[0].cells[1].children[0].children[1]

  for (row=1; row < 7; row++)
    for (cell=0; cell < 7; cell++)
      gaDayCell[((row-1)*7) + cell] = element.children[0].rows[1].cells[0].children[0].rows[row].cells[cell]

}

//------------------------------------------------------------------------
//
//  Function:  fnCreateStyleSheets
//
//  Synopsis:  The calendar uses a style sheet to control the rendering
//             of the different calendar elements.  This function creates
//             the style sheet in the main document using a unique name.
//
//  Arguments: none
//
//  Returns:   
//
//  Notes:     
//
//------------------------------------------------------------------------

function fnCreateStyleSheets()
{
  var StyleInfo

  if (! element.document.body.BehaviorStyleSheet)
  {
    element.document.body.BehaviorStyleSheet = element.document.createStyleSheet()
  }
  StyleInfo = element.document.body.BehaviorStyleSheet 

  StyleInfo.addRule(   '.WholeCalendar_' + uniqueID,
      'background-color : lightgrey        ;'+
      'border           : 1px solid #FFFFFF  ;'+
      'cursor           : default          ;'+
      'width            : 100%             ;'+
      'height           : 100%             ;'
    )
  goStyle['WholeCalendar'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  StyleInfo.addRule(   '.Title_' + uniqueID,
      'color            : #000000  ;'+	// cal--title-color 
      'font-family      : Arial    ;'+	// cal--title-font-family 
      'font-size        : 10pt     ;'+	// cal--title-font-size 
      'font-weight      : bold     ;'+	// cal--title-font-weight 
      'text-align       : center   ;'+	// cal--title-text-align 
      'height           : 1        ;'+
      'width            : 50%     ;'+
      'background-color : #EEEEEE;'
    )
  goStyle['Title'] = StyleInfo.rules[StyleInfo.rules.length - 1].style
  
  fnLoadCSSDefault('cal--title-background-color', 'calTitleBackgroundColor', goStyle['Title'], 'backgroundColor')
  fnLoadCSSDefault('cal--title-color',            'calTitleColor',           goStyle['Title'], 'color')
  fnLoadCSSDefault('cal--title-font-family',      'calTitleFontFamily',      goStyle['Title'], 'fontFamily')
  fnLoadCSSDefault('cal--title-font-size',        'calTitleFontSize',        goStyle['Title'], 'fontSize')
  fnLoadCSSDefault('cal--title-font-weight',      'calTitleFontWeight',      goStyle['Title'], 'fontWeight')
  fnLoadCSSDefault('cal--title-text-align',       'calTitleTextAlign',       goStyle['Title'], 'textAlign')

  StyleInfo.addRule(   '.DateControls_' + uniqueID,
      'text-align : right ;'
    )
  goStyle['DateControls'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  StyleInfo.addRule(   '.CalTable_' + uniqueID,
      'border : 1 solid black ;'+
      'width  : 100%          ;'+
      'height : 100%          ;'
    )
  goStyle['CalTable'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  StyleInfo.addRule(   '.DayTitle_' + uniqueID,
      'background-color    : #000000 ;'+	// dayTitle-background-color 
      'color               : #ffffff     ;'+	// dayTitle-color 
      'font-family         : Arial     ;'+	// dayTitle-font-family 
      'font-size           : 8pt       ;'+	// dayTitle-font-size 
      'font-weight         : bold      ;'+	// dayTitle-font-weight 
      'text-align          : center    ;'+	// dayTitle-text-align 
      'border-width        : 1px       ;'+
      'border-style        : solid     ;'+
      'border-left-color   : white     ;'+
      'border-top-color    : white     ;'+
      'border-right-color  : black     ;'+
      'border-bottom-color : black     ;'+
      'width               : 14%       ;'+
      'height              : 1         ;'
    )
  goStyle['DayTitle'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  fnLoadCSSDefault('cal--dayTitle-background-color', 'calDayTitleBackgroundColor', goStyle['DayTitle'], 'backgroundColor')
  fnLoadCSSDefault('cal--dayTitle-color',            'calDayTitleColor',           goStyle['DayTitle'], 'color')
  fnLoadCSSDefault('cal--dayTitle-font-family',      'calDayTitleFontFamily',      goStyle['DayTitle'], 'fontFamily')
  fnLoadCSSDefault('cal--dayTitle-font-size',        'calDayTitleFontSize',        goStyle['DayTitle'], 'fontSize')
  fnLoadCSSDefault('cal--dayTitle-font-weight',      'calDayTitleFontWeight',      goStyle['DayTitle'], 'fontWeight')
  fnLoadCSSDefault('cal--dayTitle-text-align',       'calDayTitleTextAlign',       goStyle['DayTitle'], 'textAlign')

  StyleInfo.addRule(   '.OffDay_' + uniqueID,
      'background-color    : #FFFFFF ;'+	// cal--offMonth-background-color 
      'color               : #7F7F7F   ;'+	// cal--offMonth-color 
      'font-family         : Arial     ;'+	// cal--offMonth-font-family
      'font-size           : 8pt       ;'+	// cal--offMonth-font-size 
      'font-weight         : normal    ;'+	// cal--offMonth-font-weight 
      'text-align          : right     ;'+	// cal--offMonth-text-align 
      'vertical-align      : text-top  ;'+	// cal--offMonth-vertical-align 
      'border-width        : 1px       ;'+
      'border-style        : solid     ;'+
      'border-left-color   : white     ;'+
      'border-top-color    : white     ;'+
      'border-right-color  : black     ;'+
      'border-bottom-color : black     ;'+
      'width               : 14%       ;'+
      'cursor              : hand      ;'
    )
  goStyle['OffDay'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  fnLoadCSSDefault('cal--offMonth-background-color', 'calOffMonthBackgroundColor', goStyle['OffDay'], 'backgroundColor')
  fnLoadCSSDefault('cal--offMonth-color',            'calOffMonthColor',           goStyle['OffDay'], 'color')
  fnLoadCSSDefault('cal--offMonth-font-family',      'calOffMonthFontFamily',      goStyle['OffDay'], 'fontFamily')
  fnLoadCSSDefault('cal--offMonth-font-size',        'calOffMonthFontSize',        goStyle['OffDay'], 'fontSize')
  fnLoadCSSDefault('cal--offMonth-font-weight',      'calOffMonthFontWeight',      goStyle['OffDay'], 'fontWeight')
  fnLoadCSSDefault('cal--offMonth-text-align',       'calOffMonthTextAlign',       goStyle['OffDay'], 'textAlign')
  fnLoadCSSDefault('cal--offMonth-vertical-align',   'calOffMonthVerticalAlign',   goStyle['OffDay'], 'verticalAlign')

  StyleInfo.addRule(   '.Day_' + uniqueID,
      'background-color    : #EFF3DE ;'+	// cal--currentMonth-background-color 
      'color               : #00009F   ;'+	// cal--currentMonth-color 
      'font-family         : Arial     ;'+	// cal--currentMonth-font-family 
      'font-size           : 8pt       ;'+	// cal--currentMonth-font-size 
      'font-weight         : normal    ;'+	// cal--currentMonth-font-weight 
      'text-align          : right     ;'+ 	// cal--currentMonth-text-align 
      'vertical-align      : text-top  ;'+	// cal--currentMonth-vertical-align 
      'border-width        : 1px       ;'+
      'border-style        : solid     ;'+
      'border-left-color   : white     ;'+
      'border-top-color    : white     ;'+
      'border-right-color  : black     ;'+
      'border-bottom-color : black     ;'+
      'width               : 14%       ;'+
      'cursor              : hand      ;'
    )
  goStyle['Day'] = StyleInfo.rules[StyleInfo.rules.length - 1].style
  
  fnLoadCSSDefault('cal--currentMonth-background-color', 'calCurrentMonthBackgroundColor', goStyle['Day'], 'backgroundColor')
  fnLoadCSSDefault('cal--currentMonth-color',            'calCurrentMonthColor',           goStyle['Day'], 'color')
  fnLoadCSSDefault('cal--currentMonth-font-family',      'calCurrentMonthFontFamily',      goStyle['Day'], 'fontFamily')
  fnLoadCSSDefault('cal--currentMonth-font-size',        'calCurrentMonthFontSize',        goStyle['Day'], 'fontSize')
  fnLoadCSSDefault('cal--currentMonth-font-weight',      'calCurrentMonthFontWeight',      goStyle['Day'], 'fontWeight')
  fnLoadCSSDefault('cal--currentMonth-text-align',       'calCurrentMonthTextAlign',       goStyle['Day'], 'textAlign')
  fnLoadCSSDefault('cal--currentMonth-vertical-align',   'calCurrentMonthVerticalAlign',   goStyle['Day'], 'verticalAlign')

    StyleInfo.addRule(   '.CurrentDay_' + uniqueID,
      'background-color    : #E19AAC ;'+	// cal--currentMonth-background-color 
      'color               : #00009F   ;'+	// cal--currentMonth-color 
      'font-family         : Arial     ;'+	// cal--currentMonth-font-family 
      'font-size           : 8pt       ;'+	// cal--currentMonth-font-size 
      'font-weight         : normal    ;'+	// cal--currentMonth-font-weight 
      'text-align          : right     ;'+ 	// cal--currentMonth-text-align 
      'vertical-align      : text-top  ;'+	// cal--currentMonth-vertical-align 
      'border-width        : 1px       ;'+
      'border-style        : solid     ;'+
      'border-left-color   : white     ;'+
      'border-top-color    : white     ;'+
      'border-right-color  : black     ;'+
      'border-bottom-color : black     ;'+
      'width               : 14%       ;'+
      'cursor              : hand      ;'
    )



  StyleInfo.addRule(   '.DaySelected_' + uniqueID,
      'background-color    : #7F7F7F  ;'+	// cal--selectedDay-background-color 
      'color               : yellow   ;'+	// cal--selectedDay-color 
      'font-family         : Arial    ;'+	// cal--selectedDay-font-family 
      'font-size           : 8pt      ;'+	// cal--selectedDay-font-size 
      'font-weight         : normal   ;'+	// cal--selectedDay-font-weight 
      'text-align          : right    ;'+ 	// cal--selectedMonth-text-align 
      'vertical-align      : text-top ;'+	// cal--selectedMonth-vertical-align 
      'border-width        : 1px      ;'+
      'border-style        : solid    ;'+
      'border-left-color   : black    ;'+
      'border-top-color    : black    ;'+
      'border-right-color  : #BFBFBF  ;'+
      'border-bottom-color : #BFBFBF  ;'+
      'width               : 14%       ;'+
      'cursor              : hand     ;'
    )
  goStyle['DaySelected'] = StyleInfo.rules[StyleInfo.rules.length - 1].style

  fnLoadCSSDefault('cal--selectedDay-background-color', 'calSelectedDayBackgroundColor', goStyle['DaySelected'], 'backgroundColor')
  fnLoadCSSDefault('cal--selectedDay-color',            'calSelectedDayColor',           goStyle['DaySelected'], 'color')
  fnLoadCSSDefault('cal--selectedDay-font-family',      'calSelectedDayFontFamily',      goStyle['DaySelected'], 'fontFamily')
  fnLoadCSSDefault('cal--selectedDay-font-size',        'calSelectedDayFontSize',        goStyle['DaySelected'], 'fontSize')
  fnLoadCSSDefault('cal--selectedDay-font-weight',      'calSelectedDayFontWeight',      goStyle['DaySelected'], 'fontWeight')
  fnLoadCSSDefault('cal--selectedDay-text-align',       'calSelectedDayTextAlign',       goStyle['DaySelected'], 'textAlign')
  fnLoadCSSDefault('cal--selectedDay-vertical-align',   'calSelectedDayVerticalAlign',   goStyle['DaySelected'], 'verticalAlign')
}

//------------------------------------------------------------------------
//
//  Function:  fnLoadCSSDefault
//
//  Synopsis:  This helper function checks to see if a CSS property 
//             extension was used to specify a custom style for the 
//             calendar.  If so, the style style object.
//
//  Arguments: sCSSProp        The CSS property extension used by the 
//                             page author
//             sScriptProp     The scriptable property name to add to the 
//                             style Name of the style rule
//             sStyleRuleProp  Name of the CSS property on the style rule
//
//  Returns:   none
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnLoadCSSDefault(sCSSProp, sScriptProp, oStyleRule, sStyleRuleProp)
{
  if (element.currentStyle[sCSSProp])
  {
    oStyleRule[sStyleRuleProp] = element.currentStyle[sCSSProp] 
  }
  element.style[sScriptProp] = oStyleRule[sStyleRuleProp]  
}   

//------------------------------------------------------------------------
//
//  Function:  fnGetPropertyDefaults
//
//  Synopsis:  When the for the properties.
//             If so, error checking is performed and the state of the
//             calendar is updated.
//
//  Arguments: none
//
//  Returns:   none
//
//  Notes:     none
//
//------------------------------------------------------------------------

function fnGetPropertyDefaults()
{
  var x
  var oDate = new Date()

  giDay = oDate.getDate()
  giMonth = oDate.getMonth() + 1
  giYear = oDate.getYear()

  gcurrentDay = giDay
  gcurrentMonth = giMonth
  gcurrentYear = giYear 

  // The JavaScript Date.getYear function returns a 2 digit date representation
  // for dates in the 1900's and a 4 digit date for 2000 and beyond.  
  if (giYear < 100) giYear += 1900   

  // BUGBUG : Need to fill in day/month/year loading and error checking
  if (element.year) 
  {
    if (! isNaN(parseInt(element.year))) giYear = parseInt(element.year)
    if (giYear < giMinYear) giYear = giMinYear
    if (giYear > giMaxYear) giYear = giMaxYear
  }
  
  fnCheckLeapYear(giYear)

  if (element.month) 
  {
    if (! isNaN(parseInt(element.month))) giMonth = parseInt(element.month)
    if (giMonth < 1) giMonth = 1
    if (giMonth > 12) giMonth = 12
  }
  
  if (element.day) 
  {
    if (! isNaN(parseInt(element.day))) giDay = parseInt(element.day)
    if (giDay < 1) giDay = 1
    if (giDay > gaMonthDays[giMonth - 1]) giDay = gaMonthDays[giMonth - 1]
  }

  if (element.monthLength)
  {
    switch (element.monthLength.toLowerCase())
    {
      case 'short' :
        giMonthLength = 0
        break
      case 'long' :
        giMonthLength = 1
        break
    }
  }
  
  if (element.dayLength)
  {
    switch (element.dayLength.toLowerCase())
    {
      case 'short' :
        giDayLength = 0
        break
      case 'medium' :
        giDayLength = 1
        break
      case 'long' :
        giDayLength = 1
        break
    }
  }

  if (element.firstDay)
  {
    if ((element.firstDay >= 0) && (element.firstDay <= 6))
      giFirstDay = element.firstDay
  }

  if (element.gridCellEffect) 
  { 
    switch (element.gridCellEffect.toLowerCase())
    {
      case 'raised' :
        giGridCellEffect = 'raised'
        break
      case 'flat' :
        giGridCellEffect = 'flat'
        break
      case 'sunken' :
        giGridCellEffect = 'sunken'
        break
    }
  }

  if (element.gridLinesColor) 
    gsGridLinesColor = element.gridLinesColor
  
  if (element.showDateSelectors)
    gbShowDateSelectors = (element.showDateSelectors) ? true : false
    
  if (element.showDays)
    gbShowDays = (element.showDays) ? true : false

  if (element.showTitle)
    gbShowTitle = (element.showTitle) ? true : false
    
  if (element.showHorizontalGrid)
    gbShowHorizontalGrid = (element.showHorizontalGrid) ? true : false
    
  if (element.showVerticalGrid)
    gbShowVerticalGrid = (element.showVerticalGrid) ? true : false
  
  if (element.valueIsNull)
    gbValueIsNull = (element.valueIsNull) ? true : false
  
  if (element.name)
    gsName = element.name
    
  if (element.readOnly)
    gbReadOnly = (element.readOnly) ? true : false
}

// **********************************************************************
//                       CALENDAR CONTROL FUNCTIONS
// **********************************************************************

//------------------------------------------------------------------------

⌨️ 快捷键说明

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