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

Function _createBox

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

Source from the content-addressed store, hash-verified

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

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