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

Function Ft

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

Source from the content-addressed store, hash-verified

1569 }).bind(e);
1570}
1571function Ft(e) {
1572 e._loaded = {}, e._load = function(t, n) {
1573 if (t = t || this._load_url) {
1574 var s;
1575 if (t += (t.indexOf("?") == -1 ? "?" : "&") + "timeshift=" + (/* @__PURE__ */ new Date()).getTimezoneOffset(), this.config.prevent_cache && (t += "&uid=" + this.uid()), n = n || this._date, this._load_mode) {
1576 var a = this.templates.load_format;
1577 for (n = this.date[this._load_mode + "_start"](new Date(n.valueOf())); n > this._min_date; )
1578 n = this.date.add(n, -1, this._load_mode);
1579 s = n;
1580 for (var o = !0; s < this._max_date; )
1581 s = this.date.add(s, 1, this._load_mode), this._loaded[a(n)] && o ? n = this.date.add(n, 1, this._load_mode) : o = !1;
1582 var _ = s;
1583 do
1584 s = _, _ = this.date.add(s, -1, this._load_mode);
1585 while (_ > n && this._loaded[a(_)]);
1586 if (s <= n)
1587 return !1;
1588 for (e.ajax.get(t + "&from=" + a(n) + "&to=" + a(s), r); n < s; )
1589 this._loaded[a(n)] = !0, n = this.date.add(n, 1, this._load_mode);
1590 } else
1591 e.ajax.get(t, r);
1592 return this.callEvent("onXLS", []), this.callEvent("onLoadStart", []), !0;
1593 }
1594 function r(d) {
1595 e.on_load(d), e.callEvent("onLoadEnd", []);
1596 }
1597 }, e._parsers = {}, function(t) {
1598 t._parsers.xml = { canParse: function(n, s) {
1599 if (s.responseXML && s.responseXML.firstChild)
1600 return !0;
1601 try {
1602 var a = t.ajax.parse(s.responseText), o = t.ajax.xmltop("data", a);
1603 if (o && o.tagName === "data")
1604 return !0;
1605 } catch {
1606 }
1607 return !1;
1608 }, parse: function(n) {
1609 var s;
1610 if (n.xmlDoc.responseXML || (n.xmlDoc.responseXML = t.ajax.parse(n.xmlDoc.responseText)), (s = t.ajax.xmltop("data", n.xmlDoc)).tagName != "data")
1611 return null;
1612 var a = s.getAttribute("dhx_security");
1613 a && (window.dhtmlx && (window.dhtmlx.security_key = a), t.security_key = a);
1614 for (var o = t.ajax.xpath("//coll_options", n.xmlDoc), _ = 0; _ < o.length; _++) {
1615 var r = o[_].getAttribute("for"), d = t.serverList[r];
1616 d || (t.serverList[r] = d = []), d.splice(0, d.length);
1617 for (var l = t.ajax.xpath(".//item", o[_]), h = 0; h < l.length; h++) {
1618 for (var p = l[h].attributes, m = { key: l[h].getAttribute("value"), label: l[h].getAttribute("label") }, g = 0; g < p.length; g++) {
1619 var c = p[g];
1620 c.nodeName != "value" && c.nodeName != "label" && (m[c.nodeName] = c.nodeValue);
1621 }
1622 d.push(m);
1623 }
1624 }
1625 o.length && t.callEvent("onOptionsLoad", []);
1626 var u = t.ajax.xpath("//userdata", n.xmlDoc);
1627 for (_ = 0; _ < u.length; _++) {
1628 var f = t._xmlNodeToJSON(u[_]);

Callers 1

eaFunction · 0.70

Calls 13

vtFunction · 0.85
aFunction · 0.70
iFunction · 0.70
uidMethod · 0.65
addMethod · 0.65
callEventMethod · 0.65
parseMethod · 0.65
parse_dateMethod · 0.65
addEventMethod · 0.65
definedMethod · 0.65
xml_formatMethod · 0.65
format_dateMethod · 0.65

Tested by

no test coverage detected