MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / reorderTabs

Function reorderTabs

codebase/sources/dhtmlxscheduler.es.js:7672–7684  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

7670 }
7671 }, { once: true });
7672 function reorderTabs(container) {
7673 if (scheduler2.config.header) {
7674 return;
7675 }
7676 const tabs = Array.from(container.querySelectorAll(".dhx_cal_tab"));
7677 const order = ["day", "week", "month"];
7678 const specialTabs = order.map((tabName) => tabs.find((tab) => tab.getAttribute("data-tab") === tabName)).filter((tab) => tab !== void 0);
7679 let firstTab = tabs.length > 0 ? tabs[0] : null;
7680 specialTabs.reverse().forEach((tab) => {
7681 container.insertBefore(tab, firstTab);
7682 firstTab = tab;
7683 });
7684 }
7685 };
7686}
7687function extend$2(scheduler2) {

Callers 1

extend$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected