dhtmlx-scheduler 7.2.3 → 7.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bower.json +1 -1
- package/codebase/dhtmlxscheduler.es.js +782 -764
- package/codebase/dhtmlxscheduler.es.js.map +1 -1
- package/codebase/dhtmlxscheduler.js +38 -38
- package/codebase/dhtmlxscheduler.js.map +1 -1
- package/codebase/sources/dhtmlxscheduler.es.js +32 -9
- package/codebase/sources/dhtmlxscheduler.es.js.map +1 -1
- package/codebase/sources/dhtmlxscheduler.js +32 -9
- package/codebase/sources/dhtmlxscheduler.js.map +1 -1
- package/codebase/sources/less/package.json +1 -1
- package/package.json +1 -1
- package/whatsnew.md +9 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @license
|
|
2
2
|
|
|
3
|
-
dhtmlxScheduler v.7.2.
|
|
3
|
+
dhtmlxScheduler v.7.2.4 Standard
|
|
4
4
|
|
|
5
5
|
To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
|
|
6
6
|
|
|
@@ -19,8 +19,8 @@ function St(e) {
|
|
|
19
19
|
}
|
|
20
20
|
function _(d) {
|
|
21
21
|
const { event: l, layout: c, viewName: f, sectionId: m, eventNode: p } = d;
|
|
22
|
-
(function(v,
|
|
23
|
-
switch (
|
|
22
|
+
(function(v, g) {
|
|
23
|
+
switch (g) {
|
|
24
24
|
case "month":
|
|
25
25
|
v.style.top = "", v.style.left = "";
|
|
26
26
|
break;
|
|
@@ -36,7 +36,7 @@ function St(e) {
|
|
|
36
36
|
if (c == "timeline") {
|
|
37
37
|
const v = e.getView(f);
|
|
38
38
|
if (v.round_position) {
|
|
39
|
-
const
|
|
39
|
+
const g = e._get_date_index(v, l.start_date), x = v._trace_x[g];
|
|
40
40
|
u.start_date = x;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -49,15 +49,15 @@ function St(e) {
|
|
|
49
49
|
case "month":
|
|
50
50
|
c = function(f) {
|
|
51
51
|
let m = [];
|
|
52
|
-
const { event: p, layout: h, viewName: u, sectionId: v } = f,
|
|
52
|
+
const { event: p, layout: h, viewName: u, sectionId: v } = f, g = [];
|
|
53
53
|
let x = new Date(p.start_date);
|
|
54
54
|
for (; x.valueOf() < p.end_date.valueOf(); ) {
|
|
55
55
|
let k = { start_date: x };
|
|
56
|
-
|
|
56
|
+
g.push(k), x = e.date.week_start(e.date.add(x, 1, "week"));
|
|
57
57
|
}
|
|
58
58
|
let D = e.$container.querySelectorAll(`[${e.config.event_attribute}='${p.id}']`);
|
|
59
59
|
for (let k = 0; k < D.length; k++) {
|
|
60
|
-
const S = { event:
|
|
60
|
+
const S = { event: g[k], layout: h, viewName: u, sectionId: v, eventNode: D[k].cloneNode(!0) };
|
|
61
61
|
m.push(_(S));
|
|
62
62
|
}
|
|
63
63
|
return m;
|
|
@@ -68,12 +68,12 @@ function St(e) {
|
|
|
68
68
|
c = function(f) {
|
|
69
69
|
let m = [];
|
|
70
70
|
const { event: p, layout: h, viewName: u, eventNode: v } = f;
|
|
71
|
-
let
|
|
71
|
+
let g = function(x) {
|
|
72
72
|
const D = e.getView(x);
|
|
73
73
|
return D.y_property ? D.y_property : D.map_to ? D.map_to : void 0;
|
|
74
74
|
}(u);
|
|
75
|
-
if (
|
|
76
|
-
const x = String(p[
|
|
75
|
+
if (g) {
|
|
76
|
+
const x = String(p[g]).split(e.config.section_delimiter).map((k) => String(k)), D = [];
|
|
77
77
|
for (let k = 0; k < x.length; k++) {
|
|
78
78
|
D[k] = v.cloneNode(!0);
|
|
79
79
|
const S = { event: p, layout: h, viewName: u, sectionId: x[k], eventNode: D[k] };
|
|
@@ -86,10 +86,10 @@ function St(e) {
|
|
|
86
86
|
default:
|
|
87
87
|
c = function(f) {
|
|
88
88
|
const { event: m, layout: p, viewName: h, sectionId: u } = f;
|
|
89
|
-
let v = [],
|
|
90
|
-
if (
|
|
91
|
-
for (let x = 0; x <
|
|
92
|
-
let D =
|
|
89
|
+
let v = [], g = e.$container.querySelectorAll(`[${e.config.event_attribute}='${m.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);
|
|
90
|
+
if (g)
|
|
91
|
+
for (let x = 0; x < g.length; x++) {
|
|
92
|
+
let D = g[x].cloneNode(!0);
|
|
93
93
|
const k = { event: { start_date: /* @__PURE__ */ new Date(+D.getAttribute("data-bar-start")), end_date: /* @__PURE__ */ new Date(+D.getAttribute("data-bar-end")) }, layout: p, viewName: h, sectionId: u, eventNode: D };
|
|
94
94
|
v.push(_(k));
|
|
95
95
|
}
|
|
@@ -146,8 +146,8 @@ function Mt(e) {
|
|
|
146
146
|
var f = +e.date.date_part(new Date(d)), m = s(n, c, d.getDay(), f, o);
|
|
147
147
|
if (m)
|
|
148
148
|
for (var p = 0; p < m.length; p += 2) {
|
|
149
|
-
var h = e._get_zone_minutes(d), u = n.end_date > l || n.end_date.getDate() != d.getDate() ? 1440 : e._get_zone_minutes(n.end_date), v = m[p],
|
|
150
|
-
if (v < u &&
|
|
149
|
+
var h = e._get_zone_minutes(d), u = n.end_date > l || n.end_date.getDate() != d.getDate() ? 1440 : e._get_zone_minutes(n.end_date), v = m[p], g = m[p + 1];
|
|
150
|
+
if (v < u && g > h && !(a = typeof _ == "function" && _(n, h, u, v, g)))
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -164,8 +164,8 @@ function Mt(e) {
|
|
|
164
164
|
for (var d = !0, l = 0; l < a.length; l++) {
|
|
165
165
|
var c = !0, f = a[l];
|
|
166
166
|
f._timed = e.isOneDayEvent(f), (c = !_.limit_start || !_.limit_end || f.start_date.valueOf() >= _.limit_start.valueOf() && f.end_date.valueOf() <= _.limit_end.valueOf()) && (c = !e.checkInMarkedTimespan(f, i, function(m, p, h, u, v) {
|
|
167
|
-
var
|
|
168
|
-
return p <= v && p >= u && ((v == 1440 || h <= v) && (
|
|
167
|
+
var g = !0;
|
|
168
|
+
return p <= v && p >= u && ((v == 1440 || h <= v) && (g = !1), m._timed && o._drag_id && o._drag_mode == "new-size" ? (m.start_date.setHours(0), m.start_date.setMinutes(v)) : g = !1), (h >= u && h <= v || p < u && h > v) && (m._timed && o._drag_id && o._drag_mode == "new-size" ? (m.end_date.setHours(0), m.end_date.setMinutes(u)) : g = !1), g;
|
|
169
169
|
})), c || (c = o.checkEvent("onLimitViolation") ? o.callEvent("onLimitViolation", [f.id, f]) : c), d = d && c;
|
|
170
170
|
}
|
|
171
171
|
return d || (o._drag_id = null, o._drag_mode = null), d;
|
|
@@ -237,11 +237,11 @@ function Mt(e) {
|
|
|
237
237
|
for (var p = 0; p < _.length; p++) {
|
|
238
238
|
var h = _[p], u = h.start_date, v = h.end_date;
|
|
239
239
|
if (u && v)
|
|
240
|
-
for (var
|
|
240
|
+
for (var g = e.date.date_part(new Date(u)), x = e.date.add(g, 1, "day"); g < v; ) {
|
|
241
241
|
var D;
|
|
242
|
-
delete (D = e._lame_copy({}, h)).start_date, delete D.end_date, D.days =
|
|
243
|
-
var k = u >
|
|
244
|
-
D.zones = [k, S], o.push(D),
|
|
242
|
+
delete (D = e._lame_copy({}, h)).start_date, delete D.end_date, D.days = g.valueOf();
|
|
243
|
+
var k = u > g ? e._get_zone_minutes(u) : 0, S = v > x || v.getDate() != g.getDate() ? 1440 : e._get_zone_minutes(v);
|
|
244
|
+
D.zones = [k, S], o.push(D), g = x, x = e.date.add(x, 1, "day");
|
|
245
245
|
}
|
|
246
246
|
else
|
|
247
247
|
h.days instanceof Date && (h.days = e.date.date_part(h.days).valueOf()), h.zones = n.zones.slice(), o.push(h);
|
|
@@ -277,16 +277,16 @@ function Mt(e) {
|
|
|
277
277
|
}
|
|
278
278
|
var h = n.zones, u = e._get_css_classes_by_config(n);
|
|
279
279
|
if (e._table_view && e._mode == "month") {
|
|
280
|
-
var v = [],
|
|
280
|
+
var v = [], g = [];
|
|
281
281
|
if (o)
|
|
282
|
-
v.push(o),
|
|
282
|
+
v.push(o), g.push(_);
|
|
283
283
|
else {
|
|
284
|
-
|
|
285
|
-
for (var x = 0; x <
|
|
286
|
-
v.push(this._scales[
|
|
284
|
+
g = f ? [f] : e._get_dates_by_index(_);
|
|
285
|
+
for (var x = 0; x < g.length; x++)
|
|
286
|
+
v.push(this._scales[g[x]]);
|
|
287
287
|
}
|
|
288
288
|
for (x = 0; x < v.length; x++) {
|
|
289
|
-
o = v[x], _ =
|
|
289
|
+
o = v[x], _ = g[x];
|
|
290
290
|
var D = this.locate_holder_day(_, !1) % this._cols.length;
|
|
291
291
|
if (!this._ignores[D]) {
|
|
292
292
|
var k = e._get_block_by_config(n);
|
|
@@ -300,16 +300,16 @@ function Mt(e) {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
} else {
|
|
303
|
-
var
|
|
303
|
+
var y = _;
|
|
304
304
|
if (this._ignores[this.locate_holder_day(_, !1)])
|
|
305
305
|
return a;
|
|
306
306
|
if (this._props && this._props[this._mode] && n.sections && n.sections[this._mode]) {
|
|
307
307
|
var b = this._props[this._mode];
|
|
308
|
-
|
|
308
|
+
y = b.order[n.sections[this._mode]];
|
|
309
309
|
var w = b.order[n.sections[this._mode]];
|
|
310
|
-
b.days > 1 ?
|
|
310
|
+
b.days > 1 ? y = y * (b.size || b.options.length) + w : (y = w, b.size && y > b.position + b.size && (y = 0));
|
|
311
311
|
}
|
|
312
|
-
for (o = o || e.locate_holder(
|
|
312
|
+
for (o = o || e.locate_holder(y), x = 0; x < h.length; x += 2) {
|
|
313
313
|
var E, N;
|
|
314
314
|
if (M = Math.max(h[x], 60 * d.first_hour), (E = Math.min(h[x + 1], 60 * d.last_hour)) <= M) {
|
|
315
315
|
if (x + 2 < h.length)
|
|
@@ -488,7 +488,7 @@ function Mt(e) {
|
|
|
488
488
|
} else
|
|
489
489
|
o = e.date.date_part(new Date(this._date));
|
|
490
490
|
if (_ = o.getDay(), a = o.valueOf(), l[d] && l[d][h.key]) {
|
|
491
|
-
var
|
|
491
|
+
var g = l[d][h.key], x = e._get_types_to_render(g[_], g[a]);
|
|
492
492
|
c.push.apply(c, e._get_configs_to_render(x));
|
|
493
493
|
}
|
|
494
494
|
}
|
|
@@ -805,7 +805,7 @@ var Lt = Date.now();
|
|
|
805
805
|
function Te(e) {
|
|
806
806
|
return !(!e || typeof e != "object") && !!(e.getFullYear && e.getMonth && e.getDate);
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const re = { uid: function() {
|
|
809
809
|
return Lt++;
|
|
810
810
|
}, mixin: function(e, i, t) {
|
|
811
811
|
for (var r in i)
|
|
@@ -892,10 +892,10 @@ function $t(e) {
|
|
|
892
892
|
}), h;
|
|
893
893
|
};
|
|
894
894
|
function l(p) {
|
|
895
|
-
var h = function(
|
|
895
|
+
var h = function(g) {
|
|
896
896
|
var x;
|
|
897
|
-
if (
|
|
898
|
-
switch (
|
|
897
|
+
if (g.view)
|
|
898
|
+
switch (g.view) {
|
|
899
899
|
case "today":
|
|
900
900
|
case "next":
|
|
901
901
|
case "prev":
|
|
@@ -917,7 +917,7 @@ function $t(e) {
|
|
|
917
917
|
x = s;
|
|
918
918
|
}
|
|
919
919
|
else
|
|
920
|
-
|
|
920
|
+
g.rows ? x = t : g.cols && (x = r);
|
|
921
921
|
return x;
|
|
922
922
|
}(p);
|
|
923
923
|
if (h) {
|
|
@@ -936,8 +936,8 @@ function $t(e) {
|
|
|
936
936
|
var h, u = document.createDocumentFragment();
|
|
937
937
|
h = Array.isArray(p) ? p : [p];
|
|
938
938
|
for (var v = 0; v < h.length; v++) {
|
|
939
|
-
var
|
|
940
|
-
x.view === "day" && h[v + 1] && ((
|
|
939
|
+
var g, x = c(h[v]);
|
|
940
|
+
x.view === "day" && h[v + 1] && ((g = c(h[v + 1])).view !== "week" && g.view !== "month" || (x.$firstTab = !0, x.$segmentedTab = !0)), x.view === "week" && h[v - 1] && ((g = c(h[v + 1])).view !== "week" && g.view !== "month" || (x.$segmentedTab = !0)), x.view === "month" && h[v - 1] && ((g = c(h[v - 1])).view !== "week" && g.view !== "day" || (x.$lastTab = !0, x.$segmentedTab = !0));
|
|
941
941
|
var D = l(x);
|
|
942
942
|
u.appendChild(D), (x.cols || x.rows) && D.appendChild(f(x.cols || x.rows));
|
|
943
943
|
}
|
|
@@ -1522,7 +1522,7 @@ function Vt(e) {
|
|
|
1522
1522
|
return new Date(v);
|
|
1523
1523
|
if (typeof v == "number")
|
|
1524
1524
|
return new Date(v);
|
|
1525
|
-
if (
|
|
1525
|
+
if (g = v, l.test(String(g)))
|
|
1526
1526
|
return p(v);
|
|
1527
1527
|
if (function(x) {
|
|
1528
1528
|
return c.test(String(x));
|
|
@@ -1537,7 +1537,7 @@ function Vt(e) {
|
|
|
1537
1537
|
}(v))
|
|
1538
1538
|
return new Date(v);
|
|
1539
1539
|
}
|
|
1540
|
-
var
|
|
1540
|
+
var g;
|
|
1541
1541
|
return d.call(e, v);
|
|
1542
1542
|
};
|
|
1543
1543
|
}, getISOWeek: function(n) {
|
|
@@ -1625,12 +1625,12 @@ function Ft(e) {
|
|
|
1625
1625
|
var v = t._xmlNodeToJSON(u[_]);
|
|
1626
1626
|
t._userdata[v.name] = v.text;
|
|
1627
1627
|
}
|
|
1628
|
-
var
|
|
1628
|
+
var g = [];
|
|
1629
1629
|
for (s = t.ajax.xpath("//event", r.xmlDoc), _ = 0; _ < s.length; _++) {
|
|
1630
|
-
var x =
|
|
1630
|
+
var x = g[_] = t._xmlNodeToJSON(s[_]);
|
|
1631
1631
|
t._init_event(x);
|
|
1632
1632
|
}
|
|
1633
|
-
return
|
|
1633
|
+
return g;
|
|
1634
1634
|
} };
|
|
1635
1635
|
}(e), function(t) {
|
|
1636
1636
|
t.json = t._parsers.json = { canParse: function(r) {
|
|
@@ -1814,12 +1814,12 @@ function Bt(e) {
|
|
|
1814
1814
|
if (_)
|
|
1815
1815
|
return function(h) {
|
|
1816
1816
|
if (!r(h)) {
|
|
1817
|
-
var u = e.getState().drag_mode, v = !!e.matrix && e.matrix[e._mode],
|
|
1817
|
+
var u = e.getState().drag_mode, v = !!e.matrix && e.matrix[e._mode], g = e.render_view_data;
|
|
1818
1818
|
u == "create" && v && (e.render_view_data = function() {
|
|
1819
1819
|
for (var x = e.getState().drag_id, D = e.getEvent(x), k = v.y_property, S = e.getEvents(D.start_date, D.end_date), M = 0; M < S.length; M++)
|
|
1820
1820
|
S[M][k] != D[k] && (S.splice(M, 1), M--);
|
|
1821
1821
|
D._sorder = S.length - 1, D._count = S.length, this.render_data([D], e.getState().mode);
|
|
1822
|
-
}), e._on_mouse_move(h), u == "create" && v && (e.render_view_data =
|
|
1822
|
+
}), e._on_mouse_move(h), u == "create" && v && (e.render_view_data = g), h.preventDefault && h.preventDefault(), h.cancelBubble = !0;
|
|
1823
1823
|
}
|
|
1824
1824
|
}(p), m.preventDefault && m.preventDefault(), m.cancelBubble = !0, e._update_global_tip(), !1;
|
|
1825
1825
|
n = t(m), d && (n ? (s.target != n.target || Math.abs(s.pageX - n.pageX) > 5 || Math.abs(s.pageY - n.pageY) > 5) && (a = !0, clearTimeout(o)) : a = !0);
|
|
@@ -1838,8 +1838,8 @@ function Bt(e) {
|
|
|
1838
1838
|
e.$destroyed || e._on_dbl_click(p);
|
|
1839
1839
|
}, 50), m.preventDefault && m.preventDefault(), m.cancelBubble = !0, e._block_next_stop = !0, !1;
|
|
1840
1840
|
if (l = h, !a && !_ && e.config.touch_drag) {
|
|
1841
|
-
var u = e._locate_event(document.activeElement), v = e._locate_event(p.target),
|
|
1842
|
-
if (u && v && u == v && u !=
|
|
1841
|
+
var u = e._locate_event(document.activeElement), v = e._locate_event(p.target), g = s ? e._locate_event(s.target) : null;
|
|
1842
|
+
if (u && v && u == v && u != g)
|
|
1843
1843
|
return m.preventDefault && m.preventDefault(), m.cancelBubble = !0, e._ignore_next_click = !1, e._click.dhx_cal_data(p), s = p, !1;
|
|
1844
1844
|
o = setTimeout(function() {
|
|
1845
1845
|
if (!e.$destroyed) {
|
|
@@ -1858,9 +1858,9 @@ function Bt(e) {
|
|
|
1858
1858
|
return e.config.touch_swipe_dates && !_ && function(p, h, u, v) {
|
|
1859
1859
|
if (!p || !h)
|
|
1860
1860
|
return !1;
|
|
1861
|
-
for (var
|
|
1862
|
-
|
|
1863
|
-
if (
|
|
1861
|
+
for (var g = p.target; g && g != e._obj; )
|
|
1862
|
+
g = g.parentNode;
|
|
1863
|
+
if (g != e._obj || e.matrix && e.matrix[e.getState().mode] && e.matrix[e.getState().mode].scrollable)
|
|
1864
1864
|
return !1;
|
|
1865
1865
|
var x = Math.abs(p.pageY - h.pageY), D = Math.abs(p.pageX - h.pageX);
|
|
1866
1866
|
return x < v && D > u && (!x || D / x > 3) && (p.pageX > h.pageX ? e._click.dhx_cal_next_button() : e._click.dhx_cal_prev_button(), !0);
|
|
@@ -2034,19 +2034,19 @@ function He(e) {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
function Kt(e) {
|
|
2036
2036
|
var i = "data-dhxbox", t = null;
|
|
2037
|
-
function r(v,
|
|
2037
|
+
function r(v, g, x) {
|
|
2038
2038
|
var D = v.callback;
|
|
2039
|
-
D && D(
|
|
2039
|
+
D && D(g, x), p.hide(v.box), t = v.box = null;
|
|
2040
2040
|
}
|
|
2041
2041
|
function s(v) {
|
|
2042
2042
|
if (t) {
|
|
2043
|
-
var
|
|
2043
|
+
var g = v.which || v.keyCode, x = !1;
|
|
2044
2044
|
if (h.keyboard) {
|
|
2045
|
-
if (
|
|
2045
|
+
if (g == 13 || g == 32) {
|
|
2046
2046
|
var D = v.target || v.srcElement;
|
|
2047
2047
|
ue.getClassName(D).indexOf("scheduler_popup_button") > -1 && D.click ? D.click() : (r(t, !0), x = !0);
|
|
2048
2048
|
}
|
|
2049
|
-
|
|
2049
|
+
g == 27 && (r(t, !1), x = !0);
|
|
2050
2050
|
}
|
|
2051
2051
|
return x ? (v.preventDefault && v.preventDefault(), !(v.cancelBubble = !0)) : void 0;
|
|
2052
2052
|
}
|
|
@@ -2054,21 +2054,21 @@ function Kt(e) {
|
|
|
2054
2054
|
function n(v) {
|
|
2055
2055
|
n.cover || (n.cover = document.createElement("div"), e.event(n.cover, "keydown", s), n.cover.className = "dhx_modal_cover", document.body.appendChild(n.cover)), n.cover.style.display = v ? "inline-block" : "none";
|
|
2056
2056
|
}
|
|
2057
|
-
function o(v,
|
|
2058
|
-
var D = e._waiAria.messageButtonAttrString(v), k = (
|
|
2057
|
+
function o(v, g, x) {
|
|
2058
|
+
var D = e._waiAria.messageButtonAttrString(v), k = (g || "").toLowerCase().replace(/ /g, "_");
|
|
2059
2059
|
return `<div ${D} class='scheduler_popup_button dhtmlx_popup_button ${`scheduler_${k}_button dhtmlx_${k}_button`}' data-result='${x}' result='${x}' ><div>${v}</div></div>`;
|
|
2060
2060
|
}
|
|
2061
2061
|
function _() {
|
|
2062
|
-
for (var v = [].slice.apply(arguments, [0]),
|
|
2063
|
-
if (v[
|
|
2064
|
-
return v[
|
|
2062
|
+
for (var v = [].slice.apply(arguments, [0]), g = 0; g < v.length; g++)
|
|
2063
|
+
if (v[g])
|
|
2064
|
+
return v[g];
|
|
2065
2065
|
}
|
|
2066
|
-
function a(v,
|
|
2067
|
-
var D = v.tagName ? v : function(M,
|
|
2068
|
-
var w = document.createElement("div"), E =
|
|
2066
|
+
function a(v, g, x) {
|
|
2067
|
+
var D = v.tagName ? v : function(M, y, b) {
|
|
2068
|
+
var w = document.createElement("div"), E = re.uid();
|
|
2069
2069
|
e._waiAria.messageModalAttr(w, E), w.className = " scheduler_modal_box dhtmlx_modal_box scheduler-" + M.type + " dhtmlx-" + M.type, w.setAttribute(i, 1);
|
|
2070
2070
|
var N = "";
|
|
2071
|
-
if (M.width && (w.style.width = M.width), M.height && (w.style.height = M.height), M.title && (N += '<div class="scheduler_popup_title dhtmlx_popup_title">' + M.title + "</div>"), N += '<div class="scheduler_popup_text dhtmlx_popup_text" id="' + E + '"><span>' + (M.content ? "" : M.text) + '</span></div><div class="scheduler_popup_controls dhtmlx_popup_controls">',
|
|
2071
|
+
if (M.width && (w.style.width = M.width), M.height && (w.style.height = M.height), M.title && (N += '<div class="scheduler_popup_title dhtmlx_popup_title">' + M.title + "</div>"), N += '<div class="scheduler_popup_text dhtmlx_popup_text" id="' + E + '"><span>' + (M.content ? "" : M.text) + '</span></div><div class="scheduler_popup_controls dhtmlx_popup_controls">', y && (N += o(_(M.ok, e.locale.labels.message_ok, "OK"), "ok", !0)), b && (N += o(_(M.cancel, e.locale.labels.message_cancel, "Cancel"), "cancel", !1)), M.buttons)
|
|
2072
2072
|
for (var T = 0; T < M.buttons.length; T++) {
|
|
2073
2073
|
var A = M.buttons[T];
|
|
2074
2074
|
N += 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);
|
|
@@ -2083,8 +2083,8 @@ function Kt(e) {
|
|
|
2083
2083
|
var O = H.getAttribute("data-result");
|
|
2084
2084
|
r(M, O = O == "true" || O != "false" && O, $);
|
|
2085
2085
|
}
|
|
2086
|
-
}), M.box = w, (
|
|
2087
|
-
}(v,
|
|
2086
|
+
}), M.box = w, (y || b) && (t = M), w;
|
|
2087
|
+
}(v, g, x);
|
|
2088
2088
|
v.hidden || n(!0), document.body.appendChild(D);
|
|
2089
2089
|
var k = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - D.offsetWidth) / 2)), S = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - D.offsetHeight) / 2));
|
|
2090
2090
|
return v.position == "top" ? D.style.top = "-3px" : D.style.top = S + "px", D.style.left = k + "px", e.event(D, "keydown", s), p.focus(D), v.hidden && p.hide(D), e.callEvent("onMessagePopup", [D]), D;
|
|
@@ -2098,11 +2098,11 @@ function Kt(e) {
|
|
|
2098
2098
|
function c(v) {
|
|
2099
2099
|
return a(v);
|
|
2100
2100
|
}
|
|
2101
|
-
function f(v,
|
|
2102
|
-
return typeof v != "object" && (typeof
|
|
2101
|
+
function f(v, g, x) {
|
|
2102
|
+
return typeof v != "object" && (typeof g == "function" && (x = g, g = ""), v = { text: v, type: g, callback: x }), v;
|
|
2103
2103
|
}
|
|
2104
|
-
function m(v,
|
|
2105
|
-
return typeof v != "object" && (v = { text: v, type:
|
|
2104
|
+
function m(v, g, x, D, k) {
|
|
2105
|
+
return typeof v != "object" && (v = { text: v, type: g, expire: x, id: D, callback: k }), v.id = v.id || re.uid(), v.expire = v.expire || h.expire, v;
|
|
2106
2106
|
}
|
|
2107
2107
|
e.event(document, "keydown", s, !0);
|
|
2108
2108
|
var p = function() {
|
|
@@ -2115,11 +2115,11 @@ function Kt(e) {
|
|
|
2115
2115
|
v && (v.parentNode.removeChild(v), n(!1), e.callEvent("onAfterMessagePopup", [v]));
|
|
2116
2116
|
}, p.focus = function(v) {
|
|
2117
2117
|
setTimeout(function() {
|
|
2118
|
-
var
|
|
2119
|
-
|
|
2118
|
+
var g = ue.getFocusableNodes(v);
|
|
2119
|
+
g.length && g[0].focus && g[0].focus();
|
|
2120
2120
|
}, 1);
|
|
2121
2121
|
};
|
|
2122
|
-
var h = function(v,
|
|
2122
|
+
var h = function(v, g, x, D) {
|
|
2123
2123
|
switch ((v = m.apply(this, arguments)).type = v.type || "info", v.type.split("-")[0]) {
|
|
2124
2124
|
case "alert":
|
|
2125
2125
|
return d(v);
|
|
@@ -2139,21 +2139,21 @@ function Kt(e) {
|
|
|
2139
2139
|
}(v);
|
|
2140
2140
|
}
|
|
2141
2141
|
};
|
|
2142
|
-
h.seed = (/* @__PURE__ */ new Date()).valueOf(), h.uid =
|
|
2142
|
+
h.seed = (/* @__PURE__ */ new Date()).valueOf(), h.uid = re.uid, h.expire = 4e3, h.keyboard = !0, h.position = "top", h.pull = {}, h.timers = {}, h.hideAll = function() {
|
|
2143
2143
|
for (var v in h.pull)
|
|
2144
2144
|
h.hide(v);
|
|
2145
2145
|
}, h.hide = function(v) {
|
|
2146
|
-
var
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}, 2e3),
|
|
2146
|
+
var g = h.pull[v];
|
|
2147
|
+
g && g.parentNode && (window.setTimeout(function() {
|
|
2148
|
+
g.parentNode.removeChild(g), g = null;
|
|
2149
|
+
}, 2e3), g.className += " hidden", h.timers[v] && window.clearTimeout(h.timers[v]), delete h.pull[v]);
|
|
2150
2150
|
};
|
|
2151
2151
|
var u = [];
|
|
2152
2152
|
return e.attachEvent("onMessagePopup", function(v) {
|
|
2153
2153
|
u.push(v);
|
|
2154
2154
|
}), e.attachEvent("onAfterMessagePopup", function(v) {
|
|
2155
|
-
for (var
|
|
2156
|
-
u[
|
|
2155
|
+
for (var g = 0; g < u.length; g++)
|
|
2156
|
+
u[g] === v && (u.splice(g, 1), g--);
|
|
2157
2157
|
}), e.attachEvent("onDestroy", function() {
|
|
2158
2158
|
n.cover && n.cover.parentNode && n.cover.parentNode.removeChild(n.cover);
|
|
2159
2159
|
for (var v = 0; v < u.length; v++)
|
|
@@ -2302,8 +2302,8 @@ He.prototype = { setTransactionMode: function(e, i) {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
u = u || "updated";
|
|
2305
|
-
var v = i,
|
|
2306
|
-
h && (u = h.action || u, v = h.sid || v,
|
|
2305
|
+
var v = i, g = i;
|
|
2306
|
+
h && (u = h.action || u, v = h.sid || v, g = h.id || h.tid || g), t.afterUpdateCallback(v, g, u, h);
|
|
2307
2307
|
};
|
|
2308
2308
|
const p = "event";
|
|
2309
2309
|
var m;
|
|
@@ -2657,8 +2657,8 @@ class Sa {
|
|
|
2657
2657
|
let u = f.date.add(f.date.month_start(new Date(t)), 1, "month");
|
|
2658
2658
|
const v = f.date.date_part(f._currentDate());
|
|
2659
2659
|
u.getDay() !== 0 && (u = f.date.add(f.date.week_start(u), 1, "week"));
|
|
2660
|
-
let
|
|
2661
|
-
n &&
|
|
2660
|
+
let g = this._weeksBetween(m, u);
|
|
2661
|
+
n && g < n && (u = f.date.add(u, n - g, "week"));
|
|
2662
2662
|
let x = m;
|
|
2663
2663
|
const D = document.createElement("div");
|
|
2664
2664
|
for (D.classList.add("dhx_cal_datepicker_days"), this._domEvents.attach(D, "click", (k) => {
|
|
@@ -2716,7 +2716,7 @@ class Sa {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
2718
2718
|
function Ma(e) {
|
|
2719
|
-
const i = { version: "7.2.
|
|
2719
|
+
const i = { version: "7.2.4" };
|
|
2720
2720
|
i.$stateProvider = function() {
|
|
2721
2721
|
const a = {};
|
|
2722
2722
|
return { getState: function(d) {
|
|
@@ -2725,7 +2725,7 @@ function Ma(e) {
|
|
|
2725
2725
|
{
|
|
2726
2726
|
const l = {};
|
|
2727
2727
|
for (const c in a)
|
|
2728
|
-
a[c].internal ||
|
|
2728
|
+
a[c].internal || re.mixin(l, a[c].method(), !0);
|
|
2729
2729
|
return l;
|
|
2730
2730
|
}
|
|
2731
2731
|
}, registerProvider: function(d, l, c) {
|
|
@@ -2788,19 +2788,19 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2788
2788
|
}
|
|
2789
2789
|
a.init = function(h, u, v) {
|
|
2790
2790
|
if (!this.$destroyed) {
|
|
2791
|
-
if (u = u || a._currentDate(), v = v || "week", this._obj && this.unset_actions(), this._obj = typeof h == "string" ? document.getElementById(h) : h, this.$container = this._obj, this.$root = this._obj, !this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === "100%" && window.console.error(a._commonErrorMessages.collapsedContainer(), this.$container), this.config.wai_aria_attributes && this.config.wai_aria_application_role && this.$container.setAttribute("role", "application"), this.config.header || f(this.$container) || (this.config.header = function(
|
|
2791
|
+
if (u = u || a._currentDate(), v = v || "week", this._obj && this.unset_actions(), this._obj = typeof h == "string" ? document.getElementById(h) : h, this.$container = this._obj, this.$root = this._obj, !this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === "100%" && window.console.error(a._commonErrorMessages.collapsedContainer(), this.$container), this.config.wai_aria_attributes && this.config.wai_aria_application_role && this.$container.setAttribute("role", "application"), this.config.header || f(this.$container) || (this.config.header = function(g) {
|
|
2792
2792
|
const x = ["day", "week", "month"];
|
|
2793
|
-
if (
|
|
2794
|
-
for (const D in
|
|
2793
|
+
if (g.matrix)
|
|
2794
|
+
for (const D in g.matrix)
|
|
2795
2795
|
x.push(D);
|
|
2796
|
-
if (
|
|
2797
|
-
for (const D in
|
|
2796
|
+
if (g._props)
|
|
2797
|
+
for (const D in g._props)
|
|
2798
2798
|
x.push(D);
|
|
2799
|
-
if (
|
|
2800
|
-
for (const D in
|
|
2799
|
+
if (g._grid && g._grid.names)
|
|
2800
|
+
for (const D in g._grid.names)
|
|
2801
2801
|
x.push(D);
|
|
2802
2802
|
return ["map", "agenda", "week_agenda", "year"].forEach(function(D) {
|
|
2803
|
-
|
|
2803
|
+
g[D + "_view"] && x.push(D);
|
|
2804
2804
|
}), x.concat(["date"]).concat(["prev", "today", "next"]);
|
|
2805
2805
|
}(this), window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.", "Using a default header configuration: ", "scheduler.config.header = " + JSON.stringify(this.config.header, null, 2), "Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(`
|
|
2806
2806
|
`))), this.config.header)
|
|
@@ -2817,29 +2817,29 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2817
2817
|
}, a.set_sizes = function() {
|
|
2818
2818
|
var h = this._x = this._obj.clientWidth - this.xy.margin_left, u = this._table_view ? 0 : this.xy.scale_width + this.xy.scroll_width, v = this.$container.querySelector(".dhx_cal_scale_placeholder");
|
|
2819
2819
|
a._is_material_skin() ? (v || ((v = document.createElement("div")).className = "dhx_cal_scale_placeholder", this.$container.insertBefore(v, this._els.dhx_cal_header[0])), v.style.display = "block", this.set_xy(v, h, this.xy.scale_height + 1, 0, this._els.dhx_cal_header[0].offsetTop)) : v && v.parentNode.removeChild(v), this._lightbox && (a.$container.offsetWidth < 1200 || this._setLbPosition(document.querySelector(".dhx_cal_light"))), this._data_width = h - u, this._els.dhx_cal_navline[0].style.width = h + "px";
|
|
2820
|
-
const
|
|
2821
|
-
this.set_xy(
|
|
2822
|
-
}, a.set_xy = function(h, u, v,
|
|
2820
|
+
const g = this._els.dhx_cal_header[0];
|
|
2821
|
+
this.set_xy(g, this._data_width, this.xy.scale_height), g.style.left = "", g.style.right = "", this._table_view ? this.config.rtl ? g.style.right = "-1px" : g.style.left = "-1px" : this.config.rtl ? g.style.right = `${this.xy.scale_width}px` : g.style.left = `${this.xy.scale_width}px`;
|
|
2822
|
+
}, a.set_xy = function(h, u, v, g, x) {
|
|
2823
2823
|
function D(S) {
|
|
2824
2824
|
let M = S;
|
|
2825
2825
|
return isNaN(Number(M)) || (M = Math.max(0, M) + "px"), M;
|
|
2826
2826
|
}
|
|
2827
2827
|
var k = "left";
|
|
2828
|
-
u !== void 0 && (h.style.width = D(u)), v !== void 0 && (h.style.height = D(v)), arguments.length > 3 && (
|
|
2828
|
+
u !== void 0 && (h.style.width = D(u)), v !== void 0 && (h.style.height = D(v)), arguments.length > 3 && (g !== void 0 && (this.config.rtl && (k = "right"), h.style[k] = g + "px"), x !== void 0 && (h.style.top = x + "px"));
|
|
2829
2829
|
}, a.get_elements = function() {
|
|
2830
2830
|
const h = this._obj.getElementsByTagName("DIV");
|
|
2831
2831
|
for (let u = 0; u < h.length; u++) {
|
|
2832
2832
|
let v = a._getClassName(h[u]);
|
|
2833
|
-
const
|
|
2833
|
+
const g = h[u].getAttribute("data-tab") || h[u].getAttribute("name") || "";
|
|
2834
2834
|
v && (v = v.split(" ")[0]), this._els[v] || (this._els[v] = []), this._els[v].push(h[u]);
|
|
2835
|
-
let x = a.locale.labels[
|
|
2836
|
-
typeof x != "string" &&
|
|
2835
|
+
let x = a.locale.labels[g + "_tab"] || a.locale.labels[g || v];
|
|
2836
|
+
typeof x != "string" && g && !h[u].innerHTML && (x = g.split("_")[0]), x && (this._waiAria.labelAttr(h[u], x), h[u].innerHTML = x);
|
|
2837
2837
|
}
|
|
2838
2838
|
};
|
|
2839
2839
|
const m = a._createDomEventScope();
|
|
2840
2840
|
function p(h, u) {
|
|
2841
|
-
const v = new Date(h),
|
|
2842
|
-
return Math.abs(
|
|
2841
|
+
const v = new Date(h), g = (new Date(u).getTime() - v.getTime()) / 864e5;
|
|
2842
|
+
return Math.abs(g);
|
|
2843
2843
|
}
|
|
2844
2844
|
a.unset_actions = function() {
|
|
2845
2845
|
m.detachAll();
|
|
@@ -2847,8 +2847,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2847
2847
|
for (const h in this._els)
|
|
2848
2848
|
if (this._click[h])
|
|
2849
2849
|
for (let u = 0; u < this._els[h].length; u++) {
|
|
2850
|
-
const v = this._els[h][u],
|
|
2851
|
-
m.attach(v, "click",
|
|
2850
|
+
const v = this._els[h][u], g = this._click[h].bind(v);
|
|
2851
|
+
m.attach(v, "click", g);
|
|
2852
2852
|
}
|
|
2853
2853
|
m.attach(this._obj, "selectstart", function(h) {
|
|
2854
2854
|
return h.preventDefault(), !1;
|
|
@@ -2883,8 +2883,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2883
2883
|
a.callEvent("onEmptyClick", [a.getActionData(h).date, h]);
|
|
2884
2884
|
if (u && a.config.select) {
|
|
2885
2885
|
a.select(u);
|
|
2886
|
-
const v = h.target.closest(".dhx_menu_icon"),
|
|
2887
|
-
|
|
2886
|
+
const v = h.target.closest(".dhx_menu_icon"), g = a._getClassName(v);
|
|
2887
|
+
g.indexOf("_icon") != -1 && a._click.buttons[g.split(" ")[1].replace("icon_", "")](u);
|
|
2888
2888
|
} else
|
|
2889
2889
|
a._close_not_saved(), a.getState().select_id && (/* @__PURE__ */ new Date()).valueOf() - (a._new_event || 0) > 500 && a.unselect();
|
|
2890
2890
|
}, dhx_cal_prev_button: function() {
|
|
@@ -2912,27 +2912,27 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2912
2912
|
a.showLightbox(h);
|
|
2913
2913
|
}, cancel: function(h) {
|
|
2914
2914
|
a.editStop(!1);
|
|
2915
|
-
} } }, a._dhtmlx_confirm = function({ message: h, title: u, callback: v, config:
|
|
2915
|
+
} } }, a._dhtmlx_confirm = function({ message: h, title: u, callback: v, config: g }) {
|
|
2916
2916
|
if (!h)
|
|
2917
2917
|
return v();
|
|
2918
|
-
|
|
2919
|
-
const x = { ...
|
|
2918
|
+
g = g || {};
|
|
2919
|
+
const x = { ...g, text: h };
|
|
2920
2920
|
u && (x.title = u), v && (x.callback = function(D) {
|
|
2921
2921
|
D && v();
|
|
2922
2922
|
}), a.confirm(x);
|
|
2923
2923
|
}, a.addEventNow = function(h, u, v) {
|
|
2924
|
-
let
|
|
2925
|
-
a._isObject(h) && !a._isDate(h) && (
|
|
2924
|
+
let g = {};
|
|
2925
|
+
a._isObject(h) && !a._isDate(h) && (g = h, h = null);
|
|
2926
2926
|
const x = 6e4 * (this.config.event_duration || this.config.time_step);
|
|
2927
|
-
h || (h =
|
|
2927
|
+
h || (h = g.start_date || Math.round(a._currentDate().valueOf() / x) * x);
|
|
2928
2928
|
let D = new Date(h);
|
|
2929
2929
|
if (!u) {
|
|
2930
2930
|
let M = this.config.first_hour;
|
|
2931
2931
|
M > D.getHours() && (D.setHours(M), h = D.valueOf()), u = h.valueOf() + x;
|
|
2932
2932
|
}
|
|
2933
2933
|
let k = new Date(u);
|
|
2934
|
-
D.valueOf() == k.valueOf() && k.setTime(k.valueOf() + x),
|
|
2935
|
-
const S = this.addEvent(
|
|
2934
|
+
D.valueOf() == k.valueOf() && k.setTime(k.valueOf() + x), g.start_date = g.start_date || D, g.end_date = g.end_date || k, g.text = g.text || this.locale.labels.new_event, g.id = this._drag_id = g.id || this.uid(), this._drag_mode = "new-size", this._loading = !0;
|
|
2935
|
+
const S = this.addEvent(g);
|
|
2936
2936
|
return this.callEvent("onEventCreated", [this._drag_id, v]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(v), S;
|
|
2937
2937
|
}, a._on_dbl_click = function(h, u) {
|
|
2938
2938
|
if (u = u || h.target, this.config.readonly)
|
|
@@ -2954,19 +2954,19 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2954
2954
|
case "dhx_grid_event":
|
|
2955
2955
|
case "dhx_cal_event_line":
|
|
2956
2956
|
case "dhx_cal_event_clear": {
|
|
2957
|
-
const
|
|
2958
|
-
if (!this.callEvent("onDblClick", [
|
|
2957
|
+
const g = this._locate_event(u);
|
|
2958
|
+
if (!this.callEvent("onDblClick", [g, h]))
|
|
2959
2959
|
return;
|
|
2960
|
-
this.config.details_on_dblclick || this._table_view || !this.getEvent(
|
|
2960
|
+
this.config.details_on_dblclick || this._table_view || !this.getEvent(g)._timed || !this.config.select ? this.showLightbox(g) : this.edit(g);
|
|
2961
2961
|
break;
|
|
2962
2962
|
}
|
|
2963
2963
|
case "dhx_time_block":
|
|
2964
2964
|
case "dhx_cal_container":
|
|
2965
2965
|
return;
|
|
2966
2966
|
default: {
|
|
2967
|
-
const
|
|
2968
|
-
if (
|
|
2969
|
-
|
|
2967
|
+
const g = this["dblclick_" + v];
|
|
2968
|
+
if (g)
|
|
2969
|
+
g.call(this, h);
|
|
2970
2970
|
else if (u.parentNode && u != this)
|
|
2971
2971
|
return a._on_dbl_click(h, u.parentNode);
|
|
2972
2972
|
break;
|
|
@@ -2975,10 +2975,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2975
2975
|
}, a._get_column_index = function(h) {
|
|
2976
2976
|
let u = 0;
|
|
2977
2977
|
if (this._cols) {
|
|
2978
|
-
let v = 0,
|
|
2979
|
-
for (; v + this._cols[
|
|
2980
|
-
v += this._cols[
|
|
2981
|
-
if (u =
|
|
2978
|
+
let v = 0, g = 0;
|
|
2979
|
+
for (; v + this._cols[g] < h && g < this._cols.length; )
|
|
2980
|
+
v += this._cols[g], g++;
|
|
2981
|
+
if (u = g + (this._cols[g] ? (h - v) / this._cols[g] : 0), this._ignores && u >= this._cols.length)
|
|
2982
2982
|
for (; u >= 1 && this._ignores[Math.floor(u)]; )
|
|
2983
2983
|
u--;
|
|
2984
2984
|
}
|
|
@@ -2991,8 +2991,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
2991
2991
|
return h;
|
|
2992
2992
|
}, a._mouse_coords = function(h) {
|
|
2993
2993
|
let u;
|
|
2994
|
-
const v = document.body,
|
|
2995
|
-
u = this.$env.isIE || !h.pageX && !h.pageY ? { x: h.clientX + (v.scrollLeft ||
|
|
2994
|
+
const v = document.body, g = document.documentElement;
|
|
2995
|
+
u = this.$env.isIE || !h.pageX && !h.pageY ? { x: h.clientX + (v.scrollLeft || g.scrollLeft || 0) - v.clientLeft, y: h.clientY + (v.scrollTop || g.scrollTop || 0) - v.clientTop } : { x: h.pageX, y: h.pageY }, this.config.rtl && this._colsS ? (u.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - u.x, u.x += this.$domHelpers.getAbsoluteLeft(this._obj), this._mode !== "month" && (u.x -= this.xy.scale_width)) : u.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width);
|
|
2996
2996
|
const x = this.$container.querySelector(".dhx_cal_data");
|
|
2997
2997
|
u.y -= this.$domHelpers.getAbsoluteTop(x) - this._els.dhx_cal_data[0].scrollTop, u.ev = h;
|
|
2998
2998
|
const D = this["mouse_" + this._mode];
|
|
@@ -3019,8 +3019,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3019
3019
|
}, a._correct_shift = function(h, u) {
|
|
3020
3020
|
return h - 6e4 * (new Date(a._min_date).getTimezoneOffset() - new Date(h).getTimezoneOffset()) * (u ? -1 : 1);
|
|
3021
3021
|
}, a._is_pos_changed = function(h, u) {
|
|
3022
|
-
function v(
|
|
3023
|
-
return Math.abs(
|
|
3022
|
+
function v(g, x, D) {
|
|
3023
|
+
return Math.abs(g - x) > D;
|
|
3024
3024
|
}
|
|
3025
3025
|
return !h || !this._drag_pos || !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || u.timestamp - this._drag_pos.timestamp > 100 || v(h.ev.clientX, u.ev.clientX, 5) || v(h.ev.clientY, u.ev.clientY, 5));
|
|
3026
3026
|
}, a._correct_drag_start_date = function(h) {
|
|
@@ -3031,78 +3031,93 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3031
3031
|
}, a._correct_drag_end_date = function(h, u) {
|
|
3032
3032
|
let v;
|
|
3033
3033
|
a.matrix && (v = a.matrix[a._mode]), v = v || { x_step: 1, x_unit: "day" };
|
|
3034
|
-
const
|
|
3035
|
-
return new Date(1 *
|
|
3034
|
+
const g = 1 * h + a._get_fictional_event_length(h, u, v);
|
|
3035
|
+
return new Date(1 * g - (a._get_fictional_event_length(g, -1, v, -1) + 1));
|
|
3036
3036
|
}, a._on_mouse_move = function(h) {
|
|
3037
3037
|
if (this._drag_mode) {
|
|
3038
3038
|
var u = this._mouse_coords(h);
|
|
3039
3039
|
if (this._is_pos_changed(this._drag_pos, u)) {
|
|
3040
|
-
var v,
|
|
3040
|
+
var v, g;
|
|
3041
3041
|
if (this._edit_id != this._drag_id && this._close_not_saved(), !this._drag_mode)
|
|
3042
3042
|
return;
|
|
3043
3043
|
var x = null;
|
|
3044
3044
|
if (this._drag_pos && !this._drag_pos.has_moved && ((x = this._drag_pos).has_moved = !0), this._drag_pos = u, this._drag_pos.has_moved = !0, this._drag_mode == "create") {
|
|
3045
3045
|
if (x && (u = x), this._close_not_saved(), this.unselect(this._select_id), this._loading = !0, v = this._get_date_from_pos(u).valueOf(), !this._drag_start)
|
|
3046
3046
|
return this.callEvent("onBeforeEventCreated", [h, this._drag_id]) ? (this._loading = !1, void (this._drag_start = v)) : void (this._loading = !1);
|
|
3047
|
-
|
|
3048
|
-
var D = new Date(this._drag_start), k = new Date(
|
|
3047
|
+
g = v, this._drag_start;
|
|
3048
|
+
var D = new Date(this._drag_start), k = new Date(g);
|
|
3049
3049
|
this._mode != "day" && this._mode != "week" || D.getHours() != k.getHours() || D.getMinutes() != k.getMinutes() || (k = new Date(this._drag_start + 1e3)), this._drag_id = this.uid(), this.addEvent(D, k, this.locale.labels.new_event, this._drag_id, u.fields), this.callEvent("onEventCreated", [this._drag_id, h]), this._loading = !1, this._drag_mode = "new-size";
|
|
3050
3050
|
}
|
|
3051
|
-
var S, M = this.config.time_step,
|
|
3051
|
+
var S, M = this.config.time_step, y = this.getEvent(this._drag_id);
|
|
3052
3052
|
if (a.matrix && (S = a.matrix[a._mode]), S = S || { x_step: 1, x_unit: "day" }, this._drag_mode == "move")
|
|
3053
|
-
v = this._min_date.valueOf() + 6e4 * (u.y * this.config.time_step + 24 * u.x * 60), !u.custom && this._table_view && (v += 1e3 * this.date.time_part(
|
|
3053
|
+
v = this._min_date.valueOf() + 6e4 * (u.y * this.config.time_step + 24 * u.x * 60), !u.custom && this._table_view && (v += 1e3 * this.date.time_part(y.start_date)), !this._table_view && this._dragEventBody && this._drag_event._move_event_shift === void 0 && (this._drag_event._move_event_shift = v - y.start_date), this._drag_event._move_event_shift && (v -= this._drag_event._move_event_shift), v = this._correct_shift(v), u._ignores && this.config.preserve_length && this._table_view && S ? (v = a._correct_drag_start_date(v), g = a._correct_drag_end_date(v, this._drag_event._event_length)) : g = y.end_date.valueOf() - (y.start_date.valueOf() - v);
|
|
3054
3054
|
else {
|
|
3055
|
-
if (v =
|
|
3055
|
+
if (v = y.start_date.valueOf(), g = y.end_date.valueOf(), this._table_view) {
|
|
3056
3056
|
var b = this._min_date.valueOf() + u.y * this.config.time_step * 6e4 + (u.custom ? 0 : 864e5);
|
|
3057
3057
|
if (this._mode == "month")
|
|
3058
3058
|
if (b = this._correct_shift(b, !1), this._drag_from_start) {
|
|
3059
3059
|
var w = 864e5;
|
|
3060
|
-
b <= a.date.date_part(new Date(
|
|
3060
|
+
b <= a.date.date_part(new Date(g + w - 1)).valueOf() && (v = b - w);
|
|
3061
3061
|
} else
|
|
3062
|
-
|
|
3063
|
-
else
|
|
3064
|
-
|
|
3062
|
+
g = b;
|
|
3063
|
+
else if (this.config.preserve_length) {
|
|
3064
|
+
if (u.resize_from_start)
|
|
3065
|
+
v = a._correct_drag_start_date(b), S.round_position && S.first_hour && S.last_hour && S.x_unit == "day" && (v = new Date(1 * v + S._start_correction));
|
|
3066
|
+
else if (g = a._correct_drag_end_date(b, 0), S.round_position && S.first_hour && S.last_hour && S.x_unit == "day" && (g = a.date.date_part(new Date(g)), g = new Date(1 * g - S._end_correction)), S.round_position && a["ignore_" + a._mode] && S.x_unit == "day") {
|
|
3067
|
+
const K = this["ignore_" + this._mode];
|
|
3068
|
+
let Q = a.date.add(new Date(g), -S.x_step, S.x_unit);
|
|
3069
|
+
K(Q) && (g = Q);
|
|
3070
|
+
}
|
|
3071
|
+
} else
|
|
3072
|
+
u.resize_from_start ? v = b : g = b;
|
|
3065
3073
|
} else {
|
|
3066
|
-
var E = this.date.date_part(new Date(
|
|
3074
|
+
var E = this.date.date_part(new Date(y.end_date.valueOf() - 1)).valueOf(), N = new Date(E), T = this.config.first_hour, A = 60 / M * (this.config.last_hour - T);
|
|
3067
3075
|
this.config.time_step = 1;
|
|
3068
3076
|
var C = this._mouse_coords(h);
|
|
3069
3077
|
this.config.time_step = M;
|
|
3070
3078
|
var $ = u.y * M * 6e4, H = Math.min(u.y + 1, A) * M * 6e4, O = 6e4 * C.y;
|
|
3071
|
-
|
|
3079
|
+
g = Math.abs($ - O) > Math.abs(H - O) ? E + H : E + $, g += 6e4 * (new Date(g).getTimezoneOffset() - N.getTimezoneOffset()), this._els.dhx_cal_data[0].style.cursor = "s-resize", this._mode != "week" && this._mode != "day" || (g = this._correct_shift(g));
|
|
3072
3080
|
}
|
|
3073
3081
|
if (this._drag_mode == "new-size")
|
|
3074
|
-
if (
|
|
3082
|
+
if (g <= this._drag_start) {
|
|
3075
3083
|
var I = u.shift || (this._table_view && !u.custom ? 864e5 : 0);
|
|
3076
|
-
v =
|
|
3084
|
+
v = g - (u.shift ? 0 : I), g = this._drag_start + (I || 6e4 * M);
|
|
3077
3085
|
} else
|
|
3078
3086
|
v = this._drag_start;
|
|
3079
3087
|
else
|
|
3080
|
-
|
|
3088
|
+
g <= v && (g = v + 6e4 * M);
|
|
3081
3089
|
}
|
|
3082
|
-
var Y = new Date(
|
|
3083
|
-
if (this._drag_mode == "move" && a.config.limit_drag_out && (+R < +a._min_date || +
|
|
3084
|
-
if (+
|
|
3085
|
-
R = new Date(
|
|
3090
|
+
var Y = new Date(g - 1), R = new Date(v);
|
|
3091
|
+
if (this._drag_mode == "move" && a.config.limit_drag_out && (+R < +a._min_date || +g > +a._max_date)) {
|
|
3092
|
+
if (+y.start_date < +a._min_date || +y.end_date > +a._max_date)
|
|
3093
|
+
R = new Date(y.start_date), g = new Date(y.end_date);
|
|
3086
3094
|
else {
|
|
3087
|
-
var j =
|
|
3088
|
-
+R < +a._min_date ? (R = new Date(a._min_date), u._ignores && this.config.preserve_length && this._table_view ? (R = new Date(a._correct_drag_start_date(R)), S._start_correction && (R = new Date(R.valueOf() + S._start_correction)),
|
|
3095
|
+
var j = g - R;
|
|
3096
|
+
+R < +a._min_date ? (R = new Date(a._min_date), u._ignores && this.config.preserve_length && this._table_view ? (R = new Date(a._correct_drag_start_date(R)), S._start_correction && (R = new Date(R.valueOf() + S._start_correction)), g = new Date(1 * R + this._get_fictional_event_length(R, this._drag_event._event_length, S))) : g = new Date(+R + j)) : (g = new Date(a._max_date), u._ignores && this.config.preserve_length && this._table_view ? (S._end_correction && (g = new Date(g.valueOf() - S._end_correction)), g = new Date(1 * g - this._get_fictional_event_length(g, 0, S, !0)), R = new Date(1 * g - this._get_fictional_event_length(g, this._drag_event._event_length, S, !0)), this._ignores_detected && (R = a.date.add(R, S.x_step, S.x_unit), g = new Date(1 * g - this._get_fictional_event_length(g, 0, S, !0)), g = a.date.add(g, S.x_step, S.x_unit))) : R = new Date(+g - j));
|
|
3089
3097
|
}
|
|
3090
|
-
Y = new Date(
|
|
3098
|
+
Y = new Date(g - 1);
|
|
3091
3099
|
}
|
|
3092
|
-
if (!this._table_view && this._dragEventBody && !a.config.all_timed && (!a._get_section_view() && u.x != this._get_event_sday({ start_date: new Date(v), end_date: new Date(v) }) || new Date(v).getHours() < this.config.first_hour) && (j =
|
|
3093
|
-
let
|
|
3094
|
-
new Date(a._drag_start).getDay() != new Date(
|
|
3095
|
-
let
|
|
3096
|
-
a._drag_start && this._drag_mode == "new-size" &&
|
|
3100
|
+
if (!this._table_view && this._dragEventBody && !a.config.all_timed && (!a._get_section_view() && u.x != this._get_event_sday({ start_date: new Date(v), end_date: new Date(v) }) || new Date(v).getHours() < this.config.first_hour) && (j = g - R, this._drag_mode == "move" && (w = this._min_date.valueOf() + 24 * u.x * 60 * 6e4, (R = new Date(w)).setHours(this.config.first_hour), +R <= +y.start_date ? g = new Date(+R + j) : R = new Date(+g - j))), this._table_view || a.config.all_timed || !(!a.getView() && u.x != this._get_event_sday({ start_date: new Date(g), end_date: new Date(g) }) || new Date(g).getHours() >= this.config.last_hour) || (j = g - R, w = this._min_date.valueOf() + 24 * u.x * 60 * 6e4, (g = a.date.date_part(new Date(w))).setHours(this.config.last_hour), Y = new Date(g - 1), this._drag_mode == "move" && (+R <= +y.start_date ? g = new Date(+R + j) : R = new Date(+g - j))), !this._table_view && a.config.all_timed) {
|
|
3101
|
+
let K = this._min_date.valueOf() + 24 * u.x * 60 * 6e4;
|
|
3102
|
+
new Date(a._drag_start).getDay() != new Date(K) && (K = new Date(a._drag_start));
|
|
3103
|
+
let Q = new Date(K).setHours(this.config.last_hour);
|
|
3104
|
+
a._drag_start && this._drag_mode == "new-size" && Q < new Date(g) && ((g = a.date.date_part(new Date(K))).setHours(this.config.last_hour), Y = new Date(g - 1));
|
|
3105
|
+
}
|
|
3106
|
+
if (this._table_view && a["ignore_" + this._mode] && (this._drag_mode == "resize" || this._drag_mode == "new-size") && +g > +a._max_date) {
|
|
3107
|
+
g = new Date(a._max_date);
|
|
3108
|
+
const K = this["ignore_" + this._mode];
|
|
3109
|
+
for (; K(g); )
|
|
3110
|
+
g = a.date.add(g, -S.x_step, S.x_unit);
|
|
3111
|
+
g = a.date.add(g, S.x_step, S.x_unit);
|
|
3097
3112
|
}
|
|
3098
3113
|
if (this._table_view || Y.getDate() == R.getDate() && Y.getHours() < this.config.last_hour || a._allow_dnd)
|
|
3099
|
-
if (
|
|
3114
|
+
if (y.start_date = R, y.end_date = new Date(g), this.config.update_render) {
|
|
3100
3115
|
var U = a._els.dhx_cal_data[0].scrollTop;
|
|
3101
3116
|
this.update_view(), a._els.dhx_cal_data[0].scrollTop = U;
|
|
3102
3117
|
} else
|
|
3103
3118
|
this.updateEvent(this._drag_id);
|
|
3104
|
-
this._table_view && this.for_rendered(this._drag_id, function(
|
|
3105
|
-
|
|
3119
|
+
this._table_view && this.for_rendered(this._drag_id, function(K) {
|
|
3120
|
+
K.className += " dhx_in_move dhx_cal_event_drag";
|
|
3106
3121
|
}), this.callEvent("onEventDrag", [this._drag_id, this._drag_mode, h]);
|
|
3107
3122
|
}
|
|
3108
3123
|
} else if (a.checkEvent("onMouseMove")) {
|
|
@@ -3142,9 +3157,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3142
3157
|
this._drag_mode = null, this._drag_id = null;
|
|
3143
3158
|
}
|
|
3144
3159
|
if (this._drag_mode) {
|
|
3145
|
-
var
|
|
3146
|
-
if (this.config["drag_" + this._drag_mode] && this.callEvent("onBeforeDrag", [
|
|
3147
|
-
if (this._drag_id =
|
|
3160
|
+
var g = this._locate_event(u);
|
|
3161
|
+
if (this.config["drag_" + this._drag_mode] && this.callEvent("onBeforeDrag", [g, this._drag_mode, h])) {
|
|
3162
|
+
if (this._drag_id = g, (this._edit_id != this._drag_id || this._edit_id && this._drag_mode == "create") && this._close_not_saved(), !this._drag_mode)
|
|
3148
3163
|
return;
|
|
3149
3164
|
this._drag_event = a._lame_clone(this.getEvent(this._drag_id) || {}), this._drag_pos = this._mouse_coords(h);
|
|
3150
3165
|
} else
|
|
@@ -3158,17 +3173,17 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3158
3173
|
v.indexOf("_") === 0 && (u[v] = !0);
|
|
3159
3174
|
return u;
|
|
3160
3175
|
}, a._clear_temporary_properties = function(h, u) {
|
|
3161
|
-
var v = this._get_private_properties(h),
|
|
3162
|
-
for (var x in
|
|
3176
|
+
var v = this._get_private_properties(h), g = this._get_private_properties(u);
|
|
3177
|
+
for (var x in g)
|
|
3163
3178
|
v[x] || delete u[x];
|
|
3164
3179
|
}, a._on_mouse_up = function(h) {
|
|
3165
3180
|
if (!h || h.button != 2 || !this._mobile) {
|
|
3166
3181
|
if (this._drag_mode && this._drag_id) {
|
|
3167
3182
|
this._els.dhx_cal_data[0].style.cursor = "default";
|
|
3168
|
-
var u = this._drag_id, v = this._drag_mode,
|
|
3183
|
+
var u = this._drag_id, v = this._drag_mode, g = !this._drag_pos || this._drag_pos.has_moved;
|
|
3169
3184
|
delete this._drag_event._move_event_shift;
|
|
3170
3185
|
var x = this.getEvent(this._drag_id);
|
|
3171
|
-
if (
|
|
3186
|
+
if (g && (this._drag_event._dhx_changed || !this._drag_event.start_date || x.start_date.valueOf() != this._drag_event.start_date.valueOf() || x.end_date.valueOf() != this._drag_event.end_date.valueOf())) {
|
|
3172
3187
|
var D = this._drag_mode == "new-size";
|
|
3173
3188
|
if (this.callEvent("onBeforeEventChanged", [x, h, D, this._drag_event]))
|
|
3174
3189
|
if (this._drag_id = this._drag_mode = null, D && this.config.edit_on_create) {
|
|
@@ -3196,9 +3211,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3196
3211
|
return !!(a[h + "_view"] || a.date[h + "_start"] && a.templates[h + "_date"] && a.templates[h + "_scale_date"]);
|
|
3197
3212
|
}, a._set_aria_buttons_attrs = function() {
|
|
3198
3213
|
for (var h = ["dhx_cal_next_button", "dhx_cal_prev_button", "dhx_cal_tab", "dhx_cal_today_button"], u = 0; u < h.length; u++)
|
|
3199
|
-
for (var v = this._els[h[u]],
|
|
3200
|
-
var x = v[
|
|
3201
|
-
x && (D = this.locale.labels[x + "_tab"] || this.locale.labels[x] || D), h[u] == "dhx_cal_next_button" ? D = this.locale.labels.next : h[u] == "dhx_cal_prev_button" && (D = this.locale.labels.prev), this._waiAria.headerButtonsAttributes(v[
|
|
3214
|
+
for (var v = this._els[h[u]], g = 0; v && g < v.length; g++) {
|
|
3215
|
+
var x = v[g].getAttribute("data-tab") || v[g].getAttribute("name"), D = this.locale.labels[h[u]];
|
|
3216
|
+
x && (D = this.locale.labels[x + "_tab"] || this.locale.labels[x] || D), h[u] == "dhx_cal_next_button" ? D = this.locale.labels.next : h[u] == "dhx_cal_prev_button" && (D = this.locale.labels.prev), this._waiAria.headerButtonsAttributes(v[g], D || "");
|
|
3202
3217
|
}
|
|
3203
3218
|
}, a.updateView = function(h, u) {
|
|
3204
3219
|
if (!this.$container)
|
|
@@ -3207,14 +3222,14 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3207
3222
|
h = h || this._date, u = u || this._mode;
|
|
3208
3223
|
var v = "dhx_cal_data";
|
|
3209
3224
|
this.locale.labels.icon_form || (this.locale.labels.icon_form = this.locale.labels.icon_edit);
|
|
3210
|
-
var
|
|
3211
|
-
this._mode &&
|
|
3225
|
+
var g = this._obj, x = "dhx_scheduler_" + this._mode, D = "dhx_scheduler_" + u;
|
|
3226
|
+
this._mode && g.className.indexOf(x) != -1 ? g.className = g.className.replace(x, D) : g.className += " " + D;
|
|
3212
3227
|
var k, S = "dhx_multi_day", M = !(this._mode != u || !this.config.preserve_scroll) && this._els[v][0].scrollTop;
|
|
3213
3228
|
this._els[S] && this._els[S][0] && (k = this._els[S][0].scrollTop), this[this._mode + "_view"] && u && this._mode != u && this[this._mode + "_view"](!1), this._close_not_saved(), this._els[S] && (this._els[S][0].parentNode.removeChild(this._els[S][0]), this._els[S] = null), this._mode = u, this._date = h, this._table_view = this._mode == "month", this._dy_shift = 0, this.update_view(), this._set_aria_buttons_attrs();
|
|
3214
|
-
var
|
|
3215
|
-
if (
|
|
3216
|
-
for (var b = 0; b <
|
|
3217
|
-
var w =
|
|
3229
|
+
var y = this._els.dhx_cal_tab;
|
|
3230
|
+
if (y)
|
|
3231
|
+
for (var b = 0; b < y.length; b++) {
|
|
3232
|
+
var w = y[b];
|
|
3218
3233
|
w.getAttribute("data-tab") == this._mode || w.getAttribute("name") == this._mode + "_tab" ? (w.classList.add("active"), this._waiAria.headerToggleState(w, !0)) : (w.classList.remove("active"), this._waiAria.headerToggleState(w, !1));
|
|
3219
3234
|
}
|
|
3220
3235
|
typeof M == "number" && (this._els[v][0].scrollTop = M), typeof k == "number" && this._els[S] && this._els[S][0] && (this._els[S][0].scrollTop = k);
|
|
@@ -3222,19 +3237,19 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3222
3237
|
this.callEvent("onBeforeViewChange", [this._mode, this._date, u || this._mode, h || this._date]) && (this.updateView(h, u), this.callEvent("onViewChange", [this._mode, this._date]));
|
|
3223
3238
|
}, a.render = function(h, u) {
|
|
3224
3239
|
a.setCurrentView(h, u);
|
|
3225
|
-
}, a._render_x_header = function(h, u, v,
|
|
3240
|
+
}, a._render_x_header = function(h, u, v, g, x) {
|
|
3226
3241
|
x = x || 0;
|
|
3227
3242
|
var D = document.createElement("div");
|
|
3228
3243
|
D.className = "dhx_scale_bar", this.templates[this._mode + "_scalex_class"] && (D.className += " " + this.templates[this._mode + "_scalex_class"](v));
|
|
3229
3244
|
var k = this._cols[h];
|
|
3230
3245
|
this._mode == "month" && h === 0 && this.config.left_border && (D.className += " dhx_scale_bar_border", u += 1), this.set_xy(D, k, this.xy.scale_height - 1, u, x);
|
|
3231
3246
|
var S = this.templates[this._mode + "_scale_date"](v, this._mode);
|
|
3232
|
-
D.innerHTML = S, this._waiAria.dayHeaderAttr(D, S),
|
|
3247
|
+
D.innerHTML = S, this._waiAria.dayHeaderAttr(D, S), g.appendChild(D);
|
|
3233
3248
|
}, a._get_columns_num = function(h, u) {
|
|
3234
3249
|
var v = 7;
|
|
3235
3250
|
if (!a._table_view) {
|
|
3236
|
-
var
|
|
3237
|
-
|
|
3251
|
+
var g = a.date["get_" + a._mode + "_end"];
|
|
3252
|
+
g && (u = g(h)), v = Math.round((u.valueOf() - h.valueOf()) / 864e5);
|
|
3238
3253
|
}
|
|
3239
3254
|
return v;
|
|
3240
3255
|
}, a._get_timeunit_start = function() {
|
|
@@ -3247,23 +3262,23 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3247
3262
|
}
|
|
3248
3263
|
return u;
|
|
3249
3264
|
}, a._calc_scale_sizes = function(h, u, v) {
|
|
3250
|
-
var
|
|
3265
|
+
var g = this.config.rtl, x = h, D = this._get_columns_num(u, v);
|
|
3251
3266
|
this._process_ignores(u, D, "day", 1);
|
|
3252
3267
|
for (var k = D - this._ignores_detected, S = 0; S < D; S++)
|
|
3253
|
-
this._ignores[S] ? (this._cols[S] = 0, k++) : this._cols[S] = Math.floor(x / (k - S)), x -= this._cols[S], this._colsS[S] = (this._cols[S - 1] || 0) + (this._colsS[S - 1] || (this._table_view ? 0 :
|
|
3268
|
+
this._ignores[S] ? (this._cols[S] = 0, k++) : this._cols[S] = Math.floor(x / (k - S)), x -= this._cols[S], this._colsS[S] = (this._cols[S - 1] || 0) + (this._colsS[S - 1] || (this._table_view ? 0 : g ? this.xy.scroll_width : this.xy.scale_width));
|
|
3254
3269
|
this._colsS.col_length = D, this._colsS[D] = this._cols[D - 1] + this._colsS[D - 1] || 0;
|
|
3255
3270
|
}, a._set_scale_col_size = function(h, u, v) {
|
|
3256
|
-
var
|
|
3257
|
-
this.set_xy(h, u,
|
|
3271
|
+
var g = this.config;
|
|
3272
|
+
this.set_xy(h, u, g.hour_size_px * (g.last_hour - g.first_hour), v + this.xy.scale_width + 1, 0);
|
|
3258
3273
|
}, a._render_scales = function(h, u) {
|
|
3259
|
-
var v = new Date(a._min_date),
|
|
3260
|
-
this._calc_scale_sizes(D, v,
|
|
3274
|
+
var v = new Date(a._min_date), g = new Date(a._max_date), x = this.date.date_part(a._currentDate()), D = parseInt(h.style.width, 10) - 1, k = new Date(this._min_date), S = this._get_columns_num(v, g);
|
|
3275
|
+
this._calc_scale_sizes(D, v, g);
|
|
3261
3276
|
var M = 0;
|
|
3262
3277
|
h.innerHTML = "";
|
|
3263
|
-
for (var
|
|
3264
|
-
if (this._ignores[
|
|
3278
|
+
for (var y = 0; y < S; y++) {
|
|
3279
|
+
if (this._ignores[y] || this._render_x_header(y, M, k, h), !this._table_view) {
|
|
3265
3280
|
var b = document.createElement("div"), w = "dhx_scale_holder";
|
|
3266
|
-
k.valueOf() == x.valueOf() && (w += " dhx_scale_holder_now"), b.setAttribute("data-column-index",
|
|
3281
|
+
k.valueOf() == x.valueOf() && (w += " dhx_scale_holder_now"), b.setAttribute("data-column-index", y), this._ignores_detected && this._ignores[y] && (w += " dhx_scale_ignore");
|
|
3267
3282
|
for (let E = 1 * this.config.first_hour; E < this.config.last_hour; E++) {
|
|
3268
3283
|
const N = document.createElement("div");
|
|
3269
3284
|
N.className = "dhx_scale_time_slot dhx_scale_time_slot_hour_start", N.style.height = this.config.hour_size_px / 2 + "px";
|
|
@@ -3276,9 +3291,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3276
3291
|
const $ = document.createElement("div");
|
|
3277
3292
|
$.className = "dhx_scale_time_slot", T = new Date(k.getFullYear(), k.getMonth(), k.getDate(), E, 30), $.setAttribute("data-slot-date", this.templates.format_date(T)), $.style.height = this.config.hour_size_px / 2 + "px", A = this.templates.time_slot_text(T), A && ($.innerHTML = A), C = this.templates.time_slot_class(T), C && $.classList.add(C), b.appendChild($);
|
|
3278
3293
|
}
|
|
3279
|
-
b.className = w + " " + this.templates.week_date_class(k, x), this._waiAria.dayColumnAttr(b, k), this._set_scale_col_size(b, this._cols[
|
|
3294
|
+
b.className = w + " " + this.templates.week_date_class(k, x), this._waiAria.dayColumnAttr(b, k), this._set_scale_col_size(b, this._cols[y], M), u.appendChild(b), this.callEvent("onScaleAdd", [b, k]);
|
|
3280
3295
|
}
|
|
3281
|
-
M += this._cols[
|
|
3296
|
+
M += this._cols[y], k = this.date.add(k, 1, "day"), k = this.date.day_start(k);
|
|
3282
3297
|
}
|
|
3283
3298
|
}, a._getNavDateElement = function() {
|
|
3284
3299
|
return this.$container.querySelector(".dhx_cal_date");
|
|
@@ -3286,12 +3301,12 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3286
3301
|
if (this.templates[this._mode + "_date"]) {
|
|
3287
3302
|
var h = this._els.dhx_cal_header[0], u = this._els.dhx_cal_data[0], v = this.config;
|
|
3288
3303
|
h.innerHTML = "", u.innerHTML = "";
|
|
3289
|
-
var
|
|
3304
|
+
var g, x, D = (v.readonly || !v.drag_resize ? " dhx_resize_denied" : "") + (v.readonly || !v.drag_move ? " dhx_move_denied" : "");
|
|
3290
3305
|
u.className = "dhx_cal_data" + D, this._scales = {}, this._cols = [], this._colsS = { height: 0 }, this._dy_shift = 0, this.set_sizes();
|
|
3291
3306
|
var k = this._get_timeunit_start(), S = a._get_view_end();
|
|
3292
|
-
|
|
3293
|
-
var M = this.templates[this._mode + "_date"](k, S, this._mode),
|
|
3294
|
-
if (
|
|
3307
|
+
g = x = this._table_view ? a.date.week_start(k) : k, this._min_date = g;
|
|
3308
|
+
var M = this.templates[this._mode + "_date"](k, S, this._mode), y = this._getNavDateElement();
|
|
3309
|
+
if (y && (y.innerHTML = M, this._waiAria.navBarDateAttr(y, M)), this._max_date = S, a._render_scales(h, u), this._table_view)
|
|
3295
3310
|
this._reset_month_scale(u, k, x);
|
|
3296
3311
|
else if (this._reset_hours_scale(u, k, x), v.multi_day) {
|
|
3297
3312
|
var b = "dhx_multi_day";
|
|
@@ -3305,33 +3320,33 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3305
3320
|
}
|
|
3306
3321
|
}
|
|
3307
3322
|
}, a._reset_hours_scale = function(h, u, v) {
|
|
3308
|
-
var
|
|
3309
|
-
|
|
3323
|
+
var g = document.createElement("div");
|
|
3324
|
+
g.className = "dhx_scale_holder";
|
|
3310
3325
|
for (var x = new Date(1980, 1, 1, this.config.first_hour, 0, 0), D = 1 * this.config.first_hour; D < this.config.last_hour; D++) {
|
|
3311
3326
|
var k = document.createElement("div");
|
|
3312
3327
|
k.className = "dhx_scale_hour", k.style.height = this.config.hour_size_px + "px";
|
|
3313
3328
|
var S = this.xy.scale_width;
|
|
3314
3329
|
this.config.left_border && (k.className += " dhx_scale_hour_border"), k.style.width = S + "px";
|
|
3315
3330
|
var M = a.templates.hour_scale(x);
|
|
3316
|
-
k.innerHTML = M, this._waiAria.hourScaleAttr(k, M),
|
|
3331
|
+
k.innerHTML = M, this._waiAria.hourScaleAttr(k, M), g.appendChild(k), x = this.date.add(x, 1, "hour");
|
|
3317
3332
|
}
|
|
3318
|
-
h.appendChild(
|
|
3333
|
+
h.appendChild(g), this.config.scroll_hour && (h.scrollTop = this.config.hour_size_px * (this.config.scroll_hour - this.config.first_hour));
|
|
3319
3334
|
}, a._currentDate = function() {
|
|
3320
3335
|
return a.config.now_date ? new Date(a.config.now_date) : /* @__PURE__ */ new Date();
|
|
3321
3336
|
}, a._reset_ignores = function() {
|
|
3322
3337
|
this._ignores = {}, this._ignores_detected = 0;
|
|
3323
|
-
}, a._process_ignores = function(h, u, v,
|
|
3338
|
+
}, a._process_ignores = function(h, u, v, g, x) {
|
|
3324
3339
|
this._reset_ignores();
|
|
3325
3340
|
var D = a["ignore_" + this._mode];
|
|
3326
3341
|
if (D)
|
|
3327
3342
|
for (var k = new Date(h), S = 0; S < u; S++)
|
|
3328
|
-
D(k) && (this._ignores_detected += 1, this._ignores[S] = !0, x && u++), k = a.date.add(k,
|
|
3329
|
-
}, a._render_month_scale = function(h, u, v,
|
|
3343
|
+
D(k) && (this._ignores_detected += 1, this._ignores[S] = !0, x && u++), k = a.date.add(k, g, v), a.date[v + "_start"] && (k = a.date[v + "_start"](k));
|
|
3344
|
+
}, a._render_month_scale = function(h, u, v, g) {
|
|
3330
3345
|
var x = a.date.add(u, 1, "month"), D = new Date(v), k = a._currentDate();
|
|
3331
|
-
this.date.date_part(k), this.date.date_part(v),
|
|
3346
|
+
this.date.date_part(k), this.date.date_part(v), g = g || Math.ceil(Math.round((x.valueOf() - v.valueOf()) / 864e5) / 7);
|
|
3332
3347
|
for (var S = [], M = 0; M <= 7; M++) {
|
|
3333
|
-
var
|
|
3334
|
-
isNaN(Number(
|
|
3348
|
+
var y = this._cols[M] || 0;
|
|
3349
|
+
isNaN(Number(y)) || (y += "px"), S[M] = y;
|
|
3335
3350
|
}
|
|
3336
3351
|
function b(R) {
|
|
3337
3352
|
var j = a._colsS.height;
|
|
@@ -3339,7 +3354,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3339
3354
|
}
|
|
3340
3355
|
var w = 0;
|
|
3341
3356
|
const E = document.createElement("div");
|
|
3342
|
-
for (E.classList.add("dhx_cal_month_table"), M = 0; M <
|
|
3357
|
+
for (E.classList.add("dhx_cal_month_table"), M = 0; M < g; M++) {
|
|
3343
3358
|
var N = document.createElement("div");
|
|
3344
3359
|
N.classList.add("dhx_cal_month_row"), N.style.height = b(M) + "px", E.appendChild(N);
|
|
3345
3360
|
for (var T = 0; T < 7; T++) {
|
|
@@ -3366,17 +3381,17 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3366
3381
|
const j = a.templates.parse_date(R.getAttribute("data-cell-date")), U = R.querySelector(".dhx_month_body");
|
|
3367
3382
|
this._scales[+j] = U, this.callEvent("onScaleAdd", [this._scales[+j], j]);
|
|
3368
3383
|
}), this._max_date;
|
|
3369
|
-
}, a._reset_month_scale = function(h, u, v,
|
|
3384
|
+
}, a._reset_month_scale = function(h, u, v, g) {
|
|
3370
3385
|
var x = a.date.add(u, 1, "month"), D = a._currentDate();
|
|
3371
|
-
this.date.date_part(D), this.date.date_part(v),
|
|
3372
|
-
var k = Math.floor(h.clientHeight /
|
|
3373
|
-
return this._colsS.height = k + this.xy.month_head_height, this._colsS.heights = [], a._render_month_scale(h, u, v,
|
|
3386
|
+
this.date.date_part(D), this.date.date_part(v), g = g || Math.ceil(Math.round((x.valueOf() - v.valueOf()) / 864e5) / 7);
|
|
3387
|
+
var k = Math.floor(h.clientHeight / g) - this.xy.month_head_height;
|
|
3388
|
+
return this._colsS.height = k + this.xy.month_head_height, this._colsS.heights = [], a._render_month_scale(h, u, v, g);
|
|
3374
3389
|
}, a.getView = function(h) {
|
|
3375
3390
|
return h || (h = a.getState().mode), a.matrix && a.matrix[h] ? a.matrix[h] : a._props && a._props[h] ? a._props[h] : null;
|
|
3376
3391
|
}, a.getLabel = function(h, u) {
|
|
3377
|
-
for (var v = this.config.lightbox.sections,
|
|
3378
|
-
if (v[
|
|
3379
|
-
for (var x = v[
|
|
3392
|
+
for (var v = this.config.lightbox.sections, g = 0; g < v.length; g++)
|
|
3393
|
+
if (v[g].map_to == h) {
|
|
3394
|
+
for (var x = v[g].options, D = 0; D < x.length; D++)
|
|
3380
3395
|
if (x[D].key == u)
|
|
3381
3396
|
return x[D].label;
|
|
3382
3397
|
}
|
|
@@ -3385,13 +3400,13 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3385
3400
|
var v = a.serverList(h);
|
|
3386
3401
|
return !!v && (v.splice(0, v.length), v.push.apply(v, u || []), a.callEvent("onOptionsLoad", []), a.resetLightbox(), a.hideCover(), !0);
|
|
3387
3402
|
}, a._lame_clone = function(h, u) {
|
|
3388
|
-
var v,
|
|
3403
|
+
var v, g, x;
|
|
3389
3404
|
for (u = u || [], v = 0; v < u.length; v += 2)
|
|
3390
3405
|
if (h === u[v])
|
|
3391
3406
|
return u[v + 1];
|
|
3392
3407
|
if (h && typeof h == "object") {
|
|
3393
|
-
for (x = Object.create(h),
|
|
3394
|
-
h instanceof
|
|
3408
|
+
for (x = Object.create(h), g = [Array, Date, Number, String, Boolean], v = 0; v < g.length; v++)
|
|
3409
|
+
h instanceof g[v] && (x = v ? new g[v](h) : new g[v]());
|
|
3395
3410
|
for (v in u.push(h, x), h)
|
|
3396
3411
|
Object.prototype.hasOwnProperty.apply(h, [v]) && (x[v] = a._lame_clone(h[v], u));
|
|
3397
3412
|
}
|
|
@@ -3418,32 +3433,32 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3418
3433
|
} catch {
|
|
3419
3434
|
}
|
|
3420
3435
|
}, a._get_real_event_length = function(h, u, v) {
|
|
3421
|
-
var
|
|
3422
|
-
v.render ? (k = this._get_date_index(v, h),
|
|
3423
|
-
for (var S = !0; k <
|
|
3436
|
+
var g, x = u - h, D = this["ignore_" + this._mode], k = 0;
|
|
3437
|
+
v.render ? (k = this._get_date_index(v, h), g = this._get_date_index(v, u), h.valueOf() < a.getState().min_date.valueOf() && (k = -p(h, a.getState().min_date)), u.valueOf() > a.getState().max_date.valueOf() && (g += p(u, a.getState().max_date))) : g = Math.round(x / 60 / 60 / 1e3 / 24);
|
|
3438
|
+
for (var S = !0; k < g; ) {
|
|
3424
3439
|
var M = a.date.add(u, -v.x_step, v.x_unit);
|
|
3425
3440
|
if (D && D(u) && (!S || S && D(M)))
|
|
3426
3441
|
x -= u - M;
|
|
3427
3442
|
else {
|
|
3428
|
-
let
|
|
3443
|
+
let y = 0;
|
|
3429
3444
|
const b = new Date(Math.max(M.valueOf(), h.valueOf())), w = u, E = new Date(b.getFullYear(), b.getMonth(), b.getDate(), v.first_hour || 0), N = new Date(b.getFullYear(), b.getMonth(), b.getDate(), v.last_hour || 24), T = new Date(u.getFullYear(), u.getMonth(), u.getDate(), v.first_hour || 0), A = new Date(u.getFullYear(), u.getMonth(), u.getDate(), v.last_hour || 24);
|
|
3430
|
-
w.valueOf() > A.valueOf() && (
|
|
3445
|
+
w.valueOf() > A.valueOf() && (y += w - A), w.valueOf() > T.valueOf() ? y += v._start_correction : y += 60 * w.getHours() * 60 * 1e3 + 60 * w.getMinutes() * 1e3, b.valueOf() <= N.valueOf() && (y += v._end_correction), b.valueOf() < E.valueOf() && (y += E.valueOf() - b.valueOf()), x -= y, S = !1;
|
|
3431
3446
|
}
|
|
3432
|
-
u = M,
|
|
3447
|
+
u = M, g--;
|
|
3433
3448
|
}
|
|
3434
3449
|
return x;
|
|
3435
|
-
}, a._get_fictional_event_length = function(h, u, v,
|
|
3436
|
-
var x = new Date(h), D =
|
|
3450
|
+
}, a._get_fictional_event_length = function(h, u, v, g) {
|
|
3451
|
+
var x = new Date(h), D = g ? -1 : 1;
|
|
3437
3452
|
if (v._start_correction || v._end_correction) {
|
|
3438
3453
|
var k;
|
|
3439
|
-
k =
|
|
3454
|
+
k = g ? 60 * x.getHours() + x.getMinutes() - 60 * (v.first_hour || 0) : 60 * (v.last_hour || 0) - (60 * x.getHours() + x.getMinutes());
|
|
3440
3455
|
var S = 60 * (v.last_hour - v.first_hour), M = Math.ceil((u / 6e4 - k) / S);
|
|
3441
3456
|
M < 0 && (M = 0), u += M * (1440 - S) * 60 * 1e3;
|
|
3442
3457
|
}
|
|
3443
|
-
var
|
|
3444
|
-
for (v.render ? (E = this._get_date_index(v, x),
|
|
3458
|
+
var y, b = new Date(1 * h + u * D), w = this["ignore_" + this._mode], E = 0;
|
|
3459
|
+
for (v.render ? (E = this._get_date_index(v, x), y = this._get_date_index(v, b)) : y = Math.round(u / 60 / 60 / 1e3 / 24); v.x_unit === "day" ? E * D < y * D : E * D <= y * D; ) {
|
|
3445
3460
|
var N = a.date.add(x, v.x_step * D, v.x_unit);
|
|
3446
|
-
w && w(x) && (u += (N - x) * D,
|
|
3461
|
+
w && w(x) && (u += (N - x) * D, y += D), x = N, E += D;
|
|
3447
3462
|
}
|
|
3448
3463
|
return u;
|
|
3449
3464
|
}, a._get_section_view = function() {
|
|
@@ -3472,8 +3487,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3472
3487
|
var u = [" "];
|
|
3473
3488
|
for (var v in h)
|
|
3474
3489
|
if (typeof h[v] != "function" && typeof h[v] != "object") {
|
|
3475
|
-
var
|
|
3476
|
-
u.push(v + "='" +
|
|
3490
|
+
var g = m(c(h[v]));
|
|
3491
|
+
u.push(v + "='" + g + "'");
|
|
3477
3492
|
}
|
|
3478
3493
|
return u.push(" "), u.join(" ");
|
|
3479
3494
|
}, setAttributes: function(h, u) {
|
|
@@ -3507,8 +3522,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3507
3522
|
}, setEventBarAttr: function(h, u) {
|
|
3508
3523
|
this._eventCommonAttr(h, u);
|
|
3509
3524
|
}, _getAttributes: function(h, u) {
|
|
3510
|
-
var v = { setAttribute: function(
|
|
3511
|
-
this[
|
|
3525
|
+
var v = { setAttribute: function(g, x) {
|
|
3526
|
+
this[g] = x;
|
|
3512
3527
|
} };
|
|
3513
3528
|
return h.apply(this, [u, v]), v;
|
|
3514
3529
|
}, eventBarAttrString: function(h) {
|
|
@@ -3550,8 +3565,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3550
3565
|
}, minicalHeadCell: function(h) {
|
|
3551
3566
|
this.setAttributes(h, { role: "columnheader" });
|
|
3552
3567
|
}, weekAgendaDayCell: function(h, u) {
|
|
3553
|
-
var v = h.querySelector(".dhx_wa_scale_bar"),
|
|
3554
|
-
this.setAttributes(v, { id: x }), this.setAttributes(
|
|
3568
|
+
var v = h.querySelector(".dhx_wa_scale_bar"), g = h.querySelector(".dhx_wa_day_data"), x = a.uid() + "";
|
|
3569
|
+
this.setAttributes(v, { id: x }), this.setAttributes(g, { "aria-labelledby": x });
|
|
3555
3570
|
}, weekAgendaEvent: function(h, u) {
|
|
3556
3571
|
this.eventAttr(u, h);
|
|
3557
3572
|
}, lightboxHiddenAttr: function(h) {
|
|
@@ -3621,11 +3636,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3621
3636
|
};
|
|
3622
3637
|
}(a._waiAria[p]);
|
|
3623
3638
|
})();
|
|
3624
|
-
}(i), i.utils =
|
|
3639
|
+
}(i), i.utils = re, i.$domHelpers = ue, i.utils.dom = ue, i.uid = re.uid, i.mixin = re.mixin, i.defined = re.defined, i.assert = function(a) {
|
|
3625
3640
|
return function(d, l) {
|
|
3626
3641
|
d || a.config.show_errors && a.callEvent("onError", [l]) !== !1 && (a.message ? a.message({ type: "error", text: l, expire: -1 }) : console.log(l));
|
|
3627
3642
|
};
|
|
3628
|
-
}(i), i.copy =
|
|
3643
|
+
}(i), i.copy = re.copy, i._createDatePicker = function(a, d) {
|
|
3629
3644
|
return new Sa(i, a, d);
|
|
3630
3645
|
}, i._getFocusableNodes = ue.getFocusableNodes, i._getClassName = ue.getClassName, i._locate_css = ue.locateCss;
|
|
3631
3646
|
const t = Kt(i);
|
|
@@ -3694,28 +3709,28 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3694
3709
|
return m.async = !1, this.query(m);
|
|
3695
3710
|
}, _call: function(l, c, f, m, p, h) {
|
|
3696
3711
|
return new a.Promise((function(u, v) {
|
|
3697
|
-
var
|
|
3698
|
-
if (m &&
|
|
3699
|
-
if (
|
|
3700
|
-
if ((
|
|
3712
|
+
var g = typeof XMLHttpRequest === void 0 || a.$env.isIE ? new window.ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(), x = navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null;
|
|
3713
|
+
if (m && g.addEventListener("readystatechange", function() {
|
|
3714
|
+
if (g.readyState == 4 || x && g.readyState == 3) {
|
|
3715
|
+
if ((g.status != 200 || g.responseText === "") && !a.callEvent("onAjaxError", [g]))
|
|
3701
3716
|
return;
|
|
3702
3717
|
setTimeout(function() {
|
|
3703
|
-
typeof p == "function" && p.apply(window, [{ xmlDoc:
|
|
3718
|
+
typeof p == "function" && p.apply(window, [{ xmlDoc: g, filePath: c }]), u(g), typeof p == "function" && (p = null, g = null);
|
|
3704
3719
|
}, 0);
|
|
3705
3720
|
}
|
|
3706
|
-
}), l != "GET" || this.cache || (c += (c.indexOf("?") >= 0 ? "&" : "?") + "dhxr" + (/* @__PURE__ */ new Date()).getTime() + "=1"),
|
|
3721
|
+
}), l != "GET" || this.cache || (c += (c.indexOf("?") >= 0 ? "&" : "?") + "dhxr" + (/* @__PURE__ */ new Date()).getTime() + "=1"), g.open(l, c, m), h)
|
|
3707
3722
|
for (var D in h)
|
|
3708
|
-
|
|
3723
|
+
g.setRequestHeader(D, h[D]);
|
|
3709
3724
|
else
|
|
3710
|
-
l.toUpperCase() == "POST" || l == "PUT" || l == "DELETE" ?
|
|
3711
|
-
if (
|
|
3712
|
-
return { xmlDoc:
|
|
3725
|
+
l.toUpperCase() == "POST" || l == "PUT" || l == "DELETE" ? g.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") : l == "GET" && (f = null);
|
|
3726
|
+
if (g.setRequestHeader("X-Requested-With", "XMLHttpRequest"), g.send(f), !m)
|
|
3727
|
+
return { xmlDoc: g, filePath: c };
|
|
3713
3728
|
}).bind(this));
|
|
3714
3729
|
}, urlSeparator: function(l) {
|
|
3715
3730
|
return l.indexOf("?") != -1 ? "&" : "?";
|
|
3716
3731
|
} }, a.$ajax = a.ajax;
|
|
3717
3732
|
}(i), Vt(i), function(a) {
|
|
3718
|
-
a.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: !1, preserve_length: !0, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: !0, fix_tab_position: !0, start_on_monday: !0, first_hour: 0, last_hour: 24, readonly: !1, drag_resize: !0, drag_move: !0, drag_create: !0, drag_event_body: !0, dblclick_create: !0, details_on_dblclick: !0, edit_on_create: !0, details_on_create: !0, header: null, hour_size_px: 44, resize_month_events: !1, resize_month_timed: !1, responsive_lightbox: !1, separate_short_events: !0, rtl: !1, cascade_event_display: !1, cascade_event_count: 4, cascade_event_margin: 30, multi_day: !0, multi_day_height_limit: 200, drag_lightbox: !0, preserve_scroll: !0, select: !0, undo_deleted: !0, server_utc: !1, touch: !0, touch_tip: !0, touch_drag: 500, touch_swipe_dates: !1, quick_info_detached: !0, positive_closing: !1, drag_highlight: !0, limit_drag_out: !1, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"],
|
|
3733
|
+
a.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: !1, preserve_length: !0, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: !0, fix_tab_position: !0, start_on_monday: !0, first_hour: 0, last_hour: 24, readonly: !1, drag_resize: !0, drag_move: !0, drag_create: !0, drag_event_body: !0, dblclick_create: !0, details_on_dblclick: !0, edit_on_create: !0, details_on_create: !0, header: null, hour_size_px: 44, resize_month_events: !1, resize_month_timed: !1, responsive_lightbox: !1, separate_short_events: !0, rtl: !1, cascade_event_display: !1, cascade_event_count: 4, cascade_event_margin: 30, multi_day: !0, multi_day_height_limit: 200, drag_lightbox: !0, preserve_scroll: !0, select: !0, undo_deleted: !0, server_utc: !1, touch: !0, touch_tip: !0, touch_drag: 500, touch_swipe_dates: !1, quick_info_detached: !0, positive_closing: !1, drag_highlight: !0, limit_drag_out: !1, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_right: ["dhx_save_btn", "dhx_cancel_btn"], buttons_left: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: !0, left_border: !1, ajax_error: "alert", delay_render: 0, timeline_swap_resize: !0, wai_aria_attributes: !0, wai_aria_application_role: !0, csp: "auto", event_attribute: "data-event-id", show_errors: !0 }, a.config.buttons_left.$initial = a.config.buttons_left.join(), a.config.buttons_right.$initial = a.config.buttons_right.join(), a._helpers = { parseDate: function(d) {
|
|
3719
3734
|
return (a.templates.xml_date || a.templates.parse_date)(d);
|
|
3720
3735
|
}, formatDate: function(d) {
|
|
3721
3736
|
return (a.templates.xml_format || a.templates.format_date)(d);
|
|
@@ -3837,8 +3852,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3837
3852
|
}
|
|
3838
3853
|
this._rendered_location = this._els.dhx_multi_day[0], this._table_view = !0, this.render_data(h, l), this._table_view = !1, this._rendered_location = this._els.dhx_cal_data[0], this._table_view = !1, this.render_data(p, l);
|
|
3839
3854
|
} else {
|
|
3840
|
-
var v = document.createDocumentFragment(),
|
|
3841
|
-
this._rendered_location = v, this.render_data(d, l),
|
|
3855
|
+
var v = document.createDocumentFragment(), g = this._els.dhx_cal_data[0];
|
|
3856
|
+
this._rendered_location = v, this.render_data(d, l), g.appendChild(v), this._rendered_location = g;
|
|
3842
3857
|
}
|
|
3843
3858
|
c && this.callEvent("onDataRender", []);
|
|
3844
3859
|
}, a._view_month_day = function(d) {
|
|
@@ -3849,10 +3864,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3849
3864
|
c._sday = f, c._eday = f + 1;
|
|
3850
3865
|
var m = a.date, p = a._min_date;
|
|
3851
3866
|
p = m.add(p, c._sweek, "week"), p = m.add(p, c._sday, "day");
|
|
3852
|
-
var h = a.getEvents(p, m.add(p, 1, "day")).length, u = this._get_event_bar_pos(c), v = u.x2 - u.x,
|
|
3853
|
-
a.event(
|
|
3867
|
+
var h = a.getEvents(p, m.add(p, 1, "day")).length, u = this._get_event_bar_pos(c), v = u.x2 - u.x, g = document.createElement("div");
|
|
3868
|
+
a.event(g, "click", function(x) {
|
|
3854
3869
|
a._view_month_day(x);
|
|
3855
|
-
}),
|
|
3870
|
+
}), g.className = "dhx_month_link", g.style.top = u.y + "px", g.style.left = u.x + "px", g.style.width = v + "px", g.innerHTML = a.templates.month_events_link(p, h), this._rendered.push(g), l.appendChild(g);
|
|
3856
3871
|
}
|
|
3857
3872
|
}, a._recalculate_timed = function(d) {
|
|
3858
3873
|
var l;
|
|
@@ -3892,10 +3907,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3892
3907
|
if (h.length) {
|
|
3893
3908
|
for (var u = 0; u < h.length; u++) {
|
|
3894
3909
|
m[u]++;
|
|
3895
|
-
var v = h[u].querySelectorAll(".dhx_cal_month_cell"),
|
|
3896
|
-
if (m[u] * c >
|
|
3897
|
-
var x =
|
|
3898
|
-
1 * this.config.max_month_events !== this.config.max_month_events || m[u] <= this.config.max_month_events ? x = m[u] * c : (this.config.max_month_events + 1) * c >
|
|
3910
|
+
var v = h[u].querySelectorAll(".dhx_cal_month_cell"), g = this._colsS.height - this.xy.month_head_height;
|
|
3911
|
+
if (m[u] * c > g) {
|
|
3912
|
+
var x = g;
|
|
3913
|
+
1 * this.config.max_month_events !== this.config.max_month_events || m[u] <= this.config.max_month_events ? x = m[u] * c : (this.config.max_month_events + 1) * c > g && (x = (this.config.max_month_events + 1) * c), h[u].style.height = x + this.xy.month_head_height + "px";
|
|
3899
3914
|
}
|
|
3900
3915
|
m[u] = (m[u - 1] || 0) + a._get_first_visible_cell(v).offsetHeight;
|
|
3901
3916
|
}
|
|
@@ -3906,12 +3921,12 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3906
3921
|
k -= a.xy.scroll_width || 0, this._calc_scale_sizes(k, this._min_date, this._max_date), a._colsS.heights = S, this.set_xy(this._els.dhx_cal_header[0], k), a._render_scales(this._els.dhx_cal_header[0]), a._render_month_scale(this._els.dhx_cal_data[0], this._get_timeunit_start(), this._min_date), D.scroll_fix = !0;
|
|
3907
3922
|
}
|
|
3908
3923
|
} else if (d.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (m[0] = -1), d.length || m[0] == -1) {
|
|
3909
|
-
var M = (m[0] + 1) * c + 4,
|
|
3910
|
-
this.config.multi_day_height_limit && (b = (
|
|
3924
|
+
var M = (m[0] + 1) * c + 4, y = M, b = M + "px";
|
|
3925
|
+
this.config.multi_day_height_limit && (b = (y = Math.min(M, this.config.multi_day_height_limit)) + "px");
|
|
3911
3926
|
var w = this._els.dhx_multi_day[0];
|
|
3912
3927
|
w.style.height = b, w.style.visibility = m[0] == -1 ? "hidden" : "visible", w.style.display = m[0] == -1 ? "none" : "";
|
|
3913
3928
|
var E = this._els.dhx_multi_day[1];
|
|
3914
|
-
E.style.height = b, E.style.visibility = m[0] == -1 ? "hidden" : "visible", E.style.display = m[0] == -1 ? "none" : "", E.className = m[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (m[0] + 1) * c, this.config.multi_day_height_limit && (this._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift)), m[0] = 0,
|
|
3929
|
+
E.style.height = b, E.style.visibility = m[0] == -1 ? "hidden" : "visible", E.style.display = m[0] == -1 ? "none" : "", E.className = m[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (m[0] + 1) * c, this.config.multi_day_height_limit && (this._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift)), m[0] = 0, y != M && (w.style.overflowY = "auto", E.style.position = "fixed", E.style.top = "", E.style.left = "");
|
|
3915
3930
|
}
|
|
3916
3931
|
}
|
|
3917
3932
|
return d;
|
|
@@ -3932,7 +3947,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3932
3947
|
var c = [], f = [];
|
|
3933
3948
|
this._min_mapped_duration = Math.floor(60 * this.xy.min_event_height / this.config.hour_size_px);
|
|
3934
3949
|
for (var m = 0; m < d.length; m++) {
|
|
3935
|
-
var p = d[m], h = p.start_date, u = p.end_date, v = h.getHours(),
|
|
3950
|
+
var p = d[m], h = p.start_date, u = p.end_date, v = h.getHours(), g = u.getHours();
|
|
3936
3951
|
if (p._sday = this._get_event_sday(p), this._ignores[p._sday])
|
|
3937
3952
|
d.splice(m, 1), m--;
|
|
3938
3953
|
else {
|
|
@@ -3954,12 +3969,12 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3954
3969
|
if (x.length <= x[x.length - 1]._sorder) {
|
|
3955
3970
|
if (x[x.length - 1]._sorder)
|
|
3956
3971
|
for (M = 0; M < x.length; M++) {
|
|
3957
|
-
for (var
|
|
3972
|
+
for (var y = !1, b = 0; b < x.length; b++)
|
|
3958
3973
|
if (x[b]._sorder == M) {
|
|
3959
|
-
|
|
3974
|
+
y = !0;
|
|
3960
3975
|
break;
|
|
3961
3976
|
}
|
|
3962
|
-
if (!
|
|
3977
|
+
if (!y) {
|
|
3963
3978
|
p._sorder = M;
|
|
3964
3979
|
break;
|
|
3965
3980
|
}
|
|
@@ -3977,7 +3992,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
3977
3992
|
p._sorder = 0;
|
|
3978
3993
|
x.splice(k, k == x.length ? 0 : 1, p), x.length > (x.max_count || 0) ? (x.max_count = x.length, p._count = x.length) : p._count = p._count ? p._count : 1;
|
|
3979
3994
|
}
|
|
3980
|
-
(v < this.config.first_hour ||
|
|
3995
|
+
(v < this.config.first_hour || g >= this.config.last_hour) && (f.push(p), d[m] = p = this._copy_event(p), v < this.config.first_hour && (p.start_date.setHours(this.config.first_hour), p.start_date.setMinutes(0)), g >= this.config.last_hour && (p.end_date.setMinutes(0), p.end_date.setHours(this.config.last_hour)), p.start_date > p.end_date || v == this.config.last_hour) && (d.splice(m, 1), m--);
|
|
3981
3996
|
}
|
|
3982
3997
|
}
|
|
3983
3998
|
if (!l) {
|
|
@@ -4006,22 +4021,22 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4006
4021
|
}, a._pre_render_events_table = function(d, l) {
|
|
4007
4022
|
this._time_order(d);
|
|
4008
4023
|
for (var c, f = [], m = [[], [], [], [], [], [], []], p = this._colsS.heights, h = this._cols.length, u = {}, v = 0; v < d.length; v++) {
|
|
4009
|
-
var
|
|
4024
|
+
var g = d[v], x = g.id;
|
|
4010
4025
|
u[x] || (u[x] = { first_chunk: !0, last_chunk: !0 });
|
|
4011
|
-
var D = u[x], k = c ||
|
|
4026
|
+
var D = u[x], k = c || g.start_date, S = g.end_date;
|
|
4012
4027
|
k < this._min_date && (D.first_chunk = !1, k = this._min_date), S > this._max_date && (D.last_chunk = !1, S = this._max_date);
|
|
4013
|
-
var M = this.locate_holder_day(k, !1,
|
|
4014
|
-
if (
|
|
4015
|
-
var
|
|
4016
|
-
if (
|
|
4017
|
-
var b, w = m[
|
|
4018
|
-
for (b = 0; b < w.length && !(w[b]._eday <=
|
|
4028
|
+
var M = this.locate_holder_day(k, !1, g);
|
|
4029
|
+
if (g._sday = M % h, !this._ignores[g._sday] || !g._timed) {
|
|
4030
|
+
var y = this.locate_holder_day(S, !0, g) || h;
|
|
4031
|
+
if (g._eday = y % h || h, g._length = y - M, g._sweek = Math.floor((this._correct_shift(k.valueOf(), 1) - this._min_date.valueOf()) / (864e5 * h)), a._is_any_multiday_cell_visible(k, S, g)) {
|
|
4032
|
+
var b, w = m[g._sweek];
|
|
4033
|
+
for (b = 0; b < w.length && !(w[b]._eday <= g._sday); b++)
|
|
4019
4034
|
;
|
|
4020
|
-
if (
|
|
4021
|
-
c = null, f.push(
|
|
4035
|
+
if (g._sorder && l || (g._sorder = b), g._sday + g._length <= h)
|
|
4036
|
+
c = null, f.push(g), w[b] = g, p[g._sweek] = w.length - 1, g._first_chunk = D.first_chunk, g._last_chunk = D.last_chunk;
|
|
4022
4037
|
else {
|
|
4023
|
-
var E = this._copy_event(
|
|
4024
|
-
E.id =
|
|
4038
|
+
var E = this._copy_event(g);
|
|
4039
|
+
E.id = g.id, E._length = h - g._sday, E._eday = h, E._sday = g._sday, E._sweek = g._sweek, E._sorder = g._sorder, E.end_date = this.date.add(k, E._length, "day"), E._first_chunk = D.first_chunk, D.first_chunk && (D.first_chunk = !1), f.push(E), w[b] = E, c = E.end_date, p[g._sweek] = w.length - 1, v--;
|
|
4025
4040
|
}
|
|
4026
4041
|
} else
|
|
4027
4042
|
c = null;
|
|
@@ -4059,13 +4074,13 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4059
4074
|
var p = a.locate_holder(d._sday);
|
|
4060
4075
|
if (p) {
|
|
4061
4076
|
l = l || p;
|
|
4062
|
-
var h = this._calc_event_y(d, a.xy.min_event_height), u = h.top, v = h.height,
|
|
4077
|
+
var h = this._calc_event_y(d, a.xy.min_event_height), u = h.top, v = h.height, g = d._count || 1, x = d._sorder || 0;
|
|
4063
4078
|
c = c || p.clientWidth, this.config.day_column_padding && (c -= this.config.day_column_padding);
|
|
4064
|
-
var D = Math.floor((c - m) /
|
|
4065
|
-
if (d._inner || (D *=
|
|
4079
|
+
var D = Math.floor((c - m) / g), k = x * D + 1;
|
|
4080
|
+
if (d._inner || (D *= g - x), this.config.cascade_event_display) {
|
|
4066
4081
|
const A = this.config.cascade_event_count, C = this.config.cascade_event_margin;
|
|
4067
|
-
let $, H = (
|
|
4068
|
-
|
|
4082
|
+
let $, H = (g - x - 1) % A * C, O = x % A * C;
|
|
4083
|
+
g * C < c - this.config.day_column_padding ? $ = d._inner ? H / 2 : 0 : ($ = d._inner ? H / 3 : 0, k = O / 3, g * C / 2 > c - this.config.day_column_padding && ($ = d._inner ? H / A : 0, k = O / A)), D = Math.floor(c - m - k - $);
|
|
4069
4084
|
}
|
|
4070
4085
|
d._mode = v < 30 ? "smallest" : v < 42 ? "small" : null;
|
|
4071
4086
|
var S = this._render_v_bar(d, m + k, u, D, v, d._text_style, a.templates.event_header(d.start_date, d.end_date, d), a.templates.event_text(d.start_date, d.end_date, d));
|
|
@@ -4073,8 +4088,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4073
4088
|
S.style.zIndex = 1, D = Math.max(D, a.xy.editor_width), (S = document.createElement("div")).setAttribute("event_id", d.id), S.setAttribute(this.config.event_attribute, d.id), this._waiAria.eventAttr(d, S), S.className = "dhx_cal_event dhx_cal_editor", this.config.rtl && k++, this.set_xy(S, D, v, k, u), d.color && S.style.setProperty("--dhx-scheduler-event-background", d.color);
|
|
4074
4089
|
var M = a.templates.event_class(d.start_date, d.end_date, d);
|
|
4075
4090
|
M && (S.className += " " + M);
|
|
4076
|
-
var
|
|
4077
|
-
|
|
4091
|
+
var y = document.createElement("div");
|
|
4092
|
+
y.style.cssText += "overflow:hidden;height:100%", S.appendChild(y), this._els.dhx_cal_data[0].appendChild(S), this._rendered.push(S), y.innerHTML = "<textarea class='dhx_cal_editor'>" + d.text + "</textarea>", this._editor = y.querySelector("textarea"), a.event(this._editor, "keydown", function(A) {
|
|
4078
4093
|
if (A.shiftKey)
|
|
4079
4094
|
return !0;
|
|
4080
4095
|
var C = A.keyCode;
|
|
@@ -4096,19 +4111,19 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4096
4111
|
}
|
|
4097
4112
|
}
|
|
4098
4113
|
}, a._render_v_bar = function(d, l, c, f, m, p, h, u, v) {
|
|
4099
|
-
var
|
|
4114
|
+
var g = document.createElement("div"), x = d.id, D = v ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event", k = a.getState();
|
|
4100
4115
|
k.drag_id == d.id && (D += " dhx_cal_event_drag"), k.select_id == d.id && (D += " dhx_cal_event_selected");
|
|
4101
4116
|
var S = a.templates.event_class(d.start_date, d.end_date, d);
|
|
4102
4117
|
S && (D = D + " " + S), this.config.cascade_event_display && (D += " dhx_cal_event_cascade");
|
|
4103
|
-
var M = f - 1,
|
|
4118
|
+
var M = f - 1, y = `<div event_id="${x}" ${this.config.event_attribute}="${x}" class="${D}"
|
|
4104
4119
|
style="position:absolute; top:${c}px; ${this.config.rtl ? "right:" : "left:"}${l}px; width:${M}px; height:${m}px; ${p || ""}"
|
|
4105
4120
|
data-bar-start="${d.start_date.valueOf()}" data-bar-end="${d.end_date.valueOf()}">
|
|
4106
4121
|
</div>`;
|
|
4107
|
-
|
|
4108
|
-
var b =
|
|
4122
|
+
g.innerHTML = y;
|
|
4123
|
+
var b = g.cloneNode(!0).firstChild;
|
|
4109
4124
|
if (!v && a.renderEvent(b, d, f, m, h, u))
|
|
4110
4125
|
return d.color && b.style.setProperty("--dhx-scheduler-event-background", d.color), d.textColor && b.style.setProperty("--dhx-scheduler-event-color", d.textColor), b;
|
|
4111
|
-
b =
|
|
4126
|
+
b = g.firstChild, d.color && b.style.setProperty("--dhx-scheduler-event-background", d.color), d.textColor && b.style.setProperty("--dhx-scheduler-event-color", d.textColor);
|
|
4112
4127
|
var w = '<div class="dhx_event_move dhx_header" > </div>';
|
|
4113
4128
|
w += '<div class="dhx_event_move dhx_title">' + h + "</div>", w += '<div class="dhx_body">' + u + "</div>";
|
|
4114
4129
|
var E = "dhx_event_resize dhx_footer";
|
|
@@ -4140,10 +4155,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4140
4155
|
}, a.render_event_bar = function(d) {
|
|
4141
4156
|
var l = this._rendered_location, c = this._get_event_bar_pos(d), f = c.y, m = c.x, p = c.x2, h = "";
|
|
4142
4157
|
if (p) {
|
|
4143
|
-
var u = a.config.resize_month_events && this._mode == "month" && (!d._timed || a.config.resize_month_timed), v = document.createElement("div"),
|
|
4144
|
-
d._timed && !u || (S = !1, M = "dhx_cal_event_line"),
|
|
4145
|
-
var
|
|
4146
|
-
|
|
4158
|
+
var u = a.config.resize_month_events && this._mode == "month" && (!d._timed || a.config.resize_month_timed), v = document.createElement("div"), g = d.hasOwnProperty("_first_chunk") && d._first_chunk, x = d.hasOwnProperty("_last_chunk") && d._last_chunk, D = u && (d._timed || g), k = u && (d._timed || x), S = !0, M = "dhx_cal_event_clear";
|
|
4159
|
+
d._timed && !u || (S = !1, M = "dhx_cal_event_line"), g && (M += " dhx_cal_event_line_start"), x && (M += " dhx_cal_event_line_end"), D && (h += "<div class='dhx_event_resize dhx_event_resize_start'></div>"), k && (h += "<div class='dhx_event_resize dhx_event_resize_end'></div>");
|
|
4160
|
+
var y = a.templates.event_class(d.start_date, d.end_date, d);
|
|
4161
|
+
y && (M += " " + y);
|
|
4147
4162
|
var b = d.color ? "--dhx-scheduler-event-background:" + d.color + ";" : "", w = d.textColor ? "--dhx-scheduler-event-color:" + d.textColor + ";" : "", E = ["position:absolute", "top:" + f + "px", "left:" + m + "px", "width:" + (p - m - (S ? 1 : 0)) + "px", "height:" + (this.xy.bar_height - 2) + "px", w, b, d._text_style || ""].join(";"), N = "<div event_id='" + d.id + "' " + this.config.event_attribute + "='" + d.id + "' class='" + M + "' style='" + E + "'" + this._waiAria.eventBarAttrString(d) + ">";
|
|
4148
4163
|
u && (N += h), a.getState().mode != "month" || d._beforeEventChangedFlag || (d = a.getEvent(d.id)), d._timed && (N += `<span class='dhx_cal_event_clear_date'>${a.templates.event_bar_date(d.start_date, d.end_date, d)}</span>`), N += "<div class='dhx_cal_event_line_content'>", N += a.templates.event_bar_text(d.start_date, d.end_date, d) + "</div>", N += "</div>", N += "</div>", v.innerHTML = N, this._rendered.push(v.firstChild), l.appendChild(v.firstChild);
|
|
4149
4164
|
}
|
|
@@ -4186,24 +4201,24 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4186
4201
|
a.config.preserve_scroll = !1;
|
|
4187
4202
|
var p = c.color, h = c.textColor;
|
|
4188
4203
|
if (a.config.highlight_displayed_event && (c.color = a.config.displayed_event_color, c.textColor = a.config.displayed_event_text_color), a.setCurrentView(new Date(c.start_date), l), a.config.scroll_hour = f, a.config.preserve_scroll = m, a.matrix && a.matrix[l]) {
|
|
4189
|
-
var u = a.getView(), v = u.y_property,
|
|
4190
|
-
if (
|
|
4204
|
+
var u = a.getView(), v = u.y_property, g = a.getEvent(c.id);
|
|
4205
|
+
if (g) {
|
|
4191
4206
|
if (!x) {
|
|
4192
|
-
var x =
|
|
4207
|
+
var x = g[v];
|
|
4193
4208
|
Array.isArray(x) ? x = x[0] : typeof x == "string" && a.config.section_delimiter && x.indexOf(a.config.section_delimiter) > -1 && (x = x.split(a.config.section_delimiter)[0]);
|
|
4194
4209
|
}
|
|
4195
|
-
var D = u.getSectionTop(x), k = u.posFromDate(
|
|
4210
|
+
var D = u.getSectionTop(x), k = u.posFromDate(g.start_date), S = a.$container.querySelector(".dhx_timeline_data_wrapper");
|
|
4196
4211
|
if (k -= (S.offsetWidth - u.dx) / 2, D = D - S.offsetHeight / 2 + u.dy / 2, u._smartRenderingEnabled())
|
|
4197
4212
|
var M = u.attachEvent("onScroll", function() {
|
|
4198
|
-
|
|
4213
|
+
y(), u.detachEvent(M);
|
|
4199
4214
|
});
|
|
4200
|
-
u.scrollTo({ left: k, top: D }), u._smartRenderingEnabled() ||
|
|
4215
|
+
u.scrollTo({ left: k, top: D }), u._smartRenderingEnabled() || y();
|
|
4201
4216
|
}
|
|
4202
4217
|
} else
|
|
4203
|
-
|
|
4218
|
+
y();
|
|
4204
4219
|
a.callEvent("onAfterEventDisplay", [c, l]);
|
|
4205
4220
|
}
|
|
4206
|
-
function
|
|
4221
|
+
function y() {
|
|
4207
4222
|
c.color = p, c.textColor = h;
|
|
4208
4223
|
}
|
|
4209
4224
|
};
|
|
@@ -4234,10 +4249,10 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4234
4249
|
return null;
|
|
4235
4250
|
var m = c[f];
|
|
4236
4251
|
a._lightbox || a.getLightbox();
|
|
4237
|
-
var p = a._lightbox.querySelector(`#${m.id}`), h = p.nextSibling, u = { section: m, header: p, node: h, getValue: function(
|
|
4238
|
-
return a.form_blocks[m.type].get_value(h,
|
|
4239
|
-
}, setValue: function(
|
|
4240
|
-
return a.form_blocks[m.type].set_value(h,
|
|
4252
|
+
var p = a._lightbox.querySelector(`#${m.id}`), h = p.nextSibling, u = { section: m, header: p, node: h, getValue: function(g) {
|
|
4253
|
+
return a.form_blocks[m.type].get_value(h, g || {}, m);
|
|
4254
|
+
}, setValue: function(g, x) {
|
|
4255
|
+
return a.form_blocks[m.type].set_value(h, g, x || {}, m);
|
|
4241
4256
|
} }, v = a._lightbox_controls["get_" + m.type + "_control"];
|
|
4242
4257
|
return v ? v(u) : u;
|
|
4243
4258
|
}, a._lightbox_controls.get_template_control = function(l) {
|
|
@@ -4283,15 +4298,15 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4283
4298
|
var c = l.time_format, f = a.config, m = a.date.date_part(a._currentDate()), p = 1440, h = 0;
|
|
4284
4299
|
a.config.limit_time_select && (p = 60 * f.last_hour + 1, h = 60 * f.first_hour, m.setHours(f.first_hour));
|
|
4285
4300
|
for (var u = "", v = 0; v < c.length; v++) {
|
|
4286
|
-
var
|
|
4301
|
+
var g = c[v];
|
|
4287
4302
|
v > 0 && (u += " ");
|
|
4288
4303
|
var x = "", D = "";
|
|
4289
|
-
switch (
|
|
4304
|
+
switch (g) {
|
|
4290
4305
|
case "%Y":
|
|
4291
4306
|
var k, S, M;
|
|
4292
4307
|
x = "dhx_lightbox_year_select", l._time_format_order[3] = v, l.year_range && (isNaN(l.year_range) ? l.year_range.push && (S = l.year_range[0], M = l.year_range[1]) : k = l.year_range), k = k || 10;
|
|
4293
|
-
var
|
|
4294
|
-
S = S || m.getFullYear() -
|
|
4308
|
+
var y = y || Math.floor(k / 2);
|
|
4309
|
+
S = S || m.getFullYear() - y, M = M || S + k;
|
|
4295
4310
|
for (var b = S; b < M; b++)
|
|
4296
4311
|
D += "<option value='" + b + "'>" + b + "</option>";
|
|
4297
4312
|
break;
|
|
@@ -4310,34 +4325,34 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4310
4325
|
D += "<option value='" + b + "'>" + this.templates.time_picker(m) + "</option>", l._time_values.push(b), m.setTime(m.valueOf() + 60 * this.config.time_step * 1e3), b = 24 * (m.getDate() != w ? 1 : 0) * 60 + 60 * m.getHours() + m.getMinutes();
|
|
4311
4326
|
}
|
|
4312
4327
|
if (D) {
|
|
4313
|
-
var E = a._waiAria.lightboxSelectAttrString(
|
|
4328
|
+
var E = a._waiAria.lightboxSelectAttrString(g);
|
|
4314
4329
|
u += "<select class='" + x + "' " + (l.readonly ? "disabled='disabled'" : "") + E + ">" + D + "</select> ";
|
|
4315
4330
|
}
|
|
4316
4331
|
}
|
|
4317
4332
|
return `<div class='dhx_section_time' ${l.height ? `style='height:${l.height}px;'` : ""}>${u}<span style='font-weight:normal; font-size:10pt;' class='dhx_section_time_spacer'> – </span>${u}</div>`;
|
|
4318
4333
|
}, set_value: function(l, c, f, m) {
|
|
4319
|
-
var p, h, u = a.config, v = l.getElementsByTagName("select"),
|
|
4334
|
+
var p, h, u = a.config, v = l.getElementsByTagName("select"), g = m._time_format_order;
|
|
4320
4335
|
if (u.full_day) {
|
|
4321
4336
|
if (!l._full_day) {
|
|
4322
4337
|
var x = "<label class='dhx_fullday'><input type='checkbox' name='full_day' value='true'> " + a.locale.labels.full_day + " </label></input>";
|
|
4323
4338
|
a.config.wide_form || (x = l.previousSibling.innerHTML + x), l.previousSibling.innerHTML = x, l._full_day = !0;
|
|
4324
4339
|
}
|
|
4325
4340
|
var D = l.previousSibling.getElementsByTagName("input")[0];
|
|
4326
|
-
D.checked = a.date.time_part(f.start_date) === 0 && a.date.time_part(f.end_date) === 0, v[
|
|
4341
|
+
D.checked = a.date.time_part(f.start_date) === 0 && a.date.time_part(f.end_date) === 0, v[g[0]].disabled = D.checked, v[g[0] + v.length / 2].disabled = D.checked, D.$_eventAttached || (D.$_eventAttached = !0, a.event(D, "click", function() {
|
|
4327
4342
|
if (D.checked) {
|
|
4328
|
-
var
|
|
4329
|
-
a.form_blocks.time.get_value(l,
|
|
4343
|
+
var y = {};
|
|
4344
|
+
a.form_blocks.time.get_value(l, y, m), p = a.date.date_part(y.start_date), (+(h = a.date.date_part(y.end_date)) == +p || +h >= +p && (f.end_date.getHours() !== 0 || f.end_date.getMinutes() !== 0)) && (h = a.date.add(h, 1, "day"));
|
|
4330
4345
|
} else
|
|
4331
4346
|
p = null, h = null;
|
|
4332
|
-
v[
|
|
4347
|
+
v[g[0]].disabled = D.checked, v[g[0] + v.length / 2].disabled = D.checked, M(v, 0, p || f.start_date), M(v, 4, h || f.end_date);
|
|
4333
4348
|
}));
|
|
4334
4349
|
}
|
|
4335
4350
|
if (u.auto_end_date && u.event_duration)
|
|
4336
4351
|
for (var k = function() {
|
|
4337
|
-
u.auto_end_date && u.event_duration && (p = new Date(v[
|
|
4352
|
+
u.auto_end_date && u.event_duration && (p = new Date(v[g[3]].value, v[g[2]].value, v[g[1]].value, 0, v[g[0]].value), h = new Date(p.getTime() + 60 * a.config.event_duration * 1e3), M(v, 4, h));
|
|
4338
4353
|
}, S = 0; S < 4; S++)
|
|
4339
4354
|
v[S].$_eventAttached || (v[S].$_eventAttached = !0, a.event(v[S], "change", k));
|
|
4340
|
-
function M(
|
|
4355
|
+
function M(y, b, w) {
|
|
4341
4356
|
for (var E = m._time_values, N = 60 * w.getHours() + w.getMinutes(), T = N, A = !1, C = 0; C < E.length; C++) {
|
|
4342
4357
|
var $ = E[C];
|
|
4343
4358
|
if ($ === N) {
|
|
@@ -4346,7 +4361,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4346
4361
|
}
|
|
4347
4362
|
$ < N && (T = $);
|
|
4348
4363
|
}
|
|
4349
|
-
|
|
4364
|
+
y[b + g[0]].value = A ? N : T, A || T || (y[b + g[0]].selectedIndex = -1), y[b + g[1]].value = w.getDate(), y[b + g[2]].value = w.getMonth(), y[b + g[3]].value = w.getFullYear();
|
|
4350
4365
|
}
|
|
4351
4366
|
M(v, 0, f.start_date), M(v, 4, f.end_date);
|
|
4352
4367
|
}, get_value: function(l, c, f) {
|
|
@@ -4381,9 +4396,9 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4381
4396
|
p.push(u), p.push(v), m[1].innerHTML = u, m[2].innerHTML = v;
|
|
4382
4397
|
}
|
|
4383
4398
|
this._waiAria.lightboxHeader(c, p.join(" "));
|
|
4384
|
-
for (var
|
|
4385
|
-
var D =
|
|
4386
|
-
S.set_value.call(this, k, M, f, D),
|
|
4399
|
+
for (var g = this.config.lightbox.sections, x = 0; x < g.length; x++) {
|
|
4400
|
+
var D = g[x], k = a._get_lightbox_section_node(D), S = this.form_blocks[D.type], M = f[D.map_to] !== void 0 ? f[D.map_to] : D.default_value;
|
|
4401
|
+
S.set_value.call(this, k, M, f, D), g[x].focus && S.focus.call(this, k);
|
|
4387
4402
|
}
|
|
4388
4403
|
a._lightbox_id = l;
|
|
4389
4404
|
}, a._get_lightbox_section_node = function(l) {
|
|
@@ -4502,11 +4517,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4502
4517
|
if (!this._lightbox) {
|
|
4503
4518
|
var l = document.createElement("div");
|
|
4504
4519
|
l.className = "dhx_cal_light", a.config.wide_form && (l.className += " dhx_cal_light_wide"), a.form_blocks.recurring && (l.className += " dhx_cal_light_rec"), a.config.rtl && (l.className += " dhx_cal_light_rtl"), a.config.responsive_lightbox && (l.className += " dhx_cal_light_responsive"), l.style.visibility = "hidden";
|
|
4505
|
-
var c = this._lightbox_template, f = this.config.
|
|
4520
|
+
var c = this._lightbox_template, f = this.config.buttons_right;
|
|
4506
4521
|
c += "<div class='dhx_cal_lcontrols'>";
|
|
4507
4522
|
for (var m = 0; m < f.length; m++)
|
|
4508
4523
|
c += "<div " + this._waiAria.lightboxButtonAttrString(f[m]) + " data-action='" + f[m] + "' class='dhx_btn_set dhx_" + (a.config.rtl ? "right" : "left") + "_btn_set " + f[m] + "_set'><div class='dhx_btn_inner " + f[m] + "'></div><div>" + a.locale.labels[f[m]] + "</div></div>";
|
|
4509
|
-
f = this.config.
|
|
4524
|
+
f = this.config.buttons_left;
|
|
4510
4525
|
var p = a.config.rtl;
|
|
4511
4526
|
for (m = 0; m < f.length; m++)
|
|
4512
4527
|
c += "<div class='dhx_cal_lcontrols_push_right'></div>", c += "<div " + this._waiAria.lightboxButtonAttrString(f[m]) + " data-action='" + f[m] + "' class='dhx_btn_set dhx_" + (p ? "left" : "right") + "_btn_set " + f[m] + "_set'><div class='dhx_btn_inner " + f[m] + "'></div><div>" + a.locale.labels[f[m]] + "</div></div>";
|
|
@@ -4520,8 +4535,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4520
4535
|
h[m].id = "area_" + this.uid();
|
|
4521
4536
|
var v = "";
|
|
4522
4537
|
h[m].button && (v = "<div " + a._waiAria.lightboxSectionButtonAttrString(this.locale.labels["button_" + h[m].button]) + " class='dhx_custom_button' data-section-index='" + m + "' index='" + m + "'><div class='dhx_custom_button_" + h[m].button + "'></div><div>" + this.locale.labels["button_" + h[m].button] + "</div></div>"), this.config.wide_form && (c += "<div class='dhx_wrap_section'>");
|
|
4523
|
-
var
|
|
4524
|
-
typeof
|
|
4538
|
+
var g = this.locale.labels["section_" + h[m].name];
|
|
4539
|
+
typeof g != "string" && (g = h[m].name), c += "<div id='" + h[m].id + "' class='dhx_cal_lsection dhx_cal_lsection_" + h[m].name + "'>" + v + "<label>" + g + "</label></div>" + u.render.call(this, h[m]), c += "</div>";
|
|
4525
4540
|
}
|
|
4526
4541
|
}
|
|
4527
4542
|
var x = l.getElementsByTagName("div");
|
|
@@ -4548,8 +4563,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4548
4563
|
}
|
|
4549
4564
|
h && a.form_blocks[f.type].focus && a.event(m, "click", function(v) {
|
|
4550
4565
|
return function() {
|
|
4551
|
-
var
|
|
4552
|
-
|
|
4566
|
+
var g = a.form_blocks[v.type], x = a._get_lightbox_section_node(v);
|
|
4567
|
+
g && g.focus && g.focus.call(a, x);
|
|
4553
4568
|
};
|
|
4554
4569
|
}(f));
|
|
4555
4570
|
}
|
|
@@ -4595,20 +4610,20 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`);
|
|
|
4595
4610
|
}), function(a) {
|
|
4596
4611
|
(function() {
|
|
4597
4612
|
var d = a.setCurrentView, l = a.updateView, c = null, f = null, m = function(u, v) {
|
|
4598
|
-
var
|
|
4613
|
+
var g = this;
|
|
4599
4614
|
le.clearTimeout(f), le.clearTimeout(c);
|
|
4600
|
-
var x =
|
|
4615
|
+
var x = g._date, D = g._mode;
|
|
4601
4616
|
h(this, u, v), f = setTimeout(function() {
|
|
4602
|
-
a.$destroyed || (
|
|
4617
|
+
a.$destroyed || (g.callEvent("onBeforeViewChange", [D, x, v || g._mode, u || g._date]) ? (l.call(g, u, v), g.callEvent("onViewChange", [g._mode, g._date]), le.clearTimeout(c), f = 0) : h(g, x, D));
|
|
4603
4618
|
}, a.config.delay_render);
|
|
4604
4619
|
}, p = function(u, v) {
|
|
4605
|
-
var
|
|
4620
|
+
var g = this, x = arguments;
|
|
4606
4621
|
h(this, u, v), le.clearTimeout(c), c = setTimeout(function() {
|
|
4607
|
-
a.$destroyed || f || l.apply(
|
|
4622
|
+
a.$destroyed || f || l.apply(g, x);
|
|
4608
4623
|
}, a.config.delay_render);
|
|
4609
4624
|
};
|
|
4610
|
-
function h(u, v,
|
|
4611
|
-
v && (u._date = v),
|
|
4625
|
+
function h(u, v, g) {
|
|
4626
|
+
v && (u._date = v), g && (u._mode = g);
|
|
4612
4627
|
}
|
|
4613
4628
|
a.attachEvent("onSchedulerReady", function() {
|
|
4614
4629
|
a.config.delay_render ? (a.setCurrentView = m, a.updateView = p) : (a.setCurrentView = d, a.updateView = l);
|
|
@@ -5085,7 +5100,7 @@ class $a {
|
|
|
5085
5100
|
return t && t.features.length ? (r.lng = t.features[0].center[0], r.lat = t.features[0].center[1]) : console.error(`Unable recieve a position of the event's location: ${i}`), r;
|
|
5086
5101
|
}
|
|
5087
5102
|
}
|
|
5088
|
-
var ze = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"],
|
|
5103
|
+
var ze = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"], Z = function() {
|
|
5089
5104
|
function e(i, t) {
|
|
5090
5105
|
if (t === 0)
|
|
5091
5106
|
throw new Error("Can't create weekday with n == 0");
|
|
@@ -5109,14 +5124,14 @@ var ze = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"], X = function() {
|
|
|
5109
5124
|
return typeof e == "number";
|
|
5110
5125
|
}, Xe = function(e) {
|
|
5111
5126
|
return typeof e == "string" && ze.includes(e);
|
|
5112
|
-
},
|
|
5127
|
+
}, ee = Array.isArray, se = function(e, i) {
|
|
5113
5128
|
i === void 0 && (i = e), arguments.length === 1 && (i = e, e = 0);
|
|
5114
5129
|
for (var t = [], r = e; r < i; r++)
|
|
5115
5130
|
t.push(r);
|
|
5116
5131
|
return t;
|
|
5117
5132
|
}, V = function(e, i) {
|
|
5118
5133
|
var t = 0, r = [];
|
|
5119
|
-
if (
|
|
5134
|
+
if (ee(e))
|
|
5120
5135
|
for (; t < i; t++)
|
|
5121
5136
|
r[t] = [].concat(e);
|
|
5122
5137
|
else
|
|
@@ -5129,11 +5144,11 @@ function me(e, i, t) {
|
|
|
5129
5144
|
var r = String(e);
|
|
5130
5145
|
return i |= 0, r.length > i ? String(r) : ((i -= r.length) > t.length && (t += V(t, i / t.length)), t.slice(0, i) + String(r));
|
|
5131
5146
|
}
|
|
5132
|
-
var
|
|
5147
|
+
var ae = function(e, i) {
|
|
5133
5148
|
var t = e % i;
|
|
5134
5149
|
return t * i < 0 ? t + i : t;
|
|
5135
5150
|
}, Ce = function(e, i) {
|
|
5136
|
-
return { div: Math.floor(e / i), mod:
|
|
5151
|
+
return { div: Math.floor(e / i), mod: ae(e, i) };
|
|
5137
5152
|
}, oe = function(e) {
|
|
5138
5153
|
return !J(e) || e.length === 0;
|
|
5139
5154
|
}, W = function(e) {
|
|
@@ -5232,13 +5247,13 @@ function Je(e, i) {
|
|
|
5232
5247
|
}
|
|
5233
5248
|
Re(e, i), e.prototype = i === null ? Object.create(i) : (t.prototype = i.prototype, new t());
|
|
5234
5249
|
}
|
|
5235
|
-
var
|
|
5236
|
-
return
|
|
5250
|
+
var te = function() {
|
|
5251
|
+
return te = Object.assign || function(e) {
|
|
5237
5252
|
for (var i, t = 1, r = arguments.length; t < r; t++)
|
|
5238
5253
|
for (var s in i = arguments[t])
|
|
5239
5254
|
Object.prototype.hasOwnProperty.call(i, s) && (e[s] = i[s]);
|
|
5240
5255
|
return e;
|
|
5241
|
-
},
|
|
5256
|
+
}, te.apply(this, arguments);
|
|
5242
5257
|
};
|
|
5243
5258
|
function q(e, i, t) {
|
|
5244
5259
|
if (t || arguments.length === 2)
|
|
@@ -5271,7 +5286,7 @@ var F, tt = function(e) {
|
|
|
5271
5286
|
}), this.bymonthday = n.concat(o), this.bymonthday.length || (this.bymonthday = null);
|
|
5272
5287
|
}
|
|
5273
5288
|
if (J(this.origOptions.byweekday)) {
|
|
5274
|
-
var _ =
|
|
5289
|
+
var _ = ee(this.origOptions.byweekday) ? this.origOptions.byweekday : [this.origOptions.byweekday], a = String(_);
|
|
5275
5290
|
this.byweekday = { allWeeks: _.filter(function(l) {
|
|
5276
5291
|
return !l.n;
|
|
5277
5292
|
}), someWeeks: _.filter(function(l) {
|
|
@@ -5372,7 +5387,7 @@ var F, tt = function(e) {
|
|
|
5372
5387
|
return this.text.push(" "), this.text.push(i), this;
|
|
5373
5388
|
}, e.prototype.list = function(i, t, r, s) {
|
|
5374
5389
|
var n = this;
|
|
5375
|
-
s === void 0 && (s = ","),
|
|
5390
|
+
s === void 0 && (s = ","), ee(i) || (i = [i]), t = t || function(_) {
|
|
5376
5391
|
return _.toString();
|
|
5377
5392
|
};
|
|
5378
5393
|
var o = function(_) {
|
|
@@ -5671,7 +5686,7 @@ var Ua = _e.isFullyConvertible, Se = function() {
|
|
|
5671
5686
|
this.year += t;
|
|
5672
5687
|
}, i.prototype.addMonths = function(t) {
|
|
5673
5688
|
if (this.month += t, this.month > 12) {
|
|
5674
|
-
var r = Math.floor(this.month / 12), s =
|
|
5689
|
+
var r = Math.floor(this.month / 12), s = ae(this.month, 12);
|
|
5675
5690
|
this.month = s, this.year += r, this.month === 0 && (this.month = 12, --this.year);
|
|
5676
5691
|
}
|
|
5677
5692
|
}, i.prototype.addWeekly = function(t, r) {
|
|
@@ -5736,10 +5751,10 @@ function Et(e) {
|
|
|
5736
5751
|
}
|
|
5737
5752
|
if (i.length)
|
|
5738
5753
|
throw new Error("Invalid options: " + i.join(", "));
|
|
5739
|
-
return
|
|
5754
|
+
return te({}, e);
|
|
5740
5755
|
}
|
|
5741
5756
|
function Va(e) {
|
|
5742
|
-
var i =
|
|
5757
|
+
var i = te(te({}, We), Et(e));
|
|
5743
5758
|
if (J(i.byeaster) && (i.freq = z.YEARLY), !J(i.freq) || !z.FREQUENCIES[i.freq])
|
|
5744
5759
|
throw new Error("Invalid frequency: ".concat(i.freq, " ").concat(e.freq));
|
|
5745
5760
|
if (i.dtstart || (i.dtstart = new Date((/* @__PURE__ */ new Date()).setMilliseconds(0))), J(i.wkst) ? ie(i.wkst) || (i.wkst = i.wkst.weekday) : i.wkst = z.MO.weekday, J(i.bysetpos)) {
|
|
@@ -5759,8 +5774,8 @@ function Va(e) {
|
|
|
5759
5774
|
case z.WEEKLY:
|
|
5760
5775
|
i.byweekday = [be(i.dtstart)];
|
|
5761
5776
|
}
|
|
5762
|
-
if (J(i.bymonth) && !
|
|
5763
|
-
if (
|
|
5777
|
+
if (J(i.bymonth) && !ee(i.bymonth) && (i.bymonth = [i.bymonth]), J(i.byyearday) && !ee(i.byyearday) && ie(i.byyearday) && (i.byyearday = [i.byyearday]), J(i.bymonthday))
|
|
5778
|
+
if (ee(i.bymonthday)) {
|
|
5764
5779
|
var r = [], s = [];
|
|
5765
5780
|
for (t = 0; t < i.bymonthday.length; t++) {
|
|
5766
5781
|
var n;
|
|
@@ -5771,18 +5786,18 @@ function Va(e) {
|
|
|
5771
5786
|
i.bymonthday < 0 ? (i.bynmonthday = [i.bymonthday], i.bymonthday = []) : (i.bynmonthday = [], i.bymonthday = [i.bymonthday]);
|
|
5772
5787
|
else
|
|
5773
5788
|
i.bymonthday = [], i.bynmonthday = [];
|
|
5774
|
-
if (J(i.byweekno) && !
|
|
5789
|
+
if (J(i.byweekno) && !ee(i.byweekno) && (i.byweekno = [i.byweekno]), J(i.byweekday))
|
|
5775
5790
|
if (ie(i.byweekday))
|
|
5776
5791
|
i.byweekday = [i.byweekday], i.bynweekday = null;
|
|
5777
5792
|
else if (Xe(i.byweekday))
|
|
5778
|
-
i.byweekday = [
|
|
5779
|
-
else if (i.byweekday instanceof
|
|
5793
|
+
i.byweekday = [Z.fromStr(i.byweekday).weekday], i.bynweekday = null;
|
|
5794
|
+
else if (i.byweekday instanceof Z)
|
|
5780
5795
|
!i.byweekday.n || i.freq > z.MONTHLY ? (i.byweekday = [i.byweekday.weekday], i.bynweekday = null) : (i.bynweekday = [[i.byweekday.weekday, i.byweekday.n]], i.byweekday = null);
|
|
5781
5796
|
else {
|
|
5782
5797
|
var o = [], _ = [];
|
|
5783
5798
|
for (t = 0; t < i.byweekday.length; t++) {
|
|
5784
5799
|
var a = i.byweekday[t];
|
|
5785
|
-
ie(a) ? o.push(a) : Xe(a) ? o.push(
|
|
5800
|
+
ie(a) ? o.push(a) : Xe(a) ? o.push(Z.fromStr(a).weekday) : !a.n || i.freq > z.MONTHLY ? o.push(a.weekday) : _.push([a.weekday, a.n]);
|
|
5786
5801
|
}
|
|
5787
5802
|
i.byweekday = W(o) ? o : null, i.bynweekday = W(_) ? _ : null;
|
|
5788
5803
|
}
|
|
@@ -5795,7 +5810,7 @@ function Ie(e) {
|
|
|
5795
5810
|
`).map(Fa).filter(function(t) {
|
|
5796
5811
|
return t !== null;
|
|
5797
5812
|
});
|
|
5798
|
-
return
|
|
5813
|
+
return te(te({}, i[0]), i[1]);
|
|
5799
5814
|
}
|
|
5800
5815
|
function Me(e) {
|
|
5801
5816
|
var i = {}, t = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);
|
|
@@ -5830,7 +5845,7 @@ function nt(e) {
|
|
|
5830
5845
|
i.freq = F[n.toUpperCase()];
|
|
5831
5846
|
break;
|
|
5832
5847
|
case "WKST":
|
|
5833
|
-
i.wkst =
|
|
5848
|
+
i.wkst = ne[n.toUpperCase()];
|
|
5834
5849
|
break;
|
|
5835
5850
|
case "COUNT":
|
|
5836
5851
|
case "INTERVAL":
|
|
@@ -5853,12 +5868,12 @@ function nt(e) {
|
|
|
5853
5868
|
var l = d.split(",");
|
|
5854
5869
|
return l.map(function(c) {
|
|
5855
5870
|
if (c.length === 2)
|
|
5856
|
-
return
|
|
5871
|
+
return ne[c];
|
|
5857
5872
|
var f = c.match(/^([+-]?\d{1,2})([A-Z]{2})$/);
|
|
5858
5873
|
if (!f || f.length < 3)
|
|
5859
5874
|
throw new SyntaxError("Invalid weekday string: ".concat(c));
|
|
5860
|
-
var m = Number(f[1]), p = f[2], h =
|
|
5861
|
-
return new
|
|
5875
|
+
var m = Number(f[1]), p = f[2], h = ne[p].weekday;
|
|
5876
|
+
return new Z(h, m);
|
|
5862
5877
|
});
|
|
5863
5878
|
}(n);
|
|
5864
5879
|
break;
|
|
@@ -5903,17 +5918,17 @@ function Pe(e) {
|
|
|
5903
5918
|
for (var i, t = [], r = "", s = Object.keys(e), n = Object.keys(We), o = 0; o < s.length; o++)
|
|
5904
5919
|
if (s[o] !== "tzid" && B(n, s[o])) {
|
|
5905
5920
|
var _ = s[o].toUpperCase(), a = e[s[o]], d = "";
|
|
5906
|
-
if (J(a) && (!
|
|
5921
|
+
if (J(a) && (!ee(a) || a.length)) {
|
|
5907
5922
|
switch (_) {
|
|
5908
5923
|
case "FREQ":
|
|
5909
5924
|
d = z.FREQUENCIES[e.freq];
|
|
5910
5925
|
break;
|
|
5911
5926
|
case "WKST":
|
|
5912
|
-
d = ie(a) ? new
|
|
5927
|
+
d = ie(a) ? new Z(a).toString() : a.toString();
|
|
5913
5928
|
break;
|
|
5914
5929
|
case "BYWEEKDAY":
|
|
5915
|
-
_ = "BYDAY", d = (i = a,
|
|
5916
|
-
return p instanceof
|
|
5930
|
+
_ = "BYDAY", d = (i = a, ee(i) ? i : [i]).map(function(p) {
|
|
5931
|
+
return p instanceof Z ? p : ee(p) ? new Z(p[0], p[1]) : new Z(p);
|
|
5917
5932
|
}).toString();
|
|
5918
5933
|
break;
|
|
5919
5934
|
case "DTSTART":
|
|
@@ -5923,7 +5938,7 @@ function Pe(e) {
|
|
|
5923
5938
|
d = Fe(a, !e.tzid);
|
|
5924
5939
|
break;
|
|
5925
5940
|
default:
|
|
5926
|
-
if (
|
|
5941
|
+
if (ee(a)) {
|
|
5927
5942
|
for (var l = [], c = 0; c < a.length; c++)
|
|
5928
5943
|
l[c] = String(a[c]);
|
|
5929
5944
|
d = l.toString();
|
|
@@ -5967,7 +5982,7 @@ var Wa = function() {
|
|
|
5967
5982
|
}, o = this[i];
|
|
5968
5983
|
if (i === "all")
|
|
5969
5984
|
r = this.all;
|
|
5970
|
-
else if (
|
|
5985
|
+
else if (ee(o))
|
|
5971
5986
|
for (var _ = 0; _ < o.length; _++) {
|
|
5972
5987
|
var a = o[_];
|
|
5973
5988
|
if (!s.length || !n(a)) {
|
|
@@ -5981,24 +5996,24 @@ var Wa = function() {
|
|
|
5981
5996
|
;
|
|
5982
5997
|
r = d.getValue(), this._cacheAdd(i, r, t);
|
|
5983
5998
|
}
|
|
5984
|
-
return
|
|
5999
|
+
return ee(r) ? Qe(r) : r instanceof Date ? je(r) : r;
|
|
5985
6000
|
}, e;
|
|
5986
|
-
}(), Ka = q(q(q(q(q(q(q(q(q(q(q(q(q([], V(1, 31), !0), V(2, 28), !0), V(3, 31), !0), V(4, 30), !0), V(5, 31), !0), V(6, 30), !0), V(7, 31), !0), V(8, 31), !0), V(9, 30), !0), V(10, 31), !0), V(11, 30), !0), V(12, 31), !0), V(1, 7), !0), Ga = q(q(q(q(q(q(q(q(q(q(q(q(q([], V(1, 31), !0), V(2, 29), !0), V(3, 31), !0), V(4, 30), !0), V(5, 31), !0), V(6, 30), !0), V(7, 31), !0), V(8, 31), !0), V(9, 30), !0), V(10, 31), !0), V(11, 30), !0), V(12, 31), !0), V(1, 7), !0), Xa = se(1, 29), Za = se(1, 30), fe = se(1, 31),
|
|
6001
|
+
}(), Ka = q(q(q(q(q(q(q(q(q(q(q(q(q([], V(1, 31), !0), V(2, 28), !0), V(3, 31), !0), V(4, 30), !0), V(5, 31), !0), V(6, 30), !0), V(7, 31), !0), V(8, 31), !0), V(9, 30), !0), V(10, 31), !0), V(11, 30), !0), V(12, 31), !0), V(1, 7), !0), Ga = q(q(q(q(q(q(q(q(q(q(q(q(q([], V(1, 31), !0), V(2, 29), !0), V(3, 31), !0), V(4, 30), !0), V(5, 31), !0), V(6, 30), !0), V(7, 31), !0), V(8, 31), !0), V(9, 30), !0), V(10, 31), !0), V(11, 30), !0), V(12, 31), !0), V(1, 7), !0), Xa = se(1, 29), Za = se(1, 30), fe = se(1, 31), G = se(1, 32), Qa = q(q(q(q(q(q(q(q(q(q(q(q(q([], G, !0), Za, !0), G, !0), fe, !0), G, !0), fe, !0), G, !0), G, !0), fe, !0), G, !0), fe, !0), G, !0), G.slice(0, 7), !0), en = q(q(q(q(q(q(q(q(q(q(q(q(q([], G, !0), Xa, !0), G, !0), fe, !0), G, !0), fe, !0), G, !0), G, !0), fe, !0), G, !0), fe, !0), G, !0), G.slice(0, 7), !0), tn = se(-28, 0), an = se(-29, 0), pe = se(-30, 0), X = se(-31, 0), nn = q(q(q(q(q(q(q(q(q(q(q(q(q([], X, !0), an, !0), X, !0), pe, !0), X, !0), pe, !0), X, !0), X, !0), pe, !0), X, !0), pe, !0), X, !0), X.slice(0, 7), !0), rn = q(q(q(q(q(q(q(q(q(q(q(q(q([], X, !0), tn, !0), X, !0), pe, !0), X, !0), pe, !0), X, !0), X, !0), pe, !0), X, !0), pe, !0), X, !0), X.slice(0, 7), !0), on = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366], sn = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], it = function() {
|
|
5987
6002
|
for (var e = [], i = 0; i < 55; i++)
|
|
5988
6003
|
e = e.concat(se(7));
|
|
5989
6004
|
return e;
|
|
5990
6005
|
}();
|
|
5991
6006
|
function dn(e, i) {
|
|
5992
|
-
var t, r, s = ve(e, 1, 1), n = xe(e) ? 366 : 365, o = xe(e + 1) ? 366 : 365, _ = qe(s), a = be(s), d =
|
|
5993
|
-
var
|
|
5994
|
-
return
|
|
6007
|
+
var t, r, s = ve(e, 1, 1), n = xe(e) ? 366 : 365, o = xe(e + 1) ? 366 : 365, _ = qe(s), a = be(s), d = te(te({ yearlen: n, nextyearlen: o, yearordinal: _, yearweekday: a }, function(M) {
|
|
6008
|
+
var y = xe(M) ? 366 : 365, b = ve(M, 1, 1), w = be(b);
|
|
6009
|
+
return y === 365 ? { mmask: Ka, mdaymask: en, nmdaymask: rn, wdaymask: it.slice(w), mrange: sn } : { mmask: Ga, mdaymask: Qa, nmdaymask: nn, wdaymask: it.slice(w), mrange: on };
|
|
5995
6010
|
}(e)), { wnomask: null });
|
|
5996
6011
|
if (oe(i.byweekno))
|
|
5997
6012
|
return d;
|
|
5998
6013
|
d.wnomask = V(0, n + 7);
|
|
5999
|
-
var l = t =
|
|
6000
|
-
l >= 4 ? (l = 0, r = d.yearlen +
|
|
6001
|
-
for (var c = Math.floor(r / 7), f =
|
|
6014
|
+
var l = t = ae(7 - a + i.wkst, 7);
|
|
6015
|
+
l >= 4 ? (l = 0, r = d.yearlen + ae(a - i.wkst, 7)) : r = n - l;
|
|
6016
|
+
for (var c = Math.floor(r / 7), f = ae(r, 7), m = Math.floor(c + f / 4), p = 0; p < i.byweekno.length; p++) {
|
|
6002
6017
|
var h = i.byweekno[p];
|
|
6003
6018
|
if (h < 0 && (h += m + 1), h > 0 && h <= m) {
|
|
6004
6019
|
var u = void 0;
|
|
@@ -6011,14 +6026,14 @@ function dn(e, i) {
|
|
|
6011
6026
|
for (p = 0; p < 7 && (d.wnomask[u] = 1, u += 1, d.wdaymask[u] !== i.wkst); p++)
|
|
6012
6027
|
;
|
|
6013
6028
|
if (l) {
|
|
6014
|
-
var
|
|
6029
|
+
var g = void 0;
|
|
6015
6030
|
if (B(i.byweekno, -1))
|
|
6016
|
-
|
|
6031
|
+
g = -1;
|
|
6017
6032
|
else {
|
|
6018
|
-
var x = be(ve(e - 1, 1, 1)), D =
|
|
6019
|
-
D >= 4 ? (D = 0, S = k +
|
|
6033
|
+
var x = be(ve(e - 1, 1, 1)), D = ae(7 - x.valueOf() + i.wkst, 7), k = xe(e - 1) ? 366 : 365, S = void 0;
|
|
6034
|
+
D >= 4 ? (D = 0, S = k + ae(x - i.wkst, 7)) : S = n - l, g = Math.floor(52 + ae(S, 7) / 4);
|
|
6020
6035
|
}
|
|
6021
|
-
if (B(i.byweekno,
|
|
6036
|
+
if (B(i.byweekno, g))
|
|
6022
6037
|
for (u = 0; u < l; u++)
|
|
6023
6038
|
d.wnomask[u] = 1;
|
|
6024
6039
|
}
|
|
@@ -6045,17 +6060,17 @@ var _n = function() {
|
|
|
6045
6060
|
if (oe(h))
|
|
6046
6061
|
return p;
|
|
6047
6062
|
for (p.nwdaymask = V(0, l), u = 0; u < h.length; u++)
|
|
6048
|
-
for (var v = h[u],
|
|
6049
|
-
var k = void 0, S = m.bynweekday[D], M = S[0],
|
|
6050
|
-
|
|
6063
|
+
for (var v = h[u], g = v[0], x = v[1] - 1, D = 0; D < m.bynweekday.length; D++) {
|
|
6064
|
+
var k = void 0, S = m.bynweekday[D], M = S[0], y = S[1];
|
|
6065
|
+
y < 0 ? (k = x + 7 * (y + 1), k -= ae(f[k] - M, 7)) : (k = g + 7 * (y - 1), k += ae(7 - f[k] + M, 7)), g <= k && k <= x && (p.nwdaymask[k] = 1);
|
|
6051
6066
|
}
|
|
6052
6067
|
return p;
|
|
6053
6068
|
}(i, t, n, o, _, r);
|
|
6054
6069
|
}
|
|
6055
6070
|
J(r.byeaster) && (this.eastermask = function(a, d) {
|
|
6056
6071
|
d === void 0 && (d = 0);
|
|
6057
|
-
var l = a % 19, c = Math.floor(a / 100), f = a % 100, m = Math.floor(c / 4), p = c % 4, h = Math.floor((c + 8) / 25), u = Math.floor((c - h + 1) / 3), v = Math.floor(19 * l + c - m - u + 15) % 30,
|
|
6058
|
-
return [Math.ceil((
|
|
6072
|
+
var l = a % 19, c = Math.floor(a / 100), f = a % 100, m = Math.floor(c / 4), p = c % 4, h = Math.floor((c + 8) / 25), u = Math.floor((c - h + 1) / 3), v = Math.floor(19 * l + c - m - u + 15) % 30, g = Math.floor(f / 4), x = f % 4, D = Math.floor(32 + 2 * p + 2 * g - v - x) % 7, k = Math.floor((l + 11 * v + 22 * D) / 451), S = Math.floor((v + D - 7 * k + 114) / 31), M = (v + D - 7 * k + 114) % 31 + 1, y = Date.UTC(a, S - 1, M + d), b = Date.UTC(a, 0, 1);
|
|
6073
|
+
return [Math.ceil((y - b) / 864e5)];
|
|
6059
6074
|
}(i, r.byeaster));
|
|
6060
6075
|
}, Object.defineProperty(e.prototype, "lastyear", { get: function() {
|
|
6061
6076
|
return this.monthinfo ? this.monthinfo.lastyear : null;
|
|
@@ -6132,7 +6147,7 @@ var _n = function() {
|
|
|
6132
6147
|
function ln(e, i, t, r, s, n) {
|
|
6133
6148
|
for (var o = [], _ = 0; _ < e.length; _++) {
|
|
6134
6149
|
var a = void 0, d = void 0, l = e[_];
|
|
6135
|
-
l < 0 ? (a = Math.floor(l / i.length), d =
|
|
6150
|
+
l < 0 ? (a = Math.floor(l / i.length), d = ae(l, i.length)) : (a = Math.floor((l - 1) / i.length), d = ae(l - 1, i.length));
|
|
6136
6151
|
for (var c = [], f = t; f < r; f++) {
|
|
6137
6152
|
var m = n[f];
|
|
6138
6153
|
J(m) && c.push(m);
|
|
@@ -6150,7 +6165,7 @@ function Dt(e, i) {
|
|
|
6150
6165
|
return de(e);
|
|
6151
6166
|
var a = Ya.fromDate(t), d = new _n(i);
|
|
6152
6167
|
d.rebuild(a.year, a.month);
|
|
6153
|
-
for (var l = function(
|
|
6168
|
+
for (var l = function(y, b, w) {
|
|
6154
6169
|
var E = w.freq, N = w.byhour, T = w.byminute, A = w.bysecond;
|
|
6155
6170
|
return Oe(E) ? function(C) {
|
|
6156
6171
|
var $ = C.dtstart.getTime() % 1e3;
|
|
@@ -6164,16 +6179,16 @@ function Dt(e, i) {
|
|
|
6164
6179
|
});
|
|
6165
6180
|
});
|
|
6166
6181
|
}), H;
|
|
6167
|
-
}(w) : E >= z.HOURLY && W(N) && !B(N, b.hour) || E >= z.MINUTELY && W(T) && !B(T, b.minute) || E >= z.SECONDLY && W(A) && !B(A, b.second) ? [] :
|
|
6182
|
+
}(w) : E >= z.HOURLY && W(N) && !B(N, b.hour) || E >= z.MINUTELY && W(T) && !B(T, b.minute) || E >= z.SECONDLY && W(A) && !B(A, b.second) ? [] : y.gettimeset(E)(b.hour, b.minute, b.second, b.millisecond);
|
|
6168
6183
|
}(d, a, i); ; ) {
|
|
6169
6184
|
var c = d.getdayset(r)(a.year, a.month, a.day), f = c[0], m = c[1], p = c[2], h = hn(f, m, p, d, i);
|
|
6170
6185
|
if (W(o))
|
|
6171
6186
|
for (var u = ln(o, l, m, p, d, f), v = 0; v < u.length; v++) {
|
|
6172
|
-
var
|
|
6173
|
-
if (n &&
|
|
6187
|
+
var g = u[v];
|
|
6188
|
+
if (n && g > n)
|
|
6174
6189
|
return de(e);
|
|
6175
|
-
if (
|
|
6176
|
-
var x = ot(
|
|
6190
|
+
if (g >= t) {
|
|
6191
|
+
var x = ot(g, i);
|
|
6177
6192
|
if (!e.accept(x) || _ && !--_)
|
|
6178
6193
|
return de(e);
|
|
6179
6194
|
}
|
|
@@ -6184,7 +6199,7 @@ function Dt(e, i) {
|
|
|
6184
6199
|
if (J(D))
|
|
6185
6200
|
for (var k = xt(d.yearordinal + D), S = 0; S < l.length; S++) {
|
|
6186
6201
|
var M = l[S];
|
|
6187
|
-
if (
|
|
6202
|
+
if (g = wt(k, M), n && g > n || g >= t && (x = ot(g, i), !e.accept(x) || _ && !--_))
|
|
6188
6203
|
return de(e);
|
|
6189
6204
|
}
|
|
6190
6205
|
}
|
|
@@ -6210,7 +6225,7 @@ function hn(e, i, t, r, s) {
|
|
|
6210
6225
|
}
|
|
6211
6226
|
return n;
|
|
6212
6227
|
}
|
|
6213
|
-
var
|
|
6228
|
+
var ne = { MO: new Z(0), TU: new Z(1), WE: new Z(2), TH: new Z(3), FR: new Z(4), SA: new Z(5), SU: new Z(6) }, We = { freq: F.YEARLY, dtstart: null, interval: 1, wkst: ne.MO, count: null, until: null, tzid: null, bysetpos: null, bymonth: null, bymonthday: null, bynmonthday: null, byyearday: null, byweekno: null, byweekday: null, bynweekday: null, byhour: null, byminute: null, bysecond: null, byeaster: null }, un = Object.keys(We), z = function() {
|
|
6214
6229
|
function e(i, t) {
|
|
6215
6230
|
i === void 0 && (i = {}), t === void 0 && (t = !1), this._cache = t ? null : new Wa(), this.origOptions = Et(i);
|
|
6216
6231
|
var r = Va(i).parsedOptions;
|
|
@@ -6264,7 +6279,7 @@ var ae = { MO: new X(0), TU: new X(1), WE: new X(2), TH: new X(3), FR: new X(4),
|
|
|
6264
6279
|
return Ua(this);
|
|
6265
6280
|
}, e.prototype.clone = function() {
|
|
6266
6281
|
return new e(this.origOptions);
|
|
6267
|
-
}, e.FREQUENCIES = ["YEARLY", "MONTHLY", "WEEKLY", "DAILY", "HOURLY", "MINUTELY", "SECONDLY"], e.YEARLY = F.YEARLY, e.MONTHLY = F.MONTHLY, e.WEEKLY = F.WEEKLY, e.DAILY = F.DAILY, e.HOURLY = F.HOURLY, e.MINUTELY = F.MINUTELY, e.SECONDLY = F.SECONDLY, e.MO =
|
|
6282
|
+
}, e.FREQUENCIES = ["YEARLY", "MONTHLY", "WEEKLY", "DAILY", "HOURLY", "MINUTELY", "SECONDLY"], e.YEARLY = F.YEARLY, e.MONTHLY = F.MONTHLY, e.WEEKLY = F.WEEKLY, e.DAILY = F.DAILY, e.HOURLY = F.HOURLY, e.MINUTELY = F.MINUTELY, e.SECONDLY = F.SECONDLY, e.MO = ne.MO, e.TU = ne.TU, e.WE = ne.WE, e.TH = ne.TH, e.FR = ne.FR, e.SA = ne.SA, e.SU = ne.SU, e.parseString = Ie, e.optionsToString = Pe, e;
|
|
6268
6283
|
}(), st = { dtstart: null, cache: !1, unfold: !1, forceset: !1, compatible: !1, tzid: null };
|
|
6269
6284
|
function fn(e, i) {
|
|
6270
6285
|
var t = [], r = [], s = [], n = [], o = Me(e), _ = o.dtstart, a = o.tzid, d = function(l, c) {
|
|
@@ -6283,12 +6298,12 @@ function fn(e, i) {
|
|
|
6283
6298
|
var c;
|
|
6284
6299
|
if (l) {
|
|
6285
6300
|
var f = function(v) {
|
|
6286
|
-
var
|
|
6301
|
+
var g = function(S) {
|
|
6287
6302
|
if (S.indexOf(":") === -1)
|
|
6288
6303
|
return { name: "RRULE", value: S };
|
|
6289
|
-
var M = (w = S, E = ":", N = 1, T = w.split(E), N ? T.slice(0, N).concat([T.slice(N).join(E)]) : T),
|
|
6290
|
-
return { name:
|
|
6291
|
-
}(v), x =
|
|
6304
|
+
var M = (w = S, E = ":", N = 1, T = w.split(E), N ? T.slice(0, N).concat([T.slice(N).join(E)]) : T), y = M[0], b = M[1], w, E, N, T;
|
|
6305
|
+
return { name: y, value: b };
|
|
6306
|
+
}(v), x = g.name, D = g.value, k = x.split(";");
|
|
6292
6307
|
if (!k)
|
|
6293
6308
|
throw new Error("empty property name");
|
|
6294
6309
|
return { name: k[0].toUpperCase(), parms: k.slice(1), value: D };
|
|
@@ -6342,11 +6357,11 @@ function ke(e, i) {
|
|
|
6342
6357
|
B(n, o) || r.push(o);
|
|
6343
6358
|
}), r.length)
|
|
6344
6359
|
throw new Error("Invalid options: " + r.join(", "));
|
|
6345
|
-
return
|
|
6360
|
+
return te(te({}, st), t);
|
|
6346
6361
|
}(i));
|
|
6347
6362
|
}
|
|
6348
6363
|
function Le(e, i, t) {
|
|
6349
|
-
return
|
|
6364
|
+
return te(te({}, e), { dtstart: i, tzid: t });
|
|
6350
6365
|
}
|
|
6351
6366
|
function dt(e, i) {
|
|
6352
6367
|
return function(t) {
|
|
@@ -6381,8 +6396,8 @@ var pn = function(e) {
|
|
|
6381
6396
|
var d = {}, l = r.accept;
|
|
6382
6397
|
function c(h, u) {
|
|
6383
6398
|
n.forEach(function(v) {
|
|
6384
|
-
v.between(h, u, !0).forEach(function(
|
|
6385
|
-
d[Number(
|
|
6399
|
+
v.between(h, u, !0).forEach(function(g) {
|
|
6400
|
+
d[Number(g)] = !0;
|
|
6386
6401
|
});
|
|
6387
6402
|
});
|
|
6388
6403
|
}
|
|
@@ -6575,9 +6590,9 @@ class mn {
|
|
|
6575
6590
|
}
|
|
6576
6591
|
_initDelayedFunctions() {
|
|
6577
6592
|
const i = this._scheduler;
|
|
6578
|
-
this.delayShow && this.delayShow.$cancelTimeout(), this.delayHide && this.delayHide.$cancelTimeout(), this.tooltip.hide(), this.delayShow =
|
|
6593
|
+
this.delayShow && this.delayShow.$cancelTimeout(), this.delayHide && this.delayHide.$cancelTimeout(), this.tooltip.hide(), this.delayShow = re.delay((t, r) => {
|
|
6579
6594
|
i.callEvent("onBeforeTooltip", [t]) === !1 ? this.tooltip.hide() : (this.tooltip.setContent(r), this.tooltip.show(t));
|
|
6580
|
-
}, i.config.tooltip_timeout || 1), this.delayHide =
|
|
6595
|
+
}, i.config.tooltip_timeout || 1), this.delayHide = re.delay(() => {
|
|
6581
6596
|
this.delayShow.$cancelTimeout(), this.tooltip.hide();
|
|
6582
6597
|
}, i.config.tooltip_hide_timeout || 1);
|
|
6583
6598
|
}
|
|
@@ -6628,8 +6643,8 @@ const gn = { active_links: function(e) {
|
|
|
6628
6643
|
var r = e.render_view_data;
|
|
6629
6644
|
function s() {
|
|
6630
6645
|
var n = e.get_visible_events();
|
|
6631
|
-
n.sort(function(v,
|
|
6632
|
-
return v.start_date >
|
|
6646
|
+
n.sort(function(v, g) {
|
|
6647
|
+
return v.start_date > g.start_date ? 1 : -1;
|
|
6633
6648
|
});
|
|
6634
6649
|
for (var o, _ = "<div class='dhx_agenda_area' " + e._waiAria.agendaDataAttrString() + ">", a = 0; a < n.length; a++) {
|
|
6635
6650
|
var d = n[a], l = d.color ? "--dhx-scheduler-event-background:" + d.color + ";" : "", c = d.textColor ? "--dhx-scheduler-event-color:" + d.textColor + ";" : "", f = e.templates.event_class(d.start_date, d.end_date, d);
|
|
@@ -6728,12 +6743,12 @@ const gn = { active_links: function(e) {
|
|
|
6728
6743
|
`;
|
|
6729
6744
|
return l.forEach((f) => {
|
|
6730
6745
|
c += function(m, p) {
|
|
6731
|
-
const h = e.templates.agenda_time(p.start_date, p.end_date, p), u = e.getState().select_id, v = e.templates.event_class(p.start_date, p.end_date, p),
|
|
6746
|
+
const h = e.templates.agenda_time(p.start_date, p.end_date, p), u = e.getState().select_id, v = e.templates.event_class(p.start_date, p.end_date, p), g = e.templates.agenda_text(p.start_date, p.end_date, p);
|
|
6732
6747
|
let x = "";
|
|
6733
6748
|
return (p.color || p.textColor) && (x = ` style="${p.color ? "--dhx-scheduler-event-background:" + p.color + ";" : ""}${p.textColor ? "--dhx-scheduler-event-color:" + p.textColor + ";" : ""}" `), `<div class="dhx_cal_agenda_event_line ${v || ""} ${p.id == u ? "dhx_cal_agenda_event_line_selected" : ""}" ${x} ${e.config.event_attribute}="${p.id}">
|
|
6734
6749
|
<div class="dhx_cal_agenda_event_line_marker"></div>
|
|
6735
6750
|
<div class="dhx_cal_agenda_event_line_time">${h}</div>
|
|
6736
|
-
<div class="dhx_cal_agenda_event_line_text">${
|
|
6751
|
+
<div class="dhx_cal_agenda_event_line_text">${g}</div>
|
|
6737
6752
|
</div>`;
|
|
6738
6753
|
}(0, f);
|
|
6739
6754
|
}), c += "</div></div>", c;
|
|
@@ -6783,16 +6798,16 @@ const gn = { active_links: function(e) {
|
|
|
6783
6798
|
}
|
|
6784
6799
|
var p = this._drag_mode != "move" && a;
|
|
6785
6800
|
return s.call(this, _, p);
|
|
6786
|
-
function h(
|
|
6787
|
-
var x = u(
|
|
6788
|
-
return +
|
|
6801
|
+
function h(g) {
|
|
6802
|
+
var x = u(g.start_date);
|
|
6803
|
+
return +g.end_date > +x;
|
|
6789
6804
|
}
|
|
6790
|
-
function u(
|
|
6791
|
-
var x = e.date.add(
|
|
6805
|
+
function u(g) {
|
|
6806
|
+
var x = e.date.add(g, 1, "day");
|
|
6792
6807
|
return x = e.date.date_part(x);
|
|
6793
6808
|
}
|
|
6794
|
-
function v(
|
|
6795
|
-
var D = e.date.date_part(new Date(
|
|
6809
|
+
function v(g, x) {
|
|
6810
|
+
var D = e.date.date_part(new Date(g));
|
|
6796
6811
|
return D.setHours(x), D;
|
|
6797
6812
|
}
|
|
6798
6813
|
};
|
|
@@ -6904,11 +6919,11 @@ const gn = { active_links: function(e) {
|
|
|
6904
6919
|
if (M && M.length) {
|
|
6905
6920
|
for (var v = 0; v < M.length; v++) {
|
|
6906
6921
|
if (p[v]++, p[v] * f > this._colsS.height - this.xy.month_head_height) {
|
|
6907
|
-
var
|
|
6922
|
+
var g = M[v].querySelectorAll(".dhx_cal_month_cell"), x = this._colsS.height - this.xy.month_head_height;
|
|
6908
6923
|
1 * this.config.max_month_events !== this.config.max_month_events || p[v] <= this.config.max_month_events ? x = p[v] * f : (this.config.max_month_events + 1) * f > this._colsS.height - this.xy.month_head_height && (x = (this.config.max_month_events + 1) * f), M[v].style.height = x + this.xy.month_head_height + "px";
|
|
6909
|
-
for (var D = 0; D <
|
|
6910
|
-
|
|
6911
|
-
p[v] = (p[v - 1] || 0) +
|
|
6924
|
+
for (var D = 0; D < g.length; D++)
|
|
6925
|
+
g[D].childNodes[1].style.height = x + "px";
|
|
6926
|
+
p[v] = (p[v - 1] || 0) + g[0].offsetHeight;
|
|
6912
6927
|
}
|
|
6913
6928
|
p[v] = (p[v - 1] || 0) + M[v].querySelectorAll(".dhx_cal_month_cell")[0].offsetHeight;
|
|
6914
6929
|
}
|
|
@@ -6916,8 +6931,8 @@ const gn = { active_links: function(e) {
|
|
|
6916
6931
|
} else if (l.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (p[0] = -1), l.length || p[0] == -1) {
|
|
6917
6932
|
var k = (p[0] + 1) * f + 1;
|
|
6918
6933
|
s != k + 1 && (this._obj.style.height = r - s + k - 1 + "px"), k += "px";
|
|
6919
|
-
const
|
|
6920
|
-
h.style.height = this._obj.offsetHeight -
|
|
6934
|
+
const y = this._els.dhx_cal_navline[0].offsetHeight, b = this._els.dhx_cal_header[0].offsetHeight;
|
|
6935
|
+
h.style.height = this._obj.offsetHeight - y - b - (this.xy.margin_top || 0) + "px";
|
|
6921
6936
|
var S = this._els.dhx_multi_day[0];
|
|
6922
6937
|
S.style.height = k, S.style.visibility = p[0] == -1 ? "hidden" : "visible", S.style.display = p[0] == -1 ? "none" : "", (S = this._els.dhx_multi_day[1]).style.height = k, S.style.visibility = p[0] == -1 ? "hidden" : "visible", S.style.display = p[0] == -1 ? "none" : "", S.className = p[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (p[0] + 1) * f, p[0] = 0;
|
|
6923
6938
|
}
|
|
@@ -6950,28 +6965,31 @@ const gn = { active_links: function(e) {
|
|
|
6950
6965
|
else if (h == "year")
|
|
6951
6966
|
p = 190 * e.config.year_y;
|
|
6952
6967
|
else if (h == "agenda") {
|
|
6953
|
-
if (p = 0, m.
|
|
6954
|
-
|
|
6955
|
-
p
|
|
6968
|
+
if (p = 0, m.children && m.children.length)
|
|
6969
|
+
if (m.children.length === 1 && m.children[0].classList.contains("dhx_cal_agenda_no_events"))
|
|
6970
|
+
p = 300;
|
|
6971
|
+
else
|
|
6972
|
+
for (var u = 0; u < m.children.length; u++)
|
|
6973
|
+
p += m.children[u].offsetHeight;
|
|
6956
6974
|
p + 2 < e.config.min_grid_size ? p = e.config.min_grid_size : p += 2;
|
|
6957
6975
|
} else if (h == "week_agenda") {
|
|
6958
|
-
for (var v,
|
|
6959
|
-
for (
|
|
6960
|
-
for (var k = 0, S =
|
|
6976
|
+
for (var v, g, x = e.xy.week_agenda_scale_height + e.config.min_grid_size, D = 0; D < m.childNodes.length; D++)
|
|
6977
|
+
for (g = m.childNodes[D], u = 0; u < g.childNodes.length; u++) {
|
|
6978
|
+
for (var k = 0, S = g.childNodes[u].childNodes[1], M = 0; M < S.childNodes.length; M++)
|
|
6961
6979
|
k += S.childNodes[M].offsetHeight;
|
|
6962
6980
|
v = k + e.xy.week_agenda_scale_height, (v = D != 1 || u != 2 && u != 3 ? v : 2 * v) > x && (x = v);
|
|
6963
6981
|
}
|
|
6964
6982
|
p = 3 * x;
|
|
6965
6983
|
} else if (h == "map") {
|
|
6966
6984
|
p = 0;
|
|
6967
|
-
var
|
|
6968
|
-
for (u = 0; u <
|
|
6969
|
-
p +=
|
|
6985
|
+
var y = m.querySelectorAll(".dhx_map_line");
|
|
6986
|
+
for (u = 0; u < y.length; u++)
|
|
6987
|
+
p += y[u].offsetHeight;
|
|
6970
6988
|
p + 2 < e.config.min_map_size ? p = e.config.min_map_size : p += 2;
|
|
6971
6989
|
} else if (e._gridView)
|
|
6972
6990
|
if (p = 0, m.childNodes[1].childNodes[0].childNodes && m.childNodes[1].childNodes[0].childNodes.length) {
|
|
6973
|
-
for (
|
|
6974
|
-
p +=
|
|
6991
|
+
for (y = m.childNodes[1].childNodes[0].childNodes[0].childNodes, u = 0; u < y.length; u++)
|
|
6992
|
+
p += y[u].offsetHeight;
|
|
6975
6993
|
(p += 2) < e.config.min_grid_size && (p = e.config.min_grid_size);
|
|
6976
6994
|
} else
|
|
6977
6995
|
p = e.config.min_grid_size;
|
|
@@ -7507,11 +7525,11 @@ const gn = { active_links: function(e) {
|
|
|
7507
7525
|
u(t._min_date, S), p = t._timeline_getX({ start_date: k }, !1, o), h = t._timeline_getX({ start_date: S }, !1, o);
|
|
7508
7526
|
} else
|
|
7509
7527
|
p = t._timeline_getX({ start_date: r }, !1, o), h = t._timeline_getX({ start_date: s }, !1, o);
|
|
7510
|
-
var v = o._section_height[n] - 1 || o.dy - 1,
|
|
7511
|
-
t._isRender("cell") && (
|
|
7528
|
+
var v = o._section_height[n] - 1 || o.dy - 1, g = 0;
|
|
7529
|
+
t._isRender("cell") && (g = f.offsetTop, p += o.dx, h += o.dx, f = t.$container.querySelector(".dhx_cal_data"));
|
|
7512
7530
|
var x = Math.max(1, h - p - 1);
|
|
7513
7531
|
let D = "left";
|
|
7514
|
-
return t.config.rtl && (D = "right"), m.style.cssText = `height:${v}px; ${D}:${p}px; width:${x}px; top:${
|
|
7532
|
+
return t.config.rtl && (D = "right"), m.style.cssText = `height:${v}px; ${D}:${p}px; width:${x}px; top:${g}px;`, f && (f.appendChild(m), a.push(m)), a;
|
|
7515
7533
|
}, renderMonthCell: function(r) {
|
|
7516
7534
|
for (var s = t.$container.querySelectorAll(".dhx_month_head"), n = [], o = 0; o < s.length; o++)
|
|
7517
7535
|
n.push(s[o].parentNode);
|
|
@@ -8216,20 +8234,20 @@ const gn = { active_links: function(e) {
|
|
|
8216
8234
|
a.enable(), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(p, 0));
|
|
8217
8235
|
}
|
|
8218
8236
|
function l(m) {
|
|
8219
|
-
var p = m.target || m.srcElement, h = _.utils.dom.locateCss(m, "dhx_cal_prev_button", !1), u = _.utils.dom.locateCss(m, "dhx_cal_next_button", !1), v = _.utils.dom.locateCss(m, "dhx_year_body", !1),
|
|
8237
|
+
var p = m.target || m.srcElement, h = _.utils.dom.locateCss(m, "dhx_cal_prev_button", !1), u = _.utils.dom.locateCss(m, "dhx_cal_next_button", !1), v = _.utils.dom.locateCss(m, "dhx_year_body", !1), g = 0, x = 0;
|
|
8220
8238
|
if (v) {
|
|
8221
8239
|
for (var D, k, S = p; S && S.tagName.toLowerCase() != "td"; )
|
|
8222
8240
|
S = S.parentNode;
|
|
8223
8241
|
if (S && (D = (k = S).parentNode), D && k) {
|
|
8224
|
-
for (var M = D.parentNode.querySelectorAll("tr"),
|
|
8225
|
-
if (M[
|
|
8226
|
-
|
|
8242
|
+
for (var M = D.parentNode.querySelectorAll("tr"), y = 0; y < M.length; y++)
|
|
8243
|
+
if (M[y] == D) {
|
|
8244
|
+
g = y;
|
|
8227
8245
|
break;
|
|
8228
8246
|
}
|
|
8229
8247
|
var b = D.querySelectorAll("td");
|
|
8230
|
-
for (
|
|
8231
|
-
if (b[
|
|
8232
|
-
x =
|
|
8248
|
+
for (y = 0; y < b.length; y++)
|
|
8249
|
+
if (b[y] == k) {
|
|
8250
|
+
x = y;
|
|
8233
8251
|
break;
|
|
8234
8252
|
}
|
|
8235
8253
|
}
|
|
@@ -8237,7 +8255,7 @@ const gn = { active_links: function(e) {
|
|
|
8237
8255
|
var w = m.currentTarget;
|
|
8238
8256
|
a.delay(function() {
|
|
8239
8257
|
var E;
|
|
8240
|
-
(h || u || v) && (h ? (E = new _.$keyboardNavigation.MinicalButton(w, 0), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(w, 0))) : u ? E = new _.$keyboardNavigation.MinicalButton(w, 1) : v && (E = new _.$keyboardNavigation.MinicalCell(w,
|
|
8258
|
+
(h || u || v) && (h ? (E = new _.$keyboardNavigation.MinicalButton(w, 0), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(w, 0))) : u ? E = new _.$keyboardNavigation.MinicalButton(w, 1) : v && (E = new _.$keyboardNavigation.MinicalCell(w, g, x)), E && (a.enable(), E.isValid() && (a.activeNode = null, a.setActiveNode(E))));
|
|
8241
8259
|
});
|
|
8242
8260
|
}
|
|
8243
8261
|
if (_.renderCalendar) {
|
|
@@ -8421,8 +8439,8 @@ const gn = { active_links: function(e) {
|
|
|
8421
8439
|
a.indexOf("<div class=") == -1 && (a = e.templates["event_header_" + t.layer] ? e.templates["event_header_" + t.layer](t.start_date, t.end_date, t) : a), d.indexOf("<div class=") == -1 && (d = e.templates["event_text_" + t.layer] ? e.templates["event_text_" + t.layer](t.start_date, t.end_date, t) : d);
|
|
8422
8440
|
var f = document.createElement("div"), m = "dhx_cal_event", p = e.templates["event_class_" + t.layer] ? e.templates["event_class_" + t.layer](t.start_date, t.end_date, t) : e.templates.event_class(t.start_date, t.end_date, t);
|
|
8423
8441
|
p && (m = m + " " + p);
|
|
8424
|
-
var h = e._border_box_events(), u = n - 2, v = h ? u : n - 4,
|
|
8425
|
-
return S += '<div class="dhx_header" style=" width:' +
|
|
8442
|
+
var h = e._border_box_events(), u = n - 2, v = h ? u : n - 4, g = h ? u : n - 6, x = h ? u : n - 14, D = h ? u - 2 : n - 8, k = h ? o - this.xy.event_header_height : o - 30 + 1, S = '<div event_id="' + c + '" ' + e.config.event_attribute + '="' + c + '" class="' + m + '" style="position:absolute; top:' + s + "px; left:" + r + "px; width:" + v + "px; height:" + o + "px;" + (_ || "") + '">';
|
|
8443
|
+
return S += '<div class="dhx_header" style=" width:' + g + 'px;" > </div>', S += '<div class="dhx_title">' + a + "</div>", S += '<div class="dhx_body" style=" width:' + x + "px; height:" + k + 'px;">' + d + "</div>", S += '<div class="dhx_footer" style=" width:' + D + "px;" + (l ? " margin-top:-1px;" : "") + '" ></div></div>', f.innerHTML = S, f.style.zIndex = 100, f.firstChild;
|
|
8426
8444
|
}, e.render_event_bar = function(t) {
|
|
8427
8445
|
var r = this._els.dhx_cal_data[0], s = this._colsS[t._sday], n = this._colsS[t._eday];
|
|
8428
8446
|
n == s && (n = this._colsS[t._eday + 1]);
|
|
@@ -8443,13 +8461,13 @@ const gn = { active_links: function(e) {
|
|
|
8443
8461
|
var f = c.style.zIndex;
|
|
8444
8462
|
d = Math.max(d - 4, e.xy.editor_width), (c = document.createElement("div")).setAttribute("event_id", t.id), c.setAttribute(this.config.event_attribute, t.id), this.set_xy(c, d, a - 20, l, _ + 14), c.className = "dhx_cal_editor", c.style.zIndex = f;
|
|
8445
8463
|
var m = document.createElement("div");
|
|
8446
|
-
this.set_xy(m, d - 6, a - 26), m.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", m.style.zIndex = f, c.appendChild(m), this._els.dhx_cal_data[0].appendChild(c), this._rendered.push(c), m.innerHTML = "<textarea class='dhx_cal_editor'>" + t.text + "</textarea>", this._editor = m.firstChild, this._editor.addEventListener("keypress", function(
|
|
8447
|
-
if (
|
|
8464
|
+
this.set_xy(m, d - 6, a - 26), m.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", m.style.zIndex = f, c.appendChild(m), this._els.dhx_cal_data[0].appendChild(c), this._rendered.push(c), m.innerHTML = "<textarea class='dhx_cal_editor'>" + t.text + "</textarea>", this._editor = m.firstChild, this._editor.addEventListener("keypress", function(g) {
|
|
8465
|
+
if (g.shiftKey)
|
|
8448
8466
|
return !0;
|
|
8449
|
-
var x =
|
|
8467
|
+
var x = g.keyCode;
|
|
8450
8468
|
x == e.keys.edit_save && e.editStop(!0), x == e.keys.edit_cancel && e.editStop(!1);
|
|
8451
|
-
}), this._editor.addEventListener("selectstart", function(
|
|
8452
|
-
return
|
|
8469
|
+
}), this._editor.addEventListener("selectstart", function(g) {
|
|
8470
|
+
return g.cancelBubble = !0, !0;
|
|
8453
8471
|
}), m.firstChild.focus(), this._els.dhx_cal_data[0].scrollLeft = 0, m.firstChild.select();
|
|
8454
8472
|
}
|
|
8455
8473
|
if (this._select_id == t.id) {
|
|
@@ -8599,8 +8617,8 @@ const gn = { active_links: function(e) {
|
|
|
8599
8617
|
});
|
|
8600
8618
|
let c = "<div " + e._waiAria.mapAttrString() + " class='dhx_map_area'>";
|
|
8601
8619
|
for (let p = 0; p < l.length; p++) {
|
|
8602
|
-
let h = l[p], u = h.id == e._selected_event_id ? "dhx_map_line highlight" : "dhx_map_line", v = h.color ? "--dhx-scheduler-event-background:" + h.color + ";" : "",
|
|
8603
|
-
c += "<div " + x + " class='" + u + "' event_id='" + h.id + "' " + e.config.event_attribute + "='" + h.id + "' style='" + v +
|
|
8620
|
+
let h = l[p], u = h.id == e._selected_event_id ? "dhx_map_line highlight" : "dhx_map_line", v = h.color ? "--dhx-scheduler-event-background:" + h.color + ";" : "", g = h.textColor ? "--dhx-scheduler-event-color:" + h.textColor + ";" : "", x = e._waiAria.mapRowAttrString(h), D = e._waiAria.mapDetailsBtnString();
|
|
8621
|
+
c += "<div " + x + " class='" + u + "' event_id='" + h.id + "' " + e.config.event_attribute + "='" + h.id + "' style='" + v + g + (h._text_style || "") + " width: " + (e.xy.map_date_width + e.xy.map_description_width + 2) + "px;'><div class='dhx_map_event_time' style='width: " + e.xy.map_date_width + "px;' >" + e.templates.map_time(h.start_date, h.end_date, h) + "</div>", c += `<div ${D} class='dhx_event_icon icon_details'><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8604
8622
|
<path d="M15.4444 16.4H4.55556V7.6H15.4444V16.4ZM13.1111 2V3.6H6.88889V2H5.33333V3.6H4.55556C3.69222 3.6 3 4.312 3 5.2V16.4C3 16.8243 3.16389 17.2313 3.45561 17.5314C3.74733 17.8314 4.143 18 4.55556 18H15.4444C15.857 18 16.2527 17.8314 16.5444 17.5314C16.8361 17.2313 17 16.8243 17 16.4V5.2C17 4.312 16.3 3.6 15.4444 3.6H14.6667V2H13.1111ZM13.8889 10.8H10V14.8H13.8889V10.8Z" fill="#A1A4A6"/>
|
|
8605
8623
|
</svg></div>`, c += "<div class='line_description' style='width:" + (e.xy.map_description_width - e.xy.map_icon_width) + "px;'>" + e.templates.map_text(h.start_date, h.end_date, h) + "</div></div>";
|
|
8606
8624
|
}
|
|
@@ -8633,8 +8651,8 @@ const gn = { active_links: function(e) {
|
|
|
8633
8651
|
const u = e.$container.querySelector(".dhx_cal_navline").offsetHeight;
|
|
8634
8652
|
let v = e.$container.querySelector(".dhx_cal_data").offsetHeight + e.$container.querySelector(".dhx_cal_header").offsetHeight;
|
|
8635
8653
|
v < 0 && (v = 0);
|
|
8636
|
-
let
|
|
8637
|
-
|
|
8654
|
+
let g = e._x - e.xy.map_date_width - e.xy.map_description_width - 1;
|
|
8655
|
+
g < 0 && (g = 0), h.style.height = v + "px", h.style.width = g + "px", h.style.position = "absolute", h.style.top = u + "px", e.config.rtl ? h.style.marginRight = e.xy.map_date_width + e.xy.map_description_width + 1 + "px" : h.style.marginLeft = e.xy.map_date_width + e.xy.map_description_width + 1 + "px", h.style.marginTop = e.xy.nav_height + 2 + "px";
|
|
8638
8656
|
}
|
|
8639
8657
|
})("mapContainer"), l && c ? (o.style.display = "block", a(), e.config.map_view_provider == e.ext.mapView.currentAdapter ? (i == null || i.destroy(c), s(e), i == null || i.initialize(c, e.config.map_settings)) : (i == null || i.destroy(c), s(e), i == null || i.initialize(c, e.config.map_settings), e.ext.mapView.currentAdapter = e.config.map_view_provider), i && (f = e.config.map_settings, m = i, f.resolve_user_location ? navigator.geolocation && navigator.geolocation.getCurrentPosition(function(p) {
|
|
8640
8658
|
m.setView(p.coords.latitude, p.coords.longitude, f.zoom_after_resolve || f.initial_zoom);
|
|
@@ -8671,17 +8689,17 @@ const gn = { active_links: function(e) {
|
|
|
8671
8689
|
var d = e.$domHelpers.getOffset(a);
|
|
8672
8690
|
a = { top: d.top + a.offsetHeight, left: d.left };
|
|
8673
8691
|
}
|
|
8674
|
-
_ || (_ = e._get_def_cont(a)), (n = this._render_calendar(_, o, t)).$_eventAttached || (n.$_eventAttached = !0, i.attach(n, "click", (function(
|
|
8675
|
-
var x =
|
|
8692
|
+
_ || (_ = e._get_def_cont(a)), (n = this._render_calendar(_, o, t)).$_eventAttached || (n.$_eventAttached = !0, i.attach(n, "click", (function(g) {
|
|
8693
|
+
var x = g.target || g.srcElement, D = e.$domHelpers;
|
|
8676
8694
|
if (D.closest(x, ".dhx_month_head") && !D.closest(x, ".dhx_after") && !D.closest(x, ".dhx_before")) {
|
|
8677
8695
|
var k = D.closest(x, "[data-cell-date]").getAttribute("data-cell-date"), S = e.templates.parse_date(k);
|
|
8678
|
-
e.unmarkCalendar(this), e.markCalendar(this, S, "dhx_calendar_click"), this._last_date = S, this.conf.events && this.conf.events.onDateClick && this.conf.events.onDateClick.call(this, S,
|
|
8696
|
+
e.unmarkCalendar(this), e.markCalendar(this, S, "dhx_calendar_click"), this._last_date = S, this.conf.events && this.conf.events.onDateClick && this.conf.events.onDateClick.call(this, S, g), this.conf.handler && this.conf.handler.call(e, S, this);
|
|
8679
8697
|
}
|
|
8680
|
-
}).bind(n)), i.attach(n, "mouseover", (function(
|
|
8681
|
-
const x =
|
|
8698
|
+
}).bind(n)), i.attach(n, "mouseover", (function(g) {
|
|
8699
|
+
const x = g.target;
|
|
8682
8700
|
if (x.classList.contains("dhx_cal_month_cell")) {
|
|
8683
8701
|
var D = x.getAttribute("data-cell-date"), k = e.templates.parse_date(D);
|
|
8684
|
-
this.conf.events && this.conf.events.onDateMouseOver && this.conf.events.onDateMouseOver.call(this, k,
|
|
8702
|
+
this.conf.events && this.conf.events.onDateMouseOver && this.conf.events.onDateMouseOver.call(this, k, g);
|
|
8685
8703
|
}
|
|
8686
8704
|
}).bind(n)));
|
|
8687
8705
|
}
|
|
@@ -8737,12 +8755,12 @@ const gn = { active_links: function(e) {
|
|
|
8737
8755
|
this._ignores_detected = 0, o.month_day = o.calendar_date, r = this.date.month_start(r);
|
|
8738
8756
|
var h, u = this._week_template(t.offsetWidth - 1 - this.config.minicalendar.padding);
|
|
8739
8757
|
n ? h = n : ((h = document.createElement("div")).className = "dhx_cal_container dhx_mini_calendar", this.config.rtl && (h.className += " dhx_cal_container_rtl")), h.setAttribute("date", this._helpers.formatDate(r)), h.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_grid" + (e.config.rtl ? " dhx_grid_rtl'>" : "'>") + "<div class='dhx_year_week'>" + (u ? u.innerHTML : "") + "</div><div class='dhx_year_body'></div></div>";
|
|
8740
|
-
var v = h.querySelector(".dhx_year_month"),
|
|
8758
|
+
var v = h.querySelector(".dhx_year_month"), g = h.querySelector(".dhx_year_week"), x = h.querySelector(".dhx_year_body");
|
|
8741
8759
|
if (v.innerHTML = this.templates.calendar_month(r), s.navigation)
|
|
8742
8760
|
for (var D = function(O, I) {
|
|
8743
8761
|
var Y = e.date.add(O._date, I, "month");
|
|
8744
8762
|
e.updateCalendar(O, Y), e._date.getMonth() == O._date.getMonth() && e._date.getFullYear() == O._date.getFullYear() && e._markCalendarCurrentDate(O);
|
|
8745
|
-
}, k = ["dhx_cal_prev_button", "dhx_cal_next_button"], S = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], M = [-1, 1],
|
|
8763
|
+
}, k = ["dhx_cal_prev_button", "dhx_cal_next_button"], S = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], M = [-1, 1], y = function(O) {
|
|
8746
8764
|
return function() {
|
|
8747
8765
|
if (s.sync)
|
|
8748
8766
|
for (var I = e._synced_minicalendars, Y = 0; Y < I.length; Y++)
|
|
@@ -8752,14 +8770,14 @@ const gn = { active_links: function(e) {
|
|
|
8752
8770
|
};
|
|
8753
8771
|
}, b = [e.locale.labels.prev, e.locale.labels.next], w = 0; w < 2; w++) {
|
|
8754
8772
|
var E = document.createElement("div");
|
|
8755
|
-
E.className = k[w], e._waiAria.headerButtonsAttributes(E, b[w]), E.style.cssText = S[w], E.innerHTML = this._mini_cal_arrows[w], v.appendChild(E), i.attach(E, "click",
|
|
8773
|
+
E.className = k[w], e._waiAria.headerButtonsAttributes(E, b[w]), E.style.cssText = S[w], E.innerHTML = this._mini_cal_arrows[w], v.appendChild(E), i.attach(E, "click", y(M[w]));
|
|
8756
8774
|
}
|
|
8757
8775
|
h._date = new Date(r), h.week_start = (r.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
|
|
8758
8776
|
var N = h._min_date = this.date.week_start(r);
|
|
8759
|
-
h._max_date = this.date.add(h._min_date, 6, "week"), this._reset_month_scale(x, r, N, 6), n || t.appendChild(h),
|
|
8777
|
+
h._max_date = this.date.add(h._min_date, 6, "week"), this._reset_month_scale(x, r, N, 6), n || t.appendChild(h), g.style.height = g.childNodes[0].offsetHeight - 1 + "px";
|
|
8760
8778
|
var T = e.uid();
|
|
8761
|
-
e._waiAria.minicalHeader(v, T), e._waiAria.minicalGrid(h.querySelector(".dhx_year_grid"), T), e._waiAria.minicalRow(
|
|
8762
|
-
for (var A =
|
|
8779
|
+
e._waiAria.minicalHeader(v, T), e._waiAria.minicalGrid(h.querySelector(".dhx_year_grid"), T), e._waiAria.minicalRow(g);
|
|
8780
|
+
for (var A = g.querySelectorAll(".dhx_scale_bar"), C = 0; C < A.length; C++)
|
|
8763
8781
|
e._waiAria.minicalHeadCell(A[C]);
|
|
8764
8782
|
var $ = x.querySelectorAll(".dhx_cal_month_cell"), H = new Date(N);
|
|
8765
8783
|
for (C = 0; C < $.length; C++)
|
|
@@ -8780,7 +8798,7 @@ const gn = { active_links: function(e) {
|
|
|
8780
8798
|
r += "<option value='" + a + "'>" + this.templates.time_picker(n) + "</option>", t._time_values.push(a), n = this.date.add(n, this.config.time_step, "minute");
|
|
8781
8799
|
return "<div class='dhx_section_time dhx_lightbox_minical'>" + (r += "</select>") + "<span class='dhx_lightbox_minical_spacer'> – </span>" + r + "</div>";
|
|
8782
8800
|
}, set_value: function(t, r, s, n) {
|
|
8783
|
-
var o, _, a = t.getElementsByTagName("input"), d = t.getElementsByTagName("select"), l = function(v,
|
|
8801
|
+
var o, _, a = t.getElementsByTagName("input"), d = t.getElementsByTagName("select"), l = function(v, g, x) {
|
|
8784
8802
|
e.event(v, "click", function() {
|
|
8785
8803
|
e.destroyCalendar(null, !0), e.renderCalendar({ position: v, date: new Date(this._date), navigation: !0, handler: function(D) {
|
|
8786
8804
|
v.value = e.templates.calendar_time(D), v._date = new Date(D), e.destroyCalendar(), e.config.event_duration && e.config.auto_end_date && x === 0 && p();
|
|
@@ -8799,8 +8817,8 @@ const gn = { active_links: function(e) {
|
|
|
8799
8817
|
e.form_blocks.calendar_time.get_value(t, v), o = e.date.date_part(v.start_date), (+(_ = e.date.date_part(v.end_date)) == +o || +_ >= +o && (s.end_date.getHours() !== 0 || s.end_date.getMinutes() !== 0)) && (_ = e.date.add(_, 1, "day"));
|
|
8800
8818
|
} else
|
|
8801
8819
|
o = null, _ = null;
|
|
8802
|
-
var
|
|
8803
|
-
h(a[0],
|
|
8820
|
+
var g = o || s.start_date, x = _ || s.end_date;
|
|
8821
|
+
h(a[0], g), h(a[1], x), d[0].value = 60 * g.getHours() + g.getMinutes(), d[1].value = 60 * x.getHours() + x.getMinutes(), d[0].disabled = f.checked, d[1].disabled = f.checked;
|
|
8804
8822
|
}));
|
|
8805
8823
|
}
|
|
8806
8824
|
if (e.config.event_duration && e.config.auto_end_date) {
|
|
@@ -8809,12 +8827,12 @@ const gn = { active_links: function(e) {
|
|
|
8809
8827
|
};
|
|
8810
8828
|
d[0].$_eventAttached || d[0].addEventListener("change", p);
|
|
8811
8829
|
}
|
|
8812
|
-
function h(v,
|
|
8813
|
-
l(v,
|
|
8830
|
+
function h(v, g, x) {
|
|
8831
|
+
l(v, g, x), v.value = e.templates.calendar_time(g), v._date = e.date.date_part(new Date(g));
|
|
8814
8832
|
}
|
|
8815
8833
|
function u(v) {
|
|
8816
|
-
for (var
|
|
8817
|
-
var M =
|
|
8834
|
+
for (var g = n._time_values, x = 60 * v.getHours() + v.getMinutes(), D = x, k = !1, S = 0; S < g.length; S++) {
|
|
8835
|
+
var M = g[S];
|
|
8818
8836
|
if (M === x) {
|
|
8819
8837
|
k = !0;
|
|
8820
8838
|
break;
|
|
@@ -8893,8 +8911,8 @@ const gn = { active_links: function(e) {
|
|
|
8893
8911
|
var m = function(p) {
|
|
8894
8912
|
try {
|
|
8895
8913
|
for (var h = JSON.parse(p.xmlDoc.responseText), u = {}, v = 0; v < h.length; v++) {
|
|
8896
|
-
var
|
|
8897
|
-
u[
|
|
8914
|
+
var g = h[v];
|
|
8915
|
+
u[g.value || g.key || g.id] = !0;
|
|
8898
8916
|
}
|
|
8899
8917
|
return u;
|
|
8900
8918
|
} catch {
|
|
@@ -8902,8 +8920,8 @@ const gn = { active_links: function(e) {
|
|
|
8902
8920
|
}
|
|
8903
8921
|
}(f);
|
|
8904
8922
|
m || (m = function(p, h) {
|
|
8905
|
-
for (var u = e.ajax.xpath("//data/item", p.xmlDoc), v = {},
|
|
8906
|
-
v[u[
|
|
8923
|
+
for (var u = e.ajax.xpath("//data/item", p.xmlDoc), v = {}, g = 0; g < u.length; g++)
|
|
8924
|
+
v[u[g].getAttribute(h.map_to)] = !0;
|
|
8907
8925
|
return v;
|
|
8908
8926
|
}(f, s)), _(m), i.removeChild(l);
|
|
8909
8927
|
});
|
|
@@ -9034,12 +9052,12 @@ const gn = { active_links: function(e) {
|
|
|
9034
9052
|
}
|
|
9035
9053
|
function _(k, S, M) {
|
|
9036
9054
|
k = parseFloat(k), S = parseFloat(S), !isNaN(S) && M && (k -= S);
|
|
9037
|
-
var
|
|
9038
|
-
return k = k -
|
|
9055
|
+
var y = a(k);
|
|
9056
|
+
return k = k - y.width + y.cols * i, isNaN(k) ? "auto" : 100 * k / (i - (isNaN(S) ? 0 : S));
|
|
9039
9057
|
}
|
|
9040
9058
|
function a(k) {
|
|
9041
|
-
for (var S = 0, M = e._els.dhx_cal_header[0].childNodes,
|
|
9042
|
-
var w =
|
|
9059
|
+
for (var S = 0, M = e._els.dhx_cal_header[0].childNodes, y = M[1] ? M[1].childNodes : M[0].childNodes, b = 0; b < y.length; b++) {
|
|
9060
|
+
var w = y[b].style ? y[b] : y[b].parentNode, E = parseFloat(w.style.width);
|
|
9043
9061
|
if (!(k > E))
|
|
9044
9062
|
break;
|
|
9045
9063
|
k -= E + 1, S += E + 1;
|
|
@@ -9053,57 +9071,57 @@ const gn = { active_links: function(e) {
|
|
|
9053
9071
|
return (window.getComputedStyle ? window.getComputedStyle(k, null)[S] : k.currentStyle ? k.currentStyle[S] : null) || "";
|
|
9054
9072
|
}
|
|
9055
9073
|
function c(k, S) {
|
|
9056
|
-
for (var M = parseInt(k.style.left, 10),
|
|
9057
|
-
if ((M -= e._cols[
|
|
9058
|
-
return
|
|
9074
|
+
for (var M = parseInt(k.style.left, 10), y = 0; y < e._cols.length; y++)
|
|
9075
|
+
if ((M -= e._cols[y]) < 0)
|
|
9076
|
+
return y;
|
|
9059
9077
|
return S;
|
|
9060
9078
|
}
|
|
9061
9079
|
function f(k, S) {
|
|
9062
|
-
for (var M = parseInt(k.style.top, 10),
|
|
9063
|
-
if (e._colsS.heights[
|
|
9064
|
-
return
|
|
9080
|
+
for (var M = parseInt(k.style.top, 10), y = 0; y < e._colsS.heights.length; y++)
|
|
9081
|
+
if (e._colsS.heights[y] > M)
|
|
9082
|
+
return y;
|
|
9065
9083
|
return S;
|
|
9066
9084
|
}
|
|
9067
9085
|
function m(k) {
|
|
9068
9086
|
return k ? "</" + k + ">" : "";
|
|
9069
9087
|
}
|
|
9070
|
-
function p(k, S, M,
|
|
9088
|
+
function p(k, S, M, y) {
|
|
9071
9089
|
var b = "<" + k + " profile='" + S + "'";
|
|
9072
|
-
return M && (b += " header='" + M + "'"),
|
|
9090
|
+
return M && (b += " header='" + M + "'"), y && (b += " footer='" + y + "'"), b += ">";
|
|
9073
9091
|
}
|
|
9074
9092
|
function h() {
|
|
9075
9093
|
var k = "", S = e._mode;
|
|
9076
9094
|
if (e.matrix && e.matrix[e._mode] && (S = e.matrix[e._mode].render == "cell" ? "matrix" : "timeline"), k += "<scale mode='" + S + "' today='" + e._els.dhx_cal_date[0].innerHTML + "'>", e._mode == "week_agenda")
|
|
9077
|
-
for (var M = e._els.dhx_cal_data[0].getElementsByTagName("DIV"),
|
|
9078
|
-
M[
|
|
9095
|
+
for (var M = e._els.dhx_cal_data[0].getElementsByTagName("DIV"), y = 0; y < M.length; y++)
|
|
9096
|
+
M[y].className == "dhx_wa_scale_bar" && (k += "<column>" + n(M[y].innerHTML) + "</column>");
|
|
9079
9097
|
else if (e._mode == "agenda" || e._mode == "map")
|
|
9080
9098
|
k += "<column>" + n((M = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML) + "</column><column>" + n(M[1].innerHTML) + "</column>";
|
|
9081
9099
|
else if (e._mode == "year")
|
|
9082
|
-
for (M = e._els.dhx_cal_data[0].childNodes,
|
|
9083
|
-
k += "<month label='" + n(M[
|
|
9100
|
+
for (M = e._els.dhx_cal_data[0].childNodes, y = 0; y < M.length; y++)
|
|
9101
|
+
k += "<month label='" + n(M[y].querySelector(".dhx_year_month").innerHTML) + "'>", k += v(M[y].querySelector(".dhx_year_week").childNodes), k += u(M[y].querySelector(".dhx_year_body")), k += "</month>";
|
|
9084
9102
|
else {
|
|
9085
9103
|
k += "<x>", k += v(M = e._els.dhx_cal_header[0].childNodes), k += "</x>";
|
|
9086
9104
|
var b = e._els.dhx_cal_data[0];
|
|
9087
9105
|
if (e.matrix && e.matrix[e._mode]) {
|
|
9088
|
-
for (k += "<y>",
|
|
9089
|
-
k += "<row><![CDATA[" + n(b.firstChild.rows[
|
|
9106
|
+
for (k += "<y>", y = 0; y < b.firstChild.rows.length; y++)
|
|
9107
|
+
k += "<row><![CDATA[" + n(b.firstChild.rows[y].cells[0].innerHTML) + "]]></row>";
|
|
9090
9108
|
k += "</y>", t = b.firstChild.rows[0].cells[0].offsetHeight;
|
|
9091
9109
|
} else if (b.firstChild.tagName == "TABLE")
|
|
9092
9110
|
k += u(b);
|
|
9093
9111
|
else {
|
|
9094
9112
|
for (b = b.childNodes[b.childNodes.length - 1]; b.className.indexOf("dhx_scale_holder") == -1; )
|
|
9095
9113
|
b = b.previousSibling;
|
|
9096
|
-
for (b = b.childNodes, k += "<y>",
|
|
9114
|
+
for (b = b.childNodes, k += "<y>", y = 0; y < b.length; y++)
|
|
9097
9115
|
k += `
|
|
9098
|
-
<row><![CDATA[` + n(b[
|
|
9116
|
+
<row><![CDATA[` + n(b[y].innerHTML) + "]]></row>";
|
|
9099
9117
|
k += "</y>", t = b[0].offsetHeight;
|
|
9100
9118
|
}
|
|
9101
9119
|
}
|
|
9102
9120
|
return k += "</scale>";
|
|
9103
9121
|
}
|
|
9104
9122
|
function u(k) {
|
|
9105
|
-
for (var S = "", M = k.querySelectorAll("tr"),
|
|
9106
|
-
for (var b = [], w = M[
|
|
9123
|
+
for (var S = "", M = k.querySelectorAll("tr"), y = 0; y < M.length; y++) {
|
|
9124
|
+
for (var b = [], w = M[y].querySelectorAll("td"), E = 0; E < w.length; E++)
|
|
9107
9125
|
b.push(w[E].querySelector(".dhx_month_head").innerHTML);
|
|
9108
9126
|
S += `
|
|
9109
9127
|
<row height='` + w[0].offsetHeight + "'><![CDATA[" + n(b.join("|")) + "]]></row>", t = w[0].offsetHeight;
|
|
@@ -9113,19 +9131,19 @@ const gn = { active_links: function(e) {
|
|
|
9113
9131
|
function v(k) {
|
|
9114
9132
|
var S, M = "";
|
|
9115
9133
|
e.matrix && e.matrix[e._mode] && (e.matrix[e._mode].second_scale && (S = k[1].childNodes), k = k[0].childNodes);
|
|
9116
|
-
for (var
|
|
9134
|
+
for (var y = 0; y < k.length; y++)
|
|
9117
9135
|
M += `
|
|
9118
|
-
<column><![CDATA[` + n(k[
|
|
9136
|
+
<column><![CDATA[` + n(k[y].innerHTML) + "]]></column>";
|
|
9119
9137
|
if (i = k[0].offsetWidth, S) {
|
|
9120
9138
|
var b = 0, w = k[0].offsetWidth, E = 1;
|
|
9121
|
-
for (
|
|
9139
|
+
for (y = 0; y < S.length; y++)
|
|
9122
9140
|
M += `
|
|
9123
|
-
<column second_scale='` + E + "'><![CDATA[" + n(S[
|
|
9141
|
+
<column second_scale='` + E + "'><![CDATA[" + n(S[y].innerHTML) + "]]></column>", (b += S[y].offsetWidth) >= w && (w += k[E] ? k[E].offsetWidth : 0, E++), i = S[0].offsetWidth;
|
|
9124
9142
|
}
|
|
9125
9143
|
return M;
|
|
9126
9144
|
}
|
|
9127
|
-
function
|
|
9128
|
-
var S = "", M = e._rendered,
|
|
9145
|
+
function g(k) {
|
|
9146
|
+
var S = "", M = e._rendered, y = e.matrix && e.matrix[e._mode];
|
|
9129
9147
|
if (e._mode == "agenda" || e._mode == "map")
|
|
9130
9148
|
for (var b = 0; b < M.length; b++)
|
|
9131
9149
|
S += "<event><head><![CDATA[" + n(M[b].childNodes[0].innerHTML) + "]]></head><body><![CDATA[" + n(M[b].childNodes[2].innerHTML) + "]]></body></event>";
|
|
@@ -9141,7 +9159,7 @@ const gn = { active_links: function(e) {
|
|
|
9141
9159
|
break;
|
|
9142
9160
|
}
|
|
9143
9161
|
}
|
|
9144
|
-
else if (
|
|
9162
|
+
else if (y && y.render == "cell")
|
|
9145
9163
|
for (M = e._els.dhx_cal_data[0].getElementsByTagName("TD"), b = 0; b < M.length; b++)
|
|
9146
9164
|
T = k ? l(M[b], "color") : "", S += `
|
|
9147
9165
|
<event><body backgroundColor='` + (A = k ? l(M[b], "backgroundColor") : "") + "' color='" + T + "'><![CDATA[" + n(M[b].innerHTML) + "]]></body></event>";
|
|
@@ -9170,8 +9188,8 @@ const gn = { active_links: function(e) {
|
|
|
9170
9188
|
} else {
|
|
9171
9189
|
if (M[b].parentNode == e._els.dhx_cal_data[0])
|
|
9172
9190
|
continue;
|
|
9173
|
-
var
|
|
9174
|
-
C += o(M[b].parentNode.style.left,
|
|
9191
|
+
var K = e._els.dhx_cal_data[0].childNodes[0], Q = parseFloat(K.className.indexOf("dhx_scale_holder") != -1 ? K.style.left : 0);
|
|
9192
|
+
C += o(M[b].parentNode.style.left, Q);
|
|
9175
9193
|
}
|
|
9176
9194
|
S += `
|
|
9177
9195
|
<event week='` + j + "' day='" + N + "' type='" + Y + "' x='" + C + "' y='" + O + "' width='" + $ + "' height='" + I + "' len='" + U + "'>", Y == "event" ? (S += "<header><![CDATA[" + n(M[b].childNodes[1].innerHTML) + "]]></header>", T = k ? l(M[b].childNodes[2], "color") : "", S += "<body backgroundColor='" + (A = k ? l(M[b].childNodes[2], "backgroundColor") : "") + "' color='" + T + "'><![CDATA[" + n(M[b].childNodes[2].innerHTML) + "]]></body>") : (T = k ? l(M[b], "color") : "", S += "<body backgroundColor='" + (A = k ? l(M[b], "backgroundColor") : "") + "' color='" + T + "'><![CDATA[" + n(M[b].innerHTML) + "]]></body>"), S += "</event>";
|
|
@@ -9181,21 +9199,21 @@ const gn = { active_links: function(e) {
|
|
|
9181
9199
|
}
|
|
9182
9200
|
return S;
|
|
9183
9201
|
}
|
|
9184
|
-
function x(k, S, M,
|
|
9202
|
+
function x(k, S, M, y, b, w) {
|
|
9185
9203
|
var E = !1;
|
|
9186
|
-
|
|
9204
|
+
y == "fullcolor" && (E = !0, y = "color"), y = y || "color";
|
|
9187
9205
|
var N, T = "";
|
|
9188
9206
|
if (k) {
|
|
9189
9207
|
var A = e._date, C = e._mode;
|
|
9190
|
-
S = e.date[M + "_start"](S), S = e.date["get_" + M + "_end"] ? e.date["get_" + M + "_end"](S) : e.date.add(S, 1, M), T = p("pages",
|
|
9208
|
+
S = e.date[M + "_start"](S), S = e.date["get_" + M + "_end"] ? e.date["get_" + M + "_end"](S) : e.date.add(S, 1, M), T = p("pages", y, b, w);
|
|
9191
9209
|
for (var $ = new Date(k); +$ < +S; $ = this.date.add($, 1, M))
|
|
9192
|
-
this.setCurrentView($, M), T += ((N = "page") ? "<" + N + ">" : "") + h().replace("–", "-") +
|
|
9210
|
+
this.setCurrentView($, M), T += ((N = "page") ? "<" + N + ">" : "") + h().replace("–", "-") + g(E) + m("page");
|
|
9193
9211
|
T += m("pages"), this.setCurrentView(A, C);
|
|
9194
9212
|
} else
|
|
9195
|
-
T = p("data",
|
|
9213
|
+
T = p("data", y, b, w) + h().replace("–", "-") + g(E) + m("data");
|
|
9196
9214
|
return T;
|
|
9197
9215
|
}
|
|
9198
|
-
function D(k, S, M,
|
|
9216
|
+
function D(k, S, M, y, b, w, E) {
|
|
9199
9217
|
(function(N, T) {
|
|
9200
9218
|
var A = e.uid(), C = document.createElement("div");
|
|
9201
9219
|
C.style.display = "none", document.body.appendChild(C), C.innerHTML = '<form id="' + A + '" method="post" target="_blank" action="' + T + '" accept-charset="utf-8" enctype="application/x-www-form-urlencoded"><input type="hidden" name="mycoolxmlbody"/> </form>', document.getElementById(A).firstChild.value = encodeURIComponent(N), document.getElementById(A).submit(), C.parentNode.removeChild(C);
|
|
@@ -9203,11 +9221,11 @@ const gn = { active_links: function(e) {
|
|
|
9203
9221
|
for (var T = "<data>", A = 0; A < N.length; A++)
|
|
9204
9222
|
T += N[A].source.getPDFData(N[A].start, N[A].end, N[A].view, N[A].mode, N[A].header, N[A].footer);
|
|
9205
9223
|
return T += "</data>", T;
|
|
9206
|
-
}(b) : x.apply(this, [k, S, M, b, w, E]),
|
|
9224
|
+
}(b) : x.apply(this, [k, S, M, b, w, E]), y);
|
|
9207
9225
|
}
|
|
9208
|
-
e.getPDFData = x, e.toPDF = function(k, S, M,
|
|
9209
|
-
return D.apply(this, [null, null, null, k, S, M,
|
|
9210
|
-
}, e.toPDFRange = function(k, S, M,
|
|
9226
|
+
e.getPDFData = x, e.toPDF = function(k, S, M, y) {
|
|
9227
|
+
return D.apply(this, [null, null, null, k, S, M, y]);
|
|
9228
|
+
}, e.toPDFRange = function(k, S, M, y, b, w, E) {
|
|
9211
9229
|
return typeof k == "string" && (k = e.templates.api_date(k), S = e.templates.api_date(S)), D.apply(this, arguments);
|
|
9212
9230
|
};
|
|
9213
9231
|
}, quick_info: function(e) {
|
|
@@ -9408,23 +9426,23 @@ const gn = { active_links: function(e) {
|
|
|
9408
9426
|
};
|
|
9409
9427
|
});
|
|
9410
9428
|
}, recurring: function(e) {
|
|
9411
|
-
function i(
|
|
9412
|
-
return new Date(
|
|
9429
|
+
function i(y) {
|
|
9430
|
+
return new Date(y.getFullYear(), y.getMonth(), y.getDate(), y.getHours(), y.getMinutes(), y.getSeconds(), 0);
|
|
9413
9431
|
}
|
|
9414
|
-
function t(
|
|
9415
|
-
return !!
|
|
9432
|
+
function t(y) {
|
|
9433
|
+
return !!y.rrule && !y.recurring_event_id;
|
|
9416
9434
|
}
|
|
9417
|
-
function r(
|
|
9418
|
-
return new Date(Date.UTC(
|
|
9435
|
+
function r(y) {
|
|
9436
|
+
return new Date(Date.UTC(y.getFullYear(), y.getMonth(), y.getDate(), y.getHours(), y.getMinutes(), y.getSeconds()));
|
|
9419
9437
|
}
|
|
9420
|
-
function s(
|
|
9421
|
-
|
|
9422
|
-
let b = ke(`RRULE:${
|
|
9438
|
+
function s(y) {
|
|
9439
|
+
y.rrule.includes(";UNTIL=") && (y.rrule = y.rrule.split(";UNTIL=")[0]);
|
|
9440
|
+
let b = ke(`RRULE:${y.rrule};UNTIL=${h(y._end_date || y.end_date)}`, { dtstart: y.start_date }), w = new z(b.origOptions).toString().replace("RRULE:", "");
|
|
9423
9441
|
w = w.split(`
|
|
9424
|
-
`)[1],
|
|
9442
|
+
`)[1], y.rrule = w;
|
|
9425
9443
|
}
|
|
9426
|
-
function n(
|
|
9427
|
-
b || (b = e.getEvent(
|
|
9444
|
+
function n(y, b) {
|
|
9445
|
+
b || (b = e.getEvent(y));
|
|
9428
9446
|
let w = b.rrule.split(";"), E = [];
|
|
9429
9447
|
for (let N = 0; N < w.length; N++) {
|
|
9430
9448
|
let T = w[N].split("="), A = T[0], C = T[1];
|
|
@@ -9433,40 +9451,40 @@ const gn = { active_links: function(e) {
|
|
|
9433
9451
|
E.pop(), b.rrule = E.join("");
|
|
9434
9452
|
}
|
|
9435
9453
|
var o;
|
|
9436
|
-
function _(
|
|
9437
|
-
|
|
9454
|
+
function _(y, b) {
|
|
9455
|
+
y._end_date = y.end_date, e._isExceptionFirstOccurrence(b) ? (y.start_date = b.start_date, y.end_date = new Date(b.start_date.valueOf() + 1e3 * y.duration), y._start_date = b.original_start, y._modified = !0) : (y.end_date = new Date(b.start_date.valueOf() + 1e3 * y.duration), y.start_date = b.start_date, y._firstOccurrence = !0), y._thisAndFollowing = b.id;
|
|
9438
9456
|
}
|
|
9439
|
-
function a(
|
|
9440
|
-
const N = w._modified ? E.id :
|
|
9441
|
-
e._events[N] = { ...E, text: b.text, duration: b.duration, start_date: b.start_date, rrule: b.rrule, end_date: E._end_date, _start_date: E.start_date, _thisAndFollowing: null, _end_date: null }, w._modified && delete e._events[
|
|
9457
|
+
function a(y, b, w, E) {
|
|
9458
|
+
const N = w._modified ? E.id : y;
|
|
9459
|
+
e._events[N] = { ...E, text: b.text, duration: b.duration, start_date: b.start_date, rrule: b.rrule, end_date: E._end_date, _start_date: E.start_date, _thisAndFollowing: null, _end_date: null }, w._modified && delete e._events[y], e.callEvent("onEventChanged", [e._events[N].id, e._events[N]]);
|
|
9442
9460
|
}
|
|
9443
|
-
function d(
|
|
9461
|
+
function d(y) {
|
|
9444
9462
|
for (const b in e._events)
|
|
9445
|
-
e._events[b].id ==
|
|
9463
|
+
e._events[b].id == y.id && delete e._events[b];
|
|
9446
9464
|
}
|
|
9447
|
-
function l(
|
|
9465
|
+
function l(y, b) {
|
|
9448
9466
|
for (let w in e._events) {
|
|
9449
9467
|
let E = e._events[w];
|
|
9450
|
-
(E.recurring_event_id ==
|
|
9468
|
+
(E.recurring_event_id == y || e._is_virtual_event(E.id) && E.id.split("#")[0] == y) && (E.text = b.text, e.updateEvent(E.id));
|
|
9451
9469
|
}
|
|
9452
9470
|
}
|
|
9453
|
-
function c(
|
|
9454
|
-
let w =
|
|
9455
|
-
|
|
9456
|
-
let N = e.uid(), T =
|
|
9457
|
-
A.id = N, A.recurring_event_id = b.recurring_event_id ||
|
|
9471
|
+
function c(y, b) {
|
|
9472
|
+
let w = y, E = new Date(b.original_start).valueOf();
|
|
9473
|
+
y = String(w).split("#") || b._pid_time || E;
|
|
9474
|
+
let N = e.uid(), T = y[1] ? y[1] : b._pid_time || E, A = e._copy_event(b);
|
|
9475
|
+
A.id = N, A.recurring_event_id = b.recurring_event_id || y[0], A.original_start = new Date(Number(T)), A.deleted = !0, e.addEvent(A);
|
|
9458
9476
|
}
|
|
9459
9477
|
function f() {
|
|
9460
|
-
for (const
|
|
9461
|
-
|
|
9478
|
+
for (const y in e._events)
|
|
9479
|
+
y === "$dnd_recurring_placeholder" && delete e._events[y];
|
|
9462
9480
|
e.render();
|
|
9463
9481
|
}
|
|
9464
|
-
function m(
|
|
9482
|
+
function m(y, b) {
|
|
9465
9483
|
const w = e.locale;
|
|
9466
|
-
|
|
9467
|
-
const E =
|
|
9484
|
+
y.find((N) => N.checked) || (y[0].checked = !0);
|
|
9485
|
+
const E = y.reduce((N, T) => (N[T.value] = T.callback, N), {});
|
|
9468
9486
|
e.modalbox({ text: `<div class="dhx_edit_recurrence_options">
|
|
9469
|
-
${
|
|
9487
|
+
${y.map((N) => `<label class="dhx_styled_radio">
|
|
9470
9488
|
<input type="radio" value="${N.value}" name="option" ${N.checked ? "checked" : ""}>
|
|
9471
9489
|
${N.label}
|
|
9472
9490
|
</label>`).join("")}
|
|
@@ -9479,51 +9497,51 @@ const gn = { active_links: function(e) {
|
|
|
9479
9497
|
} });
|
|
9480
9498
|
}
|
|
9481
9499
|
function p() {
|
|
9482
|
-
const
|
|
9500
|
+
const y = {};
|
|
9483
9501
|
for (const b in e._events) {
|
|
9484
9502
|
const w = e._events[b];
|
|
9485
|
-
w.recurring_event_id && w.original_start && (
|
|
9503
|
+
w.recurring_event_id && w.original_start && (y[w.recurring_event_id] || (y[w.recurring_event_id] = {}), y[w.recurring_event_id][w.original_start.valueOf()] = w);
|
|
9486
9504
|
}
|
|
9487
|
-
return
|
|
9505
|
+
return y;
|
|
9488
9506
|
}
|
|
9489
|
-
e._isFollowing = function(
|
|
9490
|
-
let b = e.getEvent(
|
|
9507
|
+
e._isFollowing = function(y) {
|
|
9508
|
+
let b = e.getEvent(y);
|
|
9491
9509
|
return !(!b || !b._thisAndFollowing);
|
|
9492
|
-
}, e._isFirstOccurrence = function(
|
|
9493
|
-
if (e._is_virtual_event(
|
|
9494
|
-
let b =
|
|
9495
|
-
return e.getEvent(b).start_date.valueOf() ===
|
|
9496
|
-
}
|
|
9497
|
-
}, e._isExceptionFirstOccurrence = function(
|
|
9498
|
-
if (e._is_modified_occurrence(
|
|
9499
|
-
let b =
|
|
9500
|
-
return !(!
|
|
9501
|
-
}
|
|
9502
|
-
}, e._rec_temp = [], e._rec_markers_pull = {}, e._rec_markers = {}, e._add_rec_marker = function(
|
|
9503
|
-
|
|
9504
|
-
}, e._get_rec_marker = function(
|
|
9510
|
+
}, e._isFirstOccurrence = function(y) {
|
|
9511
|
+
if (e._is_virtual_event(y.id)) {
|
|
9512
|
+
let b = y.id.split("#")[0];
|
|
9513
|
+
return e.getEvent(b).start_date.valueOf() === y.start_date.valueOf();
|
|
9514
|
+
}
|
|
9515
|
+
}, e._isExceptionFirstOccurrence = function(y) {
|
|
9516
|
+
if (e._is_modified_occurrence(y)) {
|
|
9517
|
+
let b = y.recurring_event_id, w = e.getEvent(b);
|
|
9518
|
+
return !(!y.original_start || !y.original_start.valueOf() || y.original_start.valueOf() !== w.start_date.valueOf());
|
|
9519
|
+
}
|
|
9520
|
+
}, e._rec_temp = [], e._rec_markers_pull = {}, e._rec_markers = {}, e._add_rec_marker = function(y, b) {
|
|
9521
|
+
y._pid_time = b, this._rec_markers[y.id] = y, this._rec_markers_pull[y.event_pid] || (this._rec_markers_pull[y.event_pid] = {}), this._rec_markers_pull[y.event_pid][b] = y;
|
|
9522
|
+
}, e._get_rec_marker = function(y, b) {
|
|
9505
9523
|
let w = this._rec_markers_pull[b];
|
|
9506
|
-
return w ? w[
|
|
9507
|
-
}, e._get_rec_markers = function(
|
|
9508
|
-
return this._rec_markers_pull[
|
|
9509
|
-
}, o = e.addEvent, e.addEvent = function(
|
|
9524
|
+
return w ? w[y] : null;
|
|
9525
|
+
}, e._get_rec_markers = function(y) {
|
|
9526
|
+
return this._rec_markers_pull[y] || [];
|
|
9527
|
+
}, o = e.addEvent, e.addEvent = function(y, b, w, E, N) {
|
|
9510
9528
|
var T = o.apply(this, arguments);
|
|
9511
9529
|
if (T && e.getEvent(T)) {
|
|
9512
9530
|
var A = e.getEvent(T);
|
|
9513
9531
|
A.start_date && (A.start_date = i(A.start_date)), A.end_date && (A.end_date = i(A.end_date));
|
|
9514
9532
|
}
|
|
9515
9533
|
return T;
|
|
9516
|
-
}, e.attachEvent("onEventLoading", function(
|
|
9517
|
-
return
|
|
9518
|
-
}), e.attachEvent("onEventIdChange", function(
|
|
9534
|
+
}, e.attachEvent("onEventLoading", function(y) {
|
|
9535
|
+
return y.original_start && !y.original_start.getFullYear && (y.original_start = e.templates.parse_date(y.original_start)), !0;
|
|
9536
|
+
}), e.attachEvent("onEventIdChange", function(y, b) {
|
|
9519
9537
|
if (!this._ignore_call) {
|
|
9520
|
-
this._ignore_call = !0, e._rec_markers[
|
|
9538
|
+
this._ignore_call = !0, e._rec_markers[y] && (e._rec_markers[b] = e._rec_markers[y], delete e._rec_markers[y]), e._rec_markers_pull[y] && (e._rec_markers_pull[b] = e._rec_markers_pull[y], delete e._rec_markers_pull[y]);
|
|
9521
9539
|
for (var w = 0; w < this._rec_temp.length; w++) {
|
|
9522
9540
|
var E = this._rec_temp[w];
|
|
9523
|
-
this._is_virtual_event(E.id) && E.id.split("#")[0] ==
|
|
9541
|
+
this._is_virtual_event(E.id) && E.id.split("#")[0] == y && (E.recurring_event_id = b, this.changeEventId(E.id, b + "#" + E.id.split("#")[1]));
|
|
9524
9542
|
}
|
|
9525
9543
|
for (var w in this._rec_markers)
|
|
9526
|
-
(E = this._rec_markers[w]).recurring_event_id ==
|
|
9544
|
+
(E = this._rec_markers[w]).recurring_event_id == y && (E.recurring_event_id = b, E._pid_changed = !0);
|
|
9527
9545
|
var N = e._rec_markers[b];
|
|
9528
9546
|
N && N._pid_changed && (delete N._pid_changed, setTimeout(function() {
|
|
9529
9547
|
if (e.$destroyed)
|
|
@@ -9531,28 +9549,28 @@ const gn = { active_links: function(e) {
|
|
|
9531
9549
|
e.callEvent("onEventChanged", [b, e.getEvent(b)]);
|
|
9532
9550
|
}, 1)), delete this._ignore_call;
|
|
9533
9551
|
}
|
|
9534
|
-
}), e.attachEvent("onConfirmedBeforeEventDelete", function(
|
|
9535
|
-
var b = this.getEvent(
|
|
9536
|
-
if (this._is_virtual_event(
|
|
9552
|
+
}), e.attachEvent("onConfirmedBeforeEventDelete", function(y) {
|
|
9553
|
+
var b = this.getEvent(y);
|
|
9554
|
+
if (this._is_virtual_event(y) || this._is_modified_occurrence(b) && !function(N) {
|
|
9537
9555
|
return !!N.deleted;
|
|
9538
9556
|
}(b))
|
|
9539
|
-
c(
|
|
9557
|
+
c(y, b);
|
|
9540
9558
|
else {
|
|
9541
9559
|
t(b) && this._lightbox_id && this._roll_back_dates(b);
|
|
9542
|
-
var w = this._get_rec_markers(
|
|
9560
|
+
var w = this._get_rec_markers(y);
|
|
9543
9561
|
for (var E in w)
|
|
9544
|
-
w.hasOwnProperty(E) && (
|
|
9562
|
+
w.hasOwnProperty(E) && (y = w[E].id, this.getEvent(y) && this.deleteEvent(y, !0));
|
|
9545
9563
|
}
|
|
9546
9564
|
return !0;
|
|
9547
|
-
}), e.attachEvent("onEventDeleted", function(
|
|
9548
|
-
!this._is_virtual_event(
|
|
9549
|
-
}), e.attachEvent("onBeforeEventChanged", function(
|
|
9550
|
-
return !(!w &&
|
|
9551
|
-
}), e.attachEvent("onEventChanged", function(
|
|
9565
|
+
}), e.attachEvent("onEventDeleted", function(y, b) {
|
|
9566
|
+
!this._is_virtual_event(y) && this._is_modified_occurrence(b) && (e._events[y] || (b.deleted = !0, this.setEvent(y, b), e.render()));
|
|
9567
|
+
}), e.attachEvent("onBeforeEventChanged", function(y, b, w, E) {
|
|
9568
|
+
return !(!w && y && (e._is_virtual_event(y.id) || e._is_modified_occurrence(y)) && (E.start_date.getDate() !== y.start_date.getDate() ? y._beforeEventChangedFlag = "edit" : y._beforeEventChangedFlag = "ask", !e.config.collision_limit || e.checkCollision(y))) || (e._events.$dnd_recurring_placeholder = e._lame_clone(y), e._showRequiredModalBox(y.id, y._beforeEventChangedFlag), !1);
|
|
9569
|
+
}), e.attachEvent("onEventChanged", function(y, b) {
|
|
9552
9570
|
if (this._loading)
|
|
9553
9571
|
return !0;
|
|
9554
|
-
let w = this.getEvent(
|
|
9555
|
-
if (this._is_virtual_event(
|
|
9572
|
+
let w = this.getEvent(y);
|
|
9573
|
+
if (this._is_virtual_event(y))
|
|
9556
9574
|
(function(C) {
|
|
9557
9575
|
let $ = C.id.split("#"), H = e.uid();
|
|
9558
9576
|
e._not_render = !0;
|
|
@@ -9562,32 +9580,32 @@ const gn = { active_links: function(e) {
|
|
|
9562
9580
|
O.original_start = new Date(Number(I)), e._add_rec_marker(O, I), e.addEvent(O), e._not_render = !1;
|
|
9563
9581
|
})(w);
|
|
9564
9582
|
else {
|
|
9565
|
-
w.start_date && (w.start_date = i(w.start_date)), w.end_date && (w.end_date = i(w.end_date)), t(w) && this._lightbox_id && (w._removeFollowing || this._isFollowing(
|
|
9566
|
-
var E = this._get_rec_markers(
|
|
9583
|
+
w.start_date && (w.start_date = i(w.start_date)), w.end_date && (w.end_date = i(w.end_date)), t(w) && this._lightbox_id && (w._removeFollowing || this._isFollowing(y) ? w._removeFollowing = null : this._roll_back_dates(w));
|
|
9584
|
+
var E = this._get_rec_markers(y);
|
|
9567
9585
|
for (var N in E)
|
|
9568
9586
|
E.hasOwnProperty(N) && (delete this._rec_markers[E[N].id], this.deleteEvent(E[N].id, !0));
|
|
9569
|
-
delete this._rec_markers_pull[
|
|
9587
|
+
delete this._rec_markers_pull[y];
|
|
9570
9588
|
for (var T = !1, A = 0; A < this._rendered.length; A++)
|
|
9571
|
-
this._rendered[A].getAttribute(this.config.event_attribute) ==
|
|
9589
|
+
this._rendered[A].getAttribute(this.config.event_attribute) == y && (T = !0);
|
|
9572
9590
|
T || (this._select_id = null);
|
|
9573
9591
|
}
|
|
9574
9592
|
return f(), !0;
|
|
9575
|
-
}), e.attachEvent("onEventAdded", function(
|
|
9593
|
+
}), e.attachEvent("onEventAdded", function(y) {
|
|
9576
9594
|
if (!this._loading) {
|
|
9577
|
-
var b = this.getEvent(
|
|
9595
|
+
var b = this.getEvent(y);
|
|
9578
9596
|
t(b) && this._roll_back_dates(b);
|
|
9579
9597
|
}
|
|
9580
9598
|
return !0;
|
|
9581
|
-
}), e.attachEvent("onEventSave", function(
|
|
9582
|
-
let E = this.getEvent(
|
|
9583
|
-
if (E && t(E) && !w && this._isFollowing(
|
|
9599
|
+
}), e.attachEvent("onEventSave", function(y, b, w) {
|
|
9600
|
+
let E = this.getEvent(y), N = e._lame_clone(E), T = b.rrule;
|
|
9601
|
+
if (E && t(E) && !w && this._isFollowing(y)) {
|
|
9584
9602
|
if (E._removeFollowing) {
|
|
9585
9603
|
if (e.getEvent(E._thisAndFollowing) && (E._firstOccurrence || E._modified))
|
|
9586
9604
|
return e.hideLightbox(), e.deleteEvent(E.id), !1;
|
|
9587
9605
|
if (E.end_date = new Date(E.start_date.valueOf() - 1e3), E._end_date = E._shorten_end_date, E.start_date = E._start_date, E._shorten = !0, s(E), e.callEvent("onEventChanged", [E.id, E]), e.getEvent(E._thisAndFollowing))
|
|
9588
9606
|
for (const A in e._events) {
|
|
9589
9607
|
let C = e._events[A];
|
|
9590
|
-
C.recurring_event_id ===
|
|
9608
|
+
C.recurring_event_id === y && C.start_date.valueOf() > N.start_date.valueOf() && c(C.id, C);
|
|
9591
9609
|
}
|
|
9592
9610
|
return e.hideLightbox(), !1;
|
|
9593
9611
|
}
|
|
@@ -9599,35 +9617,35 @@ const gn = { active_links: function(e) {
|
|
|
9599
9617
|
else if (A && E._modified)
|
|
9600
9618
|
for (const C in e._events) {
|
|
9601
9619
|
let $ = e._events[C];
|
|
9602
|
-
$.recurring_event_id ==
|
|
9620
|
+
$.recurring_event_id == y && $.id == N._thisAndFollowing && a(C, b, E, N);
|
|
9603
9621
|
}
|
|
9604
9622
|
else {
|
|
9605
9623
|
e._is_modified_occurrence(A) && d(A), E.end_date = E._shorten_end_date, E._end_date = E._shorten_end_date, E.start_date = E._start_date, E._shorten = !0, s(E), e.callEvent("onEventChanged", [E.id, E]);
|
|
9606
9624
|
let C = { ...N };
|
|
9607
9625
|
C.text = b.text, C.duration = b.duration, C.rrule = T, C._start_date = null, C.id = e.uid(), e.addEvent(C.start_date, C.end_date, C.text, C.id, C);
|
|
9608
9626
|
}
|
|
9609
|
-
return w || l(
|
|
9627
|
+
return w || l(y, b), e.hideLightbox(), !1;
|
|
9610
9628
|
}
|
|
9611
9629
|
}
|
|
9612
|
-
return w || l(
|
|
9613
|
-
}), e.attachEvent("onEventCreated", function(
|
|
9614
|
-
var b = this.getEvent(
|
|
9630
|
+
return w || l(y, b), N._ocr && N._beforeEventChangedFlag ? (E.start_date = N.start_date, E.end_date = N.end_date, E._start_date = N._start_date, E._end_date = N._end_date, e.updateEvent(E.id), !0) : (this._select_id = null, f(), !0);
|
|
9631
|
+
}), e.attachEvent("onEventCreated", function(y) {
|
|
9632
|
+
var b = this.getEvent(y);
|
|
9615
9633
|
return t(b) || function(w) {
|
|
9616
9634
|
w.rrule = "", w.original_start = null, w.recurring_event_id = null, w.duration = null, w.deleted = null;
|
|
9617
9635
|
}(b), !0;
|
|
9618
|
-
}), e.attachEvent("onEventCancel", function(
|
|
9619
|
-
var b = this.getEvent(
|
|
9636
|
+
}), e.attachEvent("onEventCancel", function(y) {
|
|
9637
|
+
var b = this.getEvent(y);
|
|
9620
9638
|
t(b) && (this._roll_back_dates(b), this.render_view_data()), f();
|
|
9621
|
-
}), e._roll_back_dates = function(
|
|
9622
|
-
|
|
9623
|
-
}, e._is_virtual_event = function(
|
|
9624
|
-
return
|
|
9625
|
-
}, e._is_modified_occurrence = function(
|
|
9626
|
-
return
|
|
9627
|
-
}, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(
|
|
9639
|
+
}), e._roll_back_dates = function(y) {
|
|
9640
|
+
y.start_date && (y.start_date = i(y.start_date)), y.end_date && (y.end_date = i(y.end_date)), y._end_date && (y._shorten || (y.duration = Math.round((y.end_date.valueOf() - y.start_date.valueOf()) / 1e3)), y.end_date = y._end_date), y._start_date && (y.start_date.setMonth(0), y.start_date.setDate(y._start_date.getDate()), y.start_date.setMonth(y._start_date.getMonth()), y.start_date.setFullYear(y._start_date.getFullYear()), this._isFollowing(y.id) && (y.start_date.setHours(y._start_date.getHours()), y.start_date.setMinutes(y._start_date.getMinutes()), y.start_date.setSeconds(y._start_date.getSeconds()))), y._thisAndFollowing = null, y._shorten_end_date && (y._shorten_end_date = null), y._removeFollowing && (y._removeFollowing = null), y._firstOccurrence && (y._firstOccurrence = null), y._modified && (y._modified = null);
|
|
9641
|
+
}, e._is_virtual_event = function(y) {
|
|
9642
|
+
return y.toString().indexOf("#") != -1;
|
|
9643
|
+
}, e._is_modified_occurrence = function(y) {
|
|
9644
|
+
return y.recurring_event_id && y.recurring_event_id != "0";
|
|
9645
|
+
}, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(y) {
|
|
9628
9646
|
const b = this.locale;
|
|
9629
|
-
let w = e.config.lightbox_recurring, E = this.getEvent(
|
|
9630
|
-
T && (N =
|
|
9647
|
+
let w = e.config.lightbox_recurring, E = this.getEvent(y), N = E.recurring_event_id, T = this._is_virtual_event(y);
|
|
9648
|
+
T && (N = y.split("#")[0]);
|
|
9631
9649
|
const A = function(C, $) {
|
|
9632
9650
|
const H = e.getEvent(C), O = e.getEvent(N), I = e.getView();
|
|
9633
9651
|
if (I && H[I.y_property] && (O[I.y_property] = H[I.y_property]), I && H[I.property] && (O[I.property] = H[I.property]), $ === "Occurrence")
|
|
@@ -9649,17 +9667,17 @@ const gn = { active_links: function(e) {
|
|
|
9649
9667
|
}
|
|
9650
9668
|
};
|
|
9651
9669
|
if ((N || 1 * N == 0) && t(E))
|
|
9652
|
-
return A(
|
|
9670
|
+
return A(y, "AllEvents");
|
|
9653
9671
|
if (!N || N === "0" || !b.labels.confirm_recurring || w == "instance" || w == "series" && !T)
|
|
9654
|
-
return this.showLightbox_rec(
|
|
9672
|
+
return this.showLightbox_rec(y);
|
|
9655
9673
|
if (w === "ask") {
|
|
9656
9674
|
const C = e.locale;
|
|
9657
|
-
m([{ value: "Occurrence", label: C.labels.button_edit_occurrence, checked: !0, callback: () => A(
|
|
9675
|
+
m([{ value: "Occurrence", label: C.labels.button_edit_occurrence, checked: !0, callback: () => A(y, "Occurrence") }, { value: "Following", label: C.labels.button_edit_occurrence_and_following, callback: () => A(y, "Following") }, { value: "AllEvents", label: C.labels.button_edit_series, callback: () => A(y, "AllEvents") }]);
|
|
9658
9676
|
}
|
|
9659
|
-
}, e._showRequiredModalBox = function(
|
|
9677
|
+
}, e._showRequiredModalBox = function(y, b) {
|
|
9660
9678
|
let w;
|
|
9661
9679
|
const E = e.locale;
|
|
9662
|
-
let N = e.getEvent(
|
|
9680
|
+
let N = e.getEvent(y), T = N.recurring_event_id;
|
|
9663
9681
|
e._is_virtual_event(N.id) && (T = N.id.split("#")[0]);
|
|
9664
9682
|
let A = e.getEvent(T);
|
|
9665
9683
|
const C = e.getView();
|
|
@@ -9680,30 +9698,30 @@ const gn = { active_links: function(e) {
|
|
|
9680
9698
|
O._end_date = A.end_date;
|
|
9681
9699
|
const P = j.original_start || e.date.date_part(new Date(j._start_date));
|
|
9682
9700
|
O._shorten_end_date = new Date(P.valueOf() - 1e3), O.end_date = j.end_date, O._start_date = A.start_date, O.start_date = j.start_date, O._thisAndFollowing = j.id, O.rrule && n(O.id, O);
|
|
9683
|
-
let
|
|
9701
|
+
let K = O.end_date;
|
|
9684
9702
|
if (O.end_date = O._end_date, !e.config.collision_limit || e.checkCollision(O)) {
|
|
9685
|
-
O.end_date =
|
|
9686
|
-
for (const
|
|
9687
|
-
e._events[
|
|
9703
|
+
O.end_date = K;
|
|
9704
|
+
for (const Q in e._events)
|
|
9705
|
+
e._events[Q].id == O.id && (e._events[Q] = { ...O }, e.callEvent("onEventSave", [e._events[Q].id, e._events[Q], e._new_event]), e.callEvent("onEventChanged", [e._events[Q].id, e._events[Q]]));
|
|
9688
9706
|
}
|
|
9689
9707
|
}
|
|
9690
9708
|
}(N) }, R = { value: "Occurrence", label: E.labels.button_edit_occurrence, callback: () => function(j) {
|
|
9691
9709
|
let U = { ...A, ...e.getEvent("$dnd_recurring_placeholder") };
|
|
9692
9710
|
if (H && $ && (U.start_date = $, U.end_date = H, U._beforeEventChangedFlag = j._beforeEventChangedFlag, U._ocr = !0), !e.config.collision_limit || e.checkCollision(U))
|
|
9693
9711
|
for (const P in e._events) {
|
|
9694
|
-
let
|
|
9695
|
-
P !== "$dnd_recurring_placeholder" &&
|
|
9712
|
+
let K = e._events[P];
|
|
9713
|
+
P !== "$dnd_recurring_placeholder" && K.id == U.id && (e._events[P] = { ...U }, e.callEvent("onEventChanged", [e._events[P].id, e._events[P]]));
|
|
9696
9714
|
}
|
|
9697
9715
|
}(N), checked: !0 };
|
|
9698
9716
|
w = b === "ask" ? [R, Y, I] : [R, Y], m(w, (j) => {
|
|
9699
9717
|
j === "cancel" && f();
|
|
9700
9718
|
});
|
|
9701
|
-
}, e.get_visible_events_rec = e.get_visible_events, e.get_visible_events = function(
|
|
9719
|
+
}, e.get_visible_events_rec = e.get_visible_events, e.get_visible_events = function(y) {
|
|
9702
9720
|
for (var b = 0; b < this._rec_temp.length; b++)
|
|
9703
9721
|
delete this._events[this._rec_temp[b].id];
|
|
9704
9722
|
this._rec_temp = [];
|
|
9705
9723
|
const w = p();
|
|
9706
|
-
var E = this.get_visible_events_rec(
|
|
9724
|
+
var E = this.get_visible_events_rec(y), N = [];
|
|
9707
9725
|
for (b = 0; b < E.length; b++)
|
|
9708
9726
|
E[b].deleted || E[b].recurring_event_id || (t(E[b]) ? this.repeat_date(E[b], N, void 0, void 0, void 0, void 0, w) : N.push(E[b]));
|
|
9709
9727
|
return function(T) {
|
|
@@ -9714,9 +9732,9 @@ const gn = { active_links: function(e) {
|
|
|
9714
9732
|
}), Object.values(A);
|
|
9715
9733
|
}(N);
|
|
9716
9734
|
}, function() {
|
|
9717
|
-
var
|
|
9735
|
+
var y = e.isOneDayEvent;
|
|
9718
9736
|
e.isOneDayEvent = function(w) {
|
|
9719
|
-
return !!t(w) ||
|
|
9737
|
+
return !!t(w) || y.call(this, w);
|
|
9720
9738
|
};
|
|
9721
9739
|
var b = e.updateEvent;
|
|
9722
9740
|
e.updateEvent = function(w) {
|
|
@@ -9725,25 +9743,25 @@ const gn = { active_links: function(e) {
|
|
|
9725
9743
|
};
|
|
9726
9744
|
}();
|
|
9727
9745
|
const h = e.date.date_to_str("%Y%m%dT%H%i%s");
|
|
9728
|
-
function u(
|
|
9729
|
-
const b =
|
|
9746
|
+
function u(y) {
|
|
9747
|
+
const b = y.getDay(), w = y.getDate();
|
|
9730
9748
|
return { dayOfWeek: b, dayNumber: Math.ceil(w / 7) };
|
|
9731
9749
|
}
|
|
9732
|
-
e.repeat_date = function(
|
|
9733
|
-
if (!
|
|
9750
|
+
e.repeat_date = function(y, b, w, E, N, T, A) {
|
|
9751
|
+
if (!y.rrule)
|
|
9734
9752
|
return;
|
|
9735
|
-
let C = A ? A[
|
|
9753
|
+
let C = A ? A[y.id] : p()[y.id];
|
|
9736
9754
|
C || (C = {}), E = r(E || new Date(e._min_date.valueOf() - 6048e5)), N = r(N || new Date(e._max_date.valueOf() - 1e3));
|
|
9737
|
-
const $ = r(
|
|
9755
|
+
const $ = r(y.start_date);
|
|
9738
9756
|
let H;
|
|
9739
|
-
H = ke(T ? `RRULE:${
|
|
9757
|
+
H = ke(T ? `RRULE:${y.rrule};UNTIL=${h(y.end_date)};COUNT=${T}` : `RRULE:${y.rrule};UNTIL=${h(y.end_date)}`, { dtstart: $ });
|
|
9740
9758
|
const O = H.between(E, N, !0).map((R) => {
|
|
9741
9759
|
const j = (U = R, new Date(U.getUTCFullYear(), U.getUTCMonth(), U.getUTCDate(), U.getUTCHours(), U.getUTCMinutes(), U.getUTCSeconds()));
|
|
9742
9760
|
var U;
|
|
9743
|
-
return j.setHours(
|
|
9761
|
+
return j.setHours(y.start_date.getHours()), j.setMinutes(y.start_date.getMinutes()), j.setSeconds(y.start_date.getSeconds()), j;
|
|
9744
9762
|
});
|
|
9745
9763
|
let I = 0;
|
|
9746
|
-
const Y =
|
|
9764
|
+
const Y = y.duration;
|
|
9747
9765
|
for (let R = 0; R < O.length && !(T && I >= T); R++) {
|
|
9748
9766
|
const j = O[R];
|
|
9749
9767
|
let U = C[j.valueOf()];
|
|
@@ -9752,8 +9770,8 @@ const gn = { active_links: function(e) {
|
|
|
9752
9770
|
continue;
|
|
9753
9771
|
I++, b.push(U);
|
|
9754
9772
|
} else {
|
|
9755
|
-
const P = e._copy_event(
|
|
9756
|
-
if (P.text =
|
|
9773
|
+
const P = e._copy_event(y);
|
|
9774
|
+
if (P.text = y.text, P.start_date = j, P.id = y.id + "#" + Math.ceil(j.valueOf()), P.end_date = new Date(j.valueOf() + 1e3 * Y), P.end_date.valueOf() < e._min_date.valueOf() || (P.end_date = e._fix_daylight_saving_date(P.start_date, P.end_date, y, j, P.end_date), P._timed = e.isOneDayEvent(P), !P._timed && !e._table_view && !e.config.multi_day))
|
|
9757
9775
|
continue;
|
|
9758
9776
|
b.push(P), w || (e._events[P.id] = P, e._rec_temp.push(P)), I++;
|
|
9759
9777
|
}
|
|
@@ -9767,11 +9785,11 @@ const gn = { active_links: function(e) {
|
|
|
9767
9785
|
E && N && j.start_date < N && j.end_date > E && b.push(j);
|
|
9768
9786
|
}
|
|
9769
9787
|
}
|
|
9770
|
-
}, e._fix_daylight_saving_date = function(
|
|
9771
|
-
var T =
|
|
9788
|
+
}, e._fix_daylight_saving_date = function(y, b, w, E, N) {
|
|
9789
|
+
var T = y.getTimezoneOffset() - b.getTimezoneOffset();
|
|
9772
9790
|
return T ? T > 0 ? new Date(E.valueOf() + 1e3 * w.duration - 60 * T * 1e3) : new Date(b.valueOf() - 60 * T * 1e3) : new Date(N.valueOf());
|
|
9773
|
-
}, e.getRecDates = function(
|
|
9774
|
-
var w = typeof
|
|
9791
|
+
}, e.getRecDates = function(y, b) {
|
|
9792
|
+
var w = typeof y == "object" ? y : e.getEvent(y), E = [];
|
|
9775
9793
|
if (b = b || 100, !t(w))
|
|
9776
9794
|
return [{ start_date: w.start_date, end_date: w.end_date }];
|
|
9777
9795
|
if (w.deleted)
|
|
@@ -9780,72 +9798,72 @@ const gn = { active_links: function(e) {
|
|
|
9780
9798
|
for (var N = [], T = 0; T < E.length; T++)
|
|
9781
9799
|
E[T].deleted || N.push({ start_date: E[T].start_date, end_date: E[T].end_date });
|
|
9782
9800
|
return N;
|
|
9783
|
-
}, e.getEvents = function(
|
|
9801
|
+
}, e.getEvents = function(y, b) {
|
|
9784
9802
|
var w = [];
|
|
9785
9803
|
const E = p();
|
|
9786
9804
|
for (var N in this._events) {
|
|
9787
9805
|
var T = this._events[N];
|
|
9788
9806
|
if (!T.recurring_event_id)
|
|
9789
|
-
if (
|
|
9807
|
+
if (y && b && T.start_date < b && T.end_date > y)
|
|
9790
9808
|
if (t(T)) {
|
|
9791
9809
|
var A = [];
|
|
9792
|
-
this.repeat_date(T, A, !0,
|
|
9793
|
-
C.start_date < b && C.end_date >
|
|
9810
|
+
this.repeat_date(T, A, !0, y, b, void 0, E), A.forEach(function(C) {
|
|
9811
|
+
C.start_date < b && C.end_date > y && w.push(C);
|
|
9794
9812
|
});
|
|
9795
9813
|
} else
|
|
9796
9814
|
this._is_virtual_event(T.id) || w.push(T);
|
|
9797
9815
|
else
|
|
9798
|
-
|
|
9816
|
+
y || b || this._is_virtual_event(T.id) || w.push(T);
|
|
9799
9817
|
}
|
|
9800
9818
|
return w;
|
|
9801
|
-
}, e._copy_dummy = function(
|
|
9819
|
+
}, e._copy_dummy = function(y) {
|
|
9802
9820
|
var b = new Date(this.start_date), w = new Date(this.end_date);
|
|
9803
9821
|
this.start_date = b, this.end_date = w, this.duration = this.rrule = null;
|
|
9804
9822
|
}, e.config.include_end_by = !1, e.config.lightbox_recurring = "ask", e.config.recurring_workdays = [z.MO.weekday, z.TU.weekday, z.WE.weekday, z.TH.weekday, z.FR.weekday], e.config.repeat_date = "%m.%d.%Y", e.config.lightbox.sections = [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "recurring", type: "recurring", map_to: "rrule" }, { name: "time", height: 72, type: "time", map_to: "auto" }], e.attachEvent("onClearAll", function() {
|
|
9805
9823
|
e._rec_markers = {}, e._rec_markers_pull = {}, e._rec_temp = [];
|
|
9806
9824
|
});
|
|
9807
|
-
const v = { 0: "SU", 1: "MO", 2: "TU", 3: "WE", 4: "TH", 5: "FR", 6: "SA" },
|
|
9808
|
-
function x(
|
|
9809
|
-
const w =
|
|
9825
|
+
const v = { 0: "SU", 1: "MO", 2: "TU", 3: "WE", 4: "TH", 5: "FR", 6: "SA" }, g = { 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0 };
|
|
9826
|
+
function x(y, b) {
|
|
9827
|
+
const w = y.querySelector("[name='repeat_interval_value']");
|
|
9810
9828
|
w && (w.value = (b ? b.interval : 1) || 1);
|
|
9811
9829
|
}
|
|
9812
|
-
function D(
|
|
9813
|
-
switch (
|
|
9830
|
+
function D(y) {
|
|
9831
|
+
switch (y) {
|
|
9814
9832
|
case 1:
|
|
9815
9833
|
case 31:
|
|
9816
|
-
return `${
|
|
9834
|
+
return `${y}st`;
|
|
9817
9835
|
case 2:
|
|
9818
|
-
return `${
|
|
9836
|
+
return `${y}nd`;
|
|
9819
9837
|
case 3:
|
|
9820
|
-
return `${
|
|
9838
|
+
return `${y}rd`;
|
|
9821
9839
|
default:
|
|
9822
|
-
return `${
|
|
9840
|
+
return `${y}th`;
|
|
9823
9841
|
}
|
|
9824
9842
|
}
|
|
9825
|
-
e.templates.repeat_monthly_date = function(
|
|
9826
|
-
return `Every ${D(
|
|
9827
|
-
}, e.templates.repeat_monthly_weekday = function(
|
|
9828
|
-
const w = u(
|
|
9843
|
+
e.templates.repeat_monthly_date = function(y, b) {
|
|
9844
|
+
return `Every ${D(y.getDate())}`;
|
|
9845
|
+
}, e.templates.repeat_monthly_weekday = function(y, b) {
|
|
9846
|
+
const w = u(y);
|
|
9829
9847
|
return `Every ${D(w.dayNumber)} ${e.locale.date.day_full[w.dayOfWeek]}`;
|
|
9830
|
-
}, e.templates.repeat_yearly_month_date = function(
|
|
9831
|
-
const w =
|
|
9848
|
+
}, e.templates.repeat_yearly_month_date = function(y, b) {
|
|
9849
|
+
const w = y.getDate(), E = e.locale.date.month_full[y.getMonth()];
|
|
9832
9850
|
return `Every ${D(w)} day of ${E}`;
|
|
9833
|
-
}, e.templates.repeat_yearly_month_weekday = function(
|
|
9834
|
-
const w = u(
|
|
9851
|
+
}, e.templates.repeat_yearly_month_weekday = function(y, b) {
|
|
9852
|
+
const w = u(y), E = e.locale.date.month_full[y.getMonth()];
|
|
9835
9853
|
return `Every ${D(w.dayNumber)} ${e.locale.date.day_full[w.dayOfWeek]} of ${E}`;
|
|
9836
9854
|
};
|
|
9837
|
-
const k = { MONTHLY: function(
|
|
9838
|
-
return { rrule: { freq: z.MONTHLY, interval: 1, bymonthday:
|
|
9839
|
-
}, WEEKLY: function(
|
|
9840
|
-
let b =
|
|
9855
|
+
const k = { MONTHLY: function(y) {
|
|
9856
|
+
return { rrule: { freq: z.MONTHLY, interval: 1, bymonthday: y.start.getDate() }, until: new Date(9999, 1, 1) };
|
|
9857
|
+
}, WEEKLY: function(y) {
|
|
9858
|
+
let b = y.start.getDay() - 1;
|
|
9841
9859
|
return b == -1 && (b = 6), { rrule: { freq: z.WEEKLY, interval: 1, byweekday: [b] }, until: new Date(9999, 1, 1) };
|
|
9842
|
-
}, DAILY: function(
|
|
9860
|
+
}, DAILY: function(y) {
|
|
9843
9861
|
return { rrule: { freq: z.DAILY, interval: 1 }, until: new Date(9999, 1, 1) };
|
|
9844
|
-
}, YEARLY: function(
|
|
9845
|
-
return { rrule: { freq: z.YEARLY, bymonth:
|
|
9846
|
-
}, WORKDAYS: function(
|
|
9862
|
+
}, YEARLY: function(y) {
|
|
9863
|
+
return { rrule: { freq: z.YEARLY, bymonth: y.start.getMonth() + 1, interval: 1, bymonthday: y.start.getDate() }, until: new Date(9999, 1, 1) };
|
|
9864
|
+
}, WORKDAYS: function(y) {
|
|
9847
9865
|
return { rrule: { freq: z.WEEKLY, interval: 1, byweekday: e.config.recurring_workdays }, until: new Date(9999, 1, 1) };
|
|
9848
|
-
}, CUSTOM: function(
|
|
9866
|
+
}, CUSTOM: function(y, b) {
|
|
9849
9867
|
const w = {}, E = b.querySelector('[name="repeat_interval_unit"]').value, N = Math.max(1, b.querySelector('[name="repeat_interval_value"]').value), T = b.querySelector('[name="dhx_custom_month_option"]') ? b.querySelector('[name="dhx_custom_month_option"]').value : null, A = b.querySelector('[name="dhx_custom_year_option"]') ? b.querySelector('[name="dhx_custom_year_option"]').value : null;
|
|
9850
9868
|
let C, $;
|
|
9851
9869
|
switch (w.interval = N, E) {
|
|
@@ -9875,10 +9893,10 @@ const gn = { active_links: function(e) {
|
|
|
9875
9893
|
});
|
|
9876
9894
|
break;
|
|
9877
9895
|
case "MONTHLY":
|
|
9878
|
-
w.freq = z.MONTHLY, T === "month_date" ? w.bymonthday =
|
|
9896
|
+
w.freq = z.MONTHLY, T === "month_date" ? w.bymonthday = y.start.getDate() : ($ = y.start.getDay() - 1, $ == -1 && ($ = 6), w.byweekday = [$], w.bysetpos = u(y.start).dayNumber);
|
|
9879
9897
|
break;
|
|
9880
9898
|
case "YEARLY":
|
|
9881
|
-
w.freq = z.YEARLY, w.bymonth =
|
|
9899
|
+
w.freq = z.YEARLY, w.bymonth = y.start.getMonth() + 1, A == "month_date" ? w.bymonthday = y.start.getDate() : ($ = y.start.getDay() - 1, $ == -1 && ($ = 6), w.byweekday = [$], w.bysetpos = u(y.start).dayNumber);
|
|
9882
9900
|
}
|
|
9883
9901
|
const H = e.date.str_to_date("%Y-%m-%d");
|
|
9884
9902
|
let O = new Date(9999, 1, 1);
|
|
@@ -9886,20 +9904,20 @@ const gn = { active_links: function(e) {
|
|
|
9886
9904
|
return I && I.value === "ON" ? (O = H(b.querySelector('[name="dhx_form_repeat_ends_ondate"]').value), w.until = new Date(O)) : I && I.value === "AFTER" && (w.count = Math.max(1, b.querySelector('[name="dhx_form_repeat_ends_after"]').value)), { rrule: w, until: O };
|
|
9887
9905
|
}, NEVER: function() {
|
|
9888
9906
|
} };
|
|
9889
|
-
function S(
|
|
9907
|
+
function S(y, b, w) {
|
|
9890
9908
|
(function(E, N) {
|
|
9891
9909
|
x(E, N);
|
|
9892
|
-
})(
|
|
9910
|
+
})(y, b), function(E, N, T) {
|
|
9893
9911
|
if (x(E, N), E.querySelectorAll(".dhx_form_repeat_custom_week input").forEach((A) => A.checked = !1), N && N.byweekday)
|
|
9894
9912
|
N.byweekday.forEach((A) => {
|
|
9895
|
-
const C =
|
|
9913
|
+
const C = g[A.weekday], $ = v[C], H = E.querySelector(`.dhx_form_repeat_custom_week input[value="${$}"]`);
|
|
9896
9914
|
H && (H.checked = !0);
|
|
9897
9915
|
});
|
|
9898
9916
|
else {
|
|
9899
9917
|
const A = v[T.start_date.getDay()], C = E.querySelector(`.dhx_form_repeat_custom_week input[value="${A}"]`);
|
|
9900
9918
|
C && (C.checked = !0);
|
|
9901
9919
|
}
|
|
9902
|
-
}(
|
|
9920
|
+
}(y, b, w), function(E, N, T) {
|
|
9903
9921
|
x(E, N);
|
|
9904
9922
|
const A = E.querySelector('.dhx_form_repeat_custom_month [value="month_date"]'), C = E.querySelector('.dhx_form_repeat_custom_month [value="month_nth_weekday"]');
|
|
9905
9923
|
if (A && C) {
|
|
@@ -9907,38 +9925,38 @@ const gn = { active_links: function(e) {
|
|
|
9907
9925
|
const $ = E.querySelector('[name="dhx_custom_month_option"]');
|
|
9908
9926
|
$ && ($.value = !N || !N.bysetpos || N.byweekday && N.byweekday.length ? "month_nth_weekday" : "month_date");
|
|
9909
9927
|
}
|
|
9910
|
-
}(
|
|
9928
|
+
}(y, b, w), function(E, N, T) {
|
|
9911
9929
|
const A = E.querySelector('.dhx_form_repeat_custom_year [value="month_date"]'), C = E.querySelector('.dhx_form_repeat_custom_year [value="month_nth_weekday"]');
|
|
9912
9930
|
A && C && (A.innerText = e.templates.repeat_yearly_month_date(T.start_date, T), C.innerText = e.templates.repeat_yearly_month_weekday(T.start_date, T), N && (!N.bysetpos || N.byweekday && N.byweekday.length) ? E.querySelector('[name="dhx_custom_year_option"]').value = "month_nth_weekday" : E.querySelector('[name="dhx_custom_year_option"]').value = "month_date");
|
|
9913
|
-
}(
|
|
9931
|
+
}(y, b, w), function(E, N, T) {
|
|
9914
9932
|
const A = E.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_after"]'), C = E.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_ondate"]'), $ = E.querySelector("[name='dhx_custom_repeat_ends']");
|
|
9915
9933
|
if (A && C && $) {
|
|
9916
9934
|
A.value = 1;
|
|
9917
9935
|
let H = e.date.date_to_str("%Y-%m-%d");
|
|
9918
9936
|
e.config.repeat_date_of_end || (e.config.repeat_date_of_end = H(e.date.add(e._currentDate(), 30, "day"))), C.value = e.config.repeat_date_of_end, N && N.count ? ($.value = "AFTER", A.value = N.count) : T._end_date && T._end_date.getFullYear() !== 9999 ? ($.value = "ON", C.value = H(T._end_date)) : $.value = "NEVER", $.dispatchEvent(new Event("change"));
|
|
9919
9937
|
}
|
|
9920
|
-
}(
|
|
9938
|
+
}(y, b, w);
|
|
9921
9939
|
}
|
|
9922
|
-
function M(
|
|
9940
|
+
function M(y) {
|
|
9923
9941
|
for (let b = 0; b < e.config.lightbox.sections.length; b++) {
|
|
9924
9942
|
let w = e.config.lightbox.sections[b];
|
|
9925
|
-
if (w.type ===
|
|
9943
|
+
if (w.type === y)
|
|
9926
9944
|
return e.formSection(w.name);
|
|
9927
9945
|
}
|
|
9928
9946
|
return null;
|
|
9929
9947
|
}
|
|
9930
|
-
e.form_blocks.recurring = { _get_node: function(
|
|
9931
|
-
if (typeof
|
|
9932
|
-
let b = e._lightbox.querySelector(`#${
|
|
9933
|
-
b || (b = document.getElementById(
|
|
9948
|
+
e.form_blocks.recurring = { _get_node: function(y) {
|
|
9949
|
+
if (typeof y == "string") {
|
|
9950
|
+
let b = e._lightbox.querySelector(`#${y}`);
|
|
9951
|
+
b || (b = document.getElementById(y)), y = b;
|
|
9934
9952
|
}
|
|
9935
|
-
return
|
|
9936
|
-
}, _outer_html: function(
|
|
9937
|
-
return
|
|
9953
|
+
return y.style.display == "none" && (y.style.display = ""), y;
|
|
9954
|
+
}, _outer_html: function(y) {
|
|
9955
|
+
return y.outerHTML || (b = y, (E = document.createElement("div")).appendChild(b.cloneNode(!0)), w = E.innerHTML, E = null, w);
|
|
9938
9956
|
var b, w, E;
|
|
9939
|
-
}, render: function(
|
|
9940
|
-
if (
|
|
9941
|
-
let w = e.form_blocks.recurring, E = w._get_node(
|
|
9957
|
+
}, render: function(y) {
|
|
9958
|
+
if (y.form) {
|
|
9959
|
+
let w = e.form_blocks.recurring, E = w._get_node(y.form), N = w._outer_html(E);
|
|
9942
9960
|
return E.style.display = "none", N;
|
|
9943
9961
|
}
|
|
9944
9962
|
let b = e.locale.labels;
|
|
@@ -10012,7 +10030,7 @@ const gn = { active_links: function(e) {
|
|
|
10012
10030
|
|
|
10013
10031
|
</div>
|
|
10014
10032
|
</div>`;
|
|
10015
|
-
}, _init_set_value: function(
|
|
10033
|
+
}, _init_set_value: function(y, b, w) {
|
|
10016
10034
|
function E($) {
|
|
10017
10035
|
$ && $.classList.add("dhx_hidden");
|
|
10018
10036
|
}
|
|
@@ -10020,17 +10038,17 @@ const gn = { active_links: function(e) {
|
|
|
10020
10038
|
$ && $.classList.remove("dhx_hidden");
|
|
10021
10039
|
}
|
|
10022
10040
|
e.form_blocks.recurring._ds = { start: w.start_date, end: w.end_date };
|
|
10023
|
-
const T =
|
|
10041
|
+
const T = y.querySelector(".dhx_form_repeat_pattern select");
|
|
10024
10042
|
T && T.addEventListener("change", function() {
|
|
10025
10043
|
(function($) {
|
|
10026
|
-
const H =
|
|
10044
|
+
const H = y.querySelector(".dhx_form_repeat_custom");
|
|
10027
10045
|
$ === "CUSTOM" ? N(H) : E(H);
|
|
10028
10046
|
})(this.value);
|
|
10029
10047
|
});
|
|
10030
|
-
const A =
|
|
10048
|
+
const A = y.querySelector(".dhx_form_repeat_custom_interval [name='repeat_interval_unit']");
|
|
10031
10049
|
A && A.addEventListener("change", function() {
|
|
10032
10050
|
(function($) {
|
|
10033
|
-
const H = { weekly:
|
|
10051
|
+
const H = { weekly: y.querySelector(".dhx_form_repeat_custom_week"), monthly: y.querySelector(".dhx_form_repeat_custom_month"), yearly: y.querySelector(".dhx_form_repeat_custom_year") };
|
|
10034
10052
|
switch ($) {
|
|
10035
10053
|
case "DAILY":
|
|
10036
10054
|
E(H.weekly), E(H.monthly), E(H.yearly);
|
|
@@ -10046,10 +10064,10 @@ const gn = { active_links: function(e) {
|
|
|
10046
10064
|
}
|
|
10047
10065
|
})(this.value);
|
|
10048
10066
|
});
|
|
10049
|
-
const C =
|
|
10067
|
+
const C = y.querySelector(".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']");
|
|
10050
10068
|
C && C.addEventListener("change", function() {
|
|
10051
10069
|
(function($) {
|
|
10052
|
-
const H = { after:
|
|
10070
|
+
const H = { after: y.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after"), on: y.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on") };
|
|
10053
10071
|
switch ($) {
|
|
10054
10072
|
case "NEVER":
|
|
10055
10073
|
E(H.after), E(H.on);
|
|
@@ -10063,18 +10081,18 @@ const gn = { active_links: function(e) {
|
|
|
10063
10081
|
})(this.value);
|
|
10064
10082
|
}), e._lightbox._rec_init_done = !0;
|
|
10065
10083
|
}, button_click: function() {
|
|
10066
|
-
}, set_value: function(
|
|
10084
|
+
}, set_value: function(y, b, w) {
|
|
10067
10085
|
let E = e.form_blocks.recurring;
|
|
10068
|
-
e._lightbox._rec_init_done || E._init_set_value(
|
|
10086
|
+
e._lightbox._rec_init_done || E._init_set_value(y, b, w), y.open = !w.rrule, y.blocked = this._is_modified_occurrence(w);
|
|
10069
10087
|
let N = E._ds;
|
|
10070
10088
|
if (N.start = w.start_date, N.end = w._end_date, w.rrule) {
|
|
10071
10089
|
const A = ke(w.rrule);
|
|
10072
|
-
S(
|
|
10090
|
+
S(y, A.origOptions, w);
|
|
10073
10091
|
const C = function($, H) {
|
|
10074
10092
|
const O = $.options, I = O.until || H;
|
|
10075
10093
|
return O.count || I && I.getFullYear() !== 9999 ? "CUSTOM" : O.freq !== z.DAILY || O.interval !== 1 || O.byweekday ? O.freq !== z.WEEKLY || O.interval !== 1 || O.byweekday ? O.freq !== z.MONTHLY || O.interval !== 1 || O.bysetpos ? O.freq !== z.YEARLY || O.interval !== 1 || O.bysetpos ? O.freq === z.DAILY && O.byweekday && O.byweekday.length === e.config.recurring_workdays.length && O.byweekday.includes(z.MO) && O.byweekday.includes(z.TU) && O.byweekday.includes(z.WE) && O.byweekday.includes(z.TH) && O.byweekday.includes(z.FR) ? "WORKDAYS" : "CUSTOM" : "YEARLY" : "MONTHLY" : "WEEKLY" : "DAILY";
|
|
10076
10094
|
}(A, w._end_date);
|
|
10077
|
-
if (
|
|
10095
|
+
if (y.querySelector(".dhx_form_repeat_pattern select").value = C, C === "CUSTOM") {
|
|
10078
10096
|
let $;
|
|
10079
10097
|
switch (A.origOptions.freq) {
|
|
10080
10098
|
case z.DAILY:
|
|
@@ -10089,18 +10107,18 @@ const gn = { active_links: function(e) {
|
|
|
10089
10107
|
case z.YEARLY:
|
|
10090
10108
|
$ = "YEARLY";
|
|
10091
10109
|
}
|
|
10092
|
-
$ && (
|
|
10110
|
+
$ && (y.querySelector('[name="repeat_interval_unit"]').value = $, y.querySelector('[name="repeat_interval_unit"]').dispatchEvent(new Event("change")));
|
|
10093
10111
|
}
|
|
10094
10112
|
} else {
|
|
10095
|
-
S(
|
|
10096
|
-
const A =
|
|
10113
|
+
S(y, null, w);
|
|
10114
|
+
const A = y.querySelector(".dhx_form_repeat_pattern select");
|
|
10097
10115
|
A && (A.value = "NEVER");
|
|
10098
10116
|
}
|
|
10099
|
-
const T =
|
|
10117
|
+
const T = y.querySelector(".dhx_form_repeat_pattern select");
|
|
10100
10118
|
T && T.dispatchEvent(new Event("change"));
|
|
10101
|
-
}, get_value: function(
|
|
10102
|
-
const w =
|
|
10103
|
-
if (
|
|
10119
|
+
}, get_value: function(y, b) {
|
|
10120
|
+
const w = y.querySelector(".dhx_form_repeat_pattern select");
|
|
10121
|
+
if (y.blocked || w && w.value === "NEVER")
|
|
10104
10122
|
b.rrule = b.rrule = "", b._end_date = b.end_date;
|
|
10105
10123
|
else {
|
|
10106
10124
|
let E = e.form_blocks.recurring._ds, N = {};
|
|
@@ -10111,11 +10129,11 @@ const gn = { active_links: function(e) {
|
|
|
10111
10129
|
`));
|
|
10112
10130
|
return C;
|
|
10113
10131
|
})().getValue(N), E.start = N.start_date;
|
|
10114
|
-
const T = w ? w.value : "CUSTOM", A = k[T](E,
|
|
10132
|
+
const T = w ? w.value : "CUSTOM", A = k[T](E, y);
|
|
10115
10133
|
b.rrule = new z(A.rrule).toString().replace("RRULE:", ""), E.end = A.until, b.duration = Math.floor((N.end_date - N.start_date) / 1e3), E._start ? (b.start_date = new Date(E.start), b._start_date = new Date(E.start), E._start = !1) : b._start_date = null, b._end_date = E.end;
|
|
10116
10134
|
}
|
|
10117
10135
|
return b.rrule;
|
|
10118
|
-
}, focus: function(
|
|
10136
|
+
}, focus: function(y) {
|
|
10119
10137
|
} };
|
|
10120
10138
|
}, recurring_legacy: function(e) {
|
|
10121
10139
|
function i() {
|
|
@@ -10194,9 +10212,9 @@ const gn = { active_links: function(e) {
|
|
|
10194
10212
|
var a = e.form_blocks.recurring, d = a._get_node_value, l = a._set_node_value;
|
|
10195
10213
|
e.form_blocks.recurring._ds = { start: _.start_date, end: _._end_date };
|
|
10196
10214
|
var c = e.date.str_to_date(e.config.repeat_date, !1, !0), f = e.date.date_to_str(e.config.repeat_date), m = n.getElementsByTagName("FORM")[0], p = {};
|
|
10197
|
-
function h(
|
|
10198
|
-
for (var b = 0; b <
|
|
10199
|
-
var w =
|
|
10215
|
+
function h(y) {
|
|
10216
|
+
for (var b = 0; b < y.length; b++) {
|
|
10217
|
+
var w = y[b];
|
|
10200
10218
|
if (w.name)
|
|
10201
10219
|
if (p[w.name])
|
|
10202
10220
|
if (p[w.name].nodeType) {
|
|
@@ -10213,14 +10231,14 @@ const gn = { active_links: function(e) {
|
|
|
10213
10231
|
e.config.repeat_date_of_end = u(e.date.add(e._currentDate(), 30, "day"));
|
|
10214
10232
|
}
|
|
10215
10233
|
l(p, "date_of_end", e.config.repeat_date_of_end);
|
|
10216
|
-
var v = function(
|
|
10217
|
-
return e._lightbox.querySelector(`#${
|
|
10234
|
+
var v = function(y) {
|
|
10235
|
+
return e._lightbox.querySelector(`#${y}`) || { style: {} };
|
|
10218
10236
|
};
|
|
10219
|
-
function
|
|
10237
|
+
function g() {
|
|
10220
10238
|
v("dhx_repeat_day").style.display = "none", v("dhx_repeat_week").style.display = "none", v("dhx_repeat_month").style.display = "none", v("dhx_repeat_year").style.display = "none", v("dhx_repeat_" + this.value).style.display = "", e.setLightboxSize();
|
|
10221
10239
|
}
|
|
10222
|
-
function x(
|
|
10223
|
-
var w =
|
|
10240
|
+
function x(y, b) {
|
|
10241
|
+
var w = y.end;
|
|
10224
10242
|
if (w.length)
|
|
10225
10243
|
if (w[0].value && w[0].value != "on")
|
|
10226
10244
|
for (var E = 0; E < w.length; E++)
|
|
@@ -10242,9 +10260,9 @@ const gn = { active_links: function(e) {
|
|
|
10242
10260
|
else
|
|
10243
10261
|
w.value = b;
|
|
10244
10262
|
}
|
|
10245
|
-
e.form_blocks.recurring._get_repeat_code = function(
|
|
10263
|
+
e.form_blocks.recurring._get_repeat_code = function(y) {
|
|
10246
10264
|
var b = [d(p, "repeat")];
|
|
10247
|
-
for (D[b[0]](b,
|
|
10265
|
+
for (D[b[0]](b, y); b.length < 5; )
|
|
10248
10266
|
b.push("");
|
|
10249
10267
|
var w = "", E = function(N) {
|
|
10250
10268
|
var T = N.end;
|
|
@@ -10256,45 +10274,45 @@ const gn = { active_links: function(e) {
|
|
|
10256
10274
|
return T.value;
|
|
10257
10275
|
return "no";
|
|
10258
10276
|
}(p);
|
|
10259
|
-
return E == "no" ? (
|
|
10277
|
+
return E == "no" ? (y.end = new Date(9999, 1, 1), w = "no") : E == "date_of_end" ? y.end = function(N) {
|
|
10260
10278
|
var T = c(N);
|
|
10261
10279
|
return e.config.include_end_by && (T = e.date.add(T, 1, "day")), T;
|
|
10262
|
-
}(d(p, "date_of_end")) : (e.transpose_type(b.join("_")), w = Math.max(1, d(p, "occurences_count")),
|
|
10280
|
+
}(d(p, "date_of_end")) : (e.transpose_type(b.join("_")), w = Math.max(1, d(p, "occurences_count")), y.end = e.date["add_" + b.join("_")](new Date(y.start), w + 0, { start_date: y.start }) || y.start), b.join("_") + "#" + w;
|
|
10263
10281
|
};
|
|
10264
|
-
var D = { month: function(
|
|
10282
|
+
var D = { month: function(y, b) {
|
|
10265
10283
|
var w = e.form_blocks.recurring._get_node_value, E = e.form_blocks.recurring._get_node_numeric_value;
|
|
10266
|
-
w(p, "month_type") == "d" ? (
|
|
10267
|
-
}, week: function(
|
|
10284
|
+
w(p, "month_type") == "d" ? (y.push(Math.max(1, E(p, "month_count"))), b.start.setDate(w(p, "month_day"))) : (y.push(Math.max(1, E(p, "month_count2"))), y.push(w(p, "month_day2")), y.push(Math.max(1, E(p, "month_week2"))), e.config.repeat_precise || b.start.setDate(1)), b._start = !0;
|
|
10285
|
+
}, week: function(y, b) {
|
|
10268
10286
|
var w = e.form_blocks.recurring._get_node_value, E = e.form_blocks.recurring._get_node_numeric_value;
|
|
10269
|
-
|
|
10287
|
+
y.push(Math.max(1, E(p, "week_count"))), y.push(""), y.push("");
|
|
10270
10288
|
for (var N = [], T = w(p, "week_day", !0), A = b.start.getDay(), C = !1, $ = 0; $ < T.length; $++)
|
|
10271
10289
|
N.push(T[$]), C = C || T[$] == A;
|
|
10272
|
-
N.length || (N.push(A), C = !0), N.sort(), e.config.repeat_precise ? C || (e.transpose_day_week(b.start, N, 1, 7), b._start = !0) : (b.start = e.date.week_start(b.start), b._start = !0),
|
|
10273
|
-
}, day: function(
|
|
10290
|
+
N.length || (N.push(A), C = !0), N.sort(), e.config.repeat_precise ? C || (e.transpose_day_week(b.start, N, 1, 7), b._start = !0) : (b.start = e.date.week_start(b.start), b._start = !0), y.push(N.join(","));
|
|
10291
|
+
}, day: function(y) {
|
|
10274
10292
|
var b = e.form_blocks.recurring._get_node_value, w = e.form_blocks.recurring._get_node_numeric_value;
|
|
10275
|
-
b(p, "day_type") == "d" ?
|
|
10276
|
-
}, year: function(
|
|
10293
|
+
b(p, "day_type") == "d" ? y.push(Math.max(1, w(p, "day_count"))) : (y.push("week"), y.push(1), y.push(""), y.push(""), y.push(e.config.recurring_workdays.join(",")), y.splice(0, 1));
|
|
10294
|
+
}, year: function(y, b) {
|
|
10277
10295
|
var w = e.form_blocks.recurring._get_node_value;
|
|
10278
|
-
w(p, "year_type") == "d" ? (
|
|
10279
|
-
} }, k = { week: function(
|
|
10296
|
+
w(p, "year_type") == "d" ? (y.push("1"), b.start.setMonth(0), b.start.setDate(w(p, "year_day")), b.start.setMonth(w(p, "year_month"))) : (y.push("1"), y.push(w(p, "year_day2")), y.push(w(p, "year_week2")), b.start.setDate(1), b.start.setMonth(w(p, "year_month2"))), b._start = !0;
|
|
10297
|
+
} }, k = { week: function(y, b) {
|
|
10280
10298
|
var w = e.form_blocks.recurring._set_node_value;
|
|
10281
|
-
w(p, "week_count",
|
|
10282
|
-
for (var E =
|
|
10299
|
+
w(p, "week_count", y[1]);
|
|
10300
|
+
for (var E = y[4].split(","), N = {}, T = 0; T < E.length; T++)
|
|
10283
10301
|
N[E[T]] = !0;
|
|
10284
10302
|
w(p, "week_day", N);
|
|
10285
|
-
}, month: function(
|
|
10303
|
+
}, month: function(y, b) {
|
|
10286
10304
|
var w = e.form_blocks.recurring._set_node_value;
|
|
10287
|
-
|
|
10288
|
-
}, day: function(
|
|
10305
|
+
y[2] === "" ? (w(p, "month_type", "d"), w(p, "month_count", y[1]), w(p, "month_day", b.start.getDate())) : (w(p, "month_type", "w"), w(p, "month_count2", y[1]), w(p, "month_week2", y[3]), w(p, "month_day2", y[2]));
|
|
10306
|
+
}, day: function(y, b) {
|
|
10289
10307
|
var w = e.form_blocks.recurring._set_node_value;
|
|
10290
|
-
w(p, "day_type", "d"), w(p, "day_count",
|
|
10291
|
-
}, year: function(
|
|
10308
|
+
w(p, "day_type", "d"), w(p, "day_count", y[1]);
|
|
10309
|
+
}, year: function(y, b) {
|
|
10292
10310
|
var w = e.form_blocks.recurring._set_node_value;
|
|
10293
|
-
|
|
10311
|
+
y[2] === "" ? (w(p, "year_type", "d"), w(p, "year_day", b.start.getDate()), w(p, "year_month", b.start.getMonth())) : (w(p, "year_type", "w"), w(p, "year_week2", y[3]), w(p, "year_day2", y[2]), w(p, "year_month2", b.start.getMonth()));
|
|
10294
10312
|
} };
|
|
10295
|
-
e.form_blocks.recurring._set_repeat_code = function(
|
|
10296
|
-
var w = e.form_blocks.recurring._set_node_value, E =
|
|
10297
|
-
switch (
|
|
10313
|
+
e.form_blocks.recurring._set_repeat_code = function(y, b) {
|
|
10314
|
+
var w = e.form_blocks.recurring._set_node_value, E = y.split("#");
|
|
10315
|
+
switch (y = E[0].split("_"), k[y[0]](y, b), E[1]) {
|
|
10298
10316
|
case "no":
|
|
10299
10317
|
x(p, "no");
|
|
10300
10318
|
break;
|
|
@@ -10306,13 +10324,13 @@ const gn = { active_links: function(e) {
|
|
|
10306
10324
|
default:
|
|
10307
10325
|
x(p, "occurences_count"), w(p, "occurences_count", E[1]);
|
|
10308
10326
|
}
|
|
10309
|
-
w(p, "repeat",
|
|
10310
|
-
var T = e.form_blocks.recurring._get_form_node(p, "repeat",
|
|
10327
|
+
w(p, "repeat", y[0]);
|
|
10328
|
+
var T = e.form_blocks.recurring._get_form_node(p, "repeat", y[0]);
|
|
10311
10329
|
T.nodeName == "SELECT" ? (T.dispatchEvent(new Event("change")), T.dispatchEvent(new MouseEvent("click"))) : T.dispatchEvent(new MouseEvent("click"));
|
|
10312
10330
|
};
|
|
10313
10331
|
for (var S = 0; S < m.elements.length; S++) {
|
|
10314
10332
|
var M = m.elements[S];
|
|
10315
|
-
M.name === "repeat" && (M.nodeName != "SELECT" || M.$_eventAttached ? M.$_eventAttached || (M.$_eventAttached = !0, M.addEventListener("click",
|
|
10333
|
+
M.name === "repeat" && (M.nodeName != "SELECT" || M.$_eventAttached ? M.$_eventAttached || (M.$_eventAttached = !0, M.addEventListener("click", g)) : (M.$_eventAttached = !0, M.addEventListener("change", g)));
|
|
10316
10334
|
}
|
|
10317
10335
|
e._lightbox._rec_init_done = !0;
|
|
10318
10336
|
}, set_value: function(n, o, _) {
|
|
@@ -10525,10 +10543,10 @@ const gn = { active_links: function(e) {
|
|
|
10525
10543
|
return null;
|
|
10526
10544
|
var u = new Date(f.valueOf());
|
|
10527
10545
|
u.setDate(1), u.setMonth(u.getMonth() + m * d);
|
|
10528
|
-
var v = u.getMonth(),
|
|
10546
|
+
var v = u.getMonth(), g = u.getFullYear();
|
|
10529
10547
|
u.setDate(p.start_date.getDate()), _[3] && e.date.day_week(u, _[2], _[3]);
|
|
10530
10548
|
var x = e.config.recurring_overflow_instances;
|
|
10531
|
-
return u.getMonth() != v && x != "none" && (u = x === "lastDay" ? new Date(
|
|
10549
|
+
return u.getMonth() != v && x != "none" && (u = x === "lastDay" ? new Date(g, v + 1, 0, u.getHours(), u.getMinutes(), u.getSeconds(), u.getMilliseconds()) : e.date[a](new Date(g, v + 1, 0), m || 1, p, h)), u;
|
|
10532
10550
|
});
|
|
10533
10551
|
}
|
|
10534
10552
|
}, e.repeat_date = function(n, o, _, a, d, l) {
|
|
@@ -10542,10 +10560,10 @@ const gn = { active_links: function(e) {
|
|
|
10542
10560
|
if (u)
|
|
10543
10561
|
_ && (u.rec_type != "none" && p++, o.push(u));
|
|
10544
10562
|
else {
|
|
10545
|
-
var v = new Date(f.valueOf() + 1e3 * n.event_length),
|
|
10546
|
-
if (
|
|
10563
|
+
var v = new Date(f.valueOf() + 1e3 * n.event_length), g = this._copy_event(n);
|
|
10564
|
+
if (g.text = n.text, g.start_date = f, g.event_pid = n.id, g.id = n.id + "#" + Math.round(h / 1e3), g.end_date = v, g.end_date = e._fix_daylight_saving_date(g.start_date, g.end_date, n, f, g.end_date), g._timed = this.isOneDayEvent(g), !g._timed && !this._table_view && !this.config.multi_day)
|
|
10547
10565
|
return;
|
|
10548
|
-
o.push(
|
|
10566
|
+
o.push(g), _ || (this._events[g.id] = g, this._rec_temp.push(g)), p++;
|
|
10549
10567
|
}
|
|
10550
10568
|
f = this.date["add_" + n.rec_pattern](f, 1, n);
|
|
10551
10569
|
}
|
|
@@ -10763,9 +10781,9 @@ END:VCALENDAR`;
|
|
|
10763
10781
|
this._tooltip.innerHTML = "";
|
|
10764
10782
|
} else {
|
|
10765
10783
|
var c = this._tooltip = document.createElement("div");
|
|
10766
|
-
c.className = "dhx_year_tooltip", this.config.rtl && (c.className += " dhx_tooltip_rtl"), document.body.appendChild(c), c.addEventListener("click", e._click.dhx_cal_data), c.addEventListener("click", function(
|
|
10767
|
-
if (
|
|
10768
|
-
const x =
|
|
10784
|
+
c.className = "dhx_year_tooltip", this.config.rtl && (c.className += " dhx_tooltip_rtl"), document.body.appendChild(c), c.addEventListener("click", e._click.dhx_cal_data), c.addEventListener("click", function(g) {
|
|
10785
|
+
if (g.target.closest(`[${e.config.event_attribute}]`)) {
|
|
10786
|
+
const x = g.target.closest(`[${e.config.event_attribute}]`).getAttribute(e.config.event_attribute);
|
|
10769
10787
|
e.showLightbox(x);
|
|
10770
10788
|
}
|
|
10771
10789
|
});
|