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

Function Bt

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

Source from the content-addressed store, hash-verified

1778 });
1779}
1780function Bt(e) {
1781 function i() {
1782 const t = e.config.csp === !0, n = !!window.Sfdc || !!window.$A || window.Aura || "$shadowResolver$" in document.body;
1783 return t || n ? e.$root : document.body;
1784 }
1785 e._lightbox_controls = {}, e.formSection = function(t) {
1786 for (var n = this.config.lightbox.sections, s = 0; s < n.length && n[s].name != t; s++)
1787 ;
1788 if (s === n.length)
1789 return null;
1790 var a = n[s];
1791 e._lightbox || e.getLightbox();
1792 var o = e._lightbox.querySelector(`#${a.id}`), _ = o.nextSibling, r = { section: a, header: o, node: _, getValue: function(l) {
1793 return e.form_blocks[a.type].get_value(_, l || {}, a);
1794 }, setValue: function(l, h) {
1795 return e.form_blocks[a.type].set_value(_, l, h || {}, a);
1796 } }, d = e._lightbox_controls["get_" + a.type + "_control"];
1797 return d ? d(r) : r;
1798 }, e._lightbox_controls.get_template_control = function(t) {
1799 return t.control = t.node, t;
1800 }, e._lightbox_controls.get_select_control = function(t) {
1801 return t.control = t.node.getElementsByTagName("select")[0], t;
1802 }, e._lightbox_controls.get_textarea_control = function(t) {
1803 return t.control = t.node.getElementsByTagName("textarea")[0], t;
1804 }, e._lightbox_controls.get_time_control = function(t) {
1805 return t.control = t.node.getElementsByTagName("select"), t;
1806 }, e._lightbox_controls.defaults = { template: { height: 30 }, textarea: { height: 200 }, select: { height: 23 }, time: { height: 20 } }, e.form_blocks = { template: { render: function(t) {
1807 return `<div class='dhx_cal_ltext dhx_cal_template' ${t.height ? `style='height:${t.height}px;'` : ""}></div>`;
1808 }, set_value: function(t, n, s, a) {
1809 t.innerHTML = n || "";
1810 }, get_value: function(t, n, s) {
1811 return t.innerHTML || "";
1812 }, focus: function(t) {
1813 } }, textarea: { render: function(t) {
1814 return `<div class='dhx_cal_ltext' ${t.height ? `style='height:${t.height}px;'` : ""}><textarea ${t.placeholder ? `placeholder='${t.placeholder}'` : ""}></textarea></div>`;
1815 }, set_value: function(t, n, s) {
1816 e.form_blocks.textarea._get_input(t).value = n || "";
1817 }, get_value: function(t, n) {
1818 return e.form_blocks.textarea._get_input(t).value;
1819 }, focus: function(t) {
1820 var n = e.form_blocks.textarea._get_input(t);
1821 e._focus(n, !0);
1822 }, _get_input: function(t) {
1823 return t.getElementsByTagName("textarea")[0];
1824 } }, select: { render: function(t) {
1825 for (var n = `<div class='dhx_cal_ltext dhx_cal_select' ${t.height ? `style='height:${t.height}px;'` : ""}><select style='width:100%;'>`, s = 0; s < t.options.length; s++)
1826 n += "<option value='" + t.options[s].key + "'>" + t.options[s].label + "</option>";
1827 return n += "</select></div>";
1828 }, set_value: function(t, n, s, a) {
1829 var o = t.firstChild;
1830 !o._dhx_onchange && a.onchange && (e.event(o, "change", a.onchange), o._dhx_onchange = !0), n === void 0 && (n = (o.options[0] || {}).value), o.value = n || "";
1831 }, get_value: function(t, n) {
1832 return t.firstChild.value;
1833 }, focus: function(t) {
1834 var n = t.firstChild;
1835 e._focus(n, !0);
1836 } }, time: { render: function(t) {
1837 t.time_format || (t.time_format = ["%H:%i", "%d", "%m", "%Y"]), t._time_format_order = {};

Callers 1

eaFunction · 0.70

Calls 15

dFunction · 0.70
cFunction · 0.70
iFunction · 0.70
getLightboxMethod · 0.65
eventMethod · 0.65
date_partMethod · 0.65
time_pickerMethod · 0.65
time_partMethod · 0.65
addMethod · 0.65
getEventMethod · 0.65
callEventMethod · 0.65
showCoverMethod · 0.65

Tested by

no test coverage detected