(scheduler2)
| 7456 | }; |
| 7457 | } |
| 7458 | function extend$3(scheduler2) { |
| 7459 | scheduler2._addThemeClass = function() { |
| 7460 | document.documentElement.setAttribute("data-scheduler-theme", scheduler2.skin); |
| 7461 | }; |
| 7462 | scheduler2._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"] }; |
| 7463 | scheduler2._skin_xy = { lightbox_additional_height: [90, 50], nav_height: [59, 22], bar_height: [24, 20] }; |
| 7464 | scheduler2._is_material_skin = function() { |
| 7465 | if (!scheduler2.skin) { |
| 7466 | return checkIfMaterialSkin(); |
| 7467 | } else { |
| 7468 | return (scheduler2.skin + "").indexOf("material") > -1; |
| 7469 | } |
| 7470 | }; |
| 7471 | function themeNameFromFile() { |
| 7472 | var links = document.getElementsByTagName("link"); |
| 7473 | for (var i = 0; i < links.length; i++) { |
| 7474 | var res = links[i].href.match("dhtmlxscheduler_([a-z]+).css"); |
| 7475 | if (res) { |
| 7476 | return res[1]; |
| 7477 | } |
| 7478 | } |
| 7479 | } |
| 7480 | scheduler2._build_skin_info = function() { |
| 7481 | monitorThemeChange(); |
| 7482 | const styles = getComputedStyle(this.$container); |
| 7483 | const themeVar = styles.getPropertyValue("--dhx-scheduler-theme"); |
| 7484 | let isCssVarTheme = !!themeVar; |
| 7485 | let themeName; |
| 7486 | let cssValues = {}; |
| 7487 | let oldMaterialTheme = false; |
| 7488 | if (isCssVarTheme) { |
| 7489 | themeName = themeVar; |
| 7490 | for (let i in scheduler2.xy) { |
| 7491 | cssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`); |
| 7492 | } |
| 7493 | cssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`); |
| 7494 | cssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`); |
| 7495 | } else { |
| 7496 | themeName = themeNameFromFile(); |
| 7497 | oldMaterialTheme = scheduler2._is_material_skin(); |
| 7498 | } |
| 7499 | scheduler2._theme_info = { theme: themeName, cssVarTheme: isCssVarTheme, oldMaterialTheme, values: cssValues }; |
| 7500 | if (scheduler2._theme_info.cssVarTheme) { |
| 7501 | const themeVariables = this._theme_info.values; |
| 7502 | for (let i in scheduler2.xy) { |
| 7503 | if (!isNaN(parseInt(themeVariables[i]))) { |
| 7504 | scheduler2.xy[i] = parseInt(themeVariables[i]); |
| 7505 | } |
| 7506 | } |
| 7507 | } |
| 7508 | }; |
| 7509 | var calculatedMaterial; |
| 7510 | function checkIfMaterialSkin() { |
| 7511 | if (calculatedMaterial === void 0) { |
| 7512 | var probe = document.createElement("div"); |
| 7513 | probe.style.position = "absolute"; |
| 7514 | probe.style.left = "-9999px"; |
| 7515 | probe.style.top = "-9999px"; |
no test coverage detected