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

Function Wt

codebase/dhtmlxscheduler.es.js:2254–2370  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

2252 };
2253}
2254function Wt(e) {
2255 var i, t;
2256 function n() {
2257 if (e._is_material_skin())
2258 return !0;
2259 if (t !== void 0)
2260 return t;
2261 var _ = document.createElement("div");
2262 _.style.position = "absolute", _.style.left = "-9999px", _.style.top = "-9999px", _.innerHTML = "<div class='dhx_cal_container'><div class='dhx_cal_data'><div class='dhx_cal_event'><div class='dhx_body'></div></div><div>", document.body.appendChild(_);
2263 var r = window.getComputedStyle(_.querySelector(".dhx_body")).getPropertyValue("box-sizing");
2264 document.body.removeChild(_), (t = r === "border-box") || setTimeout(function() {
2265 t = void 0;
2266 }, 1e3);
2267 }
2268 function s() {
2269 if (!e._is_material_skin() && !e._border_box_events()) {
2270 var _ = t;
2271 t = void 0, i = void 0, _ !== n() && e.$container && e.getState().mode && e.setCurrentView();
2272 }
2273 }
2274 function a(_) {
2275 var r = _.getMinutes();
2276 return r = r < 10 ? "0" + r : r, "<span class='dhx_scale_h'>" + _.getHours() + "</span><span class='dhx_scale_m'>&nbsp;" + r + "</span>";
2277 }
2278 e._addThemeClass = function() {
2279 document.documentElement.setAttribute("data-scheduler-theme", e.skin);
2280 }, e._skin_settings = { fix_tab_position: [1, 0], use_select_menu_space: [1, 0], wide_form: [1, 0], hour_size_px: [44, 42], displayed_event_color: ["#ff4a4a", "ffc5ab"], displayed_event_text_color: ["#ffef80", "7e2727"] }, e._skin_xy = { lightbox_additional_height: [90, 50], nav_height: [59, 22], bar_height: [24, 20] }, e._is_material_skin = function() {
2281 return e.skin ? (e.skin + "").indexOf("material") > -1 : function() {
2282 if (i === void 0) {
2283 var _ = document.createElement("div");
2284 _.style.position = "absolute", _.style.left = "-9999px", _.style.top = "-9999px", _.innerHTML = "<div class='dhx_cal_container'><div class='dhx_cal_scale_placeholder'></div><div>", document.body.appendChild(_);
2285 var r = window.getComputedStyle(_.querySelector(".dhx_cal_scale_placeholder")).getPropertyValue("position");
2286 i = r === "absolute", setTimeout(function() {
2287 i = null, _ && _.parentNode && _.parentNode.removeChild(_);
2288 }, 500);
2289 }
2290 return i;
2291 }();
2292 }, e._build_skin_info = function() {
2293 (function() {
2294 const m = e.$container;
2295 clearInterval(o), m && (o = setInterval(() => {
2296 const g = getComputedStyle(m).getPropertyValue("--dhx-scheduler-theme");
2297 g && g !== e.skin && e.setSkin(g);
2298 }, 100));
2299 })();
2300 const _ = getComputedStyle(this.$container), r = _.getPropertyValue("--dhx-scheduler-theme");
2301 let d, l = !!r, h = {}, p = !1;
2302 if (l) {
2303 d = r;
2304 for (let m in e.xy)
2305 h[m] = _.getPropertyValue(`--dhx-scheduler-xy-${m}`);
2306 h.hour_size_px = _.getPropertyValue("--dhx-scheduler-config-hour_size_px"), h.wide_form = _.getPropertyValue("--dhx-scheduler-config-form_wide");
2307 } else
2308 d = function() {
2309 for (var m = document.getElementsByTagName("link"), g = 0; g < m.length; g++) {
2310 var c = m[g].href.match("dhtmlxscheduler_([a-z]+).css");
2311 if (c)

Callers 1

eaFunction · 0.70

Calls 9

nFunction · 0.70
_Function · 0.70
setSkinMethod · 0.65
eventMethod · 0.65
renderMethod · 0.65
attachEventMethod · 0.65
date_to_strMethod · 0.65
date_partMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected