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

Function reorderTabs

codebase/sources/dhtmlxscheduler.js:7676–7688  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

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

Callers 1

extend$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected