@daypilot/daypilot-lite-angular 3.28.0 → 3.30.0
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/esm2020/lib/core/daypilot-core.mjs +1005 -877
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +1148 -975
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +1004 -876
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/lib/core/daypilot-core.d.ts +3 -0
- package/package.json +2 -2
|
@@ -130,7 +130,7 @@ DayPilot Lite
|
|
|
130
130
|
Copyright (c) 2005 - 2024 Annpoint s.r.o.
|
|
131
131
|
https://www.daypilot.org/
|
|
132
132
|
Licensed under Apache Software License 2.0
|
|
133
|
-
Version: 2024.4.
|
|
133
|
+
Version: 2024.4.622-lite
|
|
134
134
|
*/
|
|
135
135
|
var DayPilot = {};
|
|
136
136
|
if ("undefined" == typeof DayPilot)
|
|
@@ -233,7 +233,7 @@ if (function () {
|
|
|
233
233
|
if (e.hasOwnProperty(i)) {
|
|
234
234
|
var a = {};
|
|
235
235
|
a.key = i, a.val = e[i], t.push(a);
|
|
236
|
-
} return t; }, DayPilot.Util.replaceCharAt = function (e, t, i) { return e.substr(0, t) + i + e.substr(t + i.length); }, DayPilot.Util.isNullOrUndefined = function (e) { return null === e || "undefined" == typeof e; }, DayPilot.Util.escapeHtml = function (e) { var t = document.createElement("div"); return t.innerText = e, t.innerHTML; }, DayPilot.Util.escapeTextHtml = function (e, t) { return DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : DayPilot.Util.escapeHtml(e) : t; }, DayPilot.Util.overlaps = function (e, t, i, a) { return !(t <= i || e >= a); }, DayPilot.Areas = {}, DayPilot.Areas.attach = function (e, t, i) { var i = i || {}, n = i.areas, o = i.allowed || function () { return !0; }, r = i.offsetX || 0; n = a(t, n), n && DayPilot.isArray(n) && 0 !== n.length && (DayPilot.re(e, "mousemove", function (a) { e.active || e.areasDisabled || !o() || DayPilot.Areas.showAreas(e, t, a, n, { "offsetX": r, "eventDiv": i.eventDiv }); }), DayPilot.re(e, "mouseleave", function (t) { DayPilot.Areas.hideAreas(e, t); }), n.forEach(function (a) { if (DayPilot.Areas.isVisible(a)) {
|
|
236
|
+
} return t; }, DayPilot.Util.replaceCharAt = function (e, t, i) { return e.substr(0, t) + i + e.substr(t + i.length); }, DayPilot.Util.isNullOrUndefined = function (e) { return null === e || "undefined" == typeof e; }, DayPilot.Util.escapeHtml = function (e) { var t = document.createElement("div"); return t.innerText = e, t.innerHTML; }, DayPilot.Util.escapeTextHtml = function (e, t) { return DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : DayPilot.Util.escapeHtml(e) : t; }, DayPilot.Util.overlaps = function (e, t, i, a) { return !(t <= i || e >= a); }, DayPilot.Util.isVueVNode = function (e) { return !!e && (DayPilot.isArray(e) ? DayPilot.Util.isVueVNode(e[0]) : e["__v_isVNode"]); }, DayPilot.Areas = {}, DayPilot.Areas.attach = function (e, t, i) { var i = i || {}, n = i.areas, o = i.allowed || function () { return !0; }, r = i.offsetX || 0; n = a(t, n), n && DayPilot.isArray(n) && 0 !== n.length && (DayPilot.re(e, "mousemove", function (a) { e.active || e.areasDisabled || !o() || DayPilot.Areas.showAreas(e, t, a, n, { "offsetX": r, "eventDiv": i.eventDiv }); }), DayPilot.re(e, "mouseleave", function (t) { DayPilot.Areas.hideAreas(e, t); }), n.forEach(function (a) { if (DayPilot.Areas.isVisible(a)) {
|
|
237
237
|
var n = DayPilot.Areas.createArea(e, t, a, { "offsetX": r, "eventDiv": i.eventDiv });
|
|
238
238
|
e.appendChild(n);
|
|
239
239
|
} })); }, DayPilot.Areas.disable = function (e) { e.areasDisabled = !0, Array.from(e.childNodes).filter(function (e) { return e.isActiveArea && !e.area.start; }).forEach(function (e) { e.c = e.style.display, e.style.display = "none"; }); }, DayPilot.Areas.enable = function (e) { e.areasDisabled = !1, Array.from(e.childNodes).filter(function (e) { return e.isActiveArea && !e.area.start; }).forEach(function (e) { e.c ? e.style.display = e.c : e.style.display = ""; }); }, DayPilot.Areas.remove = function (e) { var t = Array.from(e.childNodes).filter(function (e) { return e.isActiveArea; }); DayPilot.de(t); }, DayPilot.Areas.isVisible = function (e) { var t = e.visibility || e.v || "Visible"; return "Visible" === t || "TouchVisible" === t && !DayPilot.browser.hover; }, DayPilot.Areas.copy = function (e) { return DayPilot.isArray(e) ? e.map(function (e) { return DayPilot.Util.copyProps(e, {}); }) : []; };
|
|
@@ -261,9 +261,9 @@ if (function () {
|
|
|
261
261
|
function r(e, t, i, a) {
|
|
262
262
|
DayPilot.Menu && DayPilot.Menu.touchPosition(a);
|
|
263
263
|
var n = i.contextMenu || i.menu;
|
|
264
|
-
if (n instanceof DayPilot.Menu || (t.isEvent && t.client.contextMenu() ? n = t.client.contextMenu() : t.isEvent && t.calendar.contextMenu && (n = t.calendar.contextMenu)),
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
if (n instanceof DayPilot.Menu || (t.isEvent && t.client.contextMenu() ? n = t.client.contextMenu() : t.isEvent && t.calendar.contextMenu && (n = t.calendar.contextMenu)),
|
|
265
|
+
n && n.show) {
|
|
266
|
+
var o = { "type": "area", "div": e, "e": t, "area": i, "a": d };
|
|
267
267
|
n.show(t, { "initiator": o });
|
|
268
268
|
}
|
|
269
269
|
}
|
|
@@ -419,29 +419,27 @@ if (function () {
|
|
|
419
419
|
DayPilot.Util.removeClass(i.C, this.selectedClass);
|
|
420
420
|
}
|
|
421
421
|
DayPilot.Util.addClass(e.C, this.selectedClass);
|
|
422
|
-
} }, this.addNavigator = function (e) {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
i.j.updateMode(s), t(i.j.control.selectionStart, i.j.control.selectionEnd.addDays(1), i.j.control.selectionDay);
|
|
444
|
-
}, this.A = function (e) { for (var t = 0; t < this.f.length; t++)
|
|
422
|
+
} }, this.addNavigator = function (e) {
|
|
423
|
+
i.j.control = e, e.timeRangeSelectedHandling = "JavaScript", e.onTimeRangeSelected = function () {
|
|
424
|
+
var a, n, o;
|
|
425
|
+
if (1 === e.api)
|
|
426
|
+
a = arguments[0], n = arguments[1], o = arguments[2];
|
|
427
|
+
else {
|
|
428
|
+
var r = arguments[0];
|
|
429
|
+
a = r.start, n = r.end, o = r.day;
|
|
430
|
+
}
|
|
431
|
+
i.l = o, t(a, n, o);
|
|
432
|
+
};
|
|
433
|
+
}, this.show = function (e) { var a, n; if (e.B)
|
|
434
|
+
n = e, a = n.D;
|
|
435
|
+
else if (a = e.n ? e : this.A(e), this.k === a)
|
|
436
|
+
return; if (i.onSelect) {
|
|
437
|
+
var o = {};
|
|
438
|
+
o.source = n ? n.C : null, o.target = a.control, i.onSelect(o);
|
|
439
|
+
} if (i.syncScrollbar) {
|
|
440
|
+
var r = this.k && this.k.control;
|
|
441
|
+
r && r.isCalendar && (i.m = r.getScrollY());
|
|
442
|
+
} this.k = a, a.t(), null !== i.m && a.control.isCalendar && a.control.setScrollY(i.m); var s = a.z(); i.j.updateMode(s), t(i.j.control.selectionStart, i.j.control.selectionEnd.addDays(1), i.j.control.selectionDay); }, this.A = function (e) { for (var t = 0; t < this.f.length; t++)
|
|
445
443
|
if (this.f[t].control === e)
|
|
446
444
|
return this.f[t]; return null; }, this.u = function () { for (var e = 0; e < this.f.length; e++)
|
|
447
445
|
this.f[e].q(); }, Object.defineProperty(this, "active", { get: function () { return i.k; } }), this.events = {}, this.events.load = function (e, t, a) { if (!i.k || !i.k.control)
|
|
@@ -649,212 +647,214 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
649
647
|
l.M(d.start, d.end, d.resource), "Hold" !== l.timeRangeSelectedHandling && "HoldForever" !== l.timeRangeSelectedHandling && e();
|
|
650
648
|
}
|
|
651
649
|
else
|
|
652
|
-
t.selecting = !1; }, t.deleteShadow = function (e) { e && e.parentNode && e.parentNode.removeChild(e); }, t.moveShadow = function (e) { var i = t.movingShadow, a = i.parentNode; a.style.display = "none", i.parentNode.removeChild(i), e.firstChild.appendChild(i), i.style.left = "0px", a.style.display = "", i.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"; }
|
|
653
|
-
|
|
654
|
-
|
|
650
|
+
t.selecting = !1; }, t.deleteShadow = function (e) { e && e.parentNode && e.parentNode.removeChild(e); }, t.moveShadow = function (e) { var i = t.movingShadow, a = i.parentNode; a.style.display = "none", i.parentNode.removeChild(i), e.firstChild.appendChild(i), i.style.left = "0px", a.style.display = "", i.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"; };
|
|
651
|
+
var i = DayPilot.Util.isVueVNode, a = DayPilot.Util.overlaps;
|
|
652
|
+
t.Calendar = function (e, n) {
|
|
653
|
+
var o = !1;
|
|
654
|
+
if (this instanceof t.Calendar && !this.N && (o = !0, this.N = !0), !o)
|
|
655
655
|
throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
|
|
656
|
-
var
|
|
657
|
-
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.4.
|
|
656
|
+
var r = this;
|
|
657
|
+
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.4.622-lite", this.id = e, this.clientName = e, this.cache = {}, this.cache.pixels = {}, this.elements = {}, this.elements.events = [], this.elements.selection = [], this.nav = {}, this.afterRender = function () { }, this.fasterDispose = !0, this.angularAutoApply = !1, this.api = 2, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.cellHeight = 30, this.columnMarginLeft = 0, this.columnMarginRight = 5, this.columnsLoadMethod = "GET", this.contextMenu = null, this.days = 1, this.durationBarVisible = !0, this.eventBorderRadius = null, this.eventsLoadMethod = "GET", this.headerDateFormat = null, this.headerHeight = 30, this.headerTextWrappingEnabled = !1, this.height = 300, this.heightSpec = "BusinessHours", this.hideUntilInit = !0, this.hourWidth = 60, this.initScrollPos = "Auto", this.loadingLabelHtml = null, this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.locale = "en-us", this.showToolTip = !0, this.startDate = (new DayPilot.Date).getDatePart(), this.cssClassPrefix = "calendar_default", this.theme = null, this.timeFormat = "Auto", this.viewType = "Days", this.visible = !0, this.xssProtection = "Enabled", this.headerClickHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.eventMoveHandling = "Update", this.eventDeleteHandling = "Disabled", this.timeRangeSelectedHandling = "Enabled", this.onBeforeCellRender = null, this.onBeforeEventRender = null, this.onBeforeHeaderRender = null, this.onEventClick = null, this.onEventClicked = null, this.onEventDelete = null, this.onEventDeleted = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onHeaderClick = null, this.onHeaderClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.O = !1, this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.P(); }, this.P = function () { DayPilot.de(r.elements.selection), r.elements.selection = [], r.nav.activeSelection = null; }, this.cleanSelection = this.clearSelection, this.Q = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + DayPilot.JSON.stringify(a); __doPostBack(r.uniqueID, n); }, this.S = function (e, t, i) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.callbackTimeout = window.setTimeout(function () { r.loadingStart(); }, 100); var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.T, n, this.ajaxError) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, n, this.U, this.clientName, this.onCallbackError, !0); }, this.onCallbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.dispose = function () { var e = r; e.O || (e.O = !0, clearInterval(e.V), e.W(), e.nav.scroll.root = null, DayPilot.pu(e.nav.loading), e.X(), e.Y(), e.nav.select = null, e.nav.cornerRight = null, e.nav.scrollable = null, e.nav.zoom = null, e.nav.loading = null, e.nav.header = null, e.nav.hourTable = null, e.nav.scrolltop = null, e.nav.scroll.onscroll = null, e.nav.scroll = null, e.nav.main = null, e.nav.message = null, e.nav.messageClose = null, e.nav.top = null, t.unregister(e)); }, this.disposed = function () { return this.O; }, this.Z = function () { this.nav.top.dispose = this.dispose; }, this.T = function (e) { r.U(e.responseText); }, this.R = function () { var e = {}; return e.control = "dpc", e.id = this.id, e.v = this.v, e.days = r.days, e.startDate = r.startDate, e.heightSpec = r.heightSpec, e.businessBeginsHour = r.businessBeginsHour, e.businessEndsHour = r.businessEndsHour, e.hashes = r.hashes, e.timeFormat = r.timeFormat, e.viewType = r.viewType, e.locale = r.locale, e; }, this._ = function (e, t) {
|
|
658
658
|
for (var i = e.parentNode; i && "TD" !== i.tagName;)
|
|
659
659
|
i = i.parentNode;
|
|
660
|
-
var a =
|
|
660
|
+
var a = r.eventBorderRadius;
|
|
661
661
|
"number" == typeof a && (a += "px");
|
|
662
|
+
var n = document.createElement("div");
|
|
663
|
+
n.setAttribute("unselectable", "on"), n.style.position = "absolute", n.style.width = e.offsetWidth + "px",
|
|
664
|
+
n.style.height = e.offsetHeight + "px", n.style.left = e.offsetLeft + "px", n.style.top = e.offsetTop + "px", n.style.boxSizing = "border-box", n.style.zIndex = 101, n.className = r.K("_shadow");
|
|
662
665
|
var o = document.createElement("div");
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
var
|
|
666
|
-
return r.className = n.K("_shadow_inner"), a && (r.style.borderRadius = a, o.style.borderRadius = a), o.appendChild(r), i.firstChild.appendChild(o), o;
|
|
667
|
-
}, this.aa = {}, this.aa.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this.aa.timeFormat = function () { return "Auto" !== n.timeFormat ? n.timeFormat : this.locale().timeFormat; }, this.aa.ba = function () { return "Disabled" !== n.xssProtection; }, this.aa.ca = function () { if ("Auto" === n.weekStarts) {
|
|
668
|
-
var e = o.locale();
|
|
666
|
+
return o.className = r.K("_shadow_inner"), a && (o.style.borderRadius = a, n.style.borderRadius = a), n.appendChild(o), i.firstChild.appendChild(n), n;
|
|
667
|
+
}, this.aa = {}, this.aa.locale = function () { var e = DayPilot.Locale.find(r.locale); return e ? e : DayPilot.Locale.US; }, this.aa.timeFormat = function () { return "Auto" !== r.timeFormat ? r.timeFormat : this.locale().timeFormat; }, this.aa.ba = function () { return "Disabled" !== r.xssProtection; }, this.aa.ca = function () { if ("Auto" === r.weekStarts) {
|
|
668
|
+
var e = s.locale();
|
|
669
669
|
return e ? e.weekStarts : 0;
|
|
670
|
-
} return
|
|
671
|
-
var
|
|
670
|
+
} return r.weekStarts || 0; };
|
|
671
|
+
var s = this.aa;
|
|
672
672
|
this.U = function (e, t) { if (e && 0 === e.indexOf("$$$")) {
|
|
673
673
|
if (!window.console)
|
|
674
674
|
throw "Error received from the server side: " + e;
|
|
675
675
|
return void console.log("Error received from the server side: " + e);
|
|
676
676
|
} var e = JSON.parse(e); if (e.CallBackRedirect)
|
|
677
677
|
return void (document.location.href = e.CallBackRedirect); if ("None" === e.UpdateType)
|
|
678
|
-
return
|
|
678
|
+
return r.loadingStop(), void r.t(); if (r.W(), "Full" === e.UpdateType && (r.columns = e.Columns, r.days = e.Days, r.startDate = new DayPilot.Date(e.StartDate), r.heightSpec = e.HeightSpec ? e.HeightSpec : r.heightSpec, r.businessBeginsHour = e.BusinessBeginsHour ? e.BusinessBeginsHour : r.businessBeginsHour, r.businessEndsHour = e.BusinessEndsHour ? e.BusinessEndsHour : r.businessEndsHour, r.headerDateFormat = e.HeaderDateFormat ? e.HeaderDateFormat : r.headerDateFormat, r.viewType = e.ViewType, r.backColor = e.BackColor ? e.BackColor : r.backColor, r.eventHeaderVisible = e.EventHeaderVisible ? e.EventHeaderVisible : r.eventHeaderVisible, r.timeFormat = e.TimeFormat ? e.TimeFormat : r.timeFormat, r.locale = e.Locale ? e.Locale : r.locale, r.da()), e.Hashes)
|
|
679
679
|
for (var i in e.Hashes)
|
|
680
|
-
|
|
681
|
-
if (
|
|
680
|
+
r.hashes[i] = e.Hashes[i]; r.events.list = e.Events, r.ea(), r.fa(), "Full" === e.UpdateType && (r.ga(), r.ha(), r.ia(), r.ja()), r.t(), r.ka(), r.clearSelection(), r.afterRender(e.CallBackData, !0), r.loadingStop(); }, this.la = function () { return this.ma() / 36e5; }, this.na = function () { return this.businessBeginsHour > this.businessEndsHour ? 24 - this.businessBeginsHour + this.businessEndsHour : this.businessEndsHour - this.businessBeginsHour; }, this.oa = function () { return this.ma() / 18e5; }, this.ma = function () { var e = 0; return e = "BusinessHoursNoScroll" === this.heightSpec ? this.na() : 24, 60 * e * 60 * 1e3; }, this.pa = function () { return "BusinessHoursNoScroll" === this.heightSpec ? this.businessBeginsHour : 0; }, this.qa = function () { return 2 === r.api; }, this.eventClickCallBack = function (e, t) { this.S("EventClick", t, e); }, this.eventClickPostBack = function (e, t) { this.Q("EventClick", t, e); }, this.ra = function (e) { var t = this, i = t.event; if (i.client.clickEnabled())
|
|
681
|
+
if (r.qa()) {
|
|
682
682
|
var a = {};
|
|
683
|
-
if (a.e = i, a.originalEvent = e, a.meta = e.metaKey, a.ctrl = e.ctrlKey, a.control =
|
|
683
|
+
if (a.e = i, a.originalEvent = e, a.meta = e.metaKey, a.ctrl = e.ctrlKey, a.control = r, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onEventClick && (r.sa.apply(function () { r.onEventClick(a); }), a.preventDefault.value))
|
|
684
684
|
return;
|
|
685
|
-
switch (
|
|
685
|
+
switch (r.eventClickHandling) {
|
|
686
686
|
case "CallBack":
|
|
687
|
-
|
|
687
|
+
r.eventClickCallBack(i);
|
|
688
688
|
break;
|
|
689
689
|
case "PostBack":
|
|
690
|
-
|
|
690
|
+
r.eventClickPostBack(i);
|
|
691
691
|
break;
|
|
692
692
|
case "ContextMenu":
|
|
693
|
-
var
|
|
694
|
-
|
|
693
|
+
var n = i.client.contextMenu();
|
|
694
|
+
n ? n.show(i) : r.contextMenu && r.contextMenu.show(i);
|
|
695
695
|
}
|
|
696
|
-
"function" == typeof
|
|
696
|
+
"function" == typeof r.onEventClicked && r.sa.apply(function () { r.onEventClicked(a); });
|
|
697
697
|
}
|
|
698
698
|
else
|
|
699
|
-
switch (
|
|
699
|
+
switch (r.eventClickHandling) {
|
|
700
700
|
case "PostBack":
|
|
701
|
-
|
|
701
|
+
r.eventClickPostBack(i);
|
|
702
702
|
break;
|
|
703
703
|
case "CallBack":
|
|
704
|
-
|
|
704
|
+
r.eventClickCallBack(i);
|
|
705
705
|
break;
|
|
706
|
-
case "JavaScript":
|
|
706
|
+
case "JavaScript": r.onEventClick(i);
|
|
707
707
|
} }, this.ta = function (e) { var t = this.event; if (e.stopPropagation && e.stopPropagation(), !t.client.rightClickEnabled())
|
|
708
|
-
return !1; var i = {}; if (i.e = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof
|
|
709
|
-
return !1; switch (
|
|
708
|
+
return !1; var i = {}; if (i.e = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onEventRightClick && (r.onEventRightClick(i), i.preventDefault.value))
|
|
709
|
+
return !1; switch (r.eventRightClickHandling) {
|
|
710
710
|
case "ContextMenu":
|
|
711
711
|
var a = t.client.contextMenu();
|
|
712
|
-
a ? a.show(t) :
|
|
713
|
-
} return "function" == typeof
|
|
712
|
+
a ? a.show(t) : r.contextMenu && r.contextMenu.show(this.event);
|
|
713
|
+
} return "function" == typeof r.onEventRightClicked && r.onEventRightClicked(i), e.preventDefault && e.preventDefault(), !1; }, this.eventDeleteCallBack = function (e, t) { this.S("EventDelete", t, e); }, this.eventDeletePostBack = function (e, t) { this.Q("EventDelete", t, e); }, this.ua = function (e) { if (r.qa()) {
|
|
714
714
|
var t = {};
|
|
715
|
-
if (t.e = e, t.control =
|
|
715
|
+
if (t.e = e, t.control = r, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onEventDelete && (r.sa.apply(function () { r.onEventDelete(t); }), t.preventDefault.value))
|
|
716
716
|
return;
|
|
717
|
-
switch (
|
|
717
|
+
switch (r.eventDeleteHandling) {
|
|
718
718
|
case "CallBack":
|
|
719
|
-
|
|
719
|
+
r.eventDeleteCallBack(e);
|
|
720
720
|
break;
|
|
721
721
|
case "PostBack":
|
|
722
|
-
|
|
722
|
+
r.eventDeletePostBack(e);
|
|
723
723
|
break;
|
|
724
|
-
case "Update":
|
|
724
|
+
case "Update": r.events.remove(e);
|
|
725
725
|
}
|
|
726
|
-
"function" == typeof
|
|
726
|
+
"function" == typeof r.onEventDeleted && r.sa.apply(function () { r.onEventDeleted(t); });
|
|
727
727
|
}
|
|
728
728
|
else
|
|
729
|
-
switch (
|
|
729
|
+
switch (r.eventDeleteHandling) {
|
|
730
730
|
case "PostBack":
|
|
731
|
-
|
|
731
|
+
r.eventDeletePostBack(e);
|
|
732
732
|
break;
|
|
733
733
|
case "CallBack":
|
|
734
|
-
|
|
734
|
+
r.eventDeleteCallBack(e);
|
|
735
735
|
break;
|
|
736
|
-
case "JavaScript":
|
|
736
|
+
case "JavaScript": r.onEventDelete(e);
|
|
737
737
|
} }, this.eventResizeCallBack = function (e, t, i, a) { if (!t)
|
|
738
738
|
throw "newStart is null"; if (!i)
|
|
739
739
|
throw "newEnd is null"; var n = {}; n.e = e, n.newStart = t, n.newEnd = i, this.S("EventResize", a, n); }, this.eventResizePostBack = function (e, t, i, a) { if (!t)
|
|
740
740
|
throw "newStart is null"; if (!i)
|
|
741
|
-
throw "newEnd is null"; var n = {}; n.e = e, n.newStart = t, n.newEnd = i, this.Q("EventResize", a, n); }, this.J = function (e, t, i, a) { var
|
|
742
|
-
var c = l.getDatePart(), u = Math.floor((i -
|
|
743
|
-
|
|
741
|
+
throw "newEnd is null"; var n = {}; n.e = e, n.newStart = t, n.newEnd = i, this.Q("EventResize", a, n); }, this.J = function (e, t, i, a) { var n = 1, o = new Date, s = new Date, l = e.start(), d = e.end(); if ("top" === a) {
|
|
742
|
+
var c = l.getDatePart(), u = Math.floor((i - n) / r.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * r.pa() * 60 * 1e3;
|
|
743
|
+
o = c.addTime(f + m), s = e.end();
|
|
744
744
|
}
|
|
745
745
|
else if ("bottom" === a) {
|
|
746
|
-
var c = d.getDatePart(), u = Math.floor((i + t -
|
|
747
|
-
|
|
748
|
-
} if (
|
|
746
|
+
var c = d.getDatePart(), u = Math.floor((i + t - n) / r.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * r.pa() * 60 * 1e3;
|
|
747
|
+
o = l, s = c.addTime(f + m);
|
|
748
|
+
} if (r.qa()) {
|
|
749
749
|
var p = {};
|
|
750
|
-
if (p.e = e, p.control =
|
|
750
|
+
if (p.e = e, p.control = r, p.newStart = o, p.newEnd = s, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onEventResize && (r.sa.apply(function () { r.onEventResize(p); }), p.preventDefault.value))
|
|
751
751
|
return;
|
|
752
|
-
switch (
|
|
752
|
+
switch (r.eventResizeHandling) {
|
|
753
753
|
case "PostBack":
|
|
754
|
-
|
|
754
|
+
r.eventResizePostBack(e, o, s);
|
|
755
755
|
break;
|
|
756
756
|
case "CallBack":
|
|
757
|
-
|
|
757
|
+
r.eventResizeCallBack(e, o, s);
|
|
758
758
|
break;
|
|
759
|
-
case "Update": e.start(
|
|
759
|
+
case "Update": e.start(o), e.end(s), r.events.update(e);
|
|
760
760
|
}
|
|
761
|
-
"function" == typeof
|
|
761
|
+
"function" == typeof r.onEventResized && r.sa.apply(function () { r.onEventResized(p); });
|
|
762
762
|
}
|
|
763
763
|
else
|
|
764
|
-
switch (
|
|
764
|
+
switch (r.eventResizeHandling) {
|
|
765
765
|
case "PostBack":
|
|
766
|
-
|
|
766
|
+
r.eventResizePostBack(e, o, s);
|
|
767
767
|
break;
|
|
768
768
|
case "CallBack":
|
|
769
|
-
|
|
769
|
+
r.eventResizeCallBack(e, o, s);
|
|
770
770
|
break;
|
|
771
|
-
case "JavaScript":
|
|
771
|
+
case "JavaScript": r.onEventResize(e, o, s);
|
|
772
772
|
} }, this.eventMovePostBack = function (e, t, i, a, n) { if (!t)
|
|
773
773
|
throw "newStart is null"; if (!i)
|
|
774
774
|
throw "newEnd is null"; var o = {}; o.e = e, o.newStart = t, o.newEnd = i, this.Q("EventMove", n, o); }, this.eventMoveCallBack = function (e, t, i, a, n) { if (!t)
|
|
775
775
|
throw "newStart is null"; if (!i)
|
|
776
|
-
throw "newEnd is null"; var o = {}; o.e = e, o.newStart = t, o.newEnd = i, this.S("EventMove", n, o); }, this.L = function (e, t, i, a) { var
|
|
776
|
+
throw "newEnd is null"; var o = {}; o.e = e, o.newStart = t, o.newEnd = i, this.S("EventMove", n, o); }, this.L = function (e, t, i, a) { var n = 1, o = Math.floor((i - n) / r.cellHeight), s = 30 * o * 60 * 1e3, l = e.start(), d = e.end(), c = new Date; l instanceof DayPilot.Date && (l = l.toDate()), c.setTime(Date.UTC(l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate())); var u = l.getTime() - (c.getTime() + 3600 * l.getUTCHours() * 1e3 + 30 * Math.floor(l.getUTCMinutes() / 30) * 60 * 1e3), h = d.getTime() - l.getTime(), f = this.va[t], m = f.id, p = f.start.getTime(), v = new Date; v.setTime(p + s + u); var y = new DayPilot.Date(v), g = y.addTime(h); if (r.qa()) {
|
|
777
777
|
var b = {};
|
|
778
|
-
if (b.e = e, b.newStart = y, b.newEnd = g, b.newResource = m, b.ctrl = a.ctrlKey, b.shift = a.shiftKey, b.control =
|
|
778
|
+
if (b.e = e, b.newStart = y, b.newEnd = g, b.newResource = m, b.ctrl = a.ctrlKey, b.shift = a.shiftKey, b.control = r, b.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onEventMove && (r.sa.apply(function () { r.onEventMove(b); }), b.preventDefault.value))
|
|
779
779
|
return;
|
|
780
|
-
switch (
|
|
780
|
+
switch (r.eventMoveHandling) {
|
|
781
781
|
case "PostBack":
|
|
782
|
-
|
|
782
|
+
r.eventMovePostBack(e, y, g, f.id);
|
|
783
783
|
break;
|
|
784
784
|
case "CallBack":
|
|
785
|
-
|
|
785
|
+
r.eventMoveCallBack(e, y, g, f.id);
|
|
786
786
|
break;
|
|
787
|
-
case "Update": e.start(y), e.end(g), e.resource(m),
|
|
787
|
+
case "Update": e.start(y), e.end(g), e.resource(m), r.events.update(e);
|
|
788
788
|
}
|
|
789
|
-
"function" == typeof
|
|
789
|
+
"function" == typeof r.onEventMoved && r.sa.apply(function () { r.onEventMoved(b); });
|
|
790
790
|
}
|
|
791
791
|
else
|
|
792
|
-
switch (
|
|
792
|
+
switch (r.eventMoveHandling) {
|
|
793
793
|
case "PostBack":
|
|
794
|
-
|
|
794
|
+
r.eventMovePostBack(e, y, g, f.id);
|
|
795
795
|
break;
|
|
796
796
|
case "CallBack":
|
|
797
|
-
|
|
797
|
+
r.eventMoveCallBack(e, y, g, f.id);
|
|
798
798
|
break;
|
|
799
|
-
case "JavaScript":
|
|
799
|
+
case "JavaScript": r.onEventMove(e, y, g, f.id, !1);
|
|
800
800
|
} }, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, this.Q("TimeRangeSelected", a, n); }, this.timeRangeSelectedCallBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, this.S("TimeRangeSelected", a, n); }, this.M = function (e, t, i) { if (e = new DayPilot.Date(e), t = new DayPilot.Date(t), this.qa()) {
|
|
801
801
|
var a = {};
|
|
802
|
-
if (a.start = e, a.end = t, a.resource = i, a.control =
|
|
802
|
+
if (a.start = e, a.end = t, a.resource = i, a.control = r, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onTimeRangeSelect && (r.sa.apply(function () { r.onTimeRangeSelect(a); }), a.preventDefault.value))
|
|
803
803
|
return;
|
|
804
|
-
switch (
|
|
804
|
+
switch (r.timeRangeSelectedHandling) {
|
|
805
805
|
case "PostBack":
|
|
806
|
-
|
|
806
|
+
r.timeRangeSelectedPostBack(e, t);
|
|
807
807
|
break;
|
|
808
|
-
case "CallBack":
|
|
808
|
+
case "CallBack": r.timeRangeSelectedCallBack(e, t);
|
|
809
809
|
}
|
|
810
|
-
"function" == typeof
|
|
810
|
+
"function" == typeof r.onTimeRangeSelected && r.sa.apply(function () { r.onTimeRangeSelected(a); });
|
|
811
811
|
}
|
|
812
812
|
else
|
|
813
|
-
switch (
|
|
813
|
+
switch (r.timeRangeSelectedHandling) {
|
|
814
814
|
case "PostBack":
|
|
815
|
-
|
|
815
|
+
r.timeRangeSelectedPostBack(e, t);
|
|
816
816
|
break;
|
|
817
817
|
case "CallBack":
|
|
818
|
-
|
|
818
|
+
r.timeRangeSelectedCallBack(e, t);
|
|
819
819
|
break;
|
|
820
|
-
case "JavaScript":
|
|
821
|
-
} }, this.wa = function (e) { if (!t.selecting && "Disabled" !==
|
|
820
|
+
case "JavaScript": r.onTimeRangeSelected(e, t);
|
|
821
|
+
} }, this.wa = function (e) { if (!t.selecting && "Disabled" !== r.timeRangeSelectedHandling) {
|
|
822
822
|
var i = e.which;
|
|
823
823
|
if (1 === i || 0 === i)
|
|
824
|
-
return t.firstMousePos = DayPilot.mc(e), t.selecting = {}, t.selecting.calendar =
|
|
824
|
+
return t.firstMousePos = DayPilot.mc(e), t.selecting = {}, t.selecting.calendar = r, t.selectedCells && (r.clearSelection(), t.selectedCells = []), t.column = t.getColumn(this), t.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, r.xa(), !1;
|
|
825
825
|
} }, this.xa = function () { this.getSelection(); !function () { var e = t.topSelectedCell, i = t.bottomSelectedCell, a = function () { if (e.data)
|
|
826
826
|
return e.data.x; for (var t = e.parentNode.cells, i = 0; i < t.length; i++)
|
|
827
827
|
if (t[i] === e)
|
|
828
|
-
return i; return -1; }(),
|
|
829
|
-
var
|
|
828
|
+
return i; return -1; }(), n = r.va[a]; if (n) {
|
|
829
|
+
var o = n.start, s = r.getPixels(e.start, o).boxTop, l = r.getPixels(i.end, o).boxBottom, d = l - s, c = r.eventBorderRadius;
|
|
830
830
|
"number" == typeof c && (c += "px");
|
|
831
|
-
var u = function () { if (
|
|
832
|
-
return
|
|
833
|
-
u.className =
|
|
831
|
+
var u = function () { if (r.nav.activeSelection)
|
|
832
|
+
return r.nav.activeSelection; var e = document.createElement("div"); e.setAttribute("unselectable", "on"), e.style.position = "absolute", e.style.left = "0px", e.style.width = "100%"; var t = document.createElement("div"); return t.setAttribute("unselectable", "on"), t.className = r.K("_shadow_inner"), c && (t.style.borderRadius = c, e.style.borderRadius = c), e.appendChild(t), r.nav.events.rows[0].cells[a].selection.appendChild(e), r.elements.selection.push(e), r.nav.activeSelection = e, e; }();
|
|
833
|
+
u.className = r.K("_shadow"), u.firstChild.innerHTML = "", u.style.top = s + "px", u.style.height = d + "px";
|
|
834
834
|
} }(); }, this.ya = function (e) { if ("undefined" != typeof t && t.selecting) {
|
|
835
835
|
var i = DayPilot.mc(e);
|
|
836
|
-
t.getColumn(this) === t.column && (
|
|
837
|
-
} }, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end, a = t.topSelectedCell.resource; return new DayPilot.Selection(e, i, a,
|
|
838
|
-
return null; for (var t = 0, i =
|
|
836
|
+
t.getColumn(this) === t.column && (r.clearSelection(), i.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(this), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(this), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), r.xa());
|
|
837
|
+
} }, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end, a = t.topSelectedCell.resource; return new DayPilot.Selection(e, i, a, r); }, this.za = function (e) { if (e < 0)
|
|
838
|
+
return null; for (var t = 0, i = r.nav.events.rows[0].cells, a = 0; a < i.length; a++) {
|
|
839
839
|
if (t += i[a].offsetWidth, e < t)
|
|
840
840
|
return a;
|
|
841
|
-
} return null; }, this.Aa = {}, this.Aa.getCellCoords = function () { var e = {}; if (e.x = 0, e.y = 0, !
|
|
842
|
-
return null; e.x =
|
|
843
|
-
throw new DayPilot.Exception("columns.load(): 'url' parameter required"); var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); },
|
|
844
|
-
i = JSON.parse(
|
|
841
|
+
} return null; }, this.Aa = {}, this.Aa.getCellCoords = function () { var e = {}; if (e.x = 0, e.y = 0, !r.coords)
|
|
842
|
+
return null; e.x = r.za(r.coords.x); var t = 0, i = Math.floor((r.coords.y - t) / r.cellHeight); return e.y = i, e.x < 0 ? null : e; }, this.columns = {}, this.columns.list = [], this.columns.load = function (e, t, i) { if (!e)
|
|
843
|
+
throw new DayPilot.Exception("columns.load(): 'url' parameter required"); var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, n = function (e) { var i, n = e.request; try {
|
|
844
|
+
i = JSON.parse(n.responseText);
|
|
845
845
|
}
|
|
846
846
|
catch (e) {
|
|
847
|
-
var
|
|
848
|
-
return
|
|
847
|
+
var o = {};
|
|
848
|
+
return o.exception = e, void a(o);
|
|
849
849
|
} if (DayPilot.isArray(i)) {
|
|
850
850
|
var s = {};
|
|
851
851
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
852
852
|
return;
|
|
853
|
-
|
|
854
|
-
} };
|
|
853
|
+
r.columns.list = i, r.Ba && r.update();
|
|
854
|
+
} }; r.columnsLoadMethod && "POST" === r.columnsLoadMethod.toUpperCase() ? DayPilot.ajax({ "method": "POST", "url": e, "success": n, "error": a }) : DayPilot.ajax({ "method": "GET", "url": e, "success": n, "error": a }); }, this.da = function () { var e; e = "Resources" !== r.viewType ? this.Ca() : r.columns.list, this.va = []; for (var t = 0; t < e.length; t++) {
|
|
855
855
|
var i = this.Da(e[t]);
|
|
856
856
|
this.va.push(i);
|
|
857
|
-
} }, this.Da = function (e) { var t = {}; return t.name = e.name, t.html = e.html, t.id = e.id, t.toolTip = e.toolTip, t.data = e, e.start ? t.start = new DayPilot.Date(e.start) : t.start = new DayPilot.Date(
|
|
857
|
+
} }, this.Da = function (e) { var t = {}; return t.name = e.name, t.html = e.html, t.id = e.id, t.toolTip = e.toolTip, t.data = e, e.start ? t.start = new DayPilot.Date(e.start) : t.start = new DayPilot.Date(r.startDate), t.putIntoBlock = function (e) { for (var t = 0; t < this.blocks.length; t++) {
|
|
858
858
|
var i = this.blocks[t];
|
|
859
859
|
if (i.overlapsWith(e.part.top, e.part.height))
|
|
860
860
|
return i.events.push(e), i.min = Math.min(i.min, e.part.top), i.max = Math.max(i.max, e.part.top + e.part.height), t;
|
|
@@ -880,65 +880,83 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
880
880
|
break;
|
|
881
881
|
case "Week":
|
|
882
882
|
i = 7;
|
|
883
|
-
var a =
|
|
883
|
+
var a = s.ca();
|
|
884
884
|
t = t.firstDayOfWeek(a);
|
|
885
885
|
break;
|
|
886
886
|
case "WorkWeek": i = 5, t = t.firstDayOfWeek(1);
|
|
887
|
-
} "BusinessHoursNoScroll" === this.heightSpec && (t = t.addHours(this.businessBeginsHour)); for (var
|
|
888
|
-
var
|
|
889
|
-
l.start = t.addDays(
|
|
890
|
-
} return e; }, this.visibleStart = function () { if ("Resources" ===
|
|
891
|
-
if (0 ===
|
|
887
|
+
} "BusinessHoursNoScroll" === this.heightSpec && (t = t.addHours(this.businessBeginsHour)); for (var n = 0; n < i; n++) {
|
|
888
|
+
var o = r.headerDateFormat ? r.headerDateFormat : s.locale().datePattern, l = {};
|
|
889
|
+
l.start = t.addDays(n), l.name = l.start.toString(o, s.locale()), e.push(l);
|
|
890
|
+
} return e; }, this.visibleStart = function () { if ("Resources" === r.viewType) {
|
|
891
|
+
if (0 === r.va.length)
|
|
892
892
|
return DayPilot.Date.today();
|
|
893
|
-
var e =
|
|
893
|
+
var e = r.va.map(function (e) { return e.start.getTime(); }), t = Math.min.apply(null, e);
|
|
894
894
|
return new DayPilot.Date(t);
|
|
895
|
-
} return this.va[0].start; }, this.visibleEnd = function () { if ("Resources" ===
|
|
896
|
-
if (0 ===
|
|
895
|
+
} return this.va[0].start; }, this.visibleEnd = function () { if ("Resources" === r.viewType) {
|
|
896
|
+
if (0 === r.va.length)
|
|
897
897
|
return DayPilot.Date.today().addDays(1);
|
|
898
|
-
var e =
|
|
898
|
+
var e = r.va.map(function (e) { return e.start.getTime(); }), t = Math.max.apply(null, e);
|
|
899
899
|
return new DayPilot.Date(t).addDays(1);
|
|
900
900
|
} var t = this.va.length - 1; return this.va[t].start.addDays(1); }, this.K = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.W = function () { if (this.elements.events)
|
|
901
901
|
for (var e = 0; e < this.elements.events.length; e++) {
|
|
902
|
-
var t = this.elements.events[e]
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
902
|
+
var t = this.elements.events[e];
|
|
903
|
+
r.Ea(t);
|
|
904
|
+
} this.elements.events = []; }, this.Ea = function (e) { !function () { var t = e.domArgs; if (e.domArgs = null, t && "function" == typeof r.onBeforeEventDomRemove && r.onBeforeEventDomRemove(t), t && "function" == typeof r.onBeforeEventDomAdd) {
|
|
905
|
+
var a = t && t.Fa;
|
|
906
|
+
if (a) {
|
|
907
|
+
r.Ha.Ga && i(t.element) && (r.Ha.Ia = !0, r.Ha.Ja(a), r.Ha.Ia = !1);
|
|
908
|
+
}
|
|
909
|
+
} }(); var t = e.event; if (t && (t.calendar = null), e.onclick = null, e.onclickSave = null, e.onmouseover = null, e.onmouseout = null, e.onmousemove = null, e.onmousedown = null, e.firstChild && e.firstChild.firstChild && e.firstChild.firstChild.tagName && "IMG" === e.firstChild.firstChild.tagName.toUpperCase()) {
|
|
910
|
+
var a = e.firstChild.firstChild;
|
|
911
|
+
a.onmousedown = null, a.onmousemove = null, a.onclick = null;
|
|
912
|
+
} e.helper = null, e.data = null, e.event = null, DayPilot.de(e); }, this.Ka = function (e) { var a = e.cache || e.data, n = this.nav.events, o = a.borderRadius || r.eventBorderRadius; "number" == typeof o && (o += "px"); var s = document.createElement("div"); s.style.position = "absolute", s.style.left = e.part.left + "%", s.style.top = e.part.top + "px", s.style.width = e.part.width + "%", s.style.height = Math.max(e.part.height, 2) + "px", s.style.overflow = "hidden", s.data = e, s.event = e, s.unselectable = "on", s.style.MozUserSelect = "none", s.style.KhtmlUserSelect = "none", s.className = this.K("_event"), a.cssClass && DayPilot.Util.addClass(s, a.cssClass), r.showToolTip && e.client.toolTip() && (s.title = e.client.toolTip()), s.isFirst = e.part.start.getTime() === e.start().getTime(), s.isLast = e.part.end.getTime() === e.end().getTime(), s.onclick = this.ra, DayPilot.re(s, "contextmenu", this.ta), s.onmouseout = function (e) { s.deleteIcon && (s.deleteIcon.style.display = "none"); }, s.onmousemove = function (i) { var a = 5; if ("undefined" != typeof t) {
|
|
913
|
+
var n = DayPilot.mo3(s, i);
|
|
914
|
+
if (n && !t.resizing && !t.moving) {
|
|
915
|
+
s.deleteIcon && (s.deleteIcon.style.display = "");
|
|
916
|
+
var o = this.isLast;
|
|
917
|
+
n.y <= a && e.client.resizeEnabled() ? (this.style.cursor = "n-resize", this.dpBorder = "top") : this.offsetHeight - n.y <= a && e.client.resizeEnabled() ? o ? (this.style.cursor = "s-resize", this.dpBorder = "bottom") : this.style.cursor = "not-allowed" : t.resizing || t.moving || ("Disabled" !== r.eventClickHandling ? this.style.cursor = "pointer" : this.style.cursor = "default");
|
|
918
|
+
}
|
|
919
|
+
} }, s.onmousedown = function (i) { var a = i.which || i.button; if ("n-resize" !== this.style.cursor && "s-resize" !== this.style.cursor || 1 !== a) {
|
|
916
920
|
if (1 === a && e.client.moveEnabled()) {
|
|
917
921
|
t.moving = this, DayPilot.Global.moving = this, t.moving.event = this.event;
|
|
918
|
-
var
|
|
919
|
-
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
+
var n = t.moving.helper = {};
|
|
923
|
+
n.oldColumn = r.va[this.data.part.dayIndex].id, t.originalMouse = DayPilot.mc(i), t.originalTop = this.offsetTop;
|
|
924
|
+
var o = DayPilot.mo3(this, i);
|
|
925
|
+
o ? t.moveOffsetY = o.y : t.moveOffsetY = 0, r.nav.top.style.cursor = "move";
|
|
922
926
|
}
|
|
923
927
|
}
|
|
924
928
|
else
|
|
925
|
-
t.resizing = this, DayPilot.Global.resizing = this, t.originalMouse = DayPilot.mc(i), t.originalHeight = this.offsetHeight, t.originalTop = this.offsetTop,
|
|
926
|
-
var
|
|
927
|
-
|
|
928
|
-
var h = document.createElement("div");
|
|
929
|
-
h.setAttribute("unselectable", "on"), h.className = this.K("_event_bar_inner"), h.style.top = d + "%", 0 < c && c <= 1 ? h.style.height = "1px" : h.style.height = c + "%", i.barColor && (h.style.backgroundColor = i.barColor), u.appendChild(h), r.appendChild(u);
|
|
930
|
-
} if (e.client.deleteEnabled()) {
|
|
929
|
+
t.resizing = this, DayPilot.Global.resizing = this, t.originalMouse = DayPilot.mc(i), t.originalHeight = this.offsetHeight, t.originalTop = this.offsetTop, r.nav.top.style.cursor = this.style.cursor; return !1; }; var l = document.createElement("div"); if (l.setAttribute("unselectable", "on"), l.className = r.K("_event_inner"), "darker" === a.borderColor && a.backColor ? l.style.borderColor = DayPilot.ColorUtil.darker(a.backColor, 2) : l.style.borderColor = a.borderColor, a.backColor && (l.style.background = a.backColor), a.fontColor && (l.style.color = a.fontColor), o && (s.style.borderRadius = o, l.style.borderRadius = o), s.appendChild(l), e.client.barVisible()) {
|
|
930
|
+
var d = e.part.height - 2, c = 100 * e.part.barTop / d, u = Math.ceil(100 * e.part.barHeight / d), h = document.createElement("div");
|
|
931
|
+
h.setAttribute("unselectable", "on"), h.className = this.K("_event_bar"), h.style.position = "absolute", a.barBackColor && (h.style.backgroundColor = a.barBackColor);
|
|
931
932
|
var f = document.createElement("div");
|
|
932
|
-
f.
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
933
|
+
f.setAttribute("unselectable", "on"), f.className = this.K("_event_bar_inner"), f.style.top = c + "%", 0 < u && u <= 1 ? f.style.height = "1px" : f.style.height = u + "%", a.barColor && (f.style.backgroundColor = a.barColor), h.appendChild(f), s.appendChild(h);
|
|
934
|
+
} if (e.client.deleteEnabled()) {
|
|
935
|
+
var m = document.createElement("div");
|
|
936
|
+
m.style.position = "absolute", m.style.right = "2px", m.style.top = "2px", m.style.width = "17px", m.style.height = "17px", m.className = r.K("_event_delete"), m.onmousedown = function (e) { e.stopPropagation(); }, m.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && r.ua(t); }, m.style.display = "none", s.deleteIcon = m, s.appendChild(m);
|
|
937
|
+
} var p = a.areas ? DayPilot.Areas.copy(a.areas) : []; if (DayPilot.Areas.attach(s, e, { "areas": p }), "function" == typeof r.onAfterEventRender) {
|
|
938
|
+
var v = {};
|
|
939
|
+
v.e = s.event, v.div = s, r.onAfterEventRender(v);
|
|
940
|
+
} if (function () { var t = {}; if (t.control = r, t.e = e, t.element = null, s.domArgs = t, "function" == typeof r.onBeforeEventDomAdd && r.onBeforeEventDomAdd(t), t.element) {
|
|
941
|
+
var a = l;
|
|
942
|
+
if (a) {
|
|
943
|
+
t.Fa = a;
|
|
944
|
+
if (i(t.element)) {
|
|
945
|
+
if (!r.Ha.Ga)
|
|
946
|
+
throw new DayPilot.Exception("Can't reach Vue");
|
|
947
|
+
r.Ha.Ia = !0, r.Ha.La(t.element, a), r.Ha.Ia = !1;
|
|
948
|
+
}
|
|
949
|
+
else
|
|
950
|
+
a.appendChild(t.element);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
else
|
|
954
|
+
l.innerHTML = e.client.innerHTML(); }(), n.rows[0].cells[e.part.dayIndex]) {
|
|
955
|
+
n.rows[0].cells[e.part.dayIndex].firstChild.appendChild(s), r.Ma(s);
|
|
956
|
+
} r.elements.events.push(s); }, this.Ma = function (e) { for (var t = e && e.childNodes ? e.childNodes.length : 0, i = 0; i < t; i++)
|
|
939
957
|
try {
|
|
940
958
|
var a = e.childNodes[i];
|
|
941
|
-
1 === a.nodeType && (a.unselectable = "on", this.
|
|
959
|
+
1 === a.nodeType && (a.unselectable = "on", this.Ma(a));
|
|
942
960
|
}
|
|
943
961
|
catch (e) { } }, this.ka = function () { for (var e = 0; e < this.va.length; e++) {
|
|
944
962
|
var t = this.va[e];
|
|
@@ -949,17 +967,17 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
949
967
|
var s = o[r];
|
|
950
968
|
s.part.width = 100 / a.lines.length, s.part.left = s.part.width * n;
|
|
951
969
|
var l = n === a.lines.length - 1;
|
|
952
|
-
l || (s.part.width = 1.5 * s.part.width), this.
|
|
970
|
+
l || (s.part.width = 1.5 * s.part.width), this.Ka(s);
|
|
953
971
|
}
|
|
954
|
-
} }, this.
|
|
955
|
-
var
|
|
956
|
-
|
|
972
|
+
} }, this.Na = function () { this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.K("_main")), this.nav.top.style.MozUserSelect = "none", this.nav.top.style.KhtmlUserSelect = "none", this.nav.top.style.position = "relative", this.nav.top.style.width = this.width ? this.width : "100%", this.hideUntilInit && (this.nav.top.style.visibility = "hidden"), this.visible || (this.nav.top.style.display = "none"), this.nav.scroll = document.createElement("div"), this.nav.scroll.style.height = this.Oa() + "px", "BusinessHours" === this.heightSpec ? this.nav.scroll.style.overflow = "auto" : this.nav.scroll.style.overflow = "hidden", this.nav.scroll.style.position = "relative"; var e = this.Pa(); this.nav.top.appendChild(e), this.nav.scroll.style.zoom = 1; var t = this.Qa(); this.nav.scrollable = t.firstChild, this.nav.scroll.appendChild(t), this.nav.top.appendChild(this.nav.scroll), this.nav.scrollLayer = document.createElement("div"), this.nav.scrollLayer.style.position = "absolute", this.nav.scrollLayer.style.top = "0px", this.nav.scrollLayer.style.left = "0px", this.nav.top.appendChild(this.nav.scrollLayer), this.nav.loading = document.createElement("div"), this.nav.loading.style.position = "absolute", this.nav.loading.style.top = "0px", this.nav.loading.style.left = this.hourWidth + 5 + "px", this.nav.loading.innerHTML = r.Ra(r.loadingLabelText, r.loadingLabelHtml), this.nav.loading.style.display = "none", this.nav.top.appendChild(this.nav.loading); }, this.ia = function () { this.fasterDispose || DayPilot.pu(this.nav.hourTable), this.nav.scrollable.rows[0].cells[0].innerHTML = "", this.nav.hourTable = this.Sa(), this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable); }, this.Qa = function () { var e = document.createElement("div"); e.style.zoom = 1, e.style.position = "relative"; var t = document.createElement("table"); t.cellSpacing = "0", t.cellPadding = "0", t.border = "0", t.style.border = "0px none", t.style.width = "100%", t.style.position = "absolute"; var i, a = t.insertRow(-1); i = a.insertCell(-1), i.valign = "top", i.style.padding = "0px", i.style.border = "0px none", this.nav.hourTable = this.Sa(), i.appendChild(this.nav.hourTable), i = a.insertCell(-1), i.valign = "top", i.width = "100%", i.style.padding = "0px", i.style.border = "0px none"; var n = document.createElement("div"); return n.style.position = "relative", i.appendChild(n), n.appendChild(this.Ta()), n.appendChild(this.Ua()), e.appendChild(t), this.nav.zoom = e, e; }, this.Ta = function () { var e = document.createElement("table"); return e.cellPadding = "0", e.cellSpacing = "0", e.border = "0", e.style.width = "100%", e.style.border = "0px none", e.style.tableLayout = "fixed", this.nav.main = e, this.nav.events = e, e; }, this.Ua = function () { var e = document.createElement("table"); e.style.top = "0px", e.cellPadding = "0", e.cellSpacing = "0", e.border = "0", e.style.position = "absolute", e.style.width = "100%", e.style.border = "0px none", e.style.tableLayout = "fixed", this.nav.events = e; for (var t = this.va, i = t.length, a = e.insertRow(-1), n = 0; n < i; n++) {
|
|
973
|
+
var o = a.insertCell(-1);
|
|
974
|
+
o.style.padding = "0px", o.style.border = "0px none", o.style.height = "0px", o.style.overflow = "visible", r.rtl || (o.style.textAlign = "left");
|
|
957
975
|
var s = document.createElement("div");
|
|
958
|
-
s.style.marginRight =
|
|
976
|
+
s.style.marginRight = r.columnMarginRight + "px", s.style.marginLeft = r.columnMarginLeft + "px", s.style.position = "relative", s.style.height = "1px", s.style.marginTop = "-1px";
|
|
959
977
|
var l = document.createElement("div");
|
|
960
|
-
|
|
961
|
-
} return e; }, this.
|
|
962
|
-
this.
|
|
978
|
+
o.selection = l, o.appendChild(s), o.appendChild(l);
|
|
979
|
+
} return e; }, this.Sa = function () { var e = document.createElement("table"); e.cellSpacing = "0", e.cellPadding = "0", e.border = "0", e.style.border = "0px none", e.style.width = this.hourWidth + "px", e.oncontextmenu = function () { return !1; }; for (var t = r.la(), i = 0; i < t; i++)
|
|
980
|
+
this.Va(e, i); return e; }, this.Va = function (e, t) { var i = 2 * this.cellHeight, a = e.insertRow(-1); a.style.height = i + "px"; var n = a.insertCell(-1); n.valign = "bottom", n.unselectable = "on", n.style.cursor = "default", n.style.padding = "0px", n.style.border = "0px none"; var o = document.createElement("div"); o.style.position = "relative", o.className = this.K("_rowheader"), o.style.width = this.hourWidth + "px", o.style.height = i + "px", o.style.overflow = "hidden", o.unselectable = "on"; var l = document.createElement("div"); l.className = this.K("_rowheader_inner"), l.unselectable = "on"; var d = document.createElement("div"); d.unselectable = "on"; var c = this.startDate.addHours(t).addHours(r.pa()), u = c.getHours(), h = u < 12, f = s.timeFormat(); "Clock12Hours" === f && (u %= 12, 0 === u && (u = 12)), d.innerHTML = u; var m = document.createElement("span"); m.unselectable = "on", m.className = this.K("_rowheader_minutes"); var p; p = "Clock12Hours" === f ? h ? "AM" : "PM" : "00", m.innerHTML = p, d.appendChild(m), l.appendChild(d), o.appendChild(l), n.appendChild(o); }, this.Oa = function () { switch (this.heightSpec) {
|
|
963
981
|
case "Full": return 48 * this.cellHeight;
|
|
964
982
|
case "BusinessHours":
|
|
965
983
|
var e = this.na();
|
|
@@ -968,201 +986,231 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
968
986
|
var e = this.na();
|
|
969
987
|
return e * this.cellHeight * 2;
|
|
970
988
|
default: throw "DayPilot.Calendar: Unexpected 'heightSpec' value.";
|
|
971
|
-
} }, this.
|
|
989
|
+
} }, this.Wa = function () { var e = r.nav.corner ? r.nav.corner.parentNode : null; if (e) {
|
|
972
990
|
e.innerHTML = "";
|
|
973
|
-
var t = this.
|
|
974
|
-
e.appendChild(t),
|
|
975
|
-
} }, this.
|
|
991
|
+
var t = this.Xa();
|
|
992
|
+
e.appendChild(t), r.nav.corner = t;
|
|
993
|
+
} }, this.Pa = function () { var e = document.createElement("div"); e.style.overflow = "auto"; var t = document.createElement("table"); t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = "100%", t.style.borderCollapse = "separate", t.style.border = "0px none"; var i = t.insertRow(-1), a = i.insertCell(-1); a.style.padding = "0px", a.style.border = "0px none"; var n = this.Xa(); a.appendChild(n), this.nav.corner = n, a = i.insertCell(-1), a.style.width = "100%", a.valign = "top", a.style.position = "relative", a.style.padding = "0px", a.style.border = "0px none", this.nav.header = document.createElement("table"), this.nav.header.cellPadding = "0", this.nav.header.cellSpacing = "0", this.nav.header.border = "0", this.nav.header.width = "100%", this.nav.header.style.tableLayout = "fixed", this.nav.header.oncontextmenu = function () { return !1; }; var o = "hidden" !== this.nav.scroll.style.overflow; if (a.appendChild(this.nav.header), o) {
|
|
976
994
|
a = i.insertCell(-1), a.unselectable = "on";
|
|
977
995
|
var r = document.createElement("div");
|
|
978
996
|
r.unselectable = "on", r.style.position = "relative", r.style.width = "16px", r.style.height = this.headerHeight + "px", r.className = this.K("_cornerright");
|
|
979
997
|
var s = document.createElement("div");
|
|
980
998
|
s.className = this.K("_cornerright_inner"), r.appendChild(s), a.appendChild(r), this.nav.cornerRight = r;
|
|
981
|
-
} return e.appendChild(t), e; }, this.
|
|
999
|
+
} return e.appendChild(t), e; }, this.Xa = function () { var e = document.createElement("div"); e.style.position = "relative", e.className = this.K("_corner"), e.style.width = this.hourWidth + "px", e.style.height = this.headerHeight + "px", e.oncontextmenu = function () { return !1; }; var t = document.createElement("div"); return t.unselectable = "on", t.className = this.K("_corner_inner"), e.appendChild(t), e; }, this.X = function () { var e = this.nav.main; e.root = null, e.onmouseup = null; for (var t = 0; t < e.rows.length; t++)
|
|
982
1000
|
for (var i = e.rows[t], a = 0; a < i.cells.length; a++) {
|
|
983
1001
|
var n = i.cells[a];
|
|
984
|
-
|
|
985
|
-
} this.fasterDispose || DayPilot.pu(e); }, this.
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1002
|
+
r.Ya(n);
|
|
1003
|
+
} this.fasterDispose || DayPilot.pu(e); }, this.Ya = function (e) { e && (!function () { var t = e, a = t.domArgs; if (t.domArgs = null, a && "function" == typeof r.onBeforeCellDomRemove && r.onBeforeCellDomRemove(a), a && "function" == typeof r.onBeforeCellDomAdd) {
|
|
1004
|
+
var n = a && a.Fa;
|
|
1005
|
+
if (n) {
|
|
1006
|
+
r.Ha.Ga && i(a.element) && (r.Ha.Ia = !0, r.Ha.Ja(n), r.Ha.Ia = !1);
|
|
1007
|
+
}
|
|
1008
|
+
} }(), e.root = null, e.onmousedown = null, e.onmousemove = null, e.onmouseout = null, e.onmouseup = null); }, this.ha = function () { var e = this.nav.main, a = 18e5, n = this.oa(), o = r.va; for (e && this.X(); e && e.rows && e.rows.length > 0;)
|
|
1009
|
+
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.tableCreated = !0; for (var s = o.length, l = this.nav.events; l && l.rows && l.rows.length > 0;)
|
|
1010
|
+
this.fasterDispose || DayPilot.pu(l.rows[0]), l.deleteRow(0); for (var s = o.length, d = l.insertRow(-1), c = 0; c < s; c++) {
|
|
1011
|
+
var u = d.insertCell(-1);
|
|
1012
|
+
u.style.padding = "0px", u.style.border = "0px none", u.style.height = "0px", u.style.overflow = "visible", r.rtl || (u.style.textAlign = "left");
|
|
992
1013
|
var h = document.createElement("div");
|
|
993
|
-
h.style.
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
var u =
|
|
1001
|
-
u.
|
|
1002
|
-
var
|
|
1003
|
-
|
|
1014
|
+
h.style.marginRight = r.columnMarginRight + "px", h.style.marginLeft = r.columnMarginLeft + "px", h.style.position = "relative", h.style.height = "1px", h.style.marginTop = "-1px";
|
|
1015
|
+
var f = document.createElement("div");
|
|
1016
|
+
f.style.position = "relative", u.selection = f, u.appendChild(h), u.appendChild(f);
|
|
1017
|
+
} for (var m = 0; m < n; m++) {
|
|
1018
|
+
var d = e.insertRow(-1);
|
|
1019
|
+
d.style.MozUserSelect = "none", d.style.KhtmlUserSelect = "none";
|
|
1020
|
+
for (var c = 0; c < s; c++) {
|
|
1021
|
+
var p = this.va[c], u = d.insertCell(-1);
|
|
1022
|
+
u.start = p.start.addTime(m * a), u.end = u.start.addTime(a), u.resource = p.id, u.onmousedown = this.wa, u.onmouseup = function () { return !1; }, u.onclick = function () { return !1; }, u.root = this, u.style.padding = "0px", u.style.border = "0px none", u.style.verticalAlign = "top", u.style.height = r.cellHeight + "px", u.style.overflow = "hidden", u.unselectable = "on";
|
|
1023
|
+
var h = document.createElement("div");
|
|
1024
|
+
h.unselectable = "on", h.style.height = r.cellHeight + "px", h.style.position = "relative", h.className = this.K("_cell");
|
|
1025
|
+
var v = this.Za(u.start, u.end), y = { "business": v, "text": null, "html": null, "cssClass": null, "backColor": null, "backImage": null, "backRepeat": null }, g = { "start": u.start, "end": u.end, "resource": u.resource, "properties": y };
|
|
1026
|
+
!function () { if ("function" == typeof r.onBeforeCellRender) {
|
|
1027
|
+
var e = {};
|
|
1028
|
+
e.cell = g, r.onBeforeCellRender(e);
|
|
1029
|
+
} }(), y.business && DayPilot.Util.addClass(h, r.K("_cell_business")), y.cssClass && DayPilot.Util.addClass(h, y.cssClass);
|
|
1030
|
+
var b = document.createElement("div");
|
|
1031
|
+
b.setAttribute("unselectable", "on"), b.className = this.K("_cell_inner");
|
|
1032
|
+
var D = DayPilot.Util.escapeTextHtml(y.text, y.html);
|
|
1033
|
+
D && (b.innerHTML = D), y.backColor && (b.style.backgroundColor = y.backColor), y.backImage && (b.style.backgroundImage = "url(" + y.backImage + ")"), y.backRepeat && (b.style.backgroundRepeat = y.backRepeat), h.appendChild(b), function () { if ("function" == typeof r.onBeforeCellDomAdd || "function" == typeof r.onBeforeCellDomRemove) {
|
|
1004
1034
|
var e = {};
|
|
1005
|
-
e.
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1035
|
+
if (e.control = r, e.cell = g, e.element = null, u.domArgs = e, "function" == typeof r.onBeforeCellDomAdd && r.onBeforeCellDomAdd(e), e.element) {
|
|
1036
|
+
var t = b;
|
|
1037
|
+
if (t) {
|
|
1038
|
+
e.Fa = t;
|
|
1039
|
+
if (i(e.element)) {
|
|
1040
|
+
if (!r.Ha.Ga)
|
|
1041
|
+
throw new DayPilot.Exception("Can't reach Vue");
|
|
1042
|
+
r.Ha.Ia = !0, r.Ha.La(e.element, t), r.Ha.Ia = !1;
|
|
1043
|
+
}
|
|
1044
|
+
else
|
|
1045
|
+
t.appendChild(e.element);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
} }(), u.appendChild(h);
|
|
1049
|
+
}
|
|
1050
|
+
} e.root = this, r.nav.scrollable.onmousemove = function (e) { var i = r.nav.scrollable; r.coords = DayPilot.mo3(i, e); var a = DayPilot.mc(e); if (t.resizing) {
|
|
1051
|
+
t.resizingShadow || (t.resizingShadow = r._(t.resizing, !1, r.shadow));
|
|
1052
|
+
var n = r.cellHeight, o = 1, s = a.y - t.originalMouse.y;
|
|
1015
1053
|
if ("bottom" === t.resizing.dpBorder) {
|
|
1016
|
-
var l = Math.floor((t.originalHeight + t.originalTop + s +
|
|
1017
|
-
l <
|
|
1018
|
-
var d =
|
|
1054
|
+
var l = Math.floor((t.originalHeight + t.originalTop + s + n / 2) / n) * n - t.originalTop + o;
|
|
1055
|
+
l < n && (l = n);
|
|
1056
|
+
var d = r.nav.main.clientHeight;
|
|
1019
1057
|
t.originalTop + l > d && (l = d - t.originalTop), t.resizingShadow.style.height = l + "px";
|
|
1020
1058
|
}
|
|
1021
1059
|
else if ("top" === t.resizing.dpBorder) {
|
|
1022
|
-
var c = Math.floor((t.originalTop + s -
|
|
1023
|
-
c <
|
|
1060
|
+
var c = Math.floor((t.originalTop + s - o + n / 2) / n) * n + o;
|
|
1061
|
+
c < o && (c = o), c > t.originalTop + t.originalHeight - n && (c = t.originalTop + t.originalHeight - n);
|
|
1024
1062
|
var l = t.originalHeight - (c - t.originalTop);
|
|
1025
|
-
l <
|
|
1063
|
+
l < n ? l = n : t.resizingShadow.style.top = c + "px", t.resizingShadow.style.height = l + "px";
|
|
1026
1064
|
}
|
|
1027
1065
|
}
|
|
1028
1066
|
else if (t.moving) {
|
|
1029
|
-
if (!
|
|
1067
|
+
if (!r.coords)
|
|
1030
1068
|
return;
|
|
1031
1069
|
if (!t.movingShadow) {
|
|
1032
1070
|
var u = 3, a = DayPilot.mc(e), h = Math.abs(a.x - t.originalMouse.x) + Math.abs(a.y - t.originalMouse.y);
|
|
1033
1071
|
if (h <= u)
|
|
1034
1072
|
return;
|
|
1035
|
-
t.movingShadow =
|
|
1036
|
-
}
|
|
1037
|
-
var
|
|
1038
|
-
f || (f =
|
|
1039
|
-
var c = Math.floor((
|
|
1040
|
-
c <
|
|
1041
|
-
var m =
|
|
1042
|
-
c + p > d && (c = d - p), DayPilot.Util.addClass(t.moving,
|
|
1043
|
-
var v = m.clientWidth / m.rows[0].cells.length, y = Math.floor((
|
|
1073
|
+
t.movingShadow = r._(t.moving, !0, r.shadow), t.movingShadow.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px";
|
|
1074
|
+
}
|
|
1075
|
+
var n = r.cellHeight, o = 1, f = t.moveOffsetY;
|
|
1076
|
+
f || (f = n / 2);
|
|
1077
|
+
var c = Math.floor((r.coords.y - f - o + n / 2) / n) * n + o;
|
|
1078
|
+
c < o && (c = o);
|
|
1079
|
+
var m = r.nav.events, d = r.nav.main.clientHeight + o, p = parseInt(t.movingShadow.style.height);
|
|
1080
|
+
c + p > d && (c = d - p), DayPilot.Util.addClass(t.moving, r.K("_event_moving_source")), t.movingShadow.parentNode.style.display = "none", t.movingShadow.style.top = c + "px", t.movingShadow.parentNode.style.display = "";
|
|
1081
|
+
var v = m.clientWidth / m.rows[0].cells.length, y = Math.floor((r.coords.x - 45) / v);
|
|
1044
1082
|
y < 0 && (y = 0), y < m.rows[0].cells.length && y >= 0 && t.movingShadow.column !== y && (t.movingShadow.column = y, t.moveShadow(m.rows[0].cells[y]));
|
|
1045
1083
|
}
|
|
1046
1084
|
else if (t.selecting) {
|
|
1047
|
-
var a = DayPilot.mc(e), g =
|
|
1048
|
-
a.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(D), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(D), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]),
|
|
1049
|
-
} },
|
|
1085
|
+
var a = DayPilot.mc(e), g = r.Aa.getCellCoords(), b = t.column, D = r.nav.main.rows[g.y].cells[b];
|
|
1086
|
+
a.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(D), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(D), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), r.xa();
|
|
1087
|
+
} }, r.nav.scrollable.style.display = ""; }, this.Za = function (e, t) { return this.businessBeginsHour < this.businessEndsHour ? !(e.getHours() < this.businessBeginsHour || e.getHours() >= this.businessEndsHour || 6 === e.getDayOfWeek() || 0 === e.getDayOfWeek()) : e.getHours() >= this.businessBeginsHour || e.getHours() < this.businessEndsHour; }, this.Y = function () { var e = this.nav.header; if (e && e.rows)
|
|
1050
1088
|
for (var t = 0; t < e.rows.length; t++)
|
|
1051
1089
|
for (var i = e.rows[t], a = 0; a < i.cells.length; a++) {
|
|
1052
1090
|
var n = i.cells[a];
|
|
1053
1091
|
n.onclick = null, n.onmousemove = null, n.onmouseout = null;
|
|
1054
|
-
} this.fasterDispose || DayPilot.pu(e); }, this
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1092
|
+
} this.fasterDispose || DayPilot.pu(e); }, this.$a = function (e) {
|
|
1093
|
+
function t(t) {
|
|
1094
|
+
var n = a[t], o = e ? i.insertCell(-1) : i.cells[t];
|
|
1095
|
+
o.data = n, o.style.overflow = "hidden", o.style.padding = "0px", o.style.border = "0px none", o.style.height = r.headerHeight + "px", o.onclick = r._a;
|
|
1096
|
+
var s, l = e ? document.createElement("div") : o.firstChild;
|
|
1097
|
+
e ? (l.unselectable = "on", l.style.MozUserSelect = "none", l.style.cursor = "default", l.style.position = "relative",
|
|
1098
|
+
l.className = r.K("_colheader"), l.style.height = r.headerHeight + "px", r.headerTextWrappingEnabled || (l.style.whiteSpace = "nowrap"), s = document.createElement("div"), s.className = r.K("_colheader_inner"), s.unselectable = "on", l.appendChild(s), o.appendChild(l)) : s = l.firstChild;
|
|
1099
|
+
var d = {};
|
|
1100
|
+
d.header = {}, d.header.cssClass = null, d.header.verticalAlignment = "center", d.column = r.ab(n, r), "function" == typeof r.onBeforeHeaderRender && (DayPilot.Util.copyProps(n, d.header, ["id", "start", "name", "html", "backColor", "toolTip", "areas"]), r.onBeforeHeaderRender(d), DayPilot.Util.copyProps(d.header, n, ["html", "backColor", "toolTip", "areas", "cssClass", "verticalAlignment"])), n.toolTip && (s.title = n.toolTip), n.cssClass && DayPilot.Util.addClass(l, n.cssClass), n.backColor && (s.style.background = n.backColor), n.areas && DayPilot.Areas.attach(l, n);
|
|
1101
|
+
var c = n.verticalAlignment;
|
|
1102
|
+
if (c)
|
|
1103
|
+
switch (s.style.display = "flex", c) {
|
|
1104
|
+
case "center":
|
|
1105
|
+
s.style.alignItems = "center";
|
|
1106
|
+
break;
|
|
1107
|
+
case "top":
|
|
1108
|
+
s.style.alignItems = "flex-start";
|
|
1109
|
+
break;
|
|
1110
|
+
case "bottom": s.style.alignItems = "flex-end";
|
|
1111
|
+
}
|
|
1112
|
+
l.firstChild.innerHTML = r.Ra(n.name, n.html);
|
|
1113
|
+
}
|
|
1114
|
+
for (var i = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], a = this.va, n = a.length, o = 0; o < n; o++)
|
|
1115
|
+
t(o);
|
|
1116
|
+
}, this._a = function (e) { if ("Disabled" !== r.headerClickHandling) {
|
|
1117
|
+
var t = this.data, i = r.ab(t), a = {};
|
|
1118
|
+
a.header = {}, a.header.id = t.id, a.header.name = t.name, a.header.start = t.start, a.column = i, a.originalEvent = e, a.shift = e.shiftKey, a.ctrl = e.ctrlKey, a.meta = e.metaKey, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof r.onHeaderClick && (r.onHeaderClick(a), a.preventDefault.value) || "function" == typeof r.onHeaderClicked && r.onHeaderClicked(a);
|
|
1119
|
+
} }, this.ab = function (e) { return new DayPilot.CalendarColumn(e, r); }, this.bb = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.ga = function () { var e = this.nav.header, t = !0, i = this.va; for (i.length; this.headerCreated && e && e.rows && e.rows.length > 0;)
|
|
1120
|
+
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.headerCreated = !0; this.$a(t); }, this.loadingStart = function () { this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = ""); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.S("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.cb = function () { var e = this.nav.scroll; e.root = this, r.db(), e.onscroll || (e.onscroll = function () { r.eb(); }); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.fb = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && (t.style.width = e + "px"); }, this.gb = function () { t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mouseup", t.gMouseUp), DayPilot.re(window, "unload", t.gUnload)); }, this.events = {}, this.events.add = function (e) { var t = null; if (e instanceof DayPilot.Event)
|
|
1073
1121
|
t = e.data;
|
|
1074
1122
|
else {
|
|
1075
1123
|
if ("object" != typeof e)
|
|
1076
1124
|
throw "DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";
|
|
1077
1125
|
t = e;
|
|
1078
|
-
}
|
|
1126
|
+
} r.events.list || (r.events.list = []), r.events.list.push(t), r.hb({ "eventsOnly": !0 }), r.sa.notify(); }, this.events.find = function (e) { if (!r.events.list)
|
|
1079
1127
|
return null; if ("function" == typeof e) {
|
|
1080
|
-
for (var t = e, i = 0; i <
|
|
1081
|
-
var a = new DayPilot.Event(
|
|
1128
|
+
for (var t = e, i = 0; i < r.events.list.length; i++) {
|
|
1129
|
+
var a = new DayPilot.Event(r.events.list[i], r);
|
|
1082
1130
|
if (t(a))
|
|
1083
1131
|
return a;
|
|
1084
1132
|
}
|
|
1085
1133
|
return null;
|
|
1086
|
-
} for (var i = 0; i <
|
|
1087
|
-
var
|
|
1088
|
-
if (
|
|
1089
|
-
return new DayPilot.Event(
|
|
1090
|
-
} return null; }, this.events.update = function (e) { if (e instanceof DayPilot.Event)
|
|
1134
|
+
} for (var i = 0; i < r.events.list.length; i++) {
|
|
1135
|
+
var n = r.events.list[i];
|
|
1136
|
+
if (n.id === e)
|
|
1137
|
+
return new DayPilot.Event(n, r);
|
|
1138
|
+
} return null; }, this.events.forRange = function (e, t) { return e = new DayPilot.Date(e), t = new DayPilot.Date(t), (r.events.list || []).filter(function (i) { return a(e, t, new DayPilot.Date(i.start), new DayPilot.Date(i.end)); }).map(function (e) { return new DayPilot.Event(e, r); }); }, this.events.update = function (e) { if (e instanceof DayPilot.Event)
|
|
1091
1139
|
e.commit();
|
|
1092
1140
|
else if ("object" == typeof e) {
|
|
1093
|
-
var t =
|
|
1141
|
+
var t = r.events.find(e.id);
|
|
1094
1142
|
if (t) {
|
|
1095
|
-
var i = DayPilot.indexOf(
|
|
1096
|
-
|
|
1143
|
+
var i = DayPilot.indexOf(r.events.list, t.data);
|
|
1144
|
+
r.events.list.splice(i, 1, e);
|
|
1097
1145
|
}
|
|
1098
|
-
}
|
|
1146
|
+
} r.hb({ "eventsOnly": !0 }), r.sa.notify(); }, this.events.remove = function (e) { var t; if (e instanceof DayPilot.Event)
|
|
1099
1147
|
t = e.data;
|
|
1100
1148
|
else if ("object" == typeof e) {
|
|
1101
|
-
var i =
|
|
1149
|
+
var i = r.events.find(e.id);
|
|
1102
1150
|
i && (t = i.data);
|
|
1103
1151
|
}
|
|
1104
1152
|
else if ("string" == typeof e || "number" == typeof e) {
|
|
1105
|
-
var i =
|
|
1153
|
+
var i = r.events.find(e);
|
|
1106
1154
|
i && (t = i.data);
|
|
1107
|
-
} var a = DayPilot.indexOf(
|
|
1108
|
-
i = JSON.parse(
|
|
1155
|
+
} var a = DayPilot.indexOf(r.events.list, t); r.events.list.splice(a, 1), r.hb({ "eventsOnly": !0 }), r.sa.notify(); }, this.events.load = function (e, t, i) { var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, n = function (e) { var i, n = e.request; try {
|
|
1156
|
+
i = JSON.parse(n.responseText);
|
|
1109
1157
|
}
|
|
1110
1158
|
catch (e) {
|
|
1111
|
-
var
|
|
1112
|
-
return
|
|
1159
|
+
var o = {};
|
|
1160
|
+
return o.exception = e, void a(o);
|
|
1113
1161
|
} if (DayPilot.isArray(i)) {
|
|
1114
1162
|
var s = {};
|
|
1115
1163
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1116
1164
|
return;
|
|
1117
|
-
|
|
1118
|
-
} }; if (
|
|
1119
|
-
DayPilot.Http.ajax({ "method": "POST", "data": { "start":
|
|
1165
|
+
r.events.list = i, r.Ba && r.hb({ "eventsOnly": !0 });
|
|
1166
|
+
} }; if (r.eventsLoadMethod && "POST" === r.eventsLoadMethod.toUpperCase())
|
|
1167
|
+
DayPilot.Http.ajax({ "method": "POST", "data": { "start": r.visibleStart().toString(), "end": r.visibleEnd().toString() }, "url": e, "success": n, "error": a });
|
|
1120
1168
|
else {
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1123
|
-
} }, this.
|
|
1124
|
-
|
|
1125
|
-
var e =
|
|
1126
|
-
e.className =
|
|
1127
|
-
var t =
|
|
1128
|
-
t && (t.className =
|
|
1129
|
-
} }, this.update = function (e) { if (
|
|
1130
|
-
throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");
|
|
1169
|
+
var o = e, s = "start=" + r.visibleStart().toString() + "&end=" + r.visibleEnd().toString();
|
|
1170
|
+
o += o.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": o, "success": n, "error": a });
|
|
1171
|
+
} }, this.ib = function () { if (r.nav.top.className !== r.K("_main")) {
|
|
1172
|
+
r.nav.top.className = r.K("_main");
|
|
1173
|
+
var e = r.nav.corner;
|
|
1174
|
+
e.className = r.K("_corner"), e.firstChild.className = r.K("_corner_inner");
|
|
1175
|
+
var t = r.nav.cornerRight;
|
|
1176
|
+
t && (t.className = r.K("_cornerright"), t.firstChild.className = r.K("_cornerright_inner"));
|
|
1177
|
+
} }, this.update = function (e) { if (r.O)
|
|
1178
|
+
throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed."); r.jb(e), r.hb(); }, this.hb = function (e) { if (this.Ba) {
|
|
1131
1179
|
var e = e || {}, t = !e.eventsOnly;
|
|
1132
|
-
|
|
1133
|
-
} }, this.
|
|
1134
|
-
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ?
|
|
1135
|
-
this.
|
|
1180
|
+
r.kb(), r.W(), r.nav.top.style.cursor = "auto", t && (r.da(), r.ga(), r.ha(), r.ia(), r.ja(), r.Wa(), r.fb(), r.ib(), r.db()), r.ea(), r.fa(), r.ka(), r.clearSelection(), this.visible ? this.show() : this.hide();
|
|
1181
|
+
} }, this.lb = null, this.jb = function (e) { if (e) {
|
|
1182
|
+
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? r.events.list = e.list : r.events.list = e; } }, "columns": { "preInit": function () { r.columns.list = this.data; } } };
|
|
1183
|
+
this.lb = t;
|
|
1136
1184
|
for (var i in e)
|
|
1137
1185
|
if (t[i]) {
|
|
1138
1186
|
var a = t[i];
|
|
1139
1187
|
a.data = e[i], a.preInit && a.preInit();
|
|
1140
1188
|
}
|
|
1141
1189
|
else
|
|
1142
|
-
|
|
1143
|
-
} }, this.
|
|
1190
|
+
r[i] = e[i];
|
|
1191
|
+
} }, this.mb = function () { var e = this.lb; for (var t in e) {
|
|
1144
1192
|
var i = e[t];
|
|
1145
1193
|
i.postInit && i.postInit();
|
|
1146
|
-
} }, this.
|
|
1194
|
+
} }, this.nb = function () { if (this.id && this.id.tagName)
|
|
1147
1195
|
this.nav.top = this.id;
|
|
1148
1196
|
else {
|
|
1149
1197
|
if ("string" != typeof this.id)
|
|
1150
1198
|
throw "DayPilot.Calendar() constructor requires the target element or its ID as a parameter";
|
|
1151
1199
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
1152
1200
|
throw "DayPilot.Calendar: The placeholder element not found: '" + e + "'.";
|
|
1153
|
-
} }, this.
|
|
1154
|
-
a[
|
|
1155
|
-
var
|
|
1156
|
-
|
|
1157
|
-
} t[e] = a; }, this.ea = function () { var e = this.events.list; if (
|
|
1201
|
+
} }, this.ob = {}, this.ob.events = [], this.pb = function (e) { var t = this.ob.events, i = this.events.list[e], a = {}; for (var n in i)
|
|
1202
|
+
a[n] = i[n]; if (a.start = new DayPilot.Date(i.start), a.end = new DayPilot.Date(i.end), "function" == typeof this.onBeforeEventRender) {
|
|
1203
|
+
var o = {};
|
|
1204
|
+
o.control = r, o.data = a, this.onBeforeEventRender(o);
|
|
1205
|
+
} t[e] = a; }, this.ea = function () { var e = this.events.list; if (r.ob.events = [], e) {
|
|
1158
1206
|
if (!DayPilot.isArray(e))
|
|
1159
1207
|
throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: " + typeof e);
|
|
1160
1208
|
var t = e.length, i = 864e5;
|
|
1161
1209
|
this.cache.pixels = {};
|
|
1162
1210
|
var a = [];
|
|
1163
1211
|
this.scrollLabels = [], this.minStart = 1e4, this.maxEnd = 0;
|
|
1164
|
-
for (var
|
|
1165
|
-
var
|
|
1212
|
+
for (var n = 0; n < t; n++) {
|
|
1213
|
+
var o = e[n], s = o;
|
|
1166
1214
|
if ("object" != typeof s)
|
|
1167
1215
|
throw new DayPilot.Exception("Event data item must be an object");
|
|
1168
1216
|
if (!s.start)
|
|
@@ -1171,67 +1219,72 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1171
1219
|
throw new DayPilot.Exception("Event data item must specify 'end' property");
|
|
1172
1220
|
if (s instanceof DayPilot.Event)
|
|
1173
1221
|
throw new DayPilot.Exception("DayPilot.Calendar: DayPilot.Event object detected in events.list array. Use raw event data instead.");
|
|
1174
|
-
r.start = new DayPilot.Date(r.start), r.end = new DayPilot.Date(r.end);
|
|
1175
1222
|
}
|
|
1176
1223
|
if ("function" == typeof this.onBeforeEventRender)
|
|
1177
|
-
for (var
|
|
1178
|
-
this.
|
|
1179
|
-
for (var
|
|
1224
|
+
for (var n = 0; n < t; n++)
|
|
1225
|
+
this.pb(n);
|
|
1226
|
+
for (var n = 0; n < this.va.length; n++) {
|
|
1180
1227
|
var l = {};
|
|
1181
1228
|
l.minEnd = 1e6, l.maxStart = -1, this.scrollLabels.push(l);
|
|
1182
|
-
var d = this.va[
|
|
1229
|
+
var d = this.va[n];
|
|
1183
1230
|
d.events = [], d.lines = [], d.blocks = [];
|
|
1184
1231
|
for (var c = new DayPilot.Date(d.start), u = c.getTime(), h = c.addTime(i), f = h.getTime(), m = 0; m < t; m++)
|
|
1185
1232
|
if (!a[m]) {
|
|
1186
|
-
var
|
|
1233
|
+
var o = e[m], p = new DayPilot.Date(o.start), v = new DayPilot.Date(o.end), y = p.getTime(), g = v.getTime();
|
|
1187
1234
|
if (!(g < y)) {
|
|
1188
1235
|
var b = !(g <= u || y >= f);
|
|
1189
|
-
if ("Resources" ===
|
|
1190
|
-
var D = new DayPilot.Event(
|
|
1191
|
-
D.part.dayIndex =
|
|
1192
|
-
var
|
|
1193
|
-
if (C === P && (
|
|
1236
|
+
if ("Resources" === r.viewType && (b = b && d.id === o.resource), b) {
|
|
1237
|
+
var D = new DayPilot.Event(o, r);
|
|
1238
|
+
D.part.dayIndex = n, D.part.start = u < y ? p : c, D.part.end = f > g ? v : h;
|
|
1239
|
+
var w = this.getPixels(D.part.start, d.start), x = this.getPixels(D.part.end, d.start), C = w.top, P = x.top;
|
|
1240
|
+
if (C === P && (w.cut || x.cut))
|
|
1194
1241
|
continue;
|
|
1195
|
-
var k =
|
|
1242
|
+
var k = x.boxBottom;
|
|
1196
1243
|
D.part.top = Math.floor(C / this.cellHeight) * this.cellHeight + 1, D.part.height = Math.max(Math.ceil(k / this.cellHeight) * this.cellHeight - D.part.top, this.cellHeight - 1) + 1, D.part.barTop = Math.max(C - D.part.top - 1, 0), D.part.barHeight = Math.max(P - C - 2, 1);
|
|
1197
1244
|
var p = D.part.top, v = D.part.top + D.part.height;
|
|
1198
|
-
p > l.maxStart && (l.maxStart = p), v < l.minEnd && (l.minEnd = v), p < this.minStart && (this.minStart = p), v > this.maxEnd && (this.maxEnd = v), d.events.push(D), "function" == typeof this.onBeforeEventRender && (D.cache = this.
|
|
1245
|
+
p > l.maxStart && (l.maxStart = p), v < l.minEnd && (l.minEnd = v), p < this.minStart && (this.minStart = p), v > this.maxEnd && (this.maxEnd = v), d.events.push(D), "function" == typeof this.onBeforeEventRender && (D.cache = this.ob.events[m]), D.part.start.getTime() === y && D.part.end.getTime() === g && (a[m] = !0);
|
|
1199
1246
|
}
|
|
1200
1247
|
}
|
|
1201
1248
|
}
|
|
1202
1249
|
}
|
|
1203
|
-
for (var
|
|
1204
|
-
var d = this.va[
|
|
1205
|
-
d.events.sort(this.
|
|
1250
|
+
for (var n = 0; n < this.va.length; n++) {
|
|
1251
|
+
var d = this.va[n];
|
|
1252
|
+
d.events.sort(this.qb);
|
|
1206
1253
|
for (var m = 0; m < d.events.length; m++) {
|
|
1207
|
-
var
|
|
1208
|
-
d.putIntoBlock(
|
|
1254
|
+
var o = d.events[m];
|
|
1255
|
+
d.putIntoBlock(o);
|
|
1209
1256
|
}
|
|
1210
1257
|
for (var m = 0; m < d.blocks.length; m++) {
|
|
1211
1258
|
var _ = d.blocks[m];
|
|
1212
|
-
_.events.sort(this.
|
|
1259
|
+
_.events.sort(this.qb);
|
|
1213
1260
|
for (var S = 0; S < _.events.length; S++) {
|
|
1214
|
-
var
|
|
1215
|
-
_.putIntoLine(
|
|
1261
|
+
var o = _.events[S];
|
|
1262
|
+
_.putIntoLine(o);
|
|
1216
1263
|
}
|
|
1217
1264
|
}
|
|
1218
1265
|
}
|
|
1219
|
-
} }, this.
|
|
1220
|
-
return 0; var i = e.start().getTime() - t.start().getTime(); return 0 !== i ? i : t.end().getTime() - e.end().getTime(); }, this.debug = function (e, t) { this.debuggingEnabled && (
|
|
1221
|
-
return n; i = t.getTime(); var o = 18e5, r = a - i, s = r % o, l = r - s, d = l + o; 0 === s && (d = l); var c = {}; return c.cut = !1, c.top = this.
|
|
1222
|
-
var e =
|
|
1223
|
-
|
|
1224
|
-
} }, this.db = function () { var e = 0; "number" == typeof
|
|
1266
|
+
} }, this.qb = function (e, t) { if (!(e && t && e.start && t.start))
|
|
1267
|
+
return 0; var i = e.start().getTime() - t.start().getTime(); return 0 !== i ? i : t.end().getTime() - e.end().getTime(); }, this.debug = function (e, t) { this.debuggingEnabled && (r.debugMessages || (r.debugMessages = []), r.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.getPixels = function (e, t) { t || (t = this.startDate); var i = t.getTime(), a = e.getTime(), n = this.cache.pixels[a + "_" + i]; if (n)
|
|
1268
|
+
return n; i = t.getTime(); var o = 18e5, r = a - i, s = r % o, l = r - s, d = l + o; 0 === s && (d = l); var c = {}; return c.cut = !1, c.top = this.rb(r), c.boxTop = this.rb(l), c.boxBottom = this.rb(d), this.cache.pixels[a + "_" + i] = c, c; }, this.rb = function (e) { return Math.floor(this.cellHeight * e / 18e5); }, this.kb = function () { this.startDate = new DayPilot.Date(this.startDate).getDatePart(); }, this.fa = function () { this.nav.corner && (this.nav.corner.style.height = this.headerHeight + "px"); }, this.ja = function () { var e = this.Oa(); this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px"); }, this.sa = {}, this.sa.scope = null, this.sa.notify = function () { r.sa.scope && r.sa.scope["$apply"](); }, this.sa.apply = function (e) { e(); }, this.eb = function () { if (r.nav.scroll && r.sb()) {
|
|
1269
|
+
var e = r.nav.scroll.scrollTop, t = e / (2 * r.cellHeight);
|
|
1270
|
+
r.tb.scrollHour = t;
|
|
1271
|
+
} }, this.db = function () { var e = 0; e = "number" == typeof r.tb.scrollHour ? 2 * r.cellHeight * r.tb.scrollHour : "Auto" === r.initScrollPos ? "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0 : this.initScrollPos; var t = r.nav.top; "none" === t.style.display ? (t.style.display = "", r.nav.scroll.scrollTop = e, t.style.display = "none") : r.nav.scroll.scrollTop = e; }, this.getScrollY = function () { return r.nav.scroll.scrollTop; }, this.setScrollY = function (e) { r.nav.scroll.scrollTop = e, r.eb(); }, this.ub = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof r.events.list || !r.events.list); }, this.t = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { r.visible = !0, r.nav.top.style.display = "", this.fb(); }, this.hide = function () { r.visible = !1, r.nav.top.style.display = "none"; }, this.vb = function () { this.kb(), this.da(), this.Na(), this.ga(), this.ha(), this.fb(), this.cb(), this.gb(), t.register(this), this.wb(), this.S("Init"); }, this.tb = {}, this.xb = function () { this.tb.themes = [], this.tb.themes.push(this.theme || this.cssClassPrefix); }, this.yb = function () { for (var e = this.tb.themes, t = 0; t < e.length; t++) {
|
|
1225
1272
|
var i = e[t];
|
|
1226
1273
|
DayPilot.Util.removeClass(this.nav.top, i + "_main");
|
|
1227
|
-
} this.
|
|
1274
|
+
} this.tb.themes = []; }, this.zb = function () { if (this.afterRender(null, !1), "function" == typeof this.onAfterRender) {
|
|
1228
1275
|
var e = {};
|
|
1229
1276
|
e.isCallBack = !1, this.onAfterRender(e);
|
|
1230
|
-
} }, this.
|
|
1231
|
-
this.
|
|
1277
|
+
} }, this.Ab = function () { if ("function" == typeof this.onInit && !this.Bb) {
|
|
1278
|
+
this.Bb = !0;
|
|
1232
1279
|
var e = {};
|
|
1233
1280
|
this.onInit(e);
|
|
1234
|
-
} }, this.
|
|
1281
|
+
} }, this.sb = function () { var e = r.nav.top; return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0); }, this.wb = function () { var e = r.sb; e() || (r.V = setInterval(function () { e() && (r.cb(), r.fb(), clearInterval(r.V)); }, 100)); }, this.Ra = function (e, t) { return r.aa.ba() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Ha = {}, this.Ha.Ga = null, this.Ha.Cb = function (e, t, i) { var a = r.Ha.Ga; if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
1282
|
+
var n = a.createVNode(e, i);
|
|
1283
|
+
a.render(n, t);
|
|
1284
|
+
} }, this.Ha.La = function (e, t) { var i = r.Ha.Ga; if ("function" == typeof i.render) {
|
|
1285
|
+
var a = e;
|
|
1286
|
+
DayPilot.isArray(e) && (a = i.h("div", null, e)), i.render(a, t);
|
|
1287
|
+
} }, this.Ha.Ja = function (e) { var t = r.Ha.Ga; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = r.jb, this.internal.xssTextHtml = r.Ra, this.internal.enableVue = function (e) { r.Ha.Ga = e; }, this.internal.vueRef = function () { return r.Ha.Ga; }, this.internal.vueRendering = function () { return r.Ha.Ia; }, this.init = function () { this.nb(); var e = this.ub(); return this.xb(), e ? void this.vb() : (this.kb(), this.da(), this.ea(), this.Na(), this.ga(), this.ha(), this.t(), this.fb(), this.cb(), this.gb(), t.register(this), this.events && (this.fa(), this.ka()), this.zb(), this.Ab(), this.wb(), this.Ba = !0, this); }, this.Init = this.init, this.jb(n);
|
|
1235
1288
|
}, DayPilot.CalendarColumn = function (e, t) { var i = this; i.id = e.id, i.name = e.name, i.data = e.data, i.start = new DayPilot.Date(e.start), i.calendar = t, i.toJSON = function () { var e = {}; return e.id = this.id, this.start && (e.start = this.start.toString()), e.name = this.name, e; }; }, DayPilot.Calendar = t.Calendar, "undefined" != typeof jQuery && !function (e) { e.fn.daypilotCalendar = function (e) { var t = null, i = this.each(function () { if (!this.daypilot) {
|
|
1236
1289
|
var i = new DayPilot.Calendar(this.id);
|
|
1237
1290
|
this.daypilot = i;
|
|
@@ -1242,41 +1295,41 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1242
1295
|
(0, e(r).assign)(t, n);
|
|
1243
1296
|
} for (var s in a)
|
|
1244
1297
|
0 === s.indexOf("on") && !function (i) { n[i] = function (n) { var o = e(a[i]); t["$apply"](function () { o(t, { "args": n }); }); }; }(s); var l = t["$watch"], d = a["config"] || a["daypilotConfig"], c = a["events"] || a["daypilotEvents"]; l.call(t, d, function (e) { for (var t in e)
|
|
1245
|
-
n[t] = e[t]; n.update(), n.
|
|
1298
|
+
n[t] = e[t]; n.update(), n.Ab(); }, !0), l.call(t, c, function (e) { n.events.list = e, n.update(); }, !0); } }; }]); }();
|
|
1246
1299
|
}
|
|
1247
1300
|
}(), "undefined" == typeof DayPilot)
|
|
1248
1301
|
var DayPilot = {};
|
|
1249
|
-
if (function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (e) { this.v = "2024.4.
|
|
1302
|
+
if (function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (e) { this.v = "2024.4.622-lite"; var t = "navigator_" + (new Date).getTime(), i = this; this.onShow = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.prepare = function () { if (this.locale = "en-us", this.target = null, this.targetAlignment = "left", this.resetTarget = !0, this.pattern = this.aa.locale().datePattern, this.theme = "navigator_default", this.patterns = [], this.zIndex = null, e)
|
|
1250
1303
|
for (var t in e)
|
|
1251
|
-
this[t] = e[t]; }, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.
|
|
1304
|
+
this[t] = e[t]; }, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.Db(); this.resetTarget && !e ? this.Eb(this.date) : this.resetTarget || (i.date = e); var t = this.C(); return t && t.addEventListener("input", function () { i.date = i.Db(), i.date && i.navigator.select(i.date, { dontNotify: !0 }); }), document.addEventListener("mousedown", function () { i.close(); }), this; }, this.close = function () { this.sb && (this.sb = !1, this.navigator && this.navigator.dispose(), this.div.innerHTML = "", this.div && this.div.parentNode === document.body && document.body.removeChild(this.div)); }, this.setDate = function (e) { this.date = new DayPilot.Date(e), this.Eb(this.date); }, this.Db = function () { var e = this.C(); if (!e)
|
|
1252
1305
|
return this.date; var t = null; if (t = "INPUT" === e.tagName ? e.value : e.innerText, !t)
|
|
1253
1306
|
return null; for (var a = DayPilot.Date.parse(t, i.pattern), n = 0; n < i.patterns.length; n++) {
|
|
1254
1307
|
if (a)
|
|
1255
1308
|
return a;
|
|
1256
1309
|
a = DayPilot.Date.parse(t, i.patterns[n]);
|
|
1257
|
-
} return a; }, this.
|
|
1310
|
+
} return a; }, this.Eb = function (e) { var t = this.C(); if (t) {
|
|
1258
1311
|
var a = e.toString(i.pattern, i.locale);
|
|
1259
1312
|
"INPUT" === t.tagName ? t.value = a : t.innerHTML = a;
|
|
1260
|
-
} }, this.aa = {}, this.aa.locale = function () { return DayPilot.Locale.find(i.locale); }, this.C = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return i.
|
|
1313
|
+
} }, this.aa = {}, this.aa.locale = function () { return DayPilot.Locale.find(i.locale); }, this.C = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return i.sb; } }), this.show = function () { if (!this.sb) {
|
|
1261
1314
|
var e = this.C(), a = this.navigator, a = new DayPilot.Navigator(t);
|
|
1262
|
-
a.api = 2, a.cssOnly = !0, a.theme = i.theme, a.weekStarts = "Auto", a.locale = i.locale, a.onTimeRangeSelected = function (e) { i.date = e.start; var t = e.start.addTime(a.
|
|
1315
|
+
a.api = 2, a.cssOnly = !0, a.theme = i.theme, a.weekStarts = "Auto", a.locale = i.locale, a.onTimeRangeSelected = function (e) { i.date = e.start; var t = e.start.addTime(a.Fb), n = t.toString(i.pattern, i.locale), e = {}; e.start = t, e.date = t, e.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(e), e.preventDefault.value) || (i.Eb(n), i.close(), "function" == typeof i.onTimeRangeSelected && i.onTimeRangeSelected(e)); }, this.navigator = a;
|
|
1263
1316
|
var n = DayPilot.abs(e), o = e.offsetHeight, r = i.targetAlignment, s = document.createElement("div");
|
|
1264
1317
|
s.style.position = "absolute", "left" === r && (s.style.left = n.x + "px"), s.style.top = n.y + o + "px", i.zIndex && (s.style.zIndex = i.zIndex);
|
|
1265
1318
|
var l = document.createElement("div");
|
|
1266
1319
|
l.id = t, s.appendChild(l), s.addEventListener("mousedown", function (e) { var e = e || window.event; e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }), document.body.appendChild(s), this.div = s;
|
|
1267
|
-
var d = i.
|
|
1268
|
-
if (a.startDate = d, a.
|
|
1320
|
+
var d = i.Db() || (new DayPilot.Date).getDatePart();
|
|
1321
|
+
if (a.startDate = d, a.Fb = d.getTimePart(), a.selectionDay = d.getDatePart(), a.init(), "right" === r) {
|
|
1269
1322
|
var c = n.x + e.offsetWidth - a.nav.top.offsetWidth;
|
|
1270
1323
|
s.style.left = c + "px";
|
|
1271
1324
|
}
|
|
1272
|
-
this.
|
|
1325
|
+
this.sb = !0, this.onShow && this.onShow();
|
|
1273
1326
|
} }, this.prepare(), this.init(); }); }(), "undefined" == typeof DayPilot)
|
|
1274
1327
|
var DayPilot = {};
|
|
1275
1328
|
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (DayPilot) {
|
|
1276
1329
|
"use strict";
|
|
1277
1330
|
if ("undefined" == typeof DayPilot.Menu || !DayPilot.Menu.def) {
|
|
1278
1331
|
var e = function () { }, t = {};
|
|
1279
|
-
t.mouse = null, t.menu = null, t.handlersRegistered = !1, t.hideTimeout = null, t.waitingSubmenu = null, DayPilot.Menu = function (i) { var a = this, n = null; this.v = "2024.4.
|
|
1332
|
+
t.mouse = null, t.menu = null, t.handlersRegistered = !1, t.hideTimeout = null, t.waitingSubmenu = null, DayPilot.Menu = function (i) { var a = this, n = null; this.v = "2024.4.622-lite", this.zIndex = 120, this.cssClassPrefix = "menu_default", this.cssOnly = !0, this.menuTitle = null, this.showMenuTitle = !1, this.hideOnMouseOut = !1, this.hideAfter = 200, this.theme = null, this.onShow = null, this.Gb = function () { }, i && DayPilot.isArray(i) && (this.items = i), this.toJSON = function () { return null; }, this.show = function (i, o) { o = o || {}; var r = null; if (i ? "string" == typeof i.id || "number" == typeof i.id ? r = i.id : "function" == typeof i.id ? r = i.id() : "function" == typeof i.value && (r = i.value()) : r = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), o.submenu || t.menuClean(), this.Gb.submenu = null, null !== t.mouse) {
|
|
1280
1333
|
a.cssOnly || (a.cssOnly = !0);
|
|
1281
1334
|
var s = null;
|
|
1282
1335
|
if (i && i.isRow && i.$.row.task ? (s = new DayPilot.Task(i.$.row.task, i.calendar), s.menuType = "resource") : s = i && i.isEvent && i.data.task ? new DayPilot.Task(i, i.calendar) : i, "function" == typeof a.onShow) {
|
|
@@ -1285,15 +1338,15 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1285
1338
|
return;
|
|
1286
1339
|
}
|
|
1287
1340
|
var d = document.createElement("div");
|
|
1288
|
-
if (d.style.position = "absolute", d.style.top = "0px", d.style.left = "0px", d.style.display = "none", d.style.overflow = "hidden", d.style.zIndex = this.zIndex + 1, d.className = this.
|
|
1341
|
+
if (d.style.position = "absolute", d.style.top = "0px", d.style.left = "0px", d.style.display = "none", d.style.overflow = "hidden", d.style.zIndex = this.zIndex + 1, d.className = this.Hb("main"), d.onclick = function (e) { e.cancelBubble = !0, this.parentNode.removeChild(this); }, this.hideOnMouseOut && (d.onmousemove = function (e) { clearTimeout(t.hideTimeout); }, d.onmouseleave = function (e) { a.delayedHide({ "hideParent": !0 }); }), !this.items || 0 === this.items.length)
|
|
1289
1342
|
throw "No menu items defined.";
|
|
1290
1343
|
if (this.showMenuTitle) {
|
|
1291
1344
|
var c = document.createElement("div");
|
|
1292
|
-
c.innerHTML = this.menuTitle, c.className = this.
|
|
1345
|
+
c.innerHTML = this.menuTitle, c.className = this.Hb("title"), d.appendChild(c);
|
|
1293
1346
|
}
|
|
1294
1347
|
for (var u = 0; u < this.items.length; u++) {
|
|
1295
1348
|
var h = this.items[u], f = document.createElement("div");
|
|
1296
|
-
if (DayPilot.Util.addClass(f, this.
|
|
1349
|
+
if (DayPilot.Util.addClass(f, this.Hb("item")), h.items && (DayPilot.Util.addClass(f, this.Hb("item_haschildren")), DayPilot.Util.addClass(d, this.Hb("withchildren"))), "undefined" != typeof h && !h.hidden) {
|
|
1297
1350
|
if ("-" === h.text) {
|
|
1298
1351
|
var m = document.createElement("div");
|
|
1299
1352
|
m.addEventListener("click", function (e) { e.stopPropagation(); }), f.appendChild(m);
|
|
@@ -1301,7 +1354,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1301
1354
|
else {
|
|
1302
1355
|
var p = document.createElement("a");
|
|
1303
1356
|
if (p.style.position = "relative", p.style.display = "block", h.cssClass && DayPilot.Util.addClass(p, h.cssClass), h.disabled)
|
|
1304
|
-
DayPilot.Util.addClass(p, a.
|
|
1357
|
+
DayPilot.Util.addClass(p, a.Hb("item_disabled"));
|
|
1305
1358
|
else {
|
|
1306
1359
|
if (h.onclick || h.onClick) {
|
|
1307
1360
|
p.item = h, p.onclick = function (e, t) { return function (i) { if ("function" == typeof e.onClick) {
|
|
@@ -1317,7 +1370,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1317
1370
|
DayPilot.reNonPassive(p, "touchstart", function (e) { e.stopPropagation(), e.preventDefault(), p.source.calendar.internal.touch.active = !0; }), DayPilot.reNonPassive(p, "touchend", v(h, p));
|
|
1318
1371
|
}
|
|
1319
1372
|
if (h.items && !h.disabled) {
|
|
1320
|
-
var y = function (e, t) { return function (i) { i.preventDefault(), i.stopPropagation(), a.
|
|
1373
|
+
var y = function (e, t) { return function (i) { i.preventDefault(), i.stopPropagation(), a.Ib(e, t); }; };
|
|
1321
1374
|
p.ontouchend = y(h, p);
|
|
1322
1375
|
}
|
|
1323
1376
|
if (h.onclick)
|
|
@@ -1340,82 +1393,82 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1340
1393
|
}
|
|
1341
1394
|
h.items && p.addEventListener("click", function (e) { e.stopPropagation(); }), p.source = s, p.menuSource = i;
|
|
1342
1395
|
var g = document.createElement("span");
|
|
1343
|
-
if (g.className = a.
|
|
1396
|
+
if (g.className = a.Hb("item_text"), g.innerHTML = DayPilot.Util.escapeTextHtml(h.text, h.html), p.appendChild(g), h.image) {
|
|
1344
1397
|
var b = document.createElement("img");
|
|
1345
1398
|
b.src = h.image, b.style.position = "absolute", b.style.top = "0px", b.style.left = "0px", p.appendChild(b);
|
|
1346
1399
|
}
|
|
1347
1400
|
if (h.icon) {
|
|
1348
1401
|
var D = document.createElement("span");
|
|
1349
|
-
D.className = a.
|
|
1350
|
-
var
|
|
1351
|
-
|
|
1402
|
+
D.className = a.Hb("item_icon");
|
|
1403
|
+
var w = document.createElement("i");
|
|
1404
|
+
w.className = h.icon, D.appendChild(w), p.appendChild(D);
|
|
1352
1405
|
}
|
|
1353
1406
|
if (h.symbol) {
|
|
1354
|
-
var
|
|
1407
|
+
var x = "http://www.w3.org/2000/svg", C = document.createElementNS(x, "svg");
|
|
1355
1408
|
C.setAttribute("width", "100%"), C.setAttribute("height", "100%");
|
|
1356
|
-
var P = document.createElementNS(
|
|
1409
|
+
var P = document.createElementNS(x, "use");
|
|
1357
1410
|
P.setAttribute("href", h.symbol), C.appendChild(P);
|
|
1358
1411
|
var k = document.createElement("span");
|
|
1359
|
-
k.className = a.
|
|
1412
|
+
k.className = a.Hb("item_symbol"), k.style.position = "absolute", k.style.top = "0px", k.style.left = "0px", k.appendChild(C), p.appendChild(k);
|
|
1360
1413
|
}
|
|
1361
1414
|
var _ = function (e, i) { return function () { var n = (i.source, e), o = t.waitingSubmenu; if (o) {
|
|
1362
1415
|
if (o.parent === n)
|
|
1363
1416
|
return;
|
|
1364
1417
|
clearTimeout(o.timeout), t.waitingSubmenu = null;
|
|
1365
|
-
} e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = n, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.
|
|
1418
|
+
} e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = n, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.Ib(n, i); }, 300)); }; };
|
|
1366
1419
|
p.onmouseover = _(h, p), f.appendChild(p);
|
|
1367
1420
|
}
|
|
1368
1421
|
d.appendChild(f);
|
|
1369
1422
|
}
|
|
1370
1423
|
}
|
|
1371
1424
|
var S = function (e) { window.setTimeout(function () { t.menuClean(), DayPilot.MenuBar.deactivate(); }, 100); };
|
|
1372
|
-
d.onclick = S, d.ontouchend = S, d.onmousedown = function (e) { e = e || window.event, e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.
|
|
1373
|
-
var M = d.offsetHeight,
|
|
1425
|
+
d.onclick = S, d.ontouchend = S, d.onmousedown = function (e) { e = e || window.event, e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.Gb.visible = !0, a.Gb.source = i, d.style.display = "";
|
|
1426
|
+
var M = d.offsetHeight, H = d.offsetWidth;
|
|
1374
1427
|
d.style.display = "none";
|
|
1375
|
-
var
|
|
1428
|
+
var T = document.documentElement.clientHeight, A = window.innerWidth, E = "number" == typeof o.windowMargin ? o.windowMargin : 5;
|
|
1376
1429
|
if (function () { var e = o.initiator; if (e) {
|
|
1377
1430
|
var t = e.div, i = e.e, a = e.area, r = a.visibility || a.v || "Visible", s = e.a;
|
|
1378
1431
|
if ("Visible" !== r && (s = DayPilot.Areas.createArea(t, i, a), t.appendChild(s), n = s), s) {
|
|
1379
1432
|
var l = DayPilot.abs(s);
|
|
1380
1433
|
o.x = l.x, o.y = l.y + l.h + 2;
|
|
1381
1434
|
}
|
|
1382
|
-
} }(), function () { var e = "number" == typeof o.x ? o.x : t.mouse.x + 1, i = "number" == typeof o.y ? o.y : t.mouse.y + 1, a = document.body.scrollTop || document.documentElement.scrollTop, n = document.body.scrollLeft || document.documentElement.scrollLeft; if (i - a >
|
|
1383
|
-
var r = i - a - (
|
|
1435
|
+
} }(), function () { var e = "number" == typeof o.x ? o.x : t.mouse.x + 1, i = "number" == typeof o.y ? o.y : t.mouse.y + 1, a = document.body.scrollTop || document.documentElement.scrollTop, n = document.body.scrollLeft || document.documentElement.scrollLeft; if (i - a > T - M && 0 !== T) {
|
|
1436
|
+
var r = i - a - (T - M) + E;
|
|
1384
1437
|
d.style.top = i - r + "px";
|
|
1385
1438
|
}
|
|
1386
1439
|
else
|
|
1387
|
-
d.style.top = i + "px"; if ("right" === o.align && (e -=
|
|
1388
|
-
var s = e - n - (
|
|
1440
|
+
d.style.top = i + "px"; if ("right" === o.align && (e -= H), e - n > A - H && 0 !== A) {
|
|
1441
|
+
var s = e - n - (A - H) + E;
|
|
1389
1442
|
d.style.left = e - s + "px";
|
|
1390
1443
|
}
|
|
1391
1444
|
else
|
|
1392
1445
|
d.style.left = e + "px"; }(), o.parentLink) {
|
|
1393
|
-
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")),
|
|
1394
|
-
|
|
1395
|
-
var
|
|
1396
|
-
|
|
1446
|
+
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")), R = DayPilot.abs(o.parentLink.parentNode), B = R.x + N.offsetWidth, z = R.y - I;
|
|
1447
|
+
B + H > A && (B = Math.max(0, R.x - H));
|
|
1448
|
+
var O = document.body.scrollTop + document.documentElement.scrollTop;
|
|
1449
|
+
z + M - O > T && (z = Math.max(0, T - M + O)), d.style.left = B + "px", d.style.top = z + "px";
|
|
1397
1450
|
}
|
|
1398
|
-
d.style.display = "", this.addShadow(d), this.
|
|
1399
|
-
} }, this.
|
|
1451
|
+
d.style.display = "", this.addShadow(d), this.Gb.div = d, o.submenu || (DayPilot.Menu.active = this);
|
|
1452
|
+
} }, this.Ib = function (e, t) { var i = e, n = t.source; if ((!a.Gb.submenu || a.Gb.submenu.item !== e) && (a.Gb.submenu && a.Gb.submenu.item !== e && (DayPilot.Util.removeClass(a.Gb.submenu.link.parentNode, a.Hb("item_haschildren_active")), a.Gb.submenu.menu.hide(), a.Gb.submenu = null), e.items)) {
|
|
1400
1453
|
var o = a.cloneOptions();
|
|
1401
|
-
o.items = e.items, a.
|
|
1402
|
-
} }, this.
|
|
1454
|
+
o.items = e.items, a.Gb.submenu = {}, a.Gb.submenu.menu = new DayPilot.Menu(o), a.Gb.submenu.menu.Jb = a, a.Gb.submenu.menu.show(n, { "submenu": !0, "parentLink": t, "parentItem": i }), a.Gb.submenu.item = e, a.Gb.submenu.link = t, DayPilot.Util.addClass(t.parentNode, a.Hb("item_haschildren_active"));
|
|
1455
|
+
} }, this.Hb = function (e) { var t = this.theme || this.cssClassPrefix, i = this.cssOnly ? "_" : ""; return t ? t + i + e : ""; }, this.cloneOptions = function () { return DayPilot.Util.copyProps(o, {}, ["cssClassPrefix", "theme", "hideAfter", "hideOnMouseOut", "zIndex"]); }, this.hide = function (e) { e = e || {}, this.Gb.submenu && this.Gb.submenu.menu.hide(); var i = t.waitingSubmenu; if (i && (t.waitingSubmenu = null, clearTimeout(i.timeout)), this.removeShadow(), this.Gb.div && this.Gb.div.parentNode === document.body && document.body.removeChild(this.Gb.div), n && (DayPilot.de(n), n = null), a.Gb.visible = !1, a.Gb.source = null, a.Jb && e.hideParent && a.Jb.hide(e), DayPilot.Menu.active === a && (DayPilot.Menu.active = null), "function" == typeof this.onHide) {
|
|
1403
1456
|
var o = {};
|
|
1404
1457
|
this.onHide(o);
|
|
1405
1458
|
} }, this.delayedHide = function (e) { t.hideTimeout = setTimeout(function () { a.hide(e); }, a.hideAfter); }, this.cancelHideTimeout = function () { clearTimeout(t.hideTimeout); }, this.init = function (e) { return t.mouseMove(e), this; }, this.addShadow = function (e) { }, this.removeShadow = function () { }; var o = DayPilot.isArray(i) ? null : i; if (o)
|
|
1406
1459
|
for (var r in o)
|
|
1407
1460
|
this[r] = o[r]; }, DayPilot.MenuBar = function (e, t) { var i = this; t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.k = null, this.Ba = !1; for (var a in t)
|
|
1408
|
-
this[a] = t[a]; this.
|
|
1409
|
-
i.
|
|
1461
|
+
this[a] = t[a]; this.Kb = function (e) { return this.theme + "_" + e; }, this.t = function () { this.nav.top = document.getElementById(e); var t = this.nav.top; t.className = this.Kb("main"), DayPilot.list(i.items).forEach(function (e) { var a = document.createElement("span"); a.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), a.className = i.Kb("item"), e.cssClass && a.classList.add(e.cssClass), a.data = e, a.onclick = function (t) { if (i.active && i.active.item === e)
|
|
1462
|
+
i.Lb();
|
|
1410
1463
|
else if (e.children)
|
|
1411
|
-
return void i.
|
|
1464
|
+
return void i.Mb(a); if ("function" == typeof e.onClick) {
|
|
1412
1465
|
var n = {};
|
|
1413
1466
|
n.item = e, n.originalEvent = t, e.onClick(n);
|
|
1414
|
-
} }, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { i.active && i.active.item !== e && i.
|
|
1415
|
-
i.
|
|
1467
|
+
} }, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { i.active && i.active.item !== e && i.Mb(a); }, t.appendChild(a), i.elements.items.push(a); }); }, this.Lb = function () { var e = i.Kb("item_active"); i.elements.items.forEach(function (t) { DayPilot.Util.removeClass(t, e); }), i.active && i.active.menu && i.active.menu.hide(), i.active = null; }, this.Nb = function (e) { return !!i.active && i.active.item === e.data; }, this.Mb = function (e) { if (!i.Nb(e)) {
|
|
1468
|
+
i.Lb();
|
|
1416
1469
|
var t = e.data, a = i.active = {};
|
|
1417
1470
|
a.item = t, a.div = e;
|
|
1418
|
-
var n = i.
|
|
1471
|
+
var n = i.Kb("item_active");
|
|
1419
1472
|
DayPilot.Util.addClass(e, n);
|
|
1420
1473
|
var o = DayPilot.abs(e);
|
|
1421
1474
|
if (t.children) {
|
|
@@ -1424,11 +1477,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1424
1477
|
"right" === t.align && (r += o.w), a.menu.show(null, { "x": r, "y": o.y + o.h, "align": t.align, "windowMargin": i.windowMargin });
|
|
1425
1478
|
}
|
|
1426
1479
|
DayPilot.MenuBar.active = i;
|
|
1427
|
-
} }, this.init = function () { return this.t(), this.Ba = !0, this; }, this.dispose = function () { this.Ba && (this.nav.top.innerHTML = "", this.elements.items = []); }; }, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.
|
|
1480
|
+
} }, this.init = function () { return this.t(), this.Ba = !0, this; }, this.dispose = function () { this.Ba && (this.nav.top.innerHTML = "", this.elements.items = []); }; }, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.Lb(), DayPilot.MenuBar.active = null); }, t.menuClean = function () { "undefined" != typeof DayPilot.Menu.active && DayPilot.Menu.active && (DayPilot.Menu.active.hide(), DayPilot.Menu.active = null); }, t.mouseDown = function (e) { "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate()); }, t.wheel = function (e) { "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate()); }, t.mouseMove = function (e) { "undefined" != typeof t && (t.mouse = t.mousePosition(e)); }, t.touchMove = function (e) { "undefined" != typeof t && (t.mouse = t.touchPosition(e)); }, t.touchStart = function (e) { "undefined" != typeof t && (t.mouse = t.touchPosition(e)); }, t.touchEnd = function (e) { }, t.touchPosition = function (e) { if (!e || !e.touches)
|
|
1428
1481
|
return null; var t = e.touches[0], i = {}; return i.x = t.pageX, i.y = t.pageY, i; }, t.mousePosition = function (e) { return DayPilot.mo3(null, e); }, DayPilot.Menu.touchPosition = function (e) { e.touches && (t.mouse = t.touchPosition(e)); }, DayPilot.Menu.hide = function (e) { if (e = e || {}, e.calendar) {
|
|
1429
1482
|
var i = DayPilot.Menu.active;
|
|
1430
1483
|
if (i) {
|
|
1431
|
-
var a = i.
|
|
1484
|
+
var a = i.Gb.source;
|
|
1432
1485
|
a && a.calendar === e.calendar && t.menuClean();
|
|
1433
1486
|
}
|
|
1434
1487
|
}
|
|
@@ -1472,24 +1525,23 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1472
1525
|
throw "No CSS registration method found";
|
|
1473
1526
|
t.sheet.addRule(e, a, n);
|
|
1474
1527
|
} }, e; }, a = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K", n = new i;
|
|
1475
|
-
n.add(".modal_default_main", "border: 10px solid #ccc; max-width: 90%;"), n.add(".modal_default_main:focus", "outline: none;"), n.add(".modal_default_content", "padding: 10px 0px;"), n.add(".modal_default_inner", "padding: 20px;"), n.add(".modal_default_input", "padding: 10px 0px;"), n.add(".modal_default_buttons", "margin-top: 10px;"), n.add(".modal_default_buttons", "padding: 10px 0px;"), n.add(".modal_default_form_item", "padding: 10px 0px; position: relative;"), n.add(".modal_default_form_item_level1", "border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"), n.add(".modal_default_form_item.modal_default_form_title", "font-size: 1.5rem; font-weight: bold;"), n.add(".modal_default_form_item input[type=text]", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item textarea", "width: 100%; height: 200px; box-sizing: border-box;"), n.add(".modal_default_form_item input[type=select]", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item label", "display: block;"), n.add(".modal_default_form_item select", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item_label", "margin: 2px 0px;"), n.add(".modal_default_form_item_image img", "max-width: 100%; height: auto;"), n.add(".modal_default_form_item_invalid", ""), n.add(".modal_default_form_item_invalid_message", "position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"), n.add(".modal_default_background", "opacity: 0.5; background-color: #000;"), n.add(".modal_default_ok", "padding: 3px; width: 80px;"), n.add(".modal_default_cancel", "padding: 3px; width: 80px;"),
|
|
1476
|
-
n.add(".modal_default_form_item_date", "position: relative;"), n.add(".modal_default_form_item_date:after", "content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url(" + "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg==" + ")"), "undefined" != typeof navigator && navigator.userAgent.indexOf("Edge") !== -1 && n.add(".modal_default_form_item_date input::-ms-clear", "display: none;"), n.add(".modal_default_form_item_scrollable_scroll", "width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"), n.add(".modal_default_form_item_scrollable_scroll_content", "padding: 5px;"), n.add(".modal_default_form_item_searchable", "position: relative;"), n.add(".modal_default_form_item_searchable_icon", ""), n.add(".modal_default_form_item_searchable_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_searchable_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_searchable_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_searchable_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_time", "position: relative;"), n.add(".modal_default_form_item_time_icon", ""), n.add(".modal_default_form_item_time_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_time_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_time_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_time_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_datetime_parent", "display: flex;"), n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main", "margin-left: 5px;"), n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ", ""), n.add(".modal_default_form_item_tabular_main", "margin-top: 10px;"), n.add(".modal_default_form_item_tabular_table", "display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"), n.add(".modal_default_form_item_tabular_tbody", "display: table-row-group;"), n.add(".modal_default_form_item_tabular_row", "display: table-row;"), n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header", ""), n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction", "padding: 0px; width: 23px;"), n.add(".modal_default_form_item_tabular_cell", "display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"), n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell", "padding-left: 0px; padding-bottom: 0px;"), n.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]", "width:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_table select", "width:100%; height:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_plus", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_plus:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_delete", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_delete:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete", "visibility: hidden;"), n.add(".modal_default_form_item_tabular_empty", "height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"), n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell", "padding: 0px;"), n.add(".modal_min_main", "border: 1px solid #ccc; max-width: 90%;"), n.add(".modal_min_background", "opacity: 0.5; background-color: #000;"), n.add(".modal_min_ok", "padding: 3px 10px;"), n.add(".modal_min_cancel", "padding: 3px 10px;"), n.add(".navigator_modal_main", "border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"), n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after", "box-sizing: content-box;"), n.add(".navigator_modal_month", "font-size: 11px;"), n.add(".navigator_modal_day", "color: black;"), n.add(".navigator_modal_weekend", "background-color: #f0f0f0;"), n.add(".navigator_modal_dayheader", "color: black;"), n.add(".navigator_modal_line", "border-bottom: 1px solid #c0c0c0;"), n.add(".navigator_modal_dayother", "color: gray;"), n.add(".navigator_modal_todaybox", "border: 1px solid red;"), n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), n.add(".navigator_modal_busy", "font-weight: bold;"), n.add(".navigator_modal_cell", "text-align: center;"), n.add(".navigator_modal_select .navigator_modal_cell_box", "background-color: #FFE794; opacity: 0.5;"), n.add(".navigator_modal_title", "text-align: center;"), n.add(".navigator_modal_titleleft, .navigator_modal_titleright", "text-align: center;"), n.add(".navigator_modal_dayheader", "text-align: center;"), n.add(".navigator_modal_weeknumber", "text-align: center;"), n.add(".navigator_modal_cell_text", "cursor: pointer;"), n.commit(), DayPilot.Modal = function (e) { this.autoFocus = !0, this.focus = null, this.autoStretch = !0, this.autoStretchFirstLoadOnly = !1, this.className = null, this.theme = "modal_default", this.disposeOnClose = !0, this.dragDrop = !0, this.loadingHtml = null, this.maxHeight = null, this.scrollWithPage = !0, this.useIframe = !0, this.zIndex = 99999, this.left = null, this.width = 600, this.top = 20, this.height = 200, this.locale = null, this.closed = null, this.onClose = null, this.onClosed = null, this.onShow = null; var t = this; this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.Fb = !1, this.Gb = null, this.Hb = null, this.showHtml = function (e) { if (DayPilot.ModalStatic.displayed(this))
|
|
1477
|
-
throw "This modal dialog is already displayed."; if (this.div || this.Ib(), this._a(), this.useIframe) {
|
|
1528
|
+
n.add(".modal_default_main", "border: 10px solid #ccc; max-width: 90%;"), n.add(".modal_default_main:focus", "outline: none;"), n.add(".modal_default_content", "padding: 10px 0px;"), n.add(".modal_default_inner", "padding: 20px;"), n.add(".modal_default_input", "padding: 10px 0px;"), n.add(".modal_default_buttons", "margin-top: 10px;"), n.add(".modal_default_buttons", "padding: 10px 0px;"), n.add(".modal_default_form_item", "padding: 10px 0px; position: relative;"), n.add(".modal_default_form_item_level1", "border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"), n.add(".modal_default_form_item.modal_default_form_title", "font-size: 1.5rem; font-weight: bold;"), n.add(".modal_default_form_item input[type=text]", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item textarea", "width: 100%; height: 200px; box-sizing: border-box;"), n.add(".modal_default_form_item input[type=select]", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item label", "display: block;"), n.add(".modal_default_form_item select", "width: 100%; box-sizing: border-box;"), n.add(".modal_default_form_item_label", "margin: 2px 0px;"), n.add(".modal_default_form_item_image img", "max-width: 100%; height: auto;"), n.add(".modal_default_form_item_invalid", ""), n.add(".modal_default_form_item_invalid_message", "position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"), n.add(".modal_default_background", "opacity: 0.5; background-color: #000;"), n.add(".modal_default_ok", "padding: 3px; width: 80px;"), n.add(".modal_default_cancel", "padding: 3px; width: 80px;"), n.add(".modal_default_form_item_date", "position: relative;"), n.add(".modal_default_form_item_date:after", "content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url(" + "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg==" + ")"), "undefined" != typeof navigator && navigator.userAgent.indexOf("Edge") !== -1 && n.add(".modal_default_form_item_date input::-ms-clear", "display: none;"), n.add(".modal_default_form_item_scrollable_scroll", "width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"), n.add(".modal_default_form_item_scrollable_scroll_content", "padding: 5px;"), n.add(".modal_default_form_item_searchable", "position: relative;"), n.add(".modal_default_form_item_searchable_icon", ""), n.add(".modal_default_form_item_searchable_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_searchable_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_searchable_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_searchable_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_time", "position: relative;"), n.add(".modal_default_form_item_time_icon", ""), n.add(".modal_default_form_item_time_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_time_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_time_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_time_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_datetime_parent", "display: flex;"), n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main", "margin-left: 5px;"), n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ", ""), n.add(".modal_default_form_item_tabular_main", "margin-top: 10px;"), n.add(".modal_default_form_item_tabular_table", "display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"), n.add(".modal_default_form_item_tabular_tbody", "display: table-row-group;"), n.add(".modal_default_form_item_tabular_row", "display: table-row;"), n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header", ""), n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction", "padding: 0px; width: 23px;"), n.add(".modal_default_form_item_tabular_cell", "display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"), n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell", "padding-left: 0px; padding-bottom: 0px;"), n.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]", "width:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_table select", "width:100%; height:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_plus", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_plus:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_delete", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_delete:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete", "visibility: hidden;"), n.add(".modal_default_form_item_tabular_empty", "height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"), n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell", "padding: 0px;"), n.add(".modal_min_main", "border: 1px solid #ccc; max-width: 90%;"), n.add(".modal_min_background", "opacity: 0.5; background-color: #000;"), n.add(".modal_min_ok", "padding: 3px 10px;"), n.add(".modal_min_cancel", "padding: 3px 10px;"), n.add(".navigator_modal_main", "border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"), n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after", "box-sizing: content-box;"), n.add(".navigator_modal_month", "font-size: 11px;"), n.add(".navigator_modal_day", "color: black;"), n.add(".navigator_modal_weekend", "background-color: #f0f0f0;"), n.add(".navigator_modal_dayheader", "color: black;"), n.add(".navigator_modal_line", "border-bottom: 1px solid #c0c0c0;"), n.add(".navigator_modal_dayother", "color: gray;"), n.add(".navigator_modal_todaybox", "border: 1px solid red;"), n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), n.add(".navigator_modal_busy", "font-weight: bold;"), n.add(".navigator_modal_cell", "text-align: center;"), n.add(".navigator_modal_select .navigator_modal_cell_box", "background-color: #FFE794; opacity: 0.5;"), n.add(".navigator_modal_title", "text-align: center;"), n.add(".navigator_modal_titleleft, .navigator_modal_titleright", "text-align: center;"), n.add(".navigator_modal_dayheader", "text-align: center;"), n.add(".navigator_modal_weeknumber", "text-align: center;"), n.add(".navigator_modal_cell_text", "cursor: pointer;"), n.commit(), DayPilot.Modal = function (e) { this.autoFocus = !0, this.focus = null, this.autoStretch = !0, this.autoStretchFirstLoadOnly = !1, this.className = null, this.theme = "modal_default", this.disposeOnClose = !0, this.dragDrop = !0, this.loadingHtml = null, this.maxHeight = null, this.scrollWithPage = !0, this.useIframe = !0, this.zIndex = 99999, this.left = null, this.width = 600, this.top = 20, this.height = 200, this.locale = null, this.closed = null, this.onClose = null, this.onClosed = null, this.onShow = null; var t = this; this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.Ob = !1, this.Pb = null, this.Qb = null, this.showHtml = function (e) { if (DayPilot.ModalStatic.displayed(this))
|
|
1529
|
+
throw "This modal dialog is already displayed."; if (this.div || this.Rb(), this.hb(), this.useIframe) {
|
|
1478
1530
|
var t = function (e, t) { return function () { e.setInnerHTML(e.id + "iframe", t); }; };
|
|
1479
1531
|
window.setTimeout(t(this, e), 0);
|
|
1480
1532
|
}
|
|
1481
1533
|
else
|
|
1482
|
-
e.nodeType ? this.div.appendChild(e) : this.div.innerHTML = e; this.
|
|
1534
|
+
e.nodeType ? this.div.appendChild(e) : this.div.innerHTML = e; this.hb(), this.Sb(), this.Tb(); }, this.showUrl = function (e) { if (DayPilot.ModalStatic.displayed(this))
|
|
1483
1535
|
throw "This modal dialog is already displayed."; if (this.useIframe) {
|
|
1484
|
-
this.div || this.
|
|
1536
|
+
this.div || this.Rb();
|
|
1485
1537
|
var i = this.loadingHtml;
|
|
1486
|
-
i && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", i)), this.re(this.iframe, "load", this.
|
|
1538
|
+
i && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", i)), this.re(this.iframe, "load", this.Ub), this.iframe.src = e, this.hb(), this.Sb(), this.Tb();
|
|
1487
1539
|
}
|
|
1488
1540
|
else
|
|
1489
|
-
t.
|
|
1541
|
+
t.Vb({ "url": e, "success": function (e) { var i = e.request.responseText; t.showHtml(i); }, "error": function (e) { t.showHtml("Error loading the modal dialog"); } }); }, this.Tb = function () { if ("function" == typeof t.onShow) {
|
|
1490
1542
|
var e = {};
|
|
1491
|
-
e.root = t.
|
|
1492
|
-
} }, this.
|
|
1543
|
+
e.root = t.Wb(), e.modal = t, t.onShow(e);
|
|
1544
|
+
} }, this.Wb = function () { return t.iframe ? t.iframe.contentWindow.document : t.div; }, this.Vb = function (e) { var t = new XMLHttpRequest; if (t) {
|
|
1493
1545
|
var i = e.method || "GET", a = e.success || function () { }, n = e.error || function () { }, o = e.data, r = e.url;
|
|
1494
1546
|
t.open(i, r, !0), t.setRequestHeader("Content-type", "text/plain"), t.onreadystatechange = function () { if (4 === t.readyState)
|
|
1495
1547
|
if (200 === t.status || 304 === t.status) {
|
|
@@ -1502,45 +1554,45 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1502
1554
|
}
|
|
1503
1555
|
else
|
|
1504
1556
|
window.console && console.log("HTTP error " + t.status); }, 4 !== t.readyState && ("object" == typeof o && (o = JSON.stringify(o)), t.send(o));
|
|
1505
|
-
} }, this.
|
|
1506
|
-
for (var a = i() - 40, n = this.width; n < a && this.
|
|
1557
|
+
} }, this.hb = function () { delete this.result; var e = window, i = document, a = e.pageYOffset ? e.pageYOffset : i.documentElement && i.documentElement.scrollTop ? i.documentElement.scrollTop : i.body.scrollTop; this.theme && (this.hideDiv.className = this.theme + "_background"), this.zIndex && (this.hideDiv.style.zIndex = this.zIndex), this.hideDiv.style.display = "", window.setTimeout(function () { t.hideDiv && (t.hideDiv.onclick = function () { t.hide({ "backgroundClick": !0 }); }); }, 500), this.theme ? this.div.className = this.theme + "_main" : this.div.className = "", this.className && (this.div.className += " " + this.className), this.left ? this.div.style.left = this.left + "px" : this.div.style.marginLeft = "-" + Math.floor(this.width / 2) + "px", this.div.style.position = "absolute", this.div.style.boxSizing = "content-box", this.div.style.top = a + this.top + "px", this.div.style.width = this.width + "px", this.zIndex && (this.div.style.zIndex = this.zIndex), this.height && (this.useIframe || !this.autoStretch ? this.div.style.height = this.height + "px" : this.div.style.height = ""), this.useIframe && this.height && (this.iframe.style.height = this.height + "px"), this.div.style.display = "", this.Yb(), DayPilot.ModalStatic.remove(this), DayPilot.ModalStatic.list.push(this); }, this.Ub = function () { t.iframe.contentWindow.modal = t, t.autoStretch && t.stretch(); }, this.stretch = function () { var e = function () { return t.Xb().y; }, i = function () { return t.Xb().x; }; if (this.useIframe) {
|
|
1558
|
+
for (var a = i() - 40, n = this.width; n < a && this.Zb(); n += 10)
|
|
1507
1559
|
this.div.style.width = n + "px", this.div.style.marginLeft = "-" + Math.floor(n / 2) + "px";
|
|
1508
|
-
for (var o = this.maxHeight || e() - 2 * this.top, r = this.height; r < o && this
|
|
1560
|
+
for (var o = this.maxHeight || e() - 2 * this.top, r = this.height; r < o && this.$b(); r += 10)
|
|
1509
1561
|
this.iframe.style.height = r + "px", this.div.style.height = r + "px";
|
|
1510
|
-
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.
|
|
1562
|
+
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.Ub);
|
|
1511
1563
|
}
|
|
1512
1564
|
else
|
|
1513
|
-
this.div.style.height = ""; }, this.
|
|
1565
|
+
this.div.style.height = ""; }, this.Zb = function () { for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollWidth, a = e.body.children, n = 0; n < a.length; n++) {
|
|
1514
1566
|
var o = a[n].offsetLeft + a[n].offsetWidth;
|
|
1515
1567
|
i = Math.max(i, o);
|
|
1516
|
-
} return i > t.clientWidth; }, this
|
|
1568
|
+
} return i > t.clientWidth; }, this.$b = function () { for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollHeight, a = e.body.children, n = 0; n < a.length; n++) {
|
|
1517
1569
|
var o = a[n].offsetTop + a[n].offsetHeight;
|
|
1518
1570
|
i = Math.max(i, o);
|
|
1519
|
-
} return i > t.clientHeight; }, this.
|
|
1571
|
+
} return i > t.clientHeight; }, this.Xb = function () { var e = document; if ("CSS1Compat" === e.compatMode && e.documentElement && e.documentElement.clientWidth) {
|
|
1520
1572
|
var t = e.documentElement.clientWidth, i = e.documentElement.clientHeight;
|
|
1521
1573
|
return { x: t, y: i };
|
|
1522
|
-
} var t = e.body.clientWidth, i = e.body.clientHeight; return { x: t, y: i }; }, this.
|
|
1523
|
-
var e = e || window.event, i = t.mc(e), a = i.x - t.
|
|
1524
|
-
t.div.style.marginLeft = "0px", t.div.style.top = t.
|
|
1525
|
-
} }, this.
|
|
1574
|
+
} var t = e.body.clientWidth, i = e.body.clientHeight; return { x: t, y: i }; }, this.Sb = function () { this.Ob || (this.re(window, "resize", this._b), this.re(window, "scroll", this.bc), this.dragDrop && (this.re(document, "mousemove", this.cc), this.re(document, "mouseup", this.dc)), this.Ob = !0); }, this.ec = function () { this.ue(window, "resize", this._b), this.ue(window, "scroll", this.bc), this.dragDrop && (this.ue(document, "mousemove", this.cc), this.ue(document, "mouseup", this.dc)), this.Ob = !1; }, this.fc = function (e) { e.target === t.div && (e.preventDefault(), t.div.style.cursor = "move", t.gc(), t.Qb = t.mc(e || window.event), t.Pb = { x: t.div.offsetLeft, y: t.div.offsetTop }); }, this.cc = function (e) { if (t.Qb) {
|
|
1575
|
+
var e = e || window.event, i = t.mc(e), a = i.x - t.Qb.x, n = i.y - t.Qb.y;
|
|
1576
|
+
t.div.style.marginLeft = "0px", t.div.style.top = t.Pb.y + n + "px", t.div.style.left = t.Pb.x + a + "px";
|
|
1577
|
+
} }, this.dc = function (e) { t.Qb && (t.hc(), t.div.style.cursor = null, t.Qb = null); }, this.gc = function () { if (this.useIframe) {
|
|
1526
1578
|
var e = document.createElement("div");
|
|
1527
1579
|
e.style.backgroundColor = "#ffffff", e.style.filter = "alpha(opacity=80)", e.style.opacity = "0.80", e.style.width = "100%", e.style.height = this.height + "px", e.style.position = "absolute", e.style.left = "0px", e.style.top = "0px", this.div.appendChild(e), this.mask = e;
|
|
1528
|
-
} }, this.
|
|
1580
|
+
} }, this.hc = function () { this.useIframe && (this.div.removeChild(this.mask), this.mask = null); }, this._b = function () { t.ic(), t.Yb(); }, this.bc = function () { t.ic(); }, this.Yb = function () { if (!t.left && t.div) {
|
|
1529
1581
|
var e = t.div.offsetWidth;
|
|
1530
1582
|
t.div.style.marginLeft = "-" + Math.floor(e / 2) + "px";
|
|
1531
|
-
} }, this
|
|
1532
|
-
var e = t.
|
|
1583
|
+
} }, this.ic = function () { if (t.hideDiv && t.div && "none" !== t.hideDiv.style.display && "none" !== t.div.style.display) {
|
|
1584
|
+
var e = t.jc.scrollY();
|
|
1533
1585
|
t.scrollWithPage || (t.div.style.top = e + t.top + "px");
|
|
1534
|
-
} }, this.
|
|
1535
|
-
e = e.offsetParent, t.x += e.offsetLeft, t.y += e.offsetTop; return t; }, this.
|
|
1586
|
+
} }, this.jc = {}, this.jc.container = function () { return t.container || document.body; }, this.jc.scrollY = function () { var e = t.jc.container(); return e === document.body ? window.pageYOffset ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop : e.scrollTop; }, this.re = function (e, t, i) { e.addEventListener ? e.addEventListener(t, i, !1) : e.attachEvent && e.attachEvent("on" + t, i); }, this.ue = function (e, t, i) { e.removeEventListener ? e.removeEventListener(t, i, !1) : e.detachEvent && e.detachEvent("on" + t, i); }, this.mc = function (e) { return e.pageX || e.pageY ? { x: e.pageX, y: e.pageY } : { x: e.clientX + document.documentElement.scrollLeft, y: e.clientY + document.documentElement.scrollTop }; }, this.abs = function (e) { for (var t = { x: e.offsetLeft, y: e.offsetTop }; e.offsetParent;)
|
|
1587
|
+
e = e.offsetParent, t.x += e.offsetLeft, t.y += e.offsetTop; return t; }, this.Rb = function () { var e = t.jc.container(), i = e === document.body, a = i ? "fixed" : "absolute", n = document.createElement("div"); n.id = this.id + "hide", n.style.position = a, n.style.left = "0px", n.style.top = "0px", n.style.right = "0px", n.style.bottom = "0px", n.oncontextmenu = function () { return !1; }, n.onmousedown = function () { return !1; }, e.appendChild(n); var o = document.createElement("div"); o.id = this.id + "popup", o.style.position = a, o.style.left = "50%", o.style.top = "0px", o.style.backgroundColor = "white", o.style.width = "50px", o.style.height = "50px", this.dragDrop && (o.onmousedown = this.fc), o.addEventListener("keydown", function (e) { e.stopPropagation(); }); var r = null; this.useIframe && (r = document.createElement("iframe"), r.id = this.id + "iframe", r.name = this.id + "iframe", r.frameBorder = "0", r.style.width = "100%", r.style.height = "50px", o.appendChild(r)), e.appendChild(o), this.div = o, this.iframe = r, this.hideDiv = n; }, this.setInnerHTML = function (e, i) { var a = window.frames[e], n = a.contentWindow || a.document || a.contentDocument; n.document && (n = n.document), null == n.body && n.write("<body></body>"), i.nodeType ? n.body.appendChild(i) : n.body.innerHTML = i, t.autoStretch && (t.autoStretchFirstLoadOnly && t.kc || (t.stretch(), t.kc = !0)); }, this.close = function (e) { this.result = e, this.hide(); }, this.closeSerialized = function () { for (var e = t.Wb(), i = e.querySelectorAll("input, textarea, select"), a = {}, n = 0; n < i.length; n++) {
|
|
1536
1588
|
var o = i[n], r = o.name;
|
|
1537
1589
|
if (r) {
|
|
1538
1590
|
var s = o.value;
|
|
1539
1591
|
a[r] = s;
|
|
1540
1592
|
}
|
|
1541
|
-
} t.close(a); }, this.hide = function (e) { e = e || {}; var i = {}; i.backgroundClick = !!e.backgroundClick, i.result = this.result, i.canceled = "undefined" == typeof this.result, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(i), i.preventDefault.value) || (this.div && (this.div.style.display = "none", this.hideDiv.style.display = "none", this.useIframe || (this.div.innerHTML = null)), window.focus(), DayPilot.ModalStatic.remove(this), "function" == typeof this.onClosed ? this.onClosed(i) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.
|
|
1593
|
+
} t.close(a); }, this.hide = function (e) { e = e || {}; var i = {}; i.backgroundClick = !!e.backgroundClick, i.result = this.result, i.canceled = "undefined" == typeof this.result, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(i), i.preventDefault.value) || (this.div && (this.div.style.display = "none", this.hideDiv.style.display = "none", this.useIframe || (this.div.innerHTML = null)), window.focus(), DayPilot.ModalStatic.remove(this), "function" == typeof this.onClosed ? this.onClosed(i) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.ec(), t.lc(t.div), t.lc(t.hideDiv), t.div = null, t.hideDiv = null, t.iframe = null)); }, this.lc = function (e) { e && e.parentNode && e.parentNode.removeChild(e); }, this.nc = function () { if (e)
|
|
1542
1594
|
for (var t in e)
|
|
1543
|
-
this[t] = e[t]; }, this.
|
|
1595
|
+
this[t] = e[t]; }, this.nc(); }, DayPilot.Modal.alert = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var i = t.okText || "OK"; t.cancelText || "Cancel"; return DayPilot.getPromise(function (a, n) { t.onClosed = function (e) { a(e); }; var o = new DayPilot.Modal(t), r = document.createElement("div"); r.className = o.theme + "_inner"; var s = document.createElement("div"); s.className = o.theme + "_content", s.innerHTML = e; var l = document.createElement("div"); l.className = o.theme + "_buttons"; var d = document.createElement("button"); d.innerText = i, d.className = o.theme + "_ok", d.onclick = function (e) { DayPilot.ModalStatic.close("OK"); }, l.appendChild(d), r.appendChild(s), r.appendChild(l), o.showHtml(r), o.autoFocus && d.focus(); }); }, DayPilot.Modal.confirm = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var i = t.okText || "OK", a = t.cancelText || "Cancel"; return DayPilot.getPromise(function (n, o) { t.onClosed = function (e) { n(e); }; var r = new DayPilot.Modal(t), s = document.createElement("div"); s.className = r.theme + "_inner"; var l = document.createElement("div"); l.className = r.theme + "_content", l.innerHTML = e; var d = document.createElement("div"); d.className = r.theme + "_buttons"; var c = document.createElement("button"); c.innerText = i, c.className = r.theme + "_ok", c.onclick = function (e) { DayPilot.ModalStatic.close("OK"); }; var u = document.createTextNode(" "), h = document.createElement("button"); h.innerText = a, h.className = r.theme + "_cancel", h.onclick = function (e) { DayPilot.ModalStatic.close(); }, d.appendChild(c), d.appendChild(u), d.appendChild(h), s.appendChild(l), s.appendChild(d), r.showHtml(s), r.autoFocus && c.focus(); }); }, DayPilot.Modal.prompt = function (e, t, i) { "object" == typeof t && (i = t, t = ""), i = i || {}, i.height = i.height || 40, i.useIframe = !1; var a = i.okText || "OK", n = i.cancelText || "Cancel", o = t || ""; return DayPilot.getPromise(function (t, r) { i.onClosed = function (e) { t(e); }; var s = new DayPilot.Modal(i), l = document.createElement("div"); l.className = s.theme + "_inner"; var d = document.createElement("div"); d.className = s.theme + "_content", d.innerHTML = e; var c = document.createElement("div"); c.className = s.theme + "_input"; var u = document.createElement("input"); u.value = o, u.style.width = "100%", u.onkeydown = function (e) { var t = !1; switch (e.keyCode) {
|
|
1544
1596
|
case 13:
|
|
1545
1597
|
s.close(this.value);
|
|
1546
1598
|
break;
|
|
@@ -1590,28 +1642,28 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1590
1642
|
g && g.focus();
|
|
1591
1643
|
}
|
|
1592
1644
|
else {
|
|
1593
|
-
var
|
|
1594
|
-
o.autoFocus &&
|
|
1645
|
+
var w = h.firstFocusable();
|
|
1646
|
+
o.autoFocus && w ? w.focus() : o.div.focus();
|
|
1595
1647
|
} }); }, DayPilot.Modal.close = function (e) { var t = DayPilot.Modal.opener(); t && t.close(e); }, DayPilot.Modal.stretch = function (e) { var t = DayPilot.Modal.opener(); if (!t)
|
|
1596
1648
|
throw "Unable to find the opener DayPilot.Modal instance."; t.stretch(); }, DayPilot.Modal.closeSerialized = function () { var e = DayPilot.Modal.opener() || DayPilot.ModalStatic.last(); e && e.closeSerialized(); }, DayPilot.Modal.opener = function () { return "undefined" != typeof DayPilot && "undefined" != typeof DayPilot.ModalStatic && DayPilot.ModalStatic.list.length > 0 ? DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length - 1] : parent && parent.DayPilot && parent.DayPilot.ModalStatic && parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length - 1]; }, DayPilot.Modal.Experimental = {}, DayPilot.Modal.Experimental.Form = r, "undefined" == typeof DayPilot.getPromise && (DayPilot.getPromise = function (e) { return "undefined" != typeof Promise ? new Promise(e) : (DayPilot.Promise = function (e) { var t = this; this.then = function (t, i) { return t = t || function () { }, i = i || function () { }, e(t, i), DayPilot.getPromise(e); }, this["catch"] = function (i) { return t.then(null, i), DayPilot.getPromise(e); }; }, new DayPilot.Promise(e)); });
|
|
1597
|
-
var r = function (e) { this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.
|
|
1649
|
+
var r = function (e) { this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.oc = [], this.pc = null, this.canceling = !1, this.qc = [], this.f = [], this.rc = null, e = e || {}; for (var t in e)
|
|
1598
1650
|
this[t] = e[t]; };
|
|
1599
|
-
r.prototype.create = function () { return this.load(), this.render(), this.
|
|
1651
|
+
r.prototype.create = function () { return this.load(), this.render(), this.rc; }, r.prototype.render = function () { var e = this; this.rc = document.createElement("div"), this.oc.forEach(function (t) { e.createView(t); }), this.applyState(); }, r.prototype.createView = function (e) { var t = this.theme, i = this, a = document.createElement("div"); if (a.className = t + "_form_item " + t + "_form_item_level" + e.level, e.interactive || "title" !== e.type ? a.className += " " + t + "_form_item_" + e.type : a.className += " " + t + "_form_title", e.data.cssClass && (a.className += " " + e.data.cssClass), !e.isValue) {
|
|
1600
1652
|
var n = document.createElement("div");
|
|
1601
1653
|
n.className = t + "_form_item_label", n.innerText = e.text, a.appendChild(n);
|
|
1602
|
-
} var o = this.createInteractive(e); o.onInput = function (e) { if (e = e || {}, i.
|
|
1654
|
+
} var o = this.createInteractive(e); o.onInput = function (e) { if (e = e || {}, i.sc(o, { "debounce": !e.immediate }), "function" == typeof i.onChange) {
|
|
1603
1655
|
var t = {};
|
|
1604
1656
|
t.result = i.serialize(), i.onChange(t);
|
|
1605
|
-
} }, o.onBlur = function () { i.canceling || i.
|
|
1657
|
+
} }, o.onBlur = function () { i.canceling || i.sc(o); }, o.apply(e), o.rc = a, o.row = e, o.element && a.appendChild(o.element), this.f.push(o), this.rc.appendChild(a); }, r.prototype.validate = function () { var e = this, t = !0; return this.f.forEach(function (i) { var a = e.sc(i); t = t && a; }), t; }, r.prototype.sc = function (e, t) { function i() { e.tc && (e.tc.remove(), e.tc = null), e.rc.classList.add(u); var t = document.createElement("div"); t.classList.add(h), t.innerText = c.message, e.tc = t, e.rc.appendChild(t); } t = t || {}; var a = t.debounce, n = t.silent, o = e.row, r = !0, s = "function" == typeof o.data.onValidate ? o.data.onValidate : null, l = "function" == typeof o.data.validate ? o.data.validate : null, d = s || l; if (d) {
|
|
1606
1658
|
var c = {};
|
|
1607
1659
|
c.valid = !0, c.value = e.save()[o.field], c.message = "Error", c.values = this.serialize(), c.result = this.serialize(), d(c);
|
|
1608
1660
|
var u = this.theme + "_form_item_invalid", h = this.theme + "_form_item_invalid_message";
|
|
1609
1661
|
if (c.valid)
|
|
1610
|
-
clearTimeout(this.
|
|
1662
|
+
clearTimeout(this.qc[o.field]), e.tc && (e.tc.remove(), e.tc = null), e.rc.classList.remove(u);
|
|
1611
1663
|
else if (!n)
|
|
1612
1664
|
if (a) {
|
|
1613
1665
|
var f = 1e3;
|
|
1614
|
-
clearTimeout(this.
|
|
1666
|
+
clearTimeout(this.qc[o.field]), this.qc[o.field] = setTimeout(function () { i(); }, f);
|
|
1615
1667
|
}
|
|
1616
1668
|
else
|
|
1617
1669
|
i();
|
|
@@ -1623,75 +1675,75 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1623
1675
|
catch (e) {
|
|
1624
1676
|
throw new Error("The 'data' object is not serializable (it may contain circular dependencies): " + e);
|
|
1625
1677
|
} for (var n in i)
|
|
1626
|
-
this.setValue(n, i[n]); }, r.prototype.setValue = function (e, t) { this.
|
|
1627
|
-
|
|
1678
|
+
this.setValue(n, i[n]); }, r.prototype.setValue = function (e, t) { this.oc.forEach(function (i) { i.applyValue(e, t); }); }, r.prototype.updateDependentState = function () { var e = this, t = [!0]; (this.pc ? this.pc : this.oc).forEach(function (i) { var a = e.updateState(i, { enabled: t[i.level] && !i.data.disabled }); a.isValue && (t[a.level + 1] = a.enabled && a.checked); }); }, r.prototype.processFormItem = function (e, t) {
|
|
1679
|
+
var i = this, a = this.getFieldType(e), n = [];
|
|
1680
|
+
if ("radio" === a) {
|
|
1681
|
+
if (e.name) {
|
|
1682
|
+
var o = new s;
|
|
1683
|
+
o.field = e.id, o.data = e, o.level = t, o.type = "label", o.interactive = !1, o.text = e.name, i.oc.push(o), n.push(o);
|
|
1684
|
+
}
|
|
1685
|
+
e.options.forEach(function (o) {
|
|
1686
|
+
var r = new s;
|
|
1687
|
+
r.field = e.id, r.data = o, r.level = t, r.type = a, r.isValue = !0, r.text = o.name, r.resolved = o.id, i.oc.push(r),
|
|
1688
|
+
n.push(r), o.children && o.children.forEach(function (e) { var a = i.processFormItem(e, t + 1); n = n.concat(a); });
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
else if ("title" === a) {
|
|
1628
1692
|
var o = new s;
|
|
1629
|
-
o.field = e.id, o.data = e, o.level = t, o.type =
|
|
1693
|
+
o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = e.name, i.oc.push(o), n.push(o);
|
|
1630
1694
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
o.isValue = !0, o.
|
|
1648
|
-
}
|
|
1649
|
-
else {
|
|
1650
|
-
var o = new s;
|
|
1651
|
-
o.field = e.id, o.data = e, o.level = t, o.type = a, o.text = e.name, o.children = [], i.ec.push(o), n.push(o);
|
|
1652
|
-
} return "checkbox" === a && (o.isValue = !0, o.resolved = !0, e.children && e.children.forEach(function (e) { var a = i.processFormItem(e, t + 1); n = n.concat(a); })), n; }, r.prototype.doOnKey = function (e) { if ("function" == typeof this.onKey) {
|
|
1695
|
+
else if ("image" === a) {
|
|
1696
|
+
var o = new s;
|
|
1697
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.oc.push(o), n.push(o);
|
|
1698
|
+
}
|
|
1699
|
+
else if ("html" === a) {
|
|
1700
|
+
var o = new s;
|
|
1701
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.oc.push(o), n.push(o);
|
|
1702
|
+
}
|
|
1703
|
+
else if ("scrollable" === a) {
|
|
1704
|
+
var o = new s;
|
|
1705
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.oc.push(o), n.push(o);
|
|
1706
|
+
}
|
|
1707
|
+
else {
|
|
1708
|
+
var o = new s;
|
|
1709
|
+
o.field = e.id, o.data = e, o.level = t, o.type = a, o.text = e.name, o.children = [], i.oc.push(o), n.push(o);
|
|
1710
|
+
}
|
|
1711
|
+
return "checkbox" === a && (o.isValue = !0, o.resolved = !0, e.children && e.children.forEach(function (e) { var a = i.processFormItem(e, t + 1); n = n.concat(a); })), n;
|
|
1712
|
+
}, r.prototype.doOnKey = function (e) { if ("function" == typeof this.onKey) {
|
|
1653
1713
|
var t = { key: e };
|
|
1654
1714
|
this.onKey(t);
|
|
1655
|
-
} }, r.prototype.createInteractive = function (e) {
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
case 9:
|
|
1685
|
-
n.close(), i = !0;
|
|
1686
|
-
break;
|
|
1687
|
-
default: i = !0;
|
|
1688
|
-
} i || (e.preventDefault(), e.stopPropagation()); }, a.onfocus = function () { n.show(); }, a.onclick = function () { n.show(); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.element = a, i.picker = n, i.canFocus = function () { return !i.element.disabled; }, i.focus = function () { i.element.focus(); }, i.save = function () { var t = n.date ? n.date.toString() : null, i = {}; return i[e.field] = t, i; }, i; }, "time": function () { return t.kc(e); }, "datetime": function () { return t.lc(e); }, "select": function () { var t = new l; t.apply = function (e) { t.row = e; var i = t.element; i.value = e.value, i.disabled = !e.enabled; }; var i = document.createElement("select"); return i.name = e.field, e.data.options && e.data.options.forEach && e.data.options.forEach(function (e) { var t = document.createElement("option"); t.innerText = e.name || e.id, t.value = e.id, t.nc = e.id, i.appendChild(t); }), i.onchange = function (e) { t.onInput({ "immediate": !0 }); }, i.onblur = function (e) { t.onBlur(); }, t.element = i, t.canFocus = function () { return !t.element.disabled; }, t.focus = function () { t.element.focus(); }, t.save = function () { var t = null, a = i.options[i.selectedIndex]; a && "undefined" != typeof a.nc && (t = a.nc); var n = {}; return n[e.field] = t, n; }, t; }, "searchable": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); }; var a = new d({ data: e.data.options || [], name: e.field, theme: t.theme + "_form_item_searchable", listZIndex: t.zIndex + 1, onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), n = a.create(); return i.element = n, i.searchable = a, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = a.selected && a.selected.id, i = {}; return i[e.field] = t, i; }, i; }, "radio": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.radio; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "radio", n.name = e.field, n.nc = e.resolved, n.onchange = function (e) { var a = i.row; t.findRowsByField(a.field).forEach(function (e) { t.updateState(e, { checked: !1 }); }), t.updateState(a, { checked: !0 }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n); var o = document.createTextNode(e.text); return a.append(o), i.element = a, i.radio = n, i.canFocus = function () { return !1; }, i.focus = function () { i.radio.focus(); }, i.save = function () { if (!n.checked)
|
|
1689
|
-
return {}; var t = n.nc, i = {}; return i[e.field] = t, i; }, i; }, "checkbox": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "checkbox", n.name = e.field, n.nc = e.resolved, n.onchange = function (e) { var a = i.row; t.updateState(a, { checked: this.checked }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n); var o = document.createTextNode(e.text); return a.append(o), i.element = a, i.checkbox = n, i.canFocus = function () { return !1; }, i.focus = function () { i.checkbox.focus(); }, i.save = function () { var t = n.checked, i = {}; return i[e.field] = t, i; }, i; }, "table": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.table; t.disabled = !e.enabled, t.load(e.value || []); }; var a = new c({ name: e.field, form: t, theme: t.theme + "_form_item_tabular", item: e.data, onInput: function (e) { i.onInput(); } }), n = a.create(); return i.element = n, i.table = a, i.canFocus = function () { return !1; }, i.focus = function () { i.table.focus(); }, i.save = function () { var t = a.save(), i = {}; return i[e.field] = t, i; }, i; } };
|
|
1690
|
-
return t.plugins && t.plugins[e.type] ? t.plugins[e.type](e) : i[e.type]();
|
|
1691
|
-
}, r.prototype.kc = function (e) { var t = this, i = new l; i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); }; var a = [], n = e.data.timeInterval || 15; [1, 5, 10, 15, 20, 30, 60].includes(n) || (n = 15); for (var o = 60 / n, r = e.data.locale || t.locale, s = DayPilot.Locale.find(r) || DayPilot.Locale.US, c = DayPilot.Date.today(), u = 0; u < 24 * o; u++) {
|
|
1715
|
+
} }, r.prototype.createInteractive = function (e) { var t = this, i = { "label": function () { return new l; }, "title": function () { return new l; }, "image": function () { var t = new l, i = document.createElement("img"); return i.src = e.data.image, t.element = i, t; }, "html": function () { var t = new l, i = document.createElement("div"); return "string" == typeof e.data.text ? i.innerText = e.data.text : "string" == typeof e.data.html && (i.innerHTML = e.data.html), t.element = i, t; }, "scrollable": function () { var i = new l, a = document.createElement("div"); a.className = t.theme + "_form_item_scrollable_scroll", e.data.height && (a.style.height = e.data.height + "px"); var n = document.createElement("div"); return n.className = t.theme + "_form_item_scrollable_scroll_content", "string" == typeof e.data.text ? n.innerText = e.data.text : "string" == typeof e.data.html && (n.innerHTML = e.data.html), a.appendChild(n), i.element = a, i; }, "text": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.element; t.value = e.value, t.disabled = !e.enabled; }; var a = document.createElement("input"); return a.name = e.field, a.type = "text", a.autocomplete = "off", a.onkeydown = function (e) { var i = !1; switch (e.keyCode) {
|
|
1716
|
+
case 13:
|
|
1717
|
+
t.doOnKey("Enter");
|
|
1718
|
+
break;
|
|
1719
|
+
case 27:
|
|
1720
|
+
t.doOnKey("Escape");
|
|
1721
|
+
break;
|
|
1722
|
+
default: i = !0;
|
|
1723
|
+
} i || (e.preventDefault(), e.stopPropagation()); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.element = a, i.canFocus = function () { return !i.element.disabled; }, i.focus = function () { i.element.focus(), i.element.setSelectionRange(0, i.element.value.length); }, i.save = function () { var t = {}; return t[e.field] = a.value, t; }, i; }, "textarea": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.element; t.value = e.value, t.disabled = !e.enabled; }; var a = document.createElement("textarea"); return a.name = e.field, e.data.height && (a.style.height = e.data.height + "px"), a.onkeydown = function (e) { var i = !1; switch (e.keyCode) {
|
|
1724
|
+
case 13:
|
|
1725
|
+
(e.ctrlKey || e.metaKey) && t.doOnKey("Enter"), i = !1;
|
|
1726
|
+
break;
|
|
1727
|
+
case 27:
|
|
1728
|
+
t.doOnKey("Escape");
|
|
1729
|
+
break;
|
|
1730
|
+
default: i = !0;
|
|
1731
|
+
} i || e.stopPropagation(); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.element = a, i.canFocus = function () { return !i.element.disabled; }, i.focus = function () { i.element.focus(), i.element.setSelectionRange(0, 0); }, i.save = function () { var t = {}; return t[e.field] = a.value, t; }, i; }, "date": function () { var i = new l; i.apply = function (e) { i.row = e; var a = i.element, n = i.picker; e.data.dateFormat && (n.pattern = e.data.dateFormat); var o = e.data.locale || t.locale; o && (n.locale = o), a.disabled = !e.enabled, n.date = new DayPilot.Date(e.value); var r = new DayPilot.Date(e.value).toString(e.data.dateFormat || n.pattern, n.locale); a.value = r; }; var a = document.createElement("input"); a.name = e.field; var n = new DayPilot.DatePicker({ target: a, theme: "navigator_modal", zIndex: t.zIndex + 1, resetTarget: !1, targetAlignment: "left", onTimeRangeSelect: function (e) { i.onInput({ "immediate": !0 }); } }); return a.picker = n, a.className = t.theme + "_input_date", a.type = "text", a.onkeydown = function (e) { var i = !1; switch (e.keyCode) {
|
|
1732
|
+
case 13:
|
|
1733
|
+
n.visible ? n.close() : t.doOnKey("Enter");
|
|
1734
|
+
break;
|
|
1735
|
+
case 27:
|
|
1736
|
+
n.visible ? n.close() : t.doOnKey("Escape");
|
|
1737
|
+
break;
|
|
1738
|
+
case 9:
|
|
1739
|
+
n.close(), i = !0;
|
|
1740
|
+
break;
|
|
1741
|
+
default: i = !0;
|
|
1742
|
+
} i || (e.preventDefault(), e.stopPropagation()); }, a.onfocus = function () { n.show(); }, a.onclick = function () { n.show(); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.element = a, i.picker = n, i.canFocus = function () { return !i.element.disabled; }, i.focus = function () { i.element.focus(); }, i.save = function () { var t = n.date ? n.date.toString() : null, i = {}; return i[e.field] = t, i; }, i; }, "time": function () { return t.uc(e); }, "datetime": function () { return t.vc(e); }, "select": function () { var t = new l; t.apply = function (e) { t.row = e; var i = t.element; i.value = e.value, i.disabled = !e.enabled; }; var i = document.createElement("select"); return i.name = e.field, e.data.options && e.data.options.forEach && e.data.options.forEach(function (e) { var t = document.createElement("option"); t.innerText = e.name || e.id, t.value = e.id, t.wc = e.id, i.appendChild(t); }), i.onchange = function (e) { t.onInput({ "immediate": !0 }); }, i.onblur = function (e) { t.onBlur(); }, t.element = i, t.canFocus = function () { return !t.element.disabled; }, t.focus = function () { t.element.focus(); }, t.save = function () { var t = null, a = i.options[i.selectedIndex]; a && "undefined" != typeof a.wc && (t = a.wc); var n = {}; return n[e.field] = t, n; }, t; }, "searchable": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); }; var a = new d({ data: e.data.options || [], name: e.field, theme: t.theme + "_form_item_searchable", listZIndex: t.zIndex + 1, onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), n = a.create(); return i.element = n, i.searchable = a, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = a.selected && a.selected.id, i = {}; return i[e.field] = t, i; }, i; }, "radio": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.radio; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "radio", n.name = e.field, n.wc = e.resolved, n.onchange = function (e) { var a = i.row; t.findRowsByField(a.field).forEach(function (e) { t.updateState(e, { checked: !1 }); }), t.updateState(a, { checked: !0 }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n); var o = document.createTextNode(e.text); return a.append(o), i.element = a, i.radio = n, i.canFocus = function () { return !1; }, i.focus = function () { i.radio.focus(); }, i.save = function () { if (!n.checked)
|
|
1743
|
+
return {}; var t = n.wc, i = {}; return i[e.field] = t, i; }, i; }, "checkbox": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "checkbox", n.name = e.field, n.wc = e.resolved, n.onchange = function (e) { var a = i.row; t.updateState(a, { checked: this.checked }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n); var o = document.createTextNode(e.text); return a.append(o), i.element = a, i.checkbox = n, i.canFocus = function () { return !1; }, i.focus = function () { i.checkbox.focus(); }, i.save = function () { var t = n.checked, i = {}; return i[e.field] = t, i; }, i; }, "table": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.table; t.disabled = !e.enabled, t.load(e.value || []); }; var a = new c({ name: e.field, form: t, theme: t.theme + "_form_item_tabular", item: e.data, onInput: function (e) { i.onInput(); } }), n = a.create(); return i.element = n, i.table = a, i.canFocus = function () { return !1; }, i.focus = function () { i.table.focus(); }, i.save = function () { var t = a.save(), i = {}; return i[e.field] = t, i; }, i; } }; return t.plugins && t.plugins[e.type] ? t.plugins[e.type](e) : i[e.type](); }, r.prototype.uc = function (e) { var t = this, i = new l; i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); }; var a = [], n = e.data.timeInterval || 15; [1, 5, 10, 15, 20, 30, 60].includes(n) || (n = 15); for (var o = 60 / n, r = e.data.locale || t.locale, s = DayPilot.Locale.find(r) || DayPilot.Locale.US, c = DayPilot.Date.today(), u = 0; u < 24 * o; u++) {
|
|
1692
1744
|
var h = c.addMinutes(n * u), f = {};
|
|
1693
1745
|
f.name = h.toString(e.data.timeFormat || s.timePattern, s), f.id = h.toString("HH:mm"), a.push(f);
|
|
1694
|
-
} var m = new d({ data: a, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), p = m.create(); return i.element = p, i.searchable = m, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = m.selected && m.selected.id, i = {}; return i[e.field] = t, i; }, i; }, r.prototype.
|
|
1746
|
+
} var m = new d({ data: a, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), p = m.create(); return i.element = p, i.searchable = m, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = m.selected && m.selected.id, i = {}; return i[e.field] = t, i; }, i; }, r.prototype.vc = function (e) { var t = this, i = new l; i.apply = function (e) { i.row = e; var a = i.searchable; a.disabled = !e.enabled; var n = new DayPilot.Date(e.value).toString("HH:mm"); a.select(n); var o = i.dateInput, r = i.picker; e.data.dateFormat && (r.pattern = e.data.dateFormat); var s = e.data.locale || t.locale; if (s) {
|
|
1695
1747
|
var l = DayPilot.Locale.find(s) || DayPilot.Locale.US;
|
|
1696
1748
|
r.locale = s, r.pattern = l.datePattern;
|
|
1697
1749
|
} o.disabled = !e.enabled, r.date = new DayPilot.Date(e.value); var d = new DayPilot.Date(e.value).toString(e.data.dateFormat || r.pattern, r.locale); o.value = d; }; var a = function () { var a = document.createElement("input"); a.name = e.field; var n = new DayPilot.DatePicker({ target: a, theme: "navigator_modal", zIndex: t.zIndex + 1, resetTarget: !1, targetAlignment: "left", onTimeRangeSelect: function (e) { i.onInput({ "immediate": !0 }); } }); return a.picker = n, a.className = t.theme + "_input_date", a.type = "text", a.onkeydown = function (e) { var i = !1; switch (e.keyCode) {
|
|
@@ -1708,11 +1760,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1708
1760
|
} i || (e.preventDefault(), e.stopPropagation()); }, a.onfocus = function () { n.show(); }, a.onclick = function () { n.show(); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.dateInput = a, i.picker = n, a; }(), n = function () { var a = [], n = e.data.timeInterval || 15; [1, 5, 10, 15, 20, 30, 60].includes(n) || (n = 15); for (var o = 60 / n, r = e.data.locale || t.locale, s = DayPilot.Locale.find(r) || DayPilot.Locale.US, l = DayPilot.Date.today(), c = 0; c < 24 * o; c++) {
|
|
1709
1761
|
var u = l.addMinutes(n * c), h = {};
|
|
1710
1762
|
h.name = u.toString(e.data.timeFormat || s.timePattern, s), h.id = u.toString("HH:mm"), a.push(h);
|
|
1711
|
-
} var f = new d({ data: a, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }); return i.searchable = f, f.create(); }(), o = document.createElement("div"); return o.className = t.theme + "_form_item_datetime_parent", o.appendChild(a), o.appendChild(n), i.element = o, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.dateInput.focus(); }, i.save = function () { var t = i.searchable.selected && i.searchable.selected.id, a = i.picker.date ? i.picker.date.toString() : null, n = new DayPilot.Date(a).getDatePart(), o = DayPilot.Date.parse(n.toString("yyyy-dd-MM ") + t, "yyyy-dd-MM HH:mm"), r = {}; return r[e.field] = o, r; }, i; }, r.prototype.findRowsByField = function (e) { return this.
|
|
1763
|
+
} var f = new d({ data: a, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }); return i.searchable = f, f.create(); }(), o = document.createElement("div"); return o.className = t.theme + "_form_item_datetime_parent", o.appendChild(a), o.appendChild(n), i.element = o, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.dateInput.focus(); }, i.save = function () { var t = i.searchable.selected && i.searchable.selected.id, a = i.picker.date ? i.picker.date.toString() : null, n = new DayPilot.Date(a).getDatePart(), o = DayPilot.Date.parse(n.toString("yyyy-dd-MM ") + t, "yyyy-dd-MM HH:mm"), r = {}; return r[e.field] = o, r; }, i; }, r.prototype.findRowsByField = function (e) { return this.oc.filter(function (t) { return t.field === e; }); }, r.prototype.findViewById = function (e, t) { return this.f.find(function (i) { return i.row.field === e && ("radio" !== i.row.type || i.row.resolved === t); }); }, r.prototype.firstFocusable = function () { return this.f.find(function (e) { return e.canFocus && e.canFocus(); }); }, r.prototype.updateState = function (e, t) { var i = this.pc ? this.pc : this.oc, a = i.indexOf(e); return this.pc = i.map(function (i) { if (i !== e)
|
|
1712
1764
|
return i; if (e.propsEqual(t))
|
|
1713
1765
|
return e; var a = e.clone(); for (var n in t)
|
|
1714
|
-
a[n] = t[n]; return a; }), this.
|
|
1715
|
-
this.
|
|
1766
|
+
a[n] = t[n]; return a; }), this.pc[a]; }, r.prototype.updateInteractive = function (e) { var t = this.pc.indexOf(e); this.f[t].apply(e); }, r.prototype.applyState = function () { var e = this; if (this.updateDependentState(), this.pc) {
|
|
1767
|
+
this.pc.filter(function (t, i) { return e.oc[i] !== t; }).forEach(function (t) { e.updateInteractive(t); }), this.oc = this.pc, this.pc = null;
|
|
1716
1768
|
} }, r.prototype.getFieldType = function (e) { return ["text", "date", "select", "searchable", "radio", "checkbox", "table", "title", "image", "html", "textarea", "scrollable", "time", "datetime"].indexOf(e.type) !== -1 ? e.type : e.type && this.plugins && this.plugins[e.type] ? e.type : e.image ? "image" : e.html || e.text ? "html" : e.id ? e.options ? "searchable" : e.dateFormat ? "date" : e.columns ? "table" : "text" : "title"; }, r.prototype.serialize = function () { var e = {}; return this.f.forEach(function (t) { var i = t.save(); for (var a in i)
|
|
1717
1769
|
e[a] = i[a]; }), e; };
|
|
1718
1770
|
var s = function () { this.id = this.guid(), this.field = null, this.data = null, this.type = null, this.level = 0, this.enabled = !0, this.value = null, this.text = null, this.interactive = !0, this.isValue = !1, this.checked = !1, this.resolved = null; };
|
|
@@ -1720,45 +1772,45 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1720
1772
|
"id" !== t && (e[t] = this[t]); return e; }, s.prototype.propsEqual = function (e) { for (var t in e)
|
|
1721
1773
|
if (this[t] !== e[t])
|
|
1722
1774
|
return !1; return !0; }, s.prototype.guid = function () { var e = function () { return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); }; return "" + e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e(); }, s.prototype.applyValue = function (e, t) { this.field === e && (this.value = t, this.isValue && t === this.resolved && (this.checked = !0)); };
|
|
1723
|
-
var l = function () { this.element = null, this.canFocus = function () { return !1; }, this.apply = function (e) { }, this.focus = function () { }, this.save = function () { return {}; }; }, d = function (e) { this.data = [], this.name = null, this.theme = "searchable_default", this.
|
|
1775
|
+
var l = function () { this.element = null, this.canFocus = function () { return !1; }, this.apply = function (e) { }, this.focus = function () { }, this.save = function () { return {}; }; }, d = function (e) { this.data = [], this.name = null, this.theme = "searchable_default", this.xc = !1, this.listZIndex = 1e5, this.onSelect = null, this.yc = null, this.zc = null, this.Ac = !1, this.Bc = null, this.Cc = null, this.p = [], this.Dc = null, e = e || {}; var t = this, i = { "selected": { post: function (e) { "object" == typeof e && e.id ? t.yc = e : "string" != typeof e && "number" != typeof e || t.select(e); } } }; Object.defineProperty(this, "selected", { get: function () { return this.yc; } }), Object.defineProperty(this, "disabled", { get: function () { return this.xc; }, set: function (e) { this.xc = e, this.Bc && (this.Bc.disabled = e, e && this.Ec()); } }); for (var a in e)
|
|
1724
1776
|
i[a] || (this[a] = e[a]); for (var a in e)
|
|
1725
1777
|
i[a] && i[a].post(e[a]); };
|
|
1726
|
-
d.prototype.select = function (e) { return this.
|
|
1778
|
+
d.prototype.select = function (e) { return this.yc = this.data.find(function (t) { return t.id === e; }), this.Fc(!1), this; }, d.prototype.create = function () { function e(e) { var i = l.strategy; "includes" !== l.strategy && "startsWith" !== l.strategy && (i = "includes"), e = e || i || "includes", h.style.display = "", h.style.top = m.offsetHeight + "px", h.style.left = "0px", h.style.width = m.offsetWidth + "px", h.innerHTML = "", h.addEventListener("mousedown", function (e) { e.preventDefault(); }), l.zc = null, l.p = []; var n = null; l.data.forEach(function (i) { var o = i.name || i.id; if ("includes" === e) {
|
|
1727
1779
|
if (o.toLowerCase().indexOf(m.value.toLowerCase()) === -1)
|
|
1728
1780
|
return;
|
|
1729
1781
|
}
|
|
1730
1782
|
else if ("startsWith" === e && 0 !== o.toLowerCase().indexOf(m.value.toLowerCase()))
|
|
1731
|
-
return; var r = document.createElement("div"); r.className = l.theme + "_list_item", r.innerText = o, r.item = i, i === l.
|
|
1783
|
+
return; var r = document.createElement("div"); r.className = l.theme + "_list_item", r.innerText = o, r.item = i, i === l.yc && (l.zc = r), n || (n = r), r.addEventListener("mousedown", function (e) { a(r), e.preventDefault(); }), r.addEventListener("mousemove", function (e) { l.zc !== r && (l.zc = r, t({ dontScroll: !0 })); }), h.appendChild(r), l.p.push(r); }), l.zc || (l.zc = n), t(); } function t(e) { e = e || {}; var t = !e.dontScroll; document.querySelectorAll("." + l.theme + "_list_item_highlight").forEach(function (e) { e.className = e.className.replace(l.theme + "_list_item_highlight", ""); }), l.zc && (l.zc.className += " " + l.theme + "_list_item_highlight", t && !i(l.zc, h) && l.zc.scrollIntoView()); } function i(e, t) { var i = e.getBoundingClientRect(), a = t.getBoundingClientRect(); return i.top >= a.top && i.bottom <= a.bottom; } function a(e) { var t = e.item; l.yc = t, l.Fc(!0), o(), r(); } function n() { l.Ec(); } function o() { l.q(); } function r() { l.Ac = !0, m.setAttribute("readonly", "readonly"), m.focus(); } function s() { l.Ac = !1, m.removeAttribute("readonly"), m.select(), e("all"); } var l = this, d = this, c = document.createElement("div"); c.className = this.theme + "_main", c.style.position = "relative"; var u = document.createElement("div"); u.className = this.theme + "_icon", u.style.position = "absolute", u.style.right = "0", u.style.top = "0", u.style.bottom = "0", u.style.width = "20px", u.addEventListener("mousedown", function (e) { e.preventDefault(), l.Ac ? (l.focus(), s()) : (n(), r()); }); var h = document.createElement("div"); h.className = this.theme + "_list", h.style.display = "none", h.style.position = "absolute", h.style.zIndex = this.listZIndex; var f = document.createElement("input"); f.type = "hidden", f.name = this.name, f.searchable = d, this.Dc = f; var m = document.createElement("input"); return m.type = "text", m.className = this.theme + "_input", m.disabled = this.xc, m.addEventListener("click", function (e) { s(); }), m.addEventListener("focus", function (t) { e("all"); }), m.addEventListener("input", function (t) { e(); }), m.addEventListener("blur", function (e) { m.removeAttribute("readonly"), n(); }), m.addEventListener("keydown", function (e) { if (l.Ac) {
|
|
1732
1784
|
if ("Enter" === e.key)
|
|
1733
1785
|
return;
|
|
1734
1786
|
if ("Esc" === e.key || "Escape" === e.key)
|
|
1735
1787
|
return;
|
|
1736
1788
|
s();
|
|
1737
1789
|
} if ("ArrowDown" === e.key) {
|
|
1738
|
-
var i = d.p.indexOf(d.
|
|
1739
|
-
i + 1 < d.p.length && (d.
|
|
1790
|
+
var i = d.p.indexOf(d.zc);
|
|
1791
|
+
i + 1 < d.p.length && (d.zc = d.p[i + 1]), t();
|
|
1740
1792
|
}
|
|
1741
1793
|
else if ("ArrowUp" === e.key) {
|
|
1742
|
-
var i = d.p.indexOf(d.
|
|
1743
|
-
i - 1 >= 0 && (d.
|
|
1794
|
+
var i = d.p.indexOf(d.zc);
|
|
1795
|
+
i - 1 >= 0 && (d.zc = d.p[i - 1]), t();
|
|
1744
1796
|
}
|
|
1745
1797
|
else
|
|
1746
|
-
"Enter" === e.key ? l.
|
|
1798
|
+
"Enter" === e.key ? l.zc ? (e.stopPropagation(), a(l.zc)) : (e.stopPropagation(), n(), r()) : "Esc" !== e.key && "Escape" !== e.key || (e.stopPropagation(), n(), r()); }), this.Bc = m, this.Cc = h, this.yc || (this.yc = this.data[0], this.yc && (m.value = this.yc.name)), c.appendChild(m), c.appendChild(u), c.appendChild(f), c.appendChild(h), c; }, d.prototype.Ec = function () { this.q(), this.yc ? this.Bc.value = this.yc.name : (this.Bc.value = "", this.Fc(!0)); }, d.prototype.focus = function () { this.Ac = !0, this.Bc.setAttribute("readonly", "readonly"), this.Bc.focus(), this.Ec(); }, d.prototype.q = function () { this.Cc.style.display = "none"; }, d.prototype.Fc = function (e) { if (this.Dc.value = this.selected ? this.selected.id : null, this.yc ? this.Bc.value = this.yc.name : this.Bc.value = "", "function" == typeof this.onSelect) {
|
|
1747
1799
|
var t = { control: this, ui: e };
|
|
1748
1800
|
this.onSelect(t);
|
|
1749
1801
|
} };
|
|
1750
|
-
var c = function (e) { this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.
|
|
1802
|
+
var c = function (e) { this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.Gc = null, this.oc = [], e = e || {}; for (var t in e)
|
|
1751
1803
|
this[t] = e[t]; };
|
|
1752
|
-
c.prototype.create = function () { var e = this, t = document.createElement("div"); t.className = this.theme + "_main", t.style.position = "relative"; var i = document.createElement("input"); i.type = "hidden", i.name = e.name, i.table = this, t.appendChild(i); var a = document.createElement("div"); a.className = this.theme + "_table"; var n = this.
|
|
1804
|
+
c.prototype.create = function () { var e = this, t = document.createElement("div"); t.className = this.theme + "_main", t.style.position = "relative"; var i = document.createElement("input"); i.type = "hidden", i.name = e.name, i.table = this, t.appendChild(i); var a = document.createElement("div"); a.className = this.theme + "_table"; var n = this.Hc(); a.appendChild(n); var o = e.Ic({}); o.spacer = !0; var r = this.Jc(o); r.classList.add(e.theme + "_spacer"), a.appendChild(r); var s = document.createElement("div"); s.className = e.theme + "_tbody", a.appendChild(s), t.appendChild(a); var l = document.createElement("div"); t.appendChild(l), this.nav.body = s, this.nav.table = a, this.nav.main = t, this.nav.after = l; var d = document.createElement("div"), c = document.createElement("span"); return c.className = this.theme + "_plus", c.addEventListener("click", function (t) { if (!e.disabled) {
|
|
1753
1805
|
var i = e.item.onNewRow, a = {};
|
|
1754
1806
|
if ("function" == typeof i) {
|
|
1755
1807
|
var n = {};
|
|
1756
1808
|
n.result = e.form.serialize(), n.value = {}, i(n), a = n.value;
|
|
1757
1809
|
}
|
|
1758
|
-
var o = e.
|
|
1759
|
-
e.
|
|
1760
|
-
} }), this.nav.plus = c, d.appendChild(c), t.appendChild(d), t; }, c.prototype.
|
|
1761
|
-
throw new Error("Array expected"); this.data = e, this.
|
|
1810
|
+
var o = e.Ic(a);
|
|
1811
|
+
e.oc.push(o), e.Kc(), e.Lc();
|
|
1812
|
+
} }), this.nav.plus = c, d.appendChild(c), t.appendChild(d), t; }, c.prototype.Hc = function () { var e = this, t = document.createElement("div"); return t.classList.add(this.theme + "_row"), t.classList.add(this.theme + "_header"), this.item.columns.forEach(function (i) { var a = document.createElement("div"); a.classList.add(e.theme + "_cell"), a.innerText = i.name, t.appendChild(a); }), t; }, c.prototype.Mc = function () { var e = this.item.max || 0; return !!(e && this.oc.length >= e); }, c.prototype.save = function () { var e = this, t = []; return e.oc.forEach(function (e) { var i = {}; e.cells.forEach(function (e) { i[e.id] = e.value; }), t.push(i); }), t; }, c.prototype.load = function (e) { if ("[object Array]" !== Object.prototype.toString.call(e))
|
|
1813
|
+
throw new Error("Array expected"); this.data = e, this.Nc(), this.Kc(); }, c.prototype.Oc = function () { this.disabled ? this.nav.main.classList.add(this.theme + "_disabled") : this.nav.main.classList.remove(this.theme + "_disabled"), this.Mc() ? this.nav.plus.classList.add(this.theme + "_plus_max") : this.nav.plus.classList.remove(this.theme + "_plus_max"); }, c.prototype.Nc = function () { var e = this; this.oc = [], this.data.forEach(function (t) { var i = e.Ic(t); e.oc.push(i); }); }, c.prototype.Pc = function (e) { var t = this, i = t.oc.indexOf(e); t.oc.splice(i, 1); }, c.prototype.Ic = function (e) { var t = this, i = {}; return i.data = e, i.cells = [], t.item.columns.forEach(function (a) { var n = a.id, o = e[n], r = t.Qc(a); if ("undefined" == typeof o)
|
|
1762
1814
|
if ("text" === r)
|
|
1763
1815
|
o = "";
|
|
1764
1816
|
else if ("number" === r)
|
|
@@ -1766,113 +1818,113 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1766
1818
|
else if ("select" === r) {
|
|
1767
1819
|
var s = a.options;
|
|
1768
1820
|
o = s && s[0].id;
|
|
1769
|
-
} var l = {}; l.id = n, l.value = o, l.type = r, l.data = a, i.cells.push(l); }), i; }, c.prototype.
|
|
1770
|
-
var t = e.
|
|
1821
|
+
} var l = {}; l.id = n, l.value = o, l.type = r, l.data = a, i.cells.push(l); }), i; }, c.prototype.Qc = function (e) { var t = e.type; return t || (t = e.options ? "select" : "text"), t; }, c.prototype.Kc = function () { var e = this; if (this.nav.body.innerHTML = "", this.nav.after.innerHTML = "", this.oc.forEach(function (t) { var i = e.Jc(t); e.nav.body.appendChild(i); }), 0 === this.oc.length) {
|
|
1822
|
+
var t = e.Rc();
|
|
1771
1823
|
e.nav.after.appendChild(t);
|
|
1772
|
-
} this.
|
|
1824
|
+
} this.Oc(); }, c.prototype.Rc = function () { var e = document.createElement("div"); return e.className = this.theme + "_empty", e; }, c.prototype.Jc = function (e) { var t = this, i = document.createElement("div"); i.className = t.theme + "_row", e.cells.forEach(function (a) { var n = document.createElement("div"); n.className = t.theme + "_cell"; var o = t.Sc(a); if (e.spacer) {
|
|
1773
1825
|
var r = document.createElement("div");
|
|
1774
1826
|
r.style.height = "0px", r.style.overflow = "hidden", r.appendChild(o), n.appendChild(r);
|
|
1775
1827
|
}
|
|
1776
1828
|
else
|
|
1777
|
-
n.appendChild(o); i.appendChild(n); }); var a = document.createElement("div"); a.classList.add(t.theme + "_cell"), a.classList.add(t.theme + "_rowaction"); var n = document.createElement("span"); return n.className = this.theme + "_delete", n.addEventListener("click", function (i) { t.disabled || (t.
|
|
1829
|
+
n.appendChild(o); i.appendChild(n); }); var a = document.createElement("div"); a.classList.add(t.theme + "_cell"), a.classList.add(t.theme + "_rowaction"); var n = document.createElement("span"); return n.className = this.theme + "_delete", n.addEventListener("click", function (i) { t.disabled || (t.Pc(e), t.Kc(), t.Lc()); }), e.spacer || a.appendChild(n), i.appendChild(a), i; }, c.prototype.Lc = function () { var e = this; if ("function" == typeof e.onInput) {
|
|
1778
1830
|
var t = {};
|
|
1779
1831
|
e.onInput(t);
|
|
1780
|
-
} }, c.prototype.
|
|
1832
|
+
} }, c.prototype.Sc = function (e) { var t = this, i = e.type; if ("text" === i || "number" === i) {
|
|
1781
1833
|
var a = document.createElement("input");
|
|
1782
|
-
return a.type = i, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function (a) { "number" === i ? e.value = Number(this.value) : e.value = this.value, t.
|
|
1834
|
+
return a.type = i, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function (a) { "number" === i ? e.value = Number(this.value) : e.value = this.value, t.Lc(); }), a;
|
|
1783
1835
|
} if ("select" === i) {
|
|
1784
1836
|
var n = document.createElement("select");
|
|
1785
|
-
return t.disabled && (n.disabled = !0), e.data.options.forEach(function (t) { var i = document.createElement("option"); i.innerText = t.name, i.value = t.id, i.
|
|
1837
|
+
return t.disabled && (n.disabled = !0), e.data.options.forEach(function (t) { var i = document.createElement("option"); i.innerText = t.name, i.value = t.id, i.wc = t.id, n.appendChild(i), e.value === t.id && i.setAttribute("selected", !0); }), n.addEventListener("change", function (i) { var a = n.options[n.selectedIndex]; a && "undefined" != typeof a.wc && (e.value = a.wc), t.Lc(); }), n;
|
|
1786
1838
|
} throw new Error("Unsupported item type: " + i); }, c.prototype.focus = function () { };
|
|
1787
1839
|
}
|
|
1788
1840
|
}(DayPilot), "undefined" == typeof DayPilot)
|
|
1789
1841
|
var DayPilot = {};
|
|
1790
1842
|
if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function () {
|
|
1791
1843
|
if ("undefined" == typeof DayPilot.Month || !DayPilot.Month.events) {
|
|
1792
|
-
var e = {};
|
|
1793
|
-
e.Month = function (
|
|
1794
|
-
this.v = "2024.4.
|
|
1795
|
-
var
|
|
1796
|
-
this.id =
|
|
1844
|
+
var e = {}, t = DayPilot.Util.isVueVNode;
|
|
1845
|
+
e.Month = function (i, a) {
|
|
1846
|
+
this.v = "2024.4.622-lite", this.nav = {};
|
|
1847
|
+
var n = this;
|
|
1848
|
+
this.id = i, this.isMonth = !0, this.api = 2, this.backendUrl = null, this.cellHeaderHeight = 24, this.cellHeight = 100, this.cellMarginBottom = 0, this.contextMenu = null, this.cssClassPrefix = "month_default", this.eventBarVisible = !0, this.eventBorderRadius = null, this.eventHeight = 25, this.eventsLoadMethod = "GET", this.headerHeight = 30, this.hideUntilInit = !0, this.lineSpace = 1, this.locale = "en-us", this.showToolTip = !0, this.startDate = new DayPilot.Date, this.theme = null, this.visible = !0, this.weekStarts = "Auto", this.width = "100%", this.xssProtection = "Enabled", this.afterRender = function () { }, this.cellHeaderClickHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.headerClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onCellHeaderClick = null, this.onCellHeaderClicked = null, this.onEventClick = null, this.onEventClicked = null, this.onEventDelete = null, this.onEventDeleted = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeEventRender = null, this.onBeforeCellRender = null, this.cellEvents = [], this.elements = {}, this.elements.events = [], this.cache = {}, this.O = !1, this.U = function (e, t) { var e = JSON.parse(e); return e.CallBackRedirect ? void (document.location.href = e.CallBackRedirect) : "None" === e.UpdateType ? void n.fireAfterRenderDetached(e.CallBackData, !0) : (n.events.list = e.Events, "Full" === e.UpdateType && (n.startDate = e.StartDate, n.timeFormat = e.TimeFormat ? e.TimeFormat : n.timeFormat, "undefined" != typeof e.WeekStarts && (n.weekStarts = e.WeekStarts), n.hashes = e.Hashes), n.W(), n.Tc(), n.ea(), "Full" === e.UpdateType && (n.Uc(), n.Vc()), n.ja(), n.show(), n.ka(), void n.fireAfterRenderDetached(e.CallBackData, !0)); }, this.fireAfterRenderDetached = function (e, t) { var i = function (e, t) { return function () { n.afterRender && n.afterRender(e, t); }; }; window.setTimeout(i(e, t), 0); }, this.lineHeight = function () { return this.eventHeight + this.lineSpace; }, this.events = {}, this.events.add = function (e) { var t = null; if (e instanceof DayPilot.Event)
|
|
1797
1849
|
t = e.data;
|
|
1798
1850
|
else {
|
|
1799
1851
|
if ("object" != typeof e)
|
|
1800
1852
|
throw "DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";
|
|
1801
1853
|
t = e;
|
|
1802
|
-
}
|
|
1854
|
+
} n.events.list || (n.events.list = []), n.events.list.push(t), n.update(), n.sa.notify(); }, this.events.find = function (e) { if (!n.events.list)
|
|
1803
1855
|
return null; if ("function" == typeof e) {
|
|
1804
|
-
for (var t = e, i = 0; i <
|
|
1805
|
-
var
|
|
1806
|
-
if (t(
|
|
1807
|
-
return
|
|
1856
|
+
for (var t = e, i = 0; i < n.events.list.length; i++) {
|
|
1857
|
+
var a = new DayPilot.Event(n.events.list[i], n);
|
|
1858
|
+
if (t(a))
|
|
1859
|
+
return a;
|
|
1808
1860
|
}
|
|
1809
1861
|
return null;
|
|
1810
|
-
} for (var i = 0; i <
|
|
1811
|
-
var o =
|
|
1862
|
+
} for (var i = 0; i < n.events.list.length; i++) {
|
|
1863
|
+
var o = n.events.list[i];
|
|
1812
1864
|
if (o.id === e)
|
|
1813
|
-
return new DayPilot.Event(o,
|
|
1865
|
+
return new DayPilot.Event(o, n);
|
|
1814
1866
|
} return null; }, this.events.update = function (e) { if (e instanceof DayPilot.Event)
|
|
1815
1867
|
e.commit();
|
|
1816
1868
|
else if ("object" == typeof e) {
|
|
1817
|
-
var t =
|
|
1869
|
+
var t = n.events.find(e.id);
|
|
1818
1870
|
if (t) {
|
|
1819
|
-
var i = DayPilot.indexOf(
|
|
1820
|
-
|
|
1871
|
+
var i = DayPilot.indexOf(n.events.list, t.data);
|
|
1872
|
+
n.events.list.splice(i, 1, e);
|
|
1821
1873
|
}
|
|
1822
|
-
}
|
|
1874
|
+
} n.update(), n.sa.notify(); }, this.events.remove = function (e) { var t; if (e instanceof DayPilot.Event)
|
|
1823
1875
|
t = e.data;
|
|
1824
1876
|
else if ("object" == typeof e) {
|
|
1825
|
-
var i =
|
|
1877
|
+
var i = n.events.find(e.id);
|
|
1826
1878
|
i && (t = i.data);
|
|
1827
1879
|
}
|
|
1828
1880
|
else if ("string" == typeof e || "number" == typeof e) {
|
|
1829
|
-
var i =
|
|
1881
|
+
var i = n.events.find(e);
|
|
1830
1882
|
i && (t = i.data);
|
|
1831
|
-
} var
|
|
1883
|
+
} var a = DayPilot.indexOf(n.events.list, t); n.events.list.splice(a, 1), n.update(), n.sa.notify(); }, this.events.load = function (e, t, i) { var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, o = function (e) { var i, o = e.request; try {
|
|
1832
1884
|
i = JSON.parse(o.responseText);
|
|
1833
1885
|
}
|
|
1834
1886
|
catch (e) {
|
|
1835
1887
|
var r = {};
|
|
1836
|
-
return r.exception = e, void
|
|
1888
|
+
return r.exception = e, void a(r);
|
|
1837
1889
|
} if (DayPilot.isArray(i)) {
|
|
1838
1890
|
var s = {};
|
|
1839
1891
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1840
1892
|
return;
|
|
1841
|
-
|
|
1842
|
-
} }; if (
|
|
1843
|
-
DayPilot.Http.ajax({ "method": "POST", "data": { "start":
|
|
1893
|
+
n.events.list = i, n.Ba && n.update();
|
|
1894
|
+
} }; if (n.eventsLoadMethod && "POST" === n.eventsLoadMethod.toUpperCase())
|
|
1895
|
+
DayPilot.Http.ajax({ "method": "POST", "data": { "start": n.visibleStart().toString(), "end": n.visibleEnd().toString() }, "url": e, "success": o, "error": a });
|
|
1844
1896
|
else {
|
|
1845
|
-
var r = e, s = "start=" +
|
|
1846
|
-
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": o, "error":
|
|
1847
|
-
} }, this.events.forRange = function (e, t) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var i = (
|
|
1848
|
-
if (
|
|
1897
|
+
var r = e, s = "start=" + n.visibleStart().toString() + "&end=" + n.visibleEnd().toString();
|
|
1898
|
+
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": o, "error": a });
|
|
1899
|
+
} }, this.events.forRange = function (e, t) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var i = (n.events.list || []).map(function (e) { return new DayPilot.Event(e); }); return i.sort(n.qb), i.filter(function (i) { var a = i.start(), n = i.end(); return a === n && a === e || DayPilot.Util.overlaps(e, t, a, n); }); }, this.update = function (e) { if (n.jb(e), this.Ba) {
|
|
1900
|
+
if (n.O)
|
|
1849
1901
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");
|
|
1850
1902
|
if (this.cells) {
|
|
1851
|
-
|
|
1903
|
+
n.W(), n.Tc(), n.ea(), n.Uc(), n.Vc(), n.ja(), n.t(), n.ka(), this.visible ? this.show() : this.hide();
|
|
1852
1904
|
}
|
|
1853
|
-
} }, this.
|
|
1854
|
-
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ?
|
|
1855
|
-
this.
|
|
1905
|
+
} }, this.lb = null, this.jb = function (e) { if (e) {
|
|
1906
|
+
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? n.events.list = e.list : n.events.list = e; } } };
|
|
1907
|
+
this.lb = t;
|
|
1856
1908
|
for (var i in e)
|
|
1857
1909
|
if (t[i]) {
|
|
1858
|
-
var
|
|
1859
|
-
|
|
1910
|
+
var a = t[i];
|
|
1911
|
+
a.data = e[i], a.preInit && a.preInit();
|
|
1860
1912
|
}
|
|
1861
1913
|
else
|
|
1862
|
-
|
|
1863
|
-
} }, this.
|
|
1914
|
+
n[i] = e[i];
|
|
1915
|
+
} }, this.mb = function () { var e = this.lb; for (var t in e) {
|
|
1864
1916
|
var i = e[t];
|
|
1865
1917
|
i.postInit && i.postInit();
|
|
1866
|
-
} }, this.
|
|
1867
|
-
|
|
1918
|
+
} }, this.ob = {}, this.ob.events = [], this.pb = function (e) { var t = this.ob.events, i = this.events.list[e], a = {}; for (var o in i)
|
|
1919
|
+
a[o] = i[o]; if ("function" == typeof this.onBeforeEventRender) {
|
|
1868
1920
|
var r = {};
|
|
1869
|
-
r.control =
|
|
1870
|
-
} t[e] =
|
|
1921
|
+
r.control = n, r.data = a, this.onBeforeEventRender(r);
|
|
1922
|
+
} t[e] = a; }, this.ea = function () { var e = this.events.list; if (e) {
|
|
1871
1923
|
if (!DayPilot.isArray(e))
|
|
1872
1924
|
throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: " + typeof e);
|
|
1873
1925
|
if ("function" == typeof this.onBeforeEventRender)
|
|
1874
1926
|
for (var t = 0; t < e.length; t++)
|
|
1875
|
-
this.
|
|
1927
|
+
this.pb(t);
|
|
1876
1928
|
for (var i = 0; i < e.length; i++) {
|
|
1877
1929
|
var a = e[i];
|
|
1878
1930
|
if ("object" != typeof a)
|
|
@@ -1885,12 +1937,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1885
1937
|
if (!(n.getTime() > o.getTime()))
|
|
1886
1938
|
for (var t = 0; t < this.rows.length; t++) {
|
|
1887
1939
|
var r = this.rows[t], s = new DayPilot.Event(a, this);
|
|
1888
|
-
r.belongsHere(s) && (r.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.
|
|
1940
|
+
r.belongsHere(s) && (r.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.ob.events[i]));
|
|
1889
1941
|
}
|
|
1890
1942
|
}
|
|
1891
1943
|
for (var l = 0; l < this.rows.length; l++) {
|
|
1892
1944
|
var r = this.rows[l];
|
|
1893
|
-
r.events.sort(this.
|
|
1945
|
+
r.events.sort(this.qb);
|
|
1894
1946
|
for (var d = 0; d < this.rows[l].events.length; d++) {
|
|
1895
1947
|
var c = r.events[d], u = r.getStartColumn(c), h = r.getWidth(c);
|
|
1896
1948
|
r.putIntoLine(c, u, h, l);
|
|
@@ -1898,100 +1950,124 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1898
1950
|
}
|
|
1899
1951
|
} }, this.W = function () { for (var e = 0; e < this.elements.events.length; e++) {
|
|
1900
1952
|
var t = this.elements.events[e];
|
|
1901
|
-
|
|
1902
|
-
} this.elements.events = []; }, this.
|
|
1953
|
+
n.Ea(t);
|
|
1954
|
+
} this.elements.events = []; }, this.Ea = function (e) { !function () { var i = e.domArgs; if (e.domArgs = null, i && "function" == typeof n.onBeforeEventDomRemove && n.onBeforeEventDomRemove(i), i && "function" == typeof n.onBeforeEventDomAdd) {
|
|
1955
|
+
var a = i && i.Fa;
|
|
1956
|
+
if (a) {
|
|
1957
|
+
n.Ha.Ga && t(i.element) && (n.Ha.Ia = !0, n.Ha.Ja(a), n.Ha.Ia = !1);
|
|
1958
|
+
}
|
|
1959
|
+
} }(), e.event = null, e.click = null, e.parentNode.removeChild(e); }, this.ka = function () { this.Wc(); }, this.Wc = function () { this.elements.events = []; for (var e = 0; e < this.rows.length; e++)
|
|
1903
1960
|
for (var t = this.rows[e], i = 0; i < t.lines.length; i++)
|
|
1904
1961
|
for (var a = t.lines[i], n = 0; n < a.length; n++)
|
|
1905
|
-
this.
|
|
1906
|
-
return 0; var i = e.start().getTime() - t.start().getTime(); return 0 !== i ? i : t.end().getTime() - e.end().getTime(); }, this.drawShadow = function (t, i,
|
|
1962
|
+
this.Ka(a[n]); }, this.qb = function (e, t) { if (!(e && t && e.start && t.start))
|
|
1963
|
+
return 0; var i = e.start().getTime() - t.start().getTime(); return 0 !== i ? i : t.end().getTime() - e.end().getTime(); }, this.drawShadow = function (t, i, a, o, r, s) { r || (r = 0); var l = o; this.shadow = {}, this.shadow.list = [], this.shadow.start = { x: t, y: i }, this.shadow.width = o; var d = 7 * i + t - r; d < 0 && (l += d, t = 0, i = 0); for (var c = r; c >= 7;)
|
|
1907
1964
|
i--, c -= 7; if (c > t) {
|
|
1908
1965
|
c > t + (7 - this.getColCount()) ? (i--, t = t + 7 - c) : (l = l - c + t, t = 0);
|
|
1909
1966
|
}
|
|
1910
1967
|
else
|
|
1911
|
-
t -= c; i < 0 && (i = 0, t = 0); var u = null;
|
|
1912
|
-
var
|
|
1913
|
-
|
|
1914
|
-
var
|
|
1915
|
-
|
|
1968
|
+
t -= c; i < 0 && (i = 0, t = 0); var u = null; e.resizingEvent ? u = "w-resize" : e.movingEvent && (u = "move"), this.nav.top.style.cursor = u; var h = n.eventBorderRadius; for ("number" == typeof h && (h += "px"); l > 0 && i < this.rows.length;) {
|
|
1969
|
+
var f = Math.min(this.getColCount() - t, l), m = this.rows[i], p = this.getRowTop(i), v = m.getHeight(), y = document.createElement("div");
|
|
1970
|
+
y.setAttribute("unselectable", "on"), y.style.position = "absolute", y.style.left = this.getCellWidth() * t + "%", y.style.width = this.getCellWidth() * f + "%", y.style.top = p + "px", y.style.height = v + "px", y.style.cursor = u, y.classList.add(n.K("_shadow"));
|
|
1971
|
+
var g = document.createElement("div");
|
|
1972
|
+
g.setAttribute("unselectable", "on"), y.appendChild(g), g.style.position = "absolute", g.style.top = "0px", g.style.right = "0px", g.style.left = "0px", g.style.bottom = "0px", g.classList.add(n.K("_shadow_inner")), h && (l === o && (y.style.borderTopLeftRadius = h, y.style.borderBottomLeftRadius = h, g.style.borderTopLeftRadius = h, g.style.borderBottomLeftRadius = h), l <= f && (y.style.borderTopRightRadius = h, y.style.borderBottomRightRadius = h, g.style.borderTopRightRadius = h, g.style.borderBottomRightRadius = h)), this.nav.top.appendChild(y), this.shadow.list.push(y), l -= f + 7 - this.getColCount(), t = 0, i++;
|
|
1916
1973
|
} }, this.clearShadow = function () { if (this.shadow) {
|
|
1917
1974
|
for (var e = 0; e < this.shadow.list.length; e++)
|
|
1918
1975
|
this.nav.top.removeChild(this.shadow.list[e]);
|
|
1919
1976
|
this.shadow = null, this.nav.top.style.cursor = "";
|
|
1920
1977
|
} }, this.getEventTop = function (e, t) { for (var i = this.headerHeight, a = 0; a < e; a++)
|
|
1921
|
-
i += this.rows[a].getHeight(); return i += this.cellHeaderHeight, i += t * this.lineHeight(); }, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.
|
|
1922
|
-
var
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1978
|
+
i += this.rows[a].getHeight(); return i += this.cellHeaderHeight, i += t * this.lineHeight(); }, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.Ka = function (i) {
|
|
1979
|
+
var a = i.cache || i.data, o = a.borderRadius || n.eventBorderRadius;
|
|
1980
|
+
"number" == typeof o && (o += "px");
|
|
1981
|
+
var r = i.part.row, s = i.part.line, l = i.part.colStart, d = i.part.colWidth, c = this.getCellWidth() * l, u = this.getCellWidth() * d, h = this.getEventTop(r, s), f = document.createElement("div");
|
|
1982
|
+
f.setAttribute("unselectable", "on"), f.style.height = this.eventHeight + "px", f.style.overflow = "hidden", f.className = this.K("_event"), a.cssClass && DayPilot.Util.addClass(f, a.cssClass), i.part.startsHere || DayPilot.Util.addClass(f, this.K("_event_continueleft")), i.part.endsHere || DayPilot.Util.addClass(f, this.K("_event_continueright")), f.event = i, f.style.width = u + "%", f.style.position = "absolute", f.style.left = c + "%", f.style.top = h + "px", this.showToolTip && i.client.toolTip() && (f.title = i.client.toolTip()), f.onclick = n.ra, f.oncontextmenu = n.Xc, f.onmousedown = function (t) {
|
|
1983
|
+
t = t || window.event;
|
|
1984
|
+
var a = t.which || t.button;
|
|
1985
|
+
if (t.cancelBubble = !0, t.stopPropagation && t.stopPropagation(), 1 === a)
|
|
1986
|
+
if (e.movingEvent = null, "w-resize" === this.style.cursor || "e-resize" === this.style.cursor) {
|
|
1987
|
+
var o = {};
|
|
1988
|
+
o.start = {}, o.start.x = l, o.start.y = r, o.event = f.event, o.width = DayPilot.DateUtil.daysSpan(o.event.start(), o.event.end()) + 1,
|
|
1989
|
+
o.direction = this.style.cursor, e.resizingEvent = o;
|
|
1990
|
+
}
|
|
1991
|
+
else if ("move" === this.style.cursor || i.client.moveEnabled()) {
|
|
1992
|
+
n.clearShadow();
|
|
1993
|
+
var c = DayPilot.mo3(n.nav.top, t);
|
|
1994
|
+
if (!c)
|
|
1995
|
+
return;
|
|
1996
|
+
var u = n.getCellBelowPoint(c.x, c.y), h = DayPilot.DateUtil.daysDiff(i.start(), n.rows[r].start), m = 7 * u.y + u.x - (7 * r + l);
|
|
1997
|
+
h && (m += h);
|
|
1998
|
+
var p = {};
|
|
1999
|
+
p.start = {}, p.start.x = l, p.start.y = r, p.start.line = s, p.offset = n.eventMoveToPosition ? 0 : m, p.colWidth = d, p.event = f.event, p.coords = c, e.movingEvent = p;
|
|
2000
|
+
}
|
|
2001
|
+
}, f.onmousemove = function (t) { if ("undefined" != typeof e && !e.movingEvent && !e.resizingEvent) {
|
|
2002
|
+
var a = DayPilot.mo3(f, t);
|
|
1939
2003
|
if (a) {
|
|
1940
|
-
|
|
2004
|
+
f.deleteIcon && (f.deleteIcon.style.display = "");
|
|
1941
2005
|
var n = 6;
|
|
1942
|
-
a.x <= n &&
|
|
2006
|
+
a.x <= n && i.client.resizeEnabled() ? i.part.startsHere ? (f.style.cursor = "w-resize", f.dpBorder = "left") : f.style.cursor = "not-allowed" : f.clientWidth - a.x <= n && i.client.resizeEnabled() ? i.part.endsHere ? (f.style.cursor = "e-resize", f.dpBorder = "right") : f.style.cursor = "not-allowed" : i.client.clickEnabled() ? f.style.cursor = "pointer" : f.style.cursor = "default";
|
|
1943
2007
|
}
|
|
1944
|
-
} },
|
|
1945
|
-
var
|
|
1946
|
-
if (
|
|
1947
|
-
var
|
|
1948
|
-
|
|
1949
|
-
var
|
|
1950
|
-
|
|
1951
|
-
}
|
|
1952
|
-
if (
|
|
1953
|
-
var
|
|
1954
|
-
|
|
1955
|
-
}
|
|
1956
|
-
var
|
|
1957
|
-
if (DayPilot.Areas.attach(
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
2008
|
+
} }, f.onmouseleave = function (e) { f.deleteIcon && (f.deleteIcon.style.display = "none"), f.style.cursor = ""; }, f.onmouseenter = function (e) { f.deleteIcon && (f.deleteIcon.style.display = ""); };
|
|
2009
|
+
var m = document.createElement("div");
|
|
2010
|
+
if (m.setAttribute("unselectable", "on"), m.className = this.K("_event_inner"), "darker" === a.borderColor && a.backColor ? m.style.borderColor = DayPilot.ColorUtil.darker(a.backColor, 2) : m.style.borderColor = a.borderColor, a.backColor && (m.style.background = a.backColor), a.fontColor && (m.style.color = a.fontColor), o && (f.style.borderRadius = o, m.style.borderRadius = o), f.appendChild(m), i.client.barVisible()) {
|
|
2011
|
+
var p = document.createElement("div");
|
|
2012
|
+
p.setAttribute("unselectable", "on"), p.className = this.K("_event_bar"), p.style.position = "absolute";
|
|
2013
|
+
var v = document.createElement("div");
|
|
2014
|
+
v.setAttribute("unselectable", "on"), v.className = this.K("_event_bar_inner"), v.style.top = "0%", v.style.height = "100%", a.barColor && (v.style.backgroundColor = a.barColor), p.appendChild(v), f.appendChild(p);
|
|
2015
|
+
}
|
|
2016
|
+
if (i.client.deleteEnabled()) {
|
|
2017
|
+
var y = Math.floor(n.eventHeight / 2 - 9), g = document.createElement("div");
|
|
2018
|
+
g.style.position = "absolute", g.style.right = "2px", g.style.top = y + "px", g.style.width = "18px", g.style.height = "18px", g.className = n.K("_event_delete"), g.onmousedown = function (e) { e.stopPropagation(); }, g.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && n.ua(t); }, g.style.display = "none", f.deleteIcon = g, f.appendChild(g);
|
|
2019
|
+
}
|
|
2020
|
+
var b = a.areas ? DayPilot.Areas.copy(a.areas) : [];
|
|
2021
|
+
if (DayPilot.Areas.attach(f, i, { "areas": b }), "function" == typeof n.onAfterEventRender) {
|
|
2022
|
+
var D = {};
|
|
2023
|
+
D.e = f.event, D.div = f, n.onAfterEventRender(D);
|
|
2024
|
+
}
|
|
2025
|
+
!function () { var e = {}; if (e.control = n, e.e = i, e.element = null, f.domArgs = e, "function" == typeof n.onBeforeEventDomAdd && n.onBeforeEventDomAdd(e), e.element) {
|
|
2026
|
+
var a = m;
|
|
2027
|
+
if (a) {
|
|
2028
|
+
e.Fa = a;
|
|
2029
|
+
if (t(e.element)) {
|
|
2030
|
+
if (!n.Ha.Ga)
|
|
2031
|
+
throw new DayPilot.Exception("Can't reach Vue");
|
|
2032
|
+
n.Ha.Ia = !0, n.Ha.La(e.element, a, { "style": { "flexGrow": 1 } }), n.Ha.Ia = !1;
|
|
2033
|
+
}
|
|
2034
|
+
else
|
|
2035
|
+
a.appendChild(e.element);
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
else
|
|
2039
|
+
m.innerHTML = i.client.innerHTML(); }(), this.elements.events.push(f), this.nav.events.appendChild(f);
|
|
2040
|
+
}, this.lastVisibleDayOfMonth = function () { return this.startDate.lastDayOfMonth(); }, this.Tc = function () { "string" == typeof this.startDate && (this.startDate = new DayPilot.Date(this.startDate)), this.startDate = this.startDate.firstDayOfMonth(), this.firstDate = this.startDate.firstDayOfWeek(this.getWeekStart()); var e, t = (this.startDate, this.lastVisibleDayOfMonth()), i = DayPilot.DateUtil.daysDiff(this.firstDate, t) + 1; e = Math.ceil(i / 7), this.days = 7 * e, this.rows = []; for (var a = 0; a < e; a++) {
|
|
1965
2041
|
var o = {};
|
|
1966
|
-
o.start = this.firstDate.addDays(7 *
|
|
2042
|
+
o.start = this.firstDate.addDays(7 * a), o.end = o.start.addDays(this.getColCount()), o.events = [], o.lines = [], o.index = a, o.minHeight = this.cellHeight, o.calendar = this, o.belongsHere = function (e) { return e.end().getTime() === e.start().getTime() && e.start().getTime() === this.start.getTime() || !(e.end().getTime() <= this.start.getTime() || e.start().getTime() >= this.end.getTime()); }, o.getPartStart = function (e) { return DayPilot.DateUtil.max(this.start, e.start()); }, o.getPartEnd = function (e) { return DayPilot.DateUtil.min(this.end, e.end()); }, o.getStartColumn = function (e) { var t = this.getPartStart(e); return DayPilot.DateUtil.daysDiff(this.start, t); }, o.getWidth = function (e) { return DayPilot.DateUtil.daysSpan(this.getPartStart(e), this.getPartEnd(e)) + 1; }, o.putIntoLine = function (e, t, i, a) { for (var n = this, o = 0; o < this.lines.length; o++) {
|
|
1967
2043
|
var r = this.lines[o];
|
|
1968
2044
|
if (r.isFree(t, i))
|
|
1969
2045
|
return r.addEvent(e, t, i, a, o), o;
|
|
1970
2046
|
} var r = []; return r.isFree = function (e, t) { for (var i = !0, a = 0; a < this.length; a++)
|
|
1971
|
-
e + t - 1 < this[a].part.colStart || e > this[a].part.colStart + this[a].part.colWidth - 1 || (i = !1); return i; }, r.addEvent = function (e, t, i, a, o) { e.part.colStart = t, e.part.colWidth = i, e.part.row = a, e.part.line = o, e.part.startsHere = n.start.getTime() <= e.start().getTime(), e.part.endsHere = n.end.getTime() >= e.end().getTime(), this.push(e); }, r.addEvent(e, t, i, a, this.lines.length), this.lines.push(r), this.lines.length - 1; }, o.getStart = function () { for (var e = 0, t = 0; t <
|
|
1972
|
-
e +=
|
|
1973
|
-
} this.endDate = this.firstDate.addDays(7 * e); }, this.visibleStart = function () { return
|
|
1974
|
-
e += this.rows[t].getHeight(); return e; }, this.getWidth = function (e, t) { return 7 * t.y + t.x - (7 * e.y + e.x) + 1; }, this.getMinCoords = function (e, t) { return 7 * e.y + e.x < 7 * t.y + t.x ? e : t; }, this.K = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.
|
|
1975
|
-
var i = DayPilot.mo3(
|
|
2047
|
+
e + t - 1 < this[a].part.colStart || e > this[a].part.colStart + this[a].part.colWidth - 1 || (i = !1); return i; }, r.addEvent = function (e, t, i, a, o) { e.part.colStart = t, e.part.colWidth = i, e.part.row = a, e.part.line = o, e.part.startsHere = n.start.getTime() <= e.start().getTime(), e.part.endsHere = n.end.getTime() >= e.end().getTime(), this.push(e); }, r.addEvent(e, t, i, a, this.lines.length), this.lines.push(r), this.lines.length - 1; }, o.getStart = function () { for (var e = 0, t = 0; t < n.rows.length && t < this.index; t++)
|
|
2048
|
+
e += n.rows[t].getHeight(); }, o.getHeight = function () { return Math.max(this.lines.length * n.lineHeight() + n.cellHeaderHeight + n.cellMarginBottom, this.calendar.cellHeight); }, this.rows.push(o);
|
|
2049
|
+
} this.endDate = this.firstDate.addDays(7 * e); }, this.visibleStart = function () { return n.firstDate; }, this.visibleEnd = function () { return n.endDate; }, this.getHeight = function () { for (var e = this.headerHeight, t = 0; t < this.rows.length; t++)
|
|
2050
|
+
e += this.rows[t].getHeight(); return e; }, this.getWidth = function (e, t) { return 7 * t.y + t.x - (7 * e.y + e.x) + 1; }, this.getMinCoords = function (e, t) { return 7 * e.y + e.x < 7 * t.y + t.x ? e : t; }, this.K = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.Na = function () { var t = this.nav.top; t.setAttribute("unselectable", "on"), t.style.MozUserSelect = "none", t.style.KhtmlUserSelect = "none", t.style.WebkitUserSelect = "none", t.style.position = "relative", this.width && (t.style.width = this.width), t.style.height = this.getHeight() + "px", t.onselectstart = function (e) { return !1; }, this.hideUntilInit && (t.style.visibility = "hidden"), this.visible || (t.style.display = "none"), t.className = this.K("_main"); var i = document.createElement("div"); this.nav.cells = i, i.style.position = "absolute", i.style.left = "0px", i.style.right = "0px", i.setAttribute("unselectable", "on"), t.appendChild(i); var a = document.createElement("div"); this.nav.events = a, a.style.position = "absolute", a.style.left = "0px", a.style.right = "0px", a.setAttribute("unselectable", "on"), t.appendChild(a), t.onmousemove = function (t) { if (e.resizingEvent) {
|
|
2051
|
+
var i = DayPilot.mo3(n.nav.top, t);
|
|
1976
2052
|
if (!i)
|
|
1977
2053
|
return;
|
|
1978
|
-
var
|
|
1979
|
-
|
|
2054
|
+
var a = n.getCellBelowPoint(i.x, i.y);
|
|
2055
|
+
n.clearShadow();
|
|
1980
2056
|
var o, r, s = e.resizingEvent;
|
|
1981
2057
|
s.start;
|
|
1982
2058
|
if ("w-resize" === s.direction) {
|
|
1983
|
-
r =
|
|
2059
|
+
r = a;
|
|
1984
2060
|
var l = s.event.end();
|
|
1985
2061
|
l.getDatePart() === l && (l = l.addDays(-1));
|
|
1986
|
-
var d =
|
|
1987
|
-
o =
|
|
2062
|
+
var d = n.getCellFromDate(l);
|
|
2063
|
+
o = n.getWidth(a, d);
|
|
1988
2064
|
}
|
|
1989
2065
|
else
|
|
1990
|
-
r =
|
|
1991
|
-
o < 1 && (o = 1),
|
|
2066
|
+
r = n.getCellFromDate(s.event.start()), o = n.getWidth(r, a);
|
|
2067
|
+
o < 1 && (o = 1), n.drawShadow(r.x, r.y, 0, o);
|
|
1992
2068
|
}
|
|
1993
2069
|
else if (e.movingEvent) {
|
|
1994
|
-
var i = DayPilot.mo3(
|
|
2070
|
+
var i = DayPilot.mo3(n.nav.top, t);
|
|
1995
2071
|
if (!i)
|
|
1996
2072
|
return;
|
|
1997
2073
|
if (i.x === e.movingEvent.coords.x && i.y === e.movingEvent.coords.y)
|
|
@@ -1999,21 +2075,21 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1999
2075
|
var c = 3, u = Math.abs(i.x - e.movingEvent.coords.x) + Math.abs(i.y - e.movingEvent.coords.y);
|
|
2000
2076
|
if (u <= c)
|
|
2001
2077
|
return;
|
|
2002
|
-
var
|
|
2003
|
-
|
|
2004
|
-
var h = e.movingEvent.event, f = e.movingEvent.offset, o =
|
|
2005
|
-
o < 1 && (o = 1),
|
|
2078
|
+
var a = n.getCellBelowPoint(i.x, i.y);
|
|
2079
|
+
n.clearShadow();
|
|
2080
|
+
var h = e.movingEvent.event, f = e.movingEvent.offset, o = n.cellMode ? 1 : DayPilot.DateUtil.daysSpan(h.start(), h.end()) + 1;
|
|
2081
|
+
o < 1 && (o = 1), n.drawShadow(a.x, a.y, 0, o, f, h);
|
|
2006
2082
|
}
|
|
2007
2083
|
else if (e.timeRangeSelecting) {
|
|
2008
|
-
var i = DayPilot.mo3(
|
|
2084
|
+
var i = DayPilot.mo3(n.nav.top, t);
|
|
2009
2085
|
if (!i)
|
|
2010
2086
|
return;
|
|
2011
|
-
var
|
|
2012
|
-
|
|
2013
|
-
var r = e.timeRangeSelecting, m = 7 * r.y + r.x, p = 7 *
|
|
2087
|
+
var a = n.getCellBelowPoint(i.x, i.y);
|
|
2088
|
+
n.clearShadow();
|
|
2089
|
+
var r = e.timeRangeSelecting, m = 7 * r.y + r.x, p = 7 * a.y + a.x, o = Math.abs(p - m) + 1;
|
|
2014
2090
|
o < 1 && (o = 1);
|
|
2015
|
-
var v = m < p ? r :
|
|
2016
|
-
e.timeRangeSelecting.from = { x: v.x, y: v.y }, e.timeRangeSelecting.width = o, e.timeRangeSelecting.moved = !0,
|
|
2091
|
+
var v = m < p ? r : a;
|
|
2092
|
+
e.timeRangeSelecting.from = { x: v.x, y: v.y }, e.timeRangeSelecting.width = o, e.timeRangeSelecting.moved = !0, n.drawShadow(v.x, v.y, 0, o, 0, null);
|
|
2017
2093
|
} }; }, this.ja = function () { this.nav.top.style.height = this.getHeight() + "px"; for (var e = 0; e < this.cells.length; e++)
|
|
2018
2094
|
for (var t = 0; t < this.cells[e].length; t++)
|
|
2019
2095
|
this.cells[e][t].style.top = this.getRowTop(t) + "px", this.cells[e][t].style.height = this.rows[t].getHeight() + "px"; }, this.getCellBelowPoint = function (e, t) { for (var i = Math.floor(this.nav.top.clientWidth / this.getColCount()), a = Math.min(Math.floor(e / i), this.getColCount() - 1), n = null, o = this.headerHeight, r = 0, s = 0; s < this.rows.length; s++) {
|
|
@@ -2023,151 +2099,180 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2023
2099
|
break;
|
|
2024
2100
|
}
|
|
2025
2101
|
} null === n && (n = this.rows.length - 1); var d = {}; return d.x = a, d.y = n, d.relativeY = r, d; }, this.getCellFromDate = function (e) { for (var t = DayPilot.DateUtil.daysDiff(this.firstDate, e), i = { x: 0, y: 0 }; t >= 7;)
|
|
2026
|
-
i.y++, t -= 7; return i.x = t, i; }, this.
|
|
2102
|
+
i.y++, t -= 7; return i.x = t, i; }, this.Vc = function () { var e = document.createElement("div"); e.oncontextmenu = function () { return !1; }, this.nav.cells.appendChild(e), this.cells = []; for (var t = 0; t < this.getColCount(); t++) {
|
|
2027
2103
|
this.cells[t] = [];
|
|
2028
2104
|
var i = document.createElement("div");
|
|
2029
2105
|
i.setAttribute("unselectable", "on"), i.style.position = "absolute", i.style.left = this.getCellWidth() * t + "%", i.style.width = this.getCellWidth() + "%", i.style.top = "0px", i.style.height = this.headerHeight + "px";
|
|
2030
2106
|
var a = t + this.getWeekStart();
|
|
2031
2107
|
a > 6 && (a -= 7), i.className = this.K("_header");
|
|
2032
|
-
var
|
|
2033
|
-
|
|
2108
|
+
var n = document.createElement("div");
|
|
2109
|
+
n.setAttribute("unselectable", "on"), n.innerHTML = o.locale().dayNames[a], i.appendChild(n), n.style.position = "absolute", n.style.top = "0px", n.style.bottom = "0px", n.style.left = "0px", n.style.right = "0px", n.className = this.K("_header_inner"), n.innerHTML = o.locale().dayNames[a], e.appendChild(i);
|
|
2034
2110
|
for (var r = 0; r < this.rows.length; r++)
|
|
2035
|
-
this.
|
|
2036
|
-
} }, this.
|
|
2037
|
-
for (var t = 0; t < this.cells[e].length; t++)
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2111
|
+
this.Yc(t, r, e);
|
|
2112
|
+
} }, this.Uc = function () { for (var e = 0; e < this.cells.length; e++)
|
|
2113
|
+
for (var t = 0; t < this.cells[e].length; t++) {
|
|
2114
|
+
var i = n.cells[e][t];
|
|
2115
|
+
n.Ya(i);
|
|
2116
|
+
} this.nav.cells.innerHTML = ""; }, this.Ya = function (e) { !function () { var i = e.domArgs; if (e.domArgs = null, i && "function" == typeof n.onBeforeCellDomRemove && n.onBeforeCellDomRemove(i), i && "function" == typeof n.onBeforeCellDomAdd) {
|
|
2117
|
+
var a = i && i.Fa;
|
|
2118
|
+
if (a) {
|
|
2119
|
+
var o = n.Zc.reactDOM && isReactCmp(i.element), r = n.Ha.Ga && (isVueCmp(i.element) || t(i.element));
|
|
2120
|
+
o ? n.Zc.$c(a) : r && (n.Ha.Ia = !0, n.Ha.Ja(a), n.Ha.Ia = !1);
|
|
2121
|
+
}
|
|
2122
|
+
} }(), e.onclick = null; }, this.qa = function () { return 2 === n.api; }, this.Yc = function (i, a, r) { var s = this.rows[a], l = this.firstDate.addDays(7 * a + i), d = l.getDay(), c = null; c = 1 === d ? o.locale().monthNames[l.getMonth()] + " " + d : "" + d; var u = !n.isWeekend(l), h = { "start": l, "end": l.addDays(1), "properties": { "headerHtml": c, "backColor": null, "business": u, "html": null } }, f = {}; f.control = n, f.cell = h, "function" == typeof n.onBeforeCellRender && n.onBeforeCellRender(f); var m = f.cell.properties, p = document.createElement("div"); if (p.setAttribute("unselectable", "on"), p.style.position = "absolute", p.style.cursor = "default", p.style.left = this.getCellWidth() * i + "%", p.style.width = this.getCellWidth() + "%", p.style.top = this.getRowTop(a) + "px", p.style.height = s.getHeight() + "px", p.className = this.K("_cell"), m.business) {
|
|
2123
|
+
var u = this.K("_cell_business");
|
|
2124
|
+
DayPilot.Util.addClass(p, u);
|
|
2125
|
+
} var v = (this.startDate.addMonths(-1).getMonth(), this.startDate.addMonths(1).getMonth(), this.startDate.getMonth(), document.createElement("div")); v.setAttribute("unselectable", "on"), p.appendChild(v), v.style.position = "absolute", v.style.left = "0px", v.style.right = "0px", v.style.top = "0px", v.style.bottom = "0px", v.className = this.K("_cell_inner"), m.backColor && (v.style.backgroundColor = f.cell.properties.backColor), p.onmousedown = function (t) { "Disabled" !== n.timeRangeSelectedHandling && (n.clearShadow(), e.timeRangeSelecting = { "root": n, "x": i, "y": a, "from": { x: i, y: a }, "width": 1 }); }, p.onclick = function () { var e = function (e) { var t = new DayPilot.Date(e), i = t.addDays(1); n.M(t, i); }; if ("Disabled" !== n.timeRangeSelectedHandling)
|
|
2126
|
+
return void e(l); }; var y = document.createElement("div"); if (y.setAttribute("unselectable", "on"), y.style.height = this.cellHeaderHeight + "px", y.className = this.K("_cell_header"), y.onclick = function (e) { if ("Enabled" === n.cellHeaderClickHandling) {
|
|
2043
2127
|
e.stopPropagation();
|
|
2044
2128
|
var t = {};
|
|
2045
|
-
t.control =
|
|
2046
|
-
} },
|
|
2047
|
-
var
|
|
2048
|
-
|
|
2049
|
-
}
|
|
2050
|
-
var e =
|
|
2129
|
+
t.control = n, t.start = l, t.end = l.addDays(1), t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onCellHeaderClick && (n.onCellHeaderClick(t), t.preventDefault.value) || "function" == typeof n.onCellHeaderClicked && n.onCellHeaderClicked(t);
|
|
2130
|
+
} }, y.innerHTML = m.headerHtml, v.appendChild(y), m.html) {
|
|
2131
|
+
var g = document.createElement("div");
|
|
2132
|
+
g.style.height = s.getHeight() - this.cellHeaderHeight + "px", g.style.overflow = "hidden", g.innerHTML = m.html, v.appendChild(g);
|
|
2133
|
+
} !function () { if ("function" == typeof n.onBeforeCellDomAdd || "function" == typeof n.onBeforeCellDomRemove) {
|
|
2134
|
+
var e = {};
|
|
2135
|
+
if (e.control = n, e.cell = h, e.element = null, p.domArgs = e, "function" == typeof n.onBeforeCellDomAdd && n.onBeforeCellDomAdd(e), e.element) {
|
|
2136
|
+
var i = v;
|
|
2137
|
+
if (i) {
|
|
2138
|
+
e.Fa = i;
|
|
2139
|
+
if (t(e.element)) {
|
|
2140
|
+
if (!n.Ha.Ga)
|
|
2141
|
+
throw new DayPilot.Exception("Can't reach Vue");
|
|
2142
|
+
n.Ha.Ia = !0, n.Ha.La(e.element, i), n.Ha.Ia = !1;
|
|
2143
|
+
}
|
|
2144
|
+
else
|
|
2145
|
+
i.appendChild(e.element);
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
} }(), this.cells[i][a] = p, r.appendChild(p); }, this.getWeekStart = function () { if ("Auto" === n.weekStarts) {
|
|
2149
|
+
var e = o.locale();
|
|
2051
2150
|
return e ? e.weekStarts : 0;
|
|
2052
|
-
} return
|
|
2053
|
-
t += this.rows[i].getHeight(); return t; }, this.S = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl && DayPilot.request(this.backendUrl, this.T, n, this.ajaxError); }, this.T = function (e) {
|
|
2054
|
-
if (
|
|
2055
|
-
var
|
|
2056
|
-
if (
|
|
2151
|
+
} return n.weekStarts || 0; }, this.getColCount = function () { return 7; }, this.getCellWidth = function () { return 14.285; }, this.getRowTop = function (e) { for (var t = this.headerHeight, i = 0; i < e; i++)
|
|
2152
|
+
t += this.rows[i].getHeight(); return t; }, this.S = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl && DayPilot.request(this.backendUrl, this.T, n, this.ajaxError); }, this.T = function (e) { n.U(e.responseText); }, this.R = function () { var e = {}; return e.control = "dpm", e.id = this.id, e.v = this.v, e.visibleStart = new DayPilot.Date(this.firstDate), e.visibleEnd = e.visibleStart.addDays(this.days), e.startDate = n.startDate, e.timeFormat = this.timeFormat, e.weekStarts = this.weekStarts, e; }, this.eventClickCallBack = function (e, t) { this.S("EventClick", t, e); }, this.ra = function (t) { e.movingEvent = null, e.resizingEvent = null; var i = this, t = t || window.event; t.ctrlKey; t.cancelBubble = !0, t.stopPropagation && t.stopPropagation(), n.eventClickSingle(i, t); }, this.eventClickSingle = function (e, t) { var i = e.event; if (i && i.client.clickEnabled())
|
|
2153
|
+
if (n.qa()) {
|
|
2154
|
+
var a = {};
|
|
2155
|
+
if (a.e = i, a.control = n, a.div = e, a.originalEvent = t, a.meta = t.metaKey, a.ctrl = t.ctrlKey, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventClick && (n.sa.apply(function () { n.onEventClick(a); }), a.preventDefault.value))
|
|
2057
2156
|
return;
|
|
2058
|
-
switch (
|
|
2157
|
+
switch (n.eventClickHandling) {
|
|
2059
2158
|
case "CallBack":
|
|
2060
|
-
|
|
2159
|
+
n.eventClickCallBack(i);
|
|
2061
2160
|
break;
|
|
2062
2161
|
case "ContextMenu":
|
|
2063
2162
|
var o = i.client.contextMenu();
|
|
2064
|
-
o ? o.show(i) :
|
|
2163
|
+
o ? o.show(i) : n.contextMenu && n.contextMenu.show(i);
|
|
2065
2164
|
}
|
|
2066
|
-
"function" == typeof
|
|
2165
|
+
"function" == typeof n.onEventClicked && n.sa.apply(function () { n.onEventClicked(a); });
|
|
2067
2166
|
}
|
|
2068
2167
|
else
|
|
2069
|
-
switch (
|
|
2168
|
+
switch (n.eventClickHandling) {
|
|
2070
2169
|
case "CallBack":
|
|
2071
|
-
|
|
2170
|
+
n.eventClickCallBack(i);
|
|
2072
2171
|
break;
|
|
2073
|
-
case "JavaScript":
|
|
2074
|
-
} }, this.
|
|
2075
|
-
return !1; var t = {}; if (t.e = e, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" != typeof
|
|
2076
|
-
switch (
|
|
2172
|
+
case "JavaScript": n.onEventClick(i);
|
|
2173
|
+
} }, this.Xc = function () { var e = this; return n.ta(e.event), !1; }, this.ta = function (e) { if (this.event = e, !e.client.rightClickEnabled())
|
|
2174
|
+
return !1; var t = {}; if (t.e = e, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" != typeof n.onEventRightClick || (n.onEventRightClick(t), !t.preventDefault.value)) {
|
|
2175
|
+
switch (n.eventRightClickHandling) {
|
|
2077
2176
|
case "ContextMenu":
|
|
2078
2177
|
var i = e.client.contextMenu();
|
|
2079
|
-
i ? i.show(e) :
|
|
2178
|
+
i ? i.show(e) : n.contextMenu && n.contextMenu.show(this.event);
|
|
2080
2179
|
}
|
|
2081
|
-
return "function" == typeof
|
|
2082
|
-
} }, this.ua = function (e) { if (
|
|
2180
|
+
return "function" == typeof n.onEventRightClicked && n.onEventRightClicked(t), !1;
|
|
2181
|
+
} }, this.ua = function (e) { if (n.qa()) {
|
|
2083
2182
|
var t = {};
|
|
2084
|
-
if (t.e = e, t.control =
|
|
2183
|
+
if (t.e = e, t.control = n, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventDelete && (n.sa.apply(function () { n.onEventDelete(t); }), t.preventDefault.value))
|
|
2085
2184
|
return;
|
|
2086
|
-
switch (
|
|
2185
|
+
switch (n.eventDeleteHandling) {
|
|
2087
2186
|
case "CallBack":
|
|
2088
|
-
|
|
2187
|
+
n.eventDeleteCallBack(e);
|
|
2089
2188
|
break;
|
|
2090
2189
|
case "PostBack":
|
|
2091
|
-
|
|
2190
|
+
n.eventDeletePostBack(e);
|
|
2092
2191
|
break;
|
|
2093
|
-
case "Update":
|
|
2192
|
+
case "Update": n.events.remove(e);
|
|
2094
2193
|
}
|
|
2095
|
-
"function" == typeof
|
|
2194
|
+
"function" == typeof n.onEventDeleted && n.sa.apply(function () { n.onEventDeleted(t); });
|
|
2096
2195
|
}
|
|
2097
2196
|
else
|
|
2098
|
-
switch (
|
|
2197
|
+
switch (n.eventDeleteHandling) {
|
|
2099
2198
|
case "PostBack":
|
|
2100
|
-
|
|
2199
|
+
n.eventDeletePostBack(e);
|
|
2101
2200
|
break;
|
|
2102
2201
|
case "CallBack":
|
|
2103
|
-
|
|
2202
|
+
n.eventDeleteCallBack(e);
|
|
2104
2203
|
break;
|
|
2105
|
-
case "JavaScript":
|
|
2204
|
+
case "JavaScript": n.onEventDelete(e);
|
|
2106
2205
|
} }, this.eventDeleteCallBack = function (e, t) { this.S("EventDelete", t, e); }, this.eventDeletePostBack = function (e, t) { this.Q("EventDelete", t, e); }, this.eventMoveCallBack = function (e, t, i, a, n) { if (!t)
|
|
2107
2206
|
throw "newStart is null"; if (!i)
|
|
2108
|
-
throw "newEnd is null"; var o = {}; o.e = e, o.newStart = t, o.newEnd = i, o.position = n, this.S("EventMove", a, o); }, this.L = function (e, t, i,
|
|
2207
|
+
throw "newEnd is null"; var o = {}; o.e = e, o.newStart = t, o.newEnd = i, o.position = n, this.S("EventMove", a, o); }, this.L = function (e, t, i, a, o, r) { var s = e.start().getTimePart(), l = e.end().getDatePart(); l.getTime() !== e.end().getTime() && (l = l.addDays(1)); var d = DayPilot.DateUtil.diff(e.end(), l), c = this.getDateFromCell(t, i); c = c.addDays(-a); var u = DayPilot.DateUtil.daysSpan(e.start(), e.end()) + 1, h = c.addDays(u), f = c.addTime(s), m = h.addTime(d); if (n.qa()) {
|
|
2109
2208
|
var p = {};
|
|
2110
|
-
if (p.e = e, p.control =
|
|
2209
|
+
if (p.e = e, p.control = n, p.newStart = f, p.newEnd = m, p.ctrl = o.ctrlKey, p.shift = o.shiftKey, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventMove && (n.sa.apply(function () { n.onEventMove(p); }), p.preventDefault.value))
|
|
2111
2210
|
return;
|
|
2112
|
-
switch (
|
|
2211
|
+
switch (n.eventMoveHandling) {
|
|
2113
2212
|
case "CallBack":
|
|
2114
|
-
|
|
2213
|
+
n.eventMoveCallBack(e, f, m);
|
|
2115
2214
|
break;
|
|
2116
|
-
case "Update": e.start(f), e.end(m),
|
|
2215
|
+
case "Update": e.start(f), e.end(m), n.events.update(e);
|
|
2117
2216
|
}
|
|
2118
|
-
"function" == typeof
|
|
2217
|
+
"function" == typeof n.onEventMoved && n.sa.apply(function () { n.onEventMoved(p); });
|
|
2119
2218
|
}
|
|
2120
2219
|
else
|
|
2121
|
-
switch (
|
|
2220
|
+
switch (n.eventMoveHandling) {
|
|
2122
2221
|
case "CallBack":
|
|
2123
|
-
|
|
2222
|
+
n.eventMoveCallBack(e, f, m);
|
|
2124
2223
|
break;
|
|
2125
|
-
case "JavaScript":
|
|
2224
|
+
case "JavaScript": n.onEventMove(e, f, m);
|
|
2126
2225
|
} }, this.eventResizeCallBack = function (e, t, i, a) { if (!t)
|
|
2127
2226
|
throw "newStart is null"; if (!i)
|
|
2128
|
-
throw "newEnd is null"; var n = {}; n.e = e, n.newStart = t, n.newEnd = i, this.S("EventResize", a, n); }, this.J = function (e, t, i) { var
|
|
2227
|
+
throw "newEnd is null"; var n = {}; n.e = e, n.newStart = t, n.newEnd = i, this.S("EventResize", a, n); }, this.J = function (e, t, i) { var a = e.start().getTimePart(), o = e.end().getDatePart(); o.getTime() !== e.end().getTime() && (o = o.addDays(1)); var r = DayPilot.DateUtil.diff(e.end(), o), s = this.getDateFromCell(t.x, t.y), l = s.addDays(i), d = s.addTime(a), c = l.addTime(r); if (n.qa()) {
|
|
2129
2228
|
var u = {};
|
|
2130
|
-
if (u.e = e, u.control =
|
|
2229
|
+
if (u.e = e, u.control = n, u.newStart = d, u.newEnd = c, u.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventResize && (n.sa.apply(function () { n.onEventResize(u); }), u.preventDefault.value))
|
|
2131
2230
|
return;
|
|
2132
|
-
switch (
|
|
2231
|
+
switch (n.eventResizeHandling) {
|
|
2133
2232
|
case "CallBack":
|
|
2134
|
-
|
|
2233
|
+
n.eventResizeCallBack(e, d, c);
|
|
2135
2234
|
break;
|
|
2136
|
-
case "Update": e.start(d), e.end(c),
|
|
2235
|
+
case "Update": e.start(d), e.end(c), n.events.update(e);
|
|
2137
2236
|
}
|
|
2138
|
-
"function" == typeof
|
|
2237
|
+
"function" == typeof n.onEventResized && n.sa.apply(function () { n.onEventResized(u); });
|
|
2139
2238
|
}
|
|
2140
2239
|
else
|
|
2141
|
-
switch (
|
|
2240
|
+
switch (n.eventResizeHandling) {
|
|
2142
2241
|
case "CallBack":
|
|
2143
|
-
|
|
2242
|
+
n.eventResizeCallBack(e, d, c);
|
|
2144
2243
|
break;
|
|
2145
|
-
case "JavaScript":
|
|
2244
|
+
case "JavaScript": n.onEventResize(e, d, c);
|
|
2146
2245
|
} }, this.timeRangeSelectedCallBack = function (e, t, i) { var a = {}; a.start = e, a.end = t, this.S("TimeRangeSelected", i, a); }, this.M = function (e, t) { if (this.qa()) {
|
|
2147
2246
|
var i = {};
|
|
2148
|
-
if (i.control =
|
|
2247
|
+
if (i.control = n, i.start = e, i.end = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onTimeRangeSelect && (n.sa.apply(function () { n.onTimeRangeSelect(i); }), i.preventDefault.value))
|
|
2149
2248
|
return;
|
|
2150
|
-
switch (
|
|
2151
|
-
case "CallBack":
|
|
2249
|
+
switch (n.timeRangeSelectedHandling) {
|
|
2250
|
+
case "CallBack": n.timeRangeSelectedCallBack(e, t);
|
|
2152
2251
|
}
|
|
2153
|
-
"function" == typeof
|
|
2252
|
+
"function" == typeof n.onTimeRangeSelected && n.sa.apply(function () { n.onTimeRangeSelected(i); });
|
|
2154
2253
|
}
|
|
2155
2254
|
else
|
|
2156
|
-
switch (
|
|
2255
|
+
switch (n.timeRangeSelectedHandling) {
|
|
2157
2256
|
case "CallBack":
|
|
2158
|
-
|
|
2257
|
+
n.timeRangeSelectedCallBack(e, t);
|
|
2159
2258
|
break;
|
|
2160
|
-
case "JavaScript":
|
|
2161
|
-
} }, this.sa = {}, this.sa.scope = null, this.sa.notify = function () {
|
|
2162
|
-
var
|
|
2163
|
-
this.debug = function (e, t) { this.debuggingEnabled && (
|
|
2259
|
+
case "JavaScript": n.onTimeRangeSelected(e, t);
|
|
2260
|
+
} }, this.sa = {}, this.sa.scope = null, this.sa.notify = function () { n.sa.scope && n.sa.scope["$apply"](); }, this.sa.apply = function (e) { e(); }, this.clearSelection = function () { n.clearShadow(); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.S("Command", t, i); }, this.isWeekend = function (e) { return e = new DayPilot.Date(e), 0 === e.dayOfWeek() || 6 === e.dayOfWeek(); }, this.aa = {}, this.aa.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this.aa.ba = function () { return "Disabled" !== n.xssProtection; };
|
|
2261
|
+
var o = this.aa;
|
|
2262
|
+
this.debug = function (e, t) { this.debuggingEnabled && (n.debugMessages || (n.debugMessages = []), n.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.dispose = function () { var e = n; e.O || (e.O = !0, e.Uc(), e.W(), e.nav.top.removeAttribute("style"), e.nav.top.removeAttribute("class"), e.nav.top.innerHTML = "", e.nav.top.dp = null, e.nav.top.onmousemove = null, e.nav.top = null); }, this.disposed = function () { return this.O; }, this.gb = function () { e.globalHandlers || (e.globalHandlers = !0, DayPilot.re(document, "mouseup", e.gMouseUp)); }, this.loadFromServer = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof n.events.list || !n.events.list); }, this.t = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { n.visible = !0, n.nav.top.style.display = ""; }, this.hide = function () { n.visible = !1, n.nav.top.style.display = "none"; }, this.nb = function () { if (this.id && this.id.tagName)
|
|
2164
2263
|
this.nav.top = this.id;
|
|
2165
2264
|
else {
|
|
2166
2265
|
if ("string" != typeof this.id)
|
|
2167
2266
|
throw "DayPilot.Month() constructor requires the target element or its ID as a parameter";
|
|
2168
2267
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
2169
2268
|
throw "DayPilot.Month: The placeholder element not found: '" + id + "'.";
|
|
2170
|
-
} }, this.
|
|
2269
|
+
} }, this.vb = function () { this.Tc(), this.Na(), this.Vc(), this.gb(), this.S("Init"); }, this.Ra = function (e, t) { return n.aa.ba() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Ha = {}, this.Ha.Ga = null, this.Ha.Cb = function (e, t, i) { var a = n.Ha.Ga; if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
2270
|
+
var o = a.createVNode(e, i);
|
|
2271
|
+
a.render(o, t);
|
|
2272
|
+
} }, this.Ha.La = function (e, t, i) { var a = n.Ha.Ga; if ("function" == typeof a.render) {
|
|
2273
|
+
var o = e;
|
|
2274
|
+
DayPilot.isArray(e) && (o = a.h("div", i, e)), a.render(o, t);
|
|
2275
|
+
} }, this.Ha.Ja = function (e) { var t = n.Ha.Ga; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = this.jb, this.internal.xssTextHtml = n.Ra, this.internal.enableVue = function (e) { n.Ha.Ga = e; }, this.internal.vueRef = function () { return n.Ha.Ga; }, this.internal.vueRendering = function () { return n.Ha.Ia; }, this.init = function () { return this.nb(), this.loadFromServer() ? void this.vb() : (this.Tc(), this.ea(), this.Na(), this.Vc(), this.t(), this.ka(), this.gb(), this.fireAfterRenderDetached(null, !1), this.Ba = !0, this); }, this.Init = this.init, Object.defineProperty(this, "durationBarVisible", { get: function () { return n.eventBarVisible; } }), this.jb(a);
|
|
2171
2276
|
}, e.gMouseUp = function (t) { if (e.movingEvent) {
|
|
2172
2277
|
var i = e.movingEvent;
|
|
2173
2278
|
if (!i.event)
|
|
@@ -2217,76 +2322,97 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2217
2322
|
"undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (DayPilot) {
|
|
2218
2323
|
"use strict";
|
|
2219
2324
|
if ("undefined" == typeof DayPilot.Navigator || !DayPilot.Navigator.def) {
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2325
|
+
var e = DayPilot.Util.isVueVNode;
|
|
2326
|
+
DayPilot.Navigator = function (t, i) {
|
|
2327
|
+
this.v = "2024.4.622-lite";
|
|
2328
|
+
var a = this;
|
|
2329
|
+
this.id = t, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "Day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.rtl = !1, this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.ob = {}, this._c = function () { this.root.dp = this, this.root.className = this.K("_main"), "Horizontal" === this.orientation ? (r.ad() || (this.root.style.width = this.showMonths * (7 * r.cellWidth() + this.bd()) + "px"), this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : r.ad() || (this.root.style.width = 7 * r.cellWidth() + this.bd() + "px"), this.rtl && (this.root.style.direction = "rtl"), this.root.style.position = "relative", this.visible || (this.root.style.display = "none"); var e = document.createElement("input"); e.type = "hidden", e.name = a.id + "_state", e.id = e.name, this.root.appendChild(e), this.state = e, this.startDate ? this.startDate = new DayPilot.Date(this.startDate).firstDayOfMonth() : this.selectionDay ? this.startDate = new DayPilot.Date(this.selectionDay).firstDayOfMonth() : this.startDate = DayPilot.Date.fromYearMonthDay(this.year, this.month), this.calendars = [], this.selected = [], this.months = []; }, this.qa = function () { return 2 === a.api; }, this.Uc = function () { this.root.innerHTML = ""; }, this.K = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.cd = function (e, t) { var i = this.K("_" + t); DayPilot.Util.addClass(e, i); }, this.dd = function (e, t) { var i = this.K("_" + t); DayPilot.Util.removeClass(e, i); }, this.ed = function () { if (!r.ad())
|
|
2330
|
+
return null; var e = 7; return this.showWeekNumbers && e++, 100 / e; }, this.fd = function () { return r.ad() ? null : r.cellWidth(); }, this.gd = function (e) { return "number" != typeof e && (e = 1), r.ad() ? this.ed() * e : this.fd() * e; }, this.hd = function (e) { var t = r.ad() ? "%" : "px"; return this.gd(e) + t; }, this.Vc = function (t, i) { var n = {}; n.cells = [], n.days = [], n.weeks = []; var o = this.startDate.addMonths(t), s = i.before, l = i.after, d = o.firstDayOfMonth(), c = d.firstDayOfWeek(r.weekStarts()), u = d.addMonths(1), h = DayPilot.DateUtil.daysDiff(c, u), f = "Auto" === this.rowsPerMonth ? Math.ceil(h / 7) : 6; n.rowCount = f; var m = (new DayPilot.Date).getDatePart(), p = 7 * r.cellWidth() + this.bd(); n.width = p; var v = this.cellHeight * f + this.titleHeight + this.dayHeaderHeight; n.height = v; var y = document.createElement("div"); if (r.ad() ? "Horizontal" === this.orientation && (y.style.width = 100 / a.showMonths + "%") : y.style.width = p + "px", y.style.height = v + "px", "Horizontal" === this.orientation)
|
|
2331
|
+
y.style.position = "absolute", r.ad() ? (y.style.left = 100 / a.showMonths * t + "%", n.leftPct = 100 / a.showMonths * t) : y.style.left = p * t + "px", y.style.top = "0px", n.top = 0, n.left = p * t;
|
|
2226
2332
|
else {
|
|
2227
|
-
|
|
2228
|
-
var
|
|
2229
|
-
|
|
2230
|
-
}
|
|
2231
|
-
for (var
|
|
2232
|
-
var
|
|
2333
|
+
y.style.position = "relative";
|
|
2334
|
+
var g = t > 0 ? a.months[t - 1].top + a.months[t - 1].height : 0;
|
|
2335
|
+
n.top = g, n.left = 0, n.leftPct = 0;
|
|
2336
|
+
} y.className = this.K("_month"), y.style.cursor = "default", y.style.MozUserSelect = "none", y.style.KhtmlUserSelect = "none", y.style.WebkitUserSelect = "none", y.month = n, n.div = y, this.root.appendChild(y); var b = this.titleHeight + this.dayHeaderHeight, D = document.createElement("div"); D.style.position = "absolute", D.style.left = "0px", D.style.right = "0px", D.style.top = "0px", D.style.width = a.hd(), D.style.height = this.titleHeight + "px", D.style.lineHeight = this.titleHeight + "px", D.setAttribute("unselectable", "on"), D.className = this.K("_titleleft"), i.left && (D.style.cursor = "pointer", D.innerHTML = "<span><</span>", D.onclick = this.jd), y.appendChild(D), this.tl = D; var w = document.createElement("div"); w.style.position = "absolute", w.style.left = a.hd(), w.style.top = "0px", w.style.width = a.hd(a.showWeekNumbers ? 6 : 5), w.style.height = this.titleHeight + "px", w.style.lineHeight = this.titleHeight + "px", w.setAttribute("unselectable", "on"), w.className = this.K("_title"), w.innerHTML = r.locale().monthNames[o.getMonth()] + " " + o.getYear(), y.appendChild(w), this.ti = w; var x = document.createElement("div"); x.style.position = "absolute", x.style.left = a.hd(a.showWeekNumbers ? 7 : 6), x.style.right = a.hd(a.showWeekNumbers ? 7 : 6), x.style.top = "0px", x.style.width = a.hd(), x.style.height = this.titleHeight + "px", x.style.lineHeight = this.titleHeight + "px", x.setAttribute("unselectable", "on"), x.className = this.K("_titleright"), i.right && (x.style.cursor = "pointer", x.innerHTML = "<span>></span>", x.onclick = this.kd), y.appendChild(x), this.tr = x; var C = (this.bd(), a.showWeekNumbers ? 1 : 0); if (this.showWeekNumbers)
|
|
2337
|
+
for (var P = 0; P < f; P++) {
|
|
2338
|
+
var k = c.addDays(7 * P), _ = null;
|
|
2233
2339
|
switch (this.weekNumberAlgorithm) {
|
|
2234
2340
|
case "Auto":
|
|
2235
|
-
|
|
2341
|
+
_ = 1 === r.weekStarts() ? k.weekNumberISO() : k.weekNumber();
|
|
2236
2342
|
break;
|
|
2237
2343
|
case "US":
|
|
2238
|
-
|
|
2344
|
+
_ = k.weekNumber();
|
|
2239
2345
|
break;
|
|
2240
2346
|
case "ISO8601":
|
|
2241
|
-
|
|
2347
|
+
_ = k.weekNumberISO();
|
|
2242
2348
|
break;
|
|
2243
2349
|
default: throw "Unknown weekNumberAlgorithm value.";
|
|
2244
2350
|
}
|
|
2245
|
-
var
|
|
2246
|
-
|
|
2247
|
-
} for (var
|
|
2248
|
-
|
|
2249
|
-
var
|
|
2250
|
-
|
|
2251
|
-
for (var
|
|
2252
|
-
var
|
|
2253
|
-
if ("month" === this.
|
|
2254
|
-
|
|
2255
|
-
else if ("day" === this.
|
|
2256
|
-
|
|
2257
|
-
else if ("week" === this.
|
|
2258
|
-
var
|
|
2259
|
-
|
|
2351
|
+
var S = document.createElement("div");
|
|
2352
|
+
S.style.position = "absolute", S.style.left = "0px", S.style.right = "0px", S.style.top = P * this.cellHeight + b + "px", S.style.width = a.hd(), S.style.height = this.cellHeight + "px", S.style.lineHeight = this.cellHeight + "px", S.setAttribute("unselectable", "on"), S.className = this.K("_weeknumber"), S.innerHTML = "<span>" + _ + "</span>", y.appendChild(S), n.weeks.push(S);
|
|
2353
|
+
} for (var M = 0; M < 7; M++) {
|
|
2354
|
+
n.cells[M] = [];
|
|
2355
|
+
var S = document.createElement("div");
|
|
2356
|
+
S.style.position = "absolute", S.style.left = a.hd(M + C), S.style.right = a.hd(M + C), S.style.top = this.titleHeight + "px", S.style.width = a.hd(), S.style.height = this.dayHeaderHeight + "px", S.style.lineHeight = this.dayHeaderHeight + "px", S.setAttribute("unselectable", "on"), S.className = this.K("_dayheader"), S.innerHTML = "<span>" + this.ld(M) + "</span>", y.appendChild(S), n.days.push(S);
|
|
2357
|
+
for (var P = 0; P < f; P++) {
|
|
2358
|
+
var k = c.addDays(7 * P + M), H = this.md(k) && "none" !== this.nd(), T = k.firstDayOfMonth() === o, A = k < o, E = k >= o.addMonths(1);
|
|
2359
|
+
if ("month" === this.nd())
|
|
2360
|
+
H = H && T;
|
|
2361
|
+
else if ("day" === this.nd())
|
|
2362
|
+
H = H && (T || s && A || l && E);
|
|
2363
|
+
else if ("week" === this.nd()) {
|
|
2364
|
+
var N = k.firstDayOfMonth() === o;
|
|
2365
|
+
H = H && (N || s && A || l && E);
|
|
2260
2366
|
}
|
|
2261
|
-
var
|
|
2262
|
-
|
|
2263
|
-
var
|
|
2264
|
-
|
|
2265
|
-
var
|
|
2266
|
-
|
|
2267
|
-
var
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2367
|
+
var I = document.createElement("div");
|
|
2368
|
+
n.cells[M][P] = I;
|
|
2369
|
+
var R = a.od(M, P), B = R.x, z = R.y, O = r.ad() ? "%" : "px";
|
|
2370
|
+
I.day = k, I.x = M, I.y = P, I.left = B, I.top = z, I.isCurrentMonth = T, I.isNextMonth = E, I.isPrevMonth = A, I.showBefore = s, I.showAfter = l, I.className = this.K(T ? "_day" : "_dayother"), a.cd(I, "cell"), k.getTime() === m.getTime() && T && this.cd(I, "today"), 0 !== k.dayOfWeek() && 6 !== k.dayOfWeek() || this.cd(I, "weekend"), I.style.position = "absolute", I.style.left = B + O, I.style.right = B + O, I.style.top = z + "px", I.style.width = a.hd(), I.style.height = this.cellHeight + "px", I.style.lineHeight = this.cellHeight + "px";
|
|
2371
|
+
var U = document.createElement("div");
|
|
2372
|
+
U.style.position = "absolute", U.className = k.getTime() === m.getTime() && T ? this.K("_todaybox") : this.K("_daybox"), a.cd(U, "cell_box"), U.style.left = "0px", U.style.top = "0px", U.style.right = "0px", U.style.bottom = "0px", I.appendChild(U);
|
|
2373
|
+
var L = null;
|
|
2374
|
+
this.cells && this.cells[k.toStringSortable()] && (L = this.cells[k.toStringSortable()]);
|
|
2375
|
+
var j = L || {};
|
|
2376
|
+
if (j.day = k, j.isCurrentMonth = T, j.isToday = k.getTime() === m.getTime() && T, j.isWeekend = 0 === k.dayOfWeek() || 6 === k.dayOfWeek(), L ? (j.html = L.html || k.getDay(), j.cssClass = L.css) : (j.html = k.getDay(), j.cssClass = null), "function" == typeof a.onBeforeCellRender) {
|
|
2377
|
+
var W = {};
|
|
2378
|
+
W.cell = j, a.onBeforeCellRender(W), L = W.cell;
|
|
2271
2379
|
}
|
|
2272
|
-
if (
|
|
2273
|
-
var
|
|
2274
|
-
|
|
2380
|
+
if (L && DayPilot.Util.addClass(I, L.cssClass || L.css), T || s && A || l && E) {
|
|
2381
|
+
var F = document.createElement("div");
|
|
2382
|
+
F.innerHTML = k.getDay(), F.style.position = "absolute", F.style.left = "0px", F.style.top = "0px", F.style.right = "0px", F.style.bottom = "0px", a.cd(F, "cell_text"), I.isClickable = !0, L && L.html && (F.innerHTML = L.html), I.appendChild(F);
|
|
2275
2383
|
}
|
|
2276
|
-
|
|
2384
|
+
I.setAttribute("unselectable", "on"), I.onclick = this.pd, function () { if ("function" == typeof a.onBeforeCellDomAdd || "function" == typeof a.onBeforeCellDomRemove) {
|
|
2385
|
+
var t = {};
|
|
2386
|
+
if (t.control = a, t.cell = j, t.element = null, I.domArgs = t, "function" == typeof a.onBeforeCellDomAdd && a.onBeforeCellDomAdd(t), t.element) {
|
|
2387
|
+
var i = U;
|
|
2388
|
+
if (i) {
|
|
2389
|
+
t.Fa = i;
|
|
2390
|
+
if (e(t.element)) {
|
|
2391
|
+
if (!a.Ha.Ga)
|
|
2392
|
+
throw new DayPilot.Exception("Can't reach Vue");
|
|
2393
|
+
a.Ha.Ia = !0, a.Ha.La(t.element, i), a.Ha.Ia = !1;
|
|
2394
|
+
}
|
|
2395
|
+
else
|
|
2396
|
+
i.appendChild(t.element);
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
} }(), y.appendChild(I), H && (a.qd(y, M, P), this.selected.push(I));
|
|
2277
2400
|
}
|
|
2278
|
-
} var
|
|
2401
|
+
} var J = document.createElement("div"); J.style.position = "absolute", J.style.left = "0px", J.style.top = b - 2 + "px", J.style.width = a.hd(7 + C), J.style.height = "1px", J.style.fontSize = "1px", J.style.lineHeight = "1px", J.className = this.K("_line"), y.appendChild(J), this.months.push(n); }, this.od = function (e, t) { var i = this.titleHeight + this.dayHeaderHeight, n = (this.bd(), this.showWeekNumbers ? 1 : 0); return { "x": a.gd(e + n), "y": t * this.cellHeight + i }; }, this.qd = function (e, t, i) {
|
|
2402
|
+
var n = e.month.cells[t][i];
|
|
2403
|
+
a.cd(n, "select");
|
|
2404
|
+
}, this.rd = function (e, t, i) { var n = e.month.cells[t][i]; a.dd(n, "select"); }, this.bd = function () { return this.showWeekNumbers ? r.cellWidth() : 0; }, this.sd = function () { if (this.items)
|
|
2279
2405
|
for (var e = 0; e < this.showMonths; e++)
|
|
2280
2406
|
for (var t = 0; t < 7; t++)
|
|
2281
2407
|
for (var i = 0; i < 6; i++) {
|
|
2282
2408
|
var a = this.months[e].cells[t][i];
|
|
2283
|
-
a && (1 === this.items[a.day.toStringSortable()] ? (this.
|
|
2284
|
-
} }, this.
|
|
2409
|
+
a && (1 === this.items[a.day.toStringSortable()] ? (this.cd(a, "busy"), this.dd(a, "free")) : (this.dd(a, "busy"), this.cd(a, "free")));
|
|
2410
|
+
} }, this.td = function () { var e = {}; e.startDate = a.startDate, e.selectionStart = a.selectionStart, e.selectionEnd = a.selectionEnd.addDays(1), a.state.value = JSON.stringify(e); }, this.nd = function () { return (this.selectMode || "").toLowerCase(); }, this.ud = function () { var e = this.selectionDay || this.selectionStart; switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.nd()) {
|
|
2285
2411
|
case "day":
|
|
2286
2412
|
this.selectionStart = e, this.selectionDay = e, this.selectionEnd = e;
|
|
2287
2413
|
break;
|
|
2288
2414
|
case "week":
|
|
2289
|
-
this.selectionDay = e, this.selectionStart = e.firstDayOfWeek(
|
|
2415
|
+
this.selectionDay = e, this.selectionStart = e.firstDayOfWeek(r.weekStarts()), this.selectionEnd = this.selectionStart.addDays(6);
|
|
2290
2416
|
break;
|
|
2291
2417
|
case "month":
|
|
2292
2418
|
this.selectionDay = e, this.selectionStart = e.firstDayOfMonth(), this.selectionEnd = this.selectionStart.lastDayOfMonth();
|
|
@@ -2295,190 +2421,186 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2295
2421
|
this.selectionEnd = e;
|
|
2296
2422
|
break;
|
|
2297
2423
|
default: throw "Unknown selectMode value.";
|
|
2298
|
-
} }, this.
|
|
2299
|
-
return void (this.
|
|
2424
|
+
} }, this.vd = null, this.select = function (e, t, i) { var n = t && (t instanceof DayPilot.Date || "string" == typeof t), o = t && "object" == typeof t || "boolean" == typeof t, r = e, s = n ? t : null, l = o ? t : i; if (!this.Ba)
|
|
2425
|
+
return void (this.vd = { "date1": r, "date2": s, "options": l }); var d = !0, c = !0; l && "object" == typeof l ? (l.dontFocus && (d = !1), l.dontNotify && (c = !1)) : "boolean" == typeof l && (d = !l); var u = this.selectionStart, h = this.selectionEnd; this.selectionStart = new DayPilot.Date(r).getDatePart(), this.selectionDay = this.selectionStart; var f = !1; if (d) {
|
|
2300
2426
|
var m = this.startDate;
|
|
2301
|
-
(this.selectionStart < this.
|
|
2302
|
-
} s &&
|
|
2303
|
-
if (
|
|
2427
|
+
(this.selectionStart < this.wd() || this.selectionStart >= this.xd()) && (m = this.selectionStart.firstDayOfMonth()), m.toStringSortable() !== this.startDate.toStringSortable() && (f = !0), this.startDate = m;
|
|
2428
|
+
} s && a.freeHandSelectionEnabled ? a.selectionEnd = new DayPilot.Date(s) : this.ud(), this.Uc(), this._c(), this.yd(), this.sd(), this.td(), !c || u.equals(this.selectionStart) && h.equals(this.selectionEnd) || this.M(), f && this.zd(); }, this.update = function (e) { if (a.jb(e), this.Ba) {
|
|
2429
|
+
if (a.O)
|
|
2304
2430
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");
|
|
2305
|
-
|
|
2306
|
-
var t = { "day":
|
|
2307
|
-
|
|
2308
|
-
} }, this.
|
|
2309
|
-
var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ?
|
|
2310
|
-
this.
|
|
2311
|
-
for (var
|
|
2312
|
-
if (t[
|
|
2313
|
-
var n = t[
|
|
2314
|
-
n.data = e[
|
|
2431
|
+
a.Ad();
|
|
2432
|
+
var t = { "day": a.selectionDay, "start": a.selectionStart, "end": a.selectionEnd };
|
|
2433
|
+
a.hb(), t.start === a.selectionStart && t.end === a.selectionEnd && t.day === a.selectionDay || a.M();
|
|
2434
|
+
} }, this.hb = function () { this.Uc(), this._c(), this.ud(), this.yd(), this.ea(), this.sd(), this.td(), this.visible ? this.show() : this.hide(); }, this.Ad = function () { a.ob = {}; }, this.lb = null, this.jb = function (e) { if (e) {
|
|
2435
|
+
var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? a.events.list = e.list : a.events.list = e); } } };
|
|
2436
|
+
this.lb = t;
|
|
2437
|
+
for (var i in e)
|
|
2438
|
+
if (t[i]) {
|
|
2439
|
+
var n = t[i];
|
|
2440
|
+
n.data = e[i], n.preInit && n.preInit();
|
|
2315
2441
|
}
|
|
2316
2442
|
else
|
|
2317
|
-
i
|
|
2318
|
-
} }, this.
|
|
2443
|
+
a[i] = e[i];
|
|
2444
|
+
} }, this.mb = function () { var e = this.lb; for (var t in e) {
|
|
2319
2445
|
var i = e[t];
|
|
2320
2446
|
i.postInit && i.postInit();
|
|
2321
|
-
} }, this.S = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.T, n, this.
|
|
2447
|
+
} }, this.S = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.R(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.T, n, this.Bd) : WebForm_DoCallback(this.uniqueID, n, this.U, null, this.callbackError, !0); }, this.Bd = function (e) { if ("function" == typeof a.onAjaxError) {
|
|
2322
2448
|
var t = {};
|
|
2323
|
-
t.request = e,
|
|
2449
|
+
t.request = e, a.onAjaxError(t);
|
|
2324
2450
|
}
|
|
2325
2451
|
else
|
|
2326
|
-
"function" == typeof
|
|
2327
|
-
var
|
|
2328
|
-
if (!
|
|
2452
|
+
"function" == typeof a.ajaxError && a.ajaxError(e); }, this.T = function (e) { a.U(e.responseText); }, this.Q = function (e, t, i) { var n = {}; n.action = e, n.parameters = i, n.data = t, n.header = this.R(); var o = "JSON" + JSON.stringify(n); __doPostBack(a.uniqueID, o); }, this.R = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.Cd = function (e, t) { "refresh" === e && this.zd(); }, this.ld = function (e) { var t = e + r.weekStarts(); return t > 6 && (t -= 7), r.locale().dayNamesShort[t]; }, this.md = function (e) { return null !== this.selectionStart && null !== this.selectionEnd && (this.selectionStart.getTime() <= e.getTime() && e.getTime() <= this.selectionEnd.getTime()); }, this.Dd = function (e) { for (var t = 0; t < a.months.length; t++) {
|
|
2453
|
+
var i = a.months[t];
|
|
2454
|
+
if (!i)
|
|
2329
2455
|
return null;
|
|
2330
|
-
if (e.x <
|
|
2456
|
+
if (e.x < i.left)
|
|
2331
2457
|
return null;
|
|
2332
|
-
if (!(
|
|
2333
|
-
|
|
2334
|
-
if (
|
|
2458
|
+
if (!(i.left + i.width < e.x)) {
|
|
2459
|
+
a.months[t].height;
|
|
2460
|
+
if (i.top <= e.y && e.y < i.top + i.height)
|
|
2335
2461
|
return t;
|
|
2336
2462
|
}
|
|
2337
|
-
} return null; }, this.
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
i.vd = t, i.months.forEach(function (e) { e.width = e.div.clientWidth, "Horizontal" === i.orientation && (e.left = e.div.offsetLeft), e.cells.forEach(function (e, i) { e.forEach(function (e, a) { e.width = t, e.left = i * t; }); }); });
|
|
2342
|
-
}, this.wd = function (e) { i.ud(); var t = DayPilot.mo3(i.nav.top, e), a = i.sd(t); if (null === a)
|
|
2343
|
-
return null; var n = i.months[a], o = this.titleHeight + this.dayHeaderHeight; if (n.top <= t.y && t.y < n.top + o)
|
|
2344
|
-
return { "month": a, "x": 0, "y": 0, "coords": t, "header": !0 }; for (var r = 0; r < n.cells.length; r++)
|
|
2463
|
+
} return null; }, this.Ed = function (e) { }, this.Fd = function () { if (!r.ad())
|
|
2464
|
+
return void (a.Gd = a.cellWidth); var e = a.months[0].cells[0][0], t = e.clientWidth; a.Gd = t, a.months.forEach(function (e) { e.width = e.div.clientWidth, "Horizontal" === a.orientation && (e.left = e.div.offsetLeft), e.cells.forEach(function (e, i) { e.forEach(function (e, a) { e.width = t, e.left = i * t; }); }); }); }, this.Hd = function (e) { a.Fd(); var t = DayPilot.mo3(a.nav.top, e), i = a.Dd(t); if (null === i)
|
|
2465
|
+
return null; var n = a.months[i], o = this.titleHeight + this.dayHeaderHeight; if (n.top <= t.y && t.y < n.top + o)
|
|
2466
|
+
return { "month": i, "x": 0, "y": 0, "coords": t, "header": !0 }; for (var r = 0; r < n.cells.length; r++)
|
|
2345
2467
|
for (var s = 0; s < n.cells[r].length; s++) {
|
|
2346
2468
|
var l = n.cells[r][s], d = l.top + n.top, c = l.left + n.left;
|
|
2347
|
-
if (c <= t.x && t.x < c +
|
|
2348
|
-
return { "month":
|
|
2349
|
-
} return null; }, this.
|
|
2350
|
-
var t =
|
|
2351
|
-
t && !t.header && (
|
|
2352
|
-
} }, this.
|
|
2353
|
-
var t =
|
|
2354
|
-
if (
|
|
2355
|
-
|
|
2469
|
+
if (c <= t.x && t.x < c + a.Gd && d <= t.y && t.y < d + a.cellHeight)
|
|
2470
|
+
return { "month": i, "x": r, "y": s, "coords": t };
|
|
2471
|
+
} return null; }, this.Id = function (e) { if (a.freeHandSelectionEnabled) {
|
|
2472
|
+
var t = a.Hd(e);
|
|
2473
|
+
t && !t.header && (n.start = t), a.months[t.month].cells[t.x][t.y], e.preventDefault();
|
|
2474
|
+
} }, this.Jd = function (e) { if (n.start) {
|
|
2475
|
+
var t = a.Hd(e);
|
|
2476
|
+
if (n.end)
|
|
2477
|
+
n.end = t;
|
|
2356
2478
|
else if (t) {
|
|
2357
|
-
var
|
|
2358
|
-
o >
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
} }, this.
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2364
|
-
var c = "Horizontal" ===
|
|
2365
|
-
s = t.leftPct +
|
|
2366
|
-
} var u = document.createElement("div"); u.style.position = "absolute", u.style.left = s + l, u.style.top =
|
|
2367
|
-
for (var e = 0; e <
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
} },
|
|
2371
|
-
if (
|
|
2372
|
-
|
|
2373
|
-
var r =
|
|
2374
|
-
|
|
2375
|
-
}
|
|
2376
|
-
for (
|
|
2377
|
-
t.visible() &&
|
|
2378
|
-
var s = new
|
|
2479
|
+
var i = 3, o = DayPilot.distance(n.start.coords, t.coords);
|
|
2480
|
+
o > i && (n.end = t);
|
|
2481
|
+
}
|
|
2482
|
+
n.end && (n.clear(), n.draw());
|
|
2483
|
+
} }, this.Kd = {};
|
|
2484
|
+
var n = this.Kd;
|
|
2485
|
+
n.start = null, n.drawCell = function (e) { var t = a.months[e.month], i = a.od(e.x, e.y), o = t.top + i.y, s = t.left + i.x, l = "px", d = a.hd(); if (r.ad()) {
|
|
2486
|
+
var c = "Horizontal" === a.orientation ? a.showMonths : 1;
|
|
2487
|
+
s = t.leftPct + i.x / c, l = "%", d = a.hd(1 / c);
|
|
2488
|
+
} var u = document.createElement("div"); u.style.position = "absolute", u.style.left = s + l, u.style.top = o + "px", u.style.height = a.cellHeight + "px", u.style.width = d, u.style.backgroundColor = "#ccc", u.style.opacity = .5, u.style.cursor = "default", a.nav.preselection.appendChild(u), n.cells.push(u); }, n.clear = function () { if (n.cells) {
|
|
2489
|
+
for (var e = 0; e < n.cells.length; e++)
|
|
2490
|
+
a.nav.preselection.removeChild(n.cells[e]);
|
|
2491
|
+
n.cells = [];
|
|
2492
|
+
} }, n.draw = function () { var e = n.ordered(), t = new o(e.start), i = e.end; if (i) {
|
|
2493
|
+
if (i === n.end && i.header && i.month > 0) {
|
|
2494
|
+
i.month -= 1;
|
|
2495
|
+
var r = a.months[i.month];
|
|
2496
|
+
i.x = 6, i.y = r.rowCount - 1;
|
|
2497
|
+
}
|
|
2498
|
+
for (n.cells = []; !t.is(i);) {
|
|
2499
|
+
t.visible() && n.drawCell(t);
|
|
2500
|
+
var s = new o(t).next();
|
|
2379
2501
|
if (!s)
|
|
2380
2502
|
return;
|
|
2381
2503
|
t.month = s.month, t.x = s.x, t.y = s.y;
|
|
2382
2504
|
}
|
|
2383
|
-
t.visible() &&
|
|
2384
|
-
} },
|
|
2385
|
-
var
|
|
2505
|
+
t.visible() && n.drawCell(t);
|
|
2506
|
+
} }, n.ordered = function () { var e = n.start, t = n.end, i = {}; return !t || new o(e).before(t) ? (i.start = e, i.end = t) : (i.start = t, i.end = e), i; };
|
|
2507
|
+
var o = function (e, t, i) { if (e instanceof o)
|
|
2386
2508
|
return e; if ("object" == typeof e) {
|
|
2387
|
-
var
|
|
2388
|
-
this.month =
|
|
2509
|
+
var n = e;
|
|
2510
|
+
this.month = n.month, this.x = n.x, this.y = n.y;
|
|
2389
2511
|
}
|
|
2390
2512
|
else
|
|
2391
|
-
this.month = e, this.x = t, this.y =
|
|
2392
|
-
return { "month": e.month, "x": e.x + 1, "y": e.y }; var t =
|
|
2513
|
+
this.month = e, this.x = t, this.y = i; this.is = function (e) { return this.month === e.month && this.x === e.x && this.y === e.y; }, this.next = function () { var e = this; if (e.x < 6)
|
|
2514
|
+
return { "month": e.month, "x": e.x + 1, "y": e.y }; var t = a.months[e.month]; return e.y < t.rowCount - 1 ? { "month": e.month, "x": 0, "y": e.y + 1 } : e.month < a.months.length - 1 ? { "month": e.month + 1, "x": 0, "y": 0 } : null; }, this.visible = function () { var e = this.cell(); return !!e.isCurrentMonth || (!(!e.isPrevMonth || !e.showBefore) || !(!e.isNextMonth || !e.showAfter)); }, this.nextVisible = function () { for (var e = this; !e.visible();) {
|
|
2393
2515
|
var t = e.next();
|
|
2394
2516
|
if (!t)
|
|
2395
2517
|
return null;
|
|
2396
|
-
e = new
|
|
2518
|
+
e = new o(t);
|
|
2397
2519
|
} return e; }, this.previous = function () { var e = this; if (e.x > 0)
|
|
2398
|
-
return { "month": e.month, "x": e.x - 1, "y": e.y };
|
|
2520
|
+
return { "month": e.month, "x": e.x - 1, "y": e.y }; a.months[e.month]; if (e.y > 0)
|
|
2399
2521
|
return { "month": e.month, "x": 6, "y": e.y - 1 }; if (e.month > 0) {
|
|
2400
|
-
var t =
|
|
2522
|
+
var t = a.months[e.month - 1];
|
|
2401
2523
|
return { "month": e.month - 1, "x": 6, "y": t.rowCount - 1 };
|
|
2402
2524
|
} return null; }, this.previousVisible = function () { for (var e = this; !e.visible();) {
|
|
2403
2525
|
var t = e.previous();
|
|
2404
2526
|
if (!t)
|
|
2405
2527
|
return null;
|
|
2406
|
-
e = new
|
|
2407
|
-
} return e; }, this.cell = function () { return
|
|
2408
|
-
this.
|
|
2409
|
-
|
|
2410
|
-
var r =
|
|
2411
|
-
switch (
|
|
2528
|
+
e = new o(t);
|
|
2529
|
+
} return e; }, this.cell = function () { return a.months[this.month].cells[this.x][this.y]; }, this.date = function () { return this.cell().day; }, this.before = function (e) { return this.date() < new o(e).date(); }; };
|
|
2530
|
+
this.pd = function (e) { var t = this.parentNode, i = this.parentNode.month, n = this.x, o = this.y, r = i.cells[n][o].day; if (i.cells[n][o].isClickable) {
|
|
2531
|
+
a.clearSelection(), a.selectionDay = r;
|
|
2532
|
+
var r = a.selectionDay;
|
|
2533
|
+
switch (a.nd()) {
|
|
2412
2534
|
case "none":
|
|
2413
|
-
|
|
2535
|
+
a.selectionStart = r, a.selectionEnd = r;
|
|
2414
2536
|
break;
|
|
2415
2537
|
case "day":
|
|
2416
|
-
if (
|
|
2538
|
+
if (a.autoFocusOnClick) {
|
|
2417
2539
|
var s = r;
|
|
2418
|
-
if (r <
|
|
2419
|
-
return void
|
|
2540
|
+
if (r < a.wd() || r >= a.xd())
|
|
2541
|
+
return void a.select(r);
|
|
2420
2542
|
}
|
|
2421
|
-
var l =
|
|
2422
|
-
|
|
2543
|
+
var l = i.cells[n][o];
|
|
2544
|
+
a.qd(t, n, o), a.selected.push(l), a.selectionStart = l.day, a.selectionEnd = l.day;
|
|
2423
2545
|
break;
|
|
2424
2546
|
case "week":
|
|
2425
|
-
if (
|
|
2426
|
-
var s =
|
|
2427
|
-
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s <
|
|
2428
|
-
return void
|
|
2547
|
+
if (a.autoFocusOnClick) {
|
|
2548
|
+
var s = i.cells[0][o].day, d = i.cells[6][o].day;
|
|
2549
|
+
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s < a.wd() || d >= a.xd()))
|
|
2550
|
+
return void a.select(r);
|
|
2429
2551
|
}
|
|
2430
2552
|
for (var c = 0; c < 7; c++)
|
|
2431
|
-
|
|
2432
|
-
|
|
2553
|
+
a.qd(t, c, o), a.selected.push(i.cells[c][o]);
|
|
2554
|
+
a.selectionStart = i.cells[0][o].day, a.selectionEnd = i.cells[6][o].day;
|
|
2433
2555
|
break;
|
|
2434
2556
|
case "month":
|
|
2435
|
-
if (
|
|
2557
|
+
if (a.autoFocusOnClick) {
|
|
2436
2558
|
var s = r;
|
|
2437
|
-
if (r <
|
|
2438
|
-
return void
|
|
2559
|
+
if (r < a.wd() || r >= a.xd())
|
|
2560
|
+
return void a.select(r);
|
|
2439
2561
|
}
|
|
2440
2562
|
for (var s = null, d = null, o = 0; o < 6; o++)
|
|
2441
2563
|
for (var n = 0; n < 7; n++) {
|
|
2442
|
-
var l =
|
|
2443
|
-
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (
|
|
2564
|
+
var l = i.cells[n][o];
|
|
2565
|
+
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (a.qd(t, n, o), a.selected.push(l), null === s && (s = l.day), d = l.day);
|
|
2444
2566
|
}
|
|
2445
|
-
|
|
2567
|
+
a.selectionStart = s, a.selectionEnd = d;
|
|
2446
2568
|
break;
|
|
2447
2569
|
default: throw "unknown selectMode";
|
|
2448
2570
|
}
|
|
2449
|
-
|
|
2450
|
-
} }, this.M = function (e) { var t =
|
|
2571
|
+
a.td(), a.M();
|
|
2572
|
+
} }, this.M = function (e) { var t = a.selectionStart, i = a.selectionEnd.addDays(1), n = DayPilot.DateUtil.daysDiff(t, i), o = a.selectionDay; if (e = e || {}, a.qa()) {
|
|
2451
2573
|
var r = {};
|
|
2452
|
-
if (r.start = t, r.end =
|
|
2574
|
+
if (r.start = t, r.end = i, r.day = o, r.days = n, r.mode = e.mode || a.selectMode, r.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onTimeRangeSelect && (a.onTimeRangeSelect(r), r.preventDefault.value))
|
|
2453
2575
|
return;
|
|
2454
|
-
switch (
|
|
2576
|
+
switch (a.timeRangeSelectedHandling) {
|
|
2455
2577
|
case "Bind":
|
|
2456
2578
|
if ("object" == typeof bound) {
|
|
2457
2579
|
var s = {};
|
|
2458
|
-
s.start = t, s.end =
|
|
2580
|
+
s.start = t, s.end = i, s.days = n, s.day = o, bound.commandCallBack(a.command, s);
|
|
2459
2581
|
}
|
|
2460
2582
|
break;
|
|
2461
2583
|
case "None": break;
|
|
2462
|
-
case "PostBack":
|
|
2584
|
+
case "PostBack": a.timeRangeSelectedPostBack(t, i, o);
|
|
2463
2585
|
}
|
|
2464
|
-
"function" == typeof
|
|
2586
|
+
"function" == typeof a.onTimeRangeSelected && a.onTimeRangeSelected(r);
|
|
2465
2587
|
}
|
|
2466
2588
|
else
|
|
2467
|
-
switch (
|
|
2589
|
+
switch (a.timeRangeSelectedHandling) {
|
|
2468
2590
|
case "Bind":
|
|
2469
2591
|
if ("object" == typeof bound) {
|
|
2470
2592
|
var s = {};
|
|
2471
|
-
s.start = t, s.end =
|
|
2593
|
+
s.start = t, s.end = i, s.days = n, s.day = o, bound.commandCallBack(a.command, s);
|
|
2472
2594
|
}
|
|
2473
2595
|
break;
|
|
2474
2596
|
case "JavaScript":
|
|
2475
|
-
|
|
2597
|
+
a.onTimeRangeSelected(t, i, o);
|
|
2476
2598
|
break;
|
|
2477
2599
|
case "None": break;
|
|
2478
|
-
case "PostBack":
|
|
2479
|
-
} }, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.Q("TimeRangeSelected", i, n); }, this
|
|
2480
|
-
var
|
|
2481
|
-
if (
|
|
2600
|
+
case "PostBack": a.timeRangeSelectedPostBack(t, i, o);
|
|
2601
|
+
} }, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.Q("TimeRangeSelected", i, n); }, this.kd = function (e) { a.Ld(a.skipMonths); }, this.jd = function (e) { a.Ld(-a.skipMonths); }, this.Ld = function (e) { this.startDate = this.startDate.addMonths(e), this.Uc(), this._c(), this.yd(), this.td(), this.zd(), this.sd(); }, this.wd = function () { return a.startDate.firstDayOfMonth(); }, this.xd = function () { return a.startDate.firstDayOfMonth().addMonths(this.showMonths); }, this.visibleStart = function () { return a.startDate.firstDayOfMonth().firstDayOfWeek(r.weekStarts()); }, this.visibleEnd = function () { return a.startDate.firstDayOfMonth().addMonths(this.showMonths - 1).firstDayOfWeek(r.weekStarts()).addDays(42); }, this.zd = function () { var e = this.visibleStart(), t = this.visibleEnd(); if (a.qa()) {
|
|
2602
|
+
var i = {};
|
|
2603
|
+
if (i.start = e, i.end = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onVisibleRangeChange && (a.onVisibleRangeChange(i), i.preventDefault.value))
|
|
2482
2604
|
return;
|
|
2483
2605
|
switch (this.visibleRangeChangedHandling) {
|
|
2484
2606
|
case "CallBack":
|
|
@@ -2489,7 +2611,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2489
2611
|
break;
|
|
2490
2612
|
case "Disabled":
|
|
2491
2613
|
}
|
|
2492
|
-
"function" == typeof
|
|
2614
|
+
"function" == typeof a.onVisibleRangeChanged && a.onVisibleRangeChanged(i);
|
|
2493
2615
|
}
|
|
2494
2616
|
else
|
|
2495
2617
|
switch (this.visibleRangeChangedHandling) {
|
|
@@ -2503,10 +2625,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2503
2625
|
this.onVisibleRangeChanged(e, t);
|
|
2504
2626
|
break;
|
|
2505
2627
|
case "Disabled":
|
|
2506
|
-
} }, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.S("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.Q("Visible", e, t); }, this.U = function (e, t) { var e = JSON.parse(e);
|
|
2507
|
-
var t = this.
|
|
2508
|
-
this.
|
|
2509
|
-
} this.root.style.height = this.
|
|
2628
|
+
} }, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.S("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.Q("Visible", e, t); }, this.U = function (e, t) { var e = JSON.parse(e); a.items = e.Items, a.cells = e.Cells, a.cells ? a.update() : a.sd(); }, this.yd = function () { for (var e = 0; e < this.showMonths; e++) {
|
|
2629
|
+
var t = this.Md(e);
|
|
2630
|
+
this.Vc(e, t);
|
|
2631
|
+
} this.root.style.height = this.Nd() + "px", this.nav.preselection = document.createElement("div"), this.nav.preselection.style.position = "absolute", this.nav.preselection.style.left = "0px", this.nav.preselection.style.right = "0px", this.nav.preselection.style.top = "0px", this.root.appendChild(this.nav.preselection); }, this.Nd = function () { if ("Horizontal" === this.orientation) {
|
|
2510
2632
|
for (var e = 0, t = 0; t < this.months.length; t++) {
|
|
2511
2633
|
var i = this.months[t];
|
|
2512
2634
|
i.height > e && (e = i.height);
|
|
@@ -2515,50 +2637,56 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2515
2637
|
} for (var a = 0, t = 0; t < this.months.length; t++) {
|
|
2516
2638
|
var i = this.months[t];
|
|
2517
2639
|
a += i.height;
|
|
2518
|
-
} return a; }, this.
|
|
2519
|
-
return this.internal.showLinks; var t = {}; return t.left = 0 === e, t.right = 0 === e, t.before = 0 === e, t.after = e === this.showMonths - 1, "Horizontal" === this.orientation && (t.right = e === this.showMonths - 1), t; }, this.sa = {}, this.sa.scope = null, this.sa.notify = function () {
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2640
|
+
} return a; }, this.Md = function (e) { if (this.internal.showLinks)
|
|
2641
|
+
return this.internal.showLinks; var t = {}; return t.left = 0 === e, t.right = 0 === e, t.before = 0 === e, t.after = e === this.showMonths - 1, "Horizontal" === this.orientation && (t.right = e === this.showMonths - 1), t; }, this.sa = {}, this.sa.scope = null, this.sa.notify = function () { a.sa.scope && a.sa.scope["$apply"](); }, this.Ha = {}, this.Ha.Ga = null, this.Ha.Cb = function (e, t, i) { var n = a.Ha.Ga; if ("function" == typeof n.createVNode && "function" == typeof n.render) {
|
|
2642
|
+
var o = n.createVNode(e, i);
|
|
2643
|
+
n.render(o, t);
|
|
2644
|
+
} }, this.Ha.La = function (e, t) { var i = a.Ha.Ga; if ("function" == typeof i.render) {
|
|
2645
|
+
var n = e;
|
|
2646
|
+
DayPilot.isArray(e) && (n = i.h("div", null, e)), i.render(n, t);
|
|
2647
|
+
} }, this.Ha.Ja = function (e) { var t = a.Ha.Ga; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = a.jb, this.internal.initialized = function () { return a.Ba; }, this.internal.vueRendering = function () { return !1; }, this.internal.enableVue = function (e) { a.Ha.Ga = e; }, this.internal.vueRef = function () { return a.Ha.Ga; }, this.internal.vueRendering = function () { return a.Ha.Ia; }, this.aa = {};
|
|
2648
|
+
var r = this.aa;
|
|
2649
|
+
r.locale = function () { return DayPilot.Locale.find(a.locale); }, r.weekStarts = function () { if ("Auto" === a.weekStarts) {
|
|
2650
|
+
var e = r.locale();
|
|
2523
2651
|
return e ? e.weekStarts : 0;
|
|
2524
|
-
} return
|
|
2525
|
-
return
|
|
2652
|
+
} return a.weekStarts; }, r.cellWidth = function () { if (a.ob.cellWidth)
|
|
2653
|
+
return a.ob.cellWidth; var e = a.Od("_cell_dimensions").width; return e || (e = a.cellWidth), a.ob.cellWidth = e, e; }, r.ad = function () { return "Auto" === a.aa.cellWidth(); }, this.clearSelection = function () { for (var e = 0; e < this.selected.length; e++) {
|
|
2526
2654
|
var t = this.selected[e];
|
|
2527
|
-
|
|
2528
|
-
} this.selected = []; }, this.
|
|
2655
|
+
a.rd(t.parentNode, t.x, t.y);
|
|
2656
|
+
} this.selected = []; }, this.Pd = function () { return !!this.backendUrl && ("undefined" == typeof a.items || !a.items); }, this.events = {}, this.ea = function () { if (DayPilot.isArray(this.events.list)) {
|
|
2529
2657
|
this.items = {};
|
|
2530
2658
|
for (var e = 0; e < this.events.list.length; e++) {
|
|
2531
2659
|
var t = this.events.list[e];
|
|
2532
2660
|
if (!t.hidden) {
|
|
2533
|
-
var i = this.
|
|
2661
|
+
var i = this.Qd(t);
|
|
2534
2662
|
for (var a in i)
|
|
2535
2663
|
this.items[a] = 1;
|
|
2536
2664
|
}
|
|
2537
2665
|
}
|
|
2538
|
-
} }, this.
|
|
2539
|
-
a[n.toStringSortable()] = 1, n = n.addDays(1); return a; }, this.show = function () {
|
|
2666
|
+
} }, this.Od = function (e) { var t = document.createElement("div"); t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.K(e); var i = a.root || document.body; i.appendChild(t); var n = t.offsetHeight, o = t.offsetWidth; i.removeChild(t); var r = {}; return r.height = n, r.width = o, r; }, this.Qd = function (e) { for (var t = new DayPilot.Date(e.start), i = new DayPilot.Date(e.end), a = {}, n = t.getDatePart(); n.getTime() <= i.getTime();)
|
|
2667
|
+
a[n.toStringSortable()] = 1, n = n.addDays(1); return a; }, this.show = function () { a.visible = !0, a.root.style.display = ""; }, this.hide = function () { a.visible = !1, a.root.style.display = "none"; }, this.nb = function () { if (this.id && this.id.tagName)
|
|
2540
2668
|
this.nav.top = this.id;
|
|
2541
2669
|
else {
|
|
2542
2670
|
if ("string" != typeof this.id)
|
|
2543
2671
|
throw "DayPilot.Navigator() constructor requires the target element or its ID as a parameter";
|
|
2544
2672
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
2545
|
-
throw "DayPilot.Navigator: The placeholder element not found: '" +
|
|
2546
|
-
} this.root = this.nav.top; }, this.init = function () { if (this.
|
|
2547
|
-
this.
|
|
2548
|
-
if (this.
|
|
2549
|
-
var e = this.
|
|
2550
|
-
this.select(e.date1, e.date2, e.options), this.
|
|
2673
|
+
throw "DayPilot.Navigator: The placeholder element not found: '" + t + "'.";
|
|
2674
|
+
} this.root = this.nav.top; }, this.init = function () { if (this.nb(), !this.root.dp) {
|
|
2675
|
+
this.ud(), this._c(), this.yd(), this.ea(), this.sd(), this.Z(), this.Rd(), this.gb();
|
|
2676
|
+
if (this.Pd() && this.zd(), this.Ba = !0, this.mb(), this.vd) {
|
|
2677
|
+
var e = this.vd;
|
|
2678
|
+
this.select(e.date1, e.date2, e.options), this.vd = null;
|
|
2551
2679
|
}
|
|
2552
2680
|
return this;
|
|
2553
|
-
} }, this.
|
|
2554
|
-
var t = DayPilot.mo3(
|
|
2555
|
-
if (t.x ===
|
|
2556
|
-
return
|
|
2557
|
-
|
|
2558
|
-
var
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
}
|
|
2681
|
+
} }, this.Rd = function () { a.nav.top.onmousedown = this.Id, a.nav.top.onmousemove = this.Jd; }, this.gb = function () { DayPilot.re(document, "mouseup", a.Sd); }, this.Sd = function (e) { if (n.start && n.end) {
|
|
2682
|
+
var t = DayPilot.mo3(a.nav.top, e);
|
|
2683
|
+
if (t.x === n.start.coords.x && t.y === n.start.coords.y)
|
|
2684
|
+
return n.start = null, void n.clear();
|
|
2685
|
+
n.clear();
|
|
2686
|
+
var i = n.ordered();
|
|
2687
|
+
i.start = new o(i.start).nextVisible(), i.end = new o(i.end).previousVisible(), a.selectionDay = new o(i.start).date(), a.selectionStart = a.selectionDay, a.selectionEnd = new o(i.end).date(), n.start = null, n.end = null, a.Uc(), a._c(), a.yd(), a.sd(), a.td();
|
|
2688
|
+
a.M({ "mode": "FreeHand" });
|
|
2689
|
+
} n.start = null, n.end = null; }, this.dispose = function () { var e = a; e.root && (e.root.removeAttribute("style"), e.root.removeAttribute("class"), e.root.dp = null, e.root.innerHTML = null, e.root = null, e.O = !0); }, this.Z = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.jb(i);
|
|
2562
2690
|
}, "undefined" != typeof jQuery && !function (e) { e.fn.daypilotNavigator = function (e) { var t = null, i = this.each(function () { if (!this.daypilot) {
|
|
2563
2691
|
var i = new DayPilot.Navigator(this.id);
|
|
2564
2692
|
this.daypilot = i;
|
|
@@ -2572,7 +2700,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2572
2700
|
var l = DayPilot.Util.shouldApply(s);
|
|
2573
2701
|
l ? !function (i) { n[i] = function (n) { var o = e(a[i]); t["$apply"](function () { o(t, { "args": n }); }); }; }(s) : !function (i) { n[i] = function (n) { e(a[i])(t, { "args": n }); }; }(s);
|
|
2574
2702
|
} var d = t["$watch"], c = a["config"] || a["daypilotConfig"], u = a["events"] || a["daypilotEvents"]; d.call(t, c, function (e, t) { for (var i in e)
|
|
2575
|
-
n[i] = e[i]; n.update(); }, !0), d.call(t, u, function (e) { n.events.list = e, n.ea(), n.
|
|
2703
|
+
n[i] = e[i]; n.update(); }, !0), d.call(t, u, function (e) { n.events.list = e, n.ea(), n.sd(); }, !0); }; } }; }]); }(), DayPilot.Navigator.def = {}, "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded();
|
|
2576
2704
|
}
|
|
2577
2705
|
}(DayPilot);
|
|
2578
2706
|
|