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

Function Gt

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

Source from the content-addressed store, hash-verified

2397 return this.serverProcessor = e, this.action_param = "!nativeeditor_status", this.object = null, this.updatedRows = [], this.autoUpdate = !0, this.updateMode = "cell", this._tMode = "GET", this._headers = null, this._payload = null, this.post_delim = "_", this._waitMode = 0, this._in_progress = {}, this._invalid = {}, this.messages = [], this.styles = { updated: "font-weight:bold;", inserted: "font-weight:bold;", deleted: "text-decoration : line-through;", invalid: "background-color:FFE0E0;", invalid_cell: "border-bottom:2px solid red;", error: "color:red;", clear: "font-weight:normal;text-decoration:none;" }, this.enableUTFencoding(!0), Ye(this), this;
2398}
2399function Gt(e) {
2400 var i = "data-dhxbox", t = null;
2401 function n(f, y, w) {
2402 var D = f.callback;
2403 D && D(y, w), g.hide(f.box), t = f.box = null;
2404 }
2405 function s(f) {
2406 if (t) {
2407 var y = f.which || f.keyCode, w = !1;
2408 if (c.keyboard) {
2409 if (y == 13 || y == 32) {
2410 var D = f.target || f.srcElement;
2411 he.getClassName(D).indexOf("scheduler_popup_button") > -1 && D.click ? D.click() : (n(t, !0), w = !0);
2412 }
2413 y == 27 && (n(t, !1), w = !0);
2414 }
2415 return w ? (f.preventDefault && f.preventDefault(), !(f.cancelBubble = !0)) : void 0;
2416 }
2417 }
2418 function a(f) {
2419 a.cover || (a.cover = document.createElement("div"), e.event(a.cover, "keydown", s), a.cover.className = "dhx_modal_cover", document.body.appendChild(a.cover)), a.cover.style.display = f ? "inline-block" : "none";
2420 }
2421 function o(f, y, w) {
2422 var D = e._waiAria.messageButtonAttrString(f), M = (y || "").toLowerCase().replace(/ /g, "_");
2423 return `<div ${D} class='scheduler_popup_button dhtmlx_popup_button ${`scheduler_${M}_button dhtmlx_${M}_button`}' data-result='${w}' result='${w}' ><div>${f}</div></div>`;
2424 }
2425 function _() {
2426 for (var f = [].slice.apply(arguments, [0]), y = 0; y < f.length; y++)
2427 if (f[y])
2428 return f[y];
2429 }
2430 function r(f, y, w) {
2431 var D = f.tagName ? f : function(N, v, x) {
2432 var b = document.createElement("div"), E = ne.uid();
2433 e._waiAria.messageModalAttr(b, E), b.className = " scheduler_modal_box dhtmlx_modal_box scheduler-" + N.type + " dhtmlx-" + N.type, b.setAttribute(i, 1);
2434 var S = "";
2435 if (N.width && (b.style.width = N.width), N.height && (b.style.height = N.height), N.title && (S += '<div class="scheduler_popup_title dhtmlx_popup_title">' + N.title + "</div>"), S += '<div class="scheduler_popup_text dhtmlx_popup_text" id="' + E + '"><span>' + (N.content ? "" : N.text) + '</span></div><div class="scheduler_popup_controls dhtmlx_popup_controls">', v && (S += o(_(N.ok, e.locale.labels.message_ok, "OK"), "ok", !0)), x && (S += o(_(N.cancel, e.locale.labels.message_cancel, "Cancel"), "cancel", !1)), N.buttons)
2436 for (var T = 0; T < N.buttons.length; T++) {
2437 var A = N.buttons[T];
2438 S += typeof A == "object" ? o(A.label, A.css || "scheduler_" + A.label.toLowerCase() + "_button dhtmlx_" + A.label.toLowerCase() + "_button", A.value || T) : o(A, A, T);
2439 }
2440 if (S += "</div>", b.innerHTML = S, N.content) {
2441 var C = N.content;
2442 typeof C == "string" && (C = document.getElementById(C)), C.style.display == "none" && (C.style.display = ""), b.childNodes[N.title ? 1 : 0].appendChild(C);
2443 }
2444 return e.event(b, "click", function($) {
2445 var H = $.target || $.srcElement;
2446 if (H.className || (H = H.parentNode), he.closest(H, ".scheduler_popup_button")) {
2447 var O = H.getAttribute("data-result");
2448 n(N, O = O == "true" || O != "false" && O, $);
2449 }
2450 }), N.box = b, (v || x) && (t = N), b;
2451 }(f, y, w);
2452 f.hidden || a(!0), document.body.appendChild(D);
2453 var M = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - D.offsetWidth) / 2)), k = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - D.offsetHeight) / 2));
2454 return f.position == "top" ? D.style.top = "-3px" : D.style.top = k + "px", D.style.left = M + "px", e.event(D, "keydown", s), g.focus(D), f.hidden && g.hide(D), e.callEvent("onMessagePopup", [D]), D;
2455 }
2456 function d(f) {

Callers 1

eaFunction · 0.70

Calls 8

aFunction · 0.70
dFunction · 0.70
lFunction · 0.70
eventMethod · 0.65
callEventMethod · 0.65
focusMethod · 0.65
attachEventMethod · 0.65
hideMethod · 0.45

Tested by

no test coverage detected