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

Function _createBox

codebase/sources/dhtmlxscheduler.js:8792–8810  ·  view source on GitHub ↗
(config, ok, cancel)

Source from the content-addressed store, hash-verified

8790 return box;
8791 }
8792 function _createBox(config, ok, cancel) {
8793 var box = config.tagName ? config : _boxStructure(config, ok, cancel);
8794 if (!config.hidden)
8795 modality(true);
8796 document.body.appendChild(box);
8797 var x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));
8798 var y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));
8799 if (config.position == "top")
8800 box.style.top = "-3px";
8801 else
8802 box.style.top = y + "px";
8803 box.style.left = x + "px";
8804 scheduler2.event(box, "keydown", modal_key);
8805 modalBox.focus(box);
8806 if (config.hidden)
8807 modalBox.hide(box);
8808 scheduler2.callEvent("onMessagePopup", [box]);
8809 return box;
8810 }
8811 function alertPopup(config) {
8812 return _createBox(config, true, false);
8813 }

Callers 3

alertPopupFunction · 0.70
confirmPopupFunction · 0.70
boxPopupFunction · 0.70

Calls 6

_boxStructureFunction · 0.70
modalityFunction · 0.70
eventMethod · 0.65
focusMethod · 0.65
callEventMethod · 0.65
hideMethod · 0.45

Tested by

no test coverage detected