@daypilot/daypilot-lite-angular 3.25.0 → 3.26.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 +132 -125
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +149 -126
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +131 -124
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/lib/core/daypilot-core.d.ts +3 -2
- package/package.json +1 -1
|
@@ -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.3.
|
|
133
|
+
Version: 2024.3.547-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.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.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, {}); }) : []; };
|
|
@@ -258,13 +258,16 @@ if (function () {
|
|
|
258
258
|
} }, DayPilot.Areas.createArea = function (e, t, i, a) {
|
|
259
259
|
function n(e, t, i) { var a = {}; return a.area = e, a.source = t, a.originalEvent = i, a.preventDefault = function () { a.preventDefault.value = !0; }, "function" == typeof e.onClick && e.onClick(a), a; }
|
|
260
260
|
function o(e, t, i) { DayPilot.Bubble && DayPilot.Bubble.touchPosition(i), e.calendar.bubble && e.calendar.bubble.showEvent(e, !0); }
|
|
261
|
-
function r(e, t, i, a) {
|
|
262
|
-
|
|
263
|
-
n
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
261
|
+
function r(e, t, i, a) {
|
|
262
|
+
DayPilot.Menu && DayPilot.Menu.touchPosition(a);
|
|
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)), n && n.show) {
|
|
265
|
+
var o = { "type": "area", "div": e, "e": t, "area": i,
|
|
266
|
+
"a": d };
|
|
267
|
+
n.show(t, { "initiator": o });
|
|
268
|
+
}
|
|
267
269
|
}
|
|
270
|
+
function s(e) { return "string" == typeof e && isNaN(e) ? e : "undefined" != typeof e ? e + "px" : void 0; }
|
|
268
271
|
var a = a || {}, l = (a.offsetX || 0, a.eventDiv || e), d = document.createElement("div");
|
|
269
272
|
d.isActiveArea = !0, d.area = i, d.setAttribute("unselectable", "on");
|
|
270
273
|
var c = i.w || i.width, u = i.h || i.height, h = i.cssClass || i.css || i.className;
|
|
@@ -433,8 +436,7 @@ if (function () {
|
|
|
433
436
|
}
|
|
434
437
|
this.k = a, a.s();
|
|
435
438
|
var r = a.u();
|
|
436
|
-
i.j.updateMode(r),
|
|
437
|
-
t(i.j.control.selectionStart, i.j.control.selectionEnd.addDays(1), i.j.control.selectionDay);
|
|
439
|
+
i.j.updateMode(r), t(i.j.control.selectionStart, i.j.control.selectionEnd.addDays(1), i.j.control.selectionDay);
|
|
438
440
|
}, this.z = function (e) { for (var t = 0; t < this.f.length; t++)
|
|
439
441
|
if (this.f[t].control === e)
|
|
440
442
|
return this.f[t]; return null; }, this.t = function () { for (var e = 0; e < this.f.length; e++)
|
|
@@ -648,14 +650,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
648
650
|
if (this instanceof t.Calendar && !this.M && (a = !0, this.M = !0), !a)
|
|
649
651
|
throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
|
|
650
652
|
var n = this;
|
|
651
|
-
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.3.
|
|
652
|
-
i = i.parentNode; var a = document.createElement("div"); a.setAttribute("unselectable", "on"), a.style.position = "absolute", a.style.width = e.offsetWidth + "px", a.style.height = e.offsetHeight + "px", a.style.left = e.offsetLeft + "px", a.style.top = e.offsetTop + "px", a.style.boxSizing = "border-box", a.style.zIndex = 101, a.className = n.J("_shadow"); var o = document.createElement("div"); return o.className = n.J("_shadow_inner"), a.appendChild(o), i.firstChild.appendChild(a), a; }, this._ = {}, this._.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this._.timeFormat = function () { return "Auto" !== n.timeFormat ? n.timeFormat : this.locale().timeFormat; }, this._.aa = function () {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
};
|
|
653
|
+
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.3.547-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.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.N = !1, this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.O(); }, this.O = function () { DayPilot.de(n.elements.selection), n.elements.selection = [], n.nav.activeSelection = null; }, this.cleanSelection = this.clearSelection, this.P = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var o = "JSON" + DayPilot.JSON.stringify(a); __doPostBack(n.uniqueID, o); }, this.R = function (e, t, i) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.callbackTimeout = window.setTimeout(function () { n.loadingStart(); }, 100); var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var o = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, o, this.ajaxError) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, o, this.T, this.clientName, this.onCallbackError, !0); }, this.onCallbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.dispose = function () { var e = n; e.N || (e.N = !0, clearInterval(e.U), e.V(), e.nav.scroll.root = null, DayPilot.pu(e.nav.loading), e.W(), e.X(), 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.N; }, this.Y = function () { this.nav.top.dispose = this.dispose; }, this.S = function (e) { n.T(e.responseText); }, this.Q = function () { var e = {}; return e.control = "dpc", e.id = this.id, e.v = this.v, e.days = n.days, e.startDate = n.startDate, e.heightSpec = n.heightSpec, e.businessBeginsHour = n.businessBeginsHour, e.businessEndsHour = n.businessEndsHour, e.hashes = n.hashes, e.timeFormat = n.timeFormat, e.viewType = n.viewType, e.locale = n.locale, e; }, this.Z = function (e, t) { for (var i = e.parentNode; i && "TD" !== i.tagName;)
|
|
654
|
+
i = i.parentNode; var a = document.createElement("div"); a.setAttribute("unselectable", "on"), a.style.position = "absolute", a.style.width = e.offsetWidth + "px", a.style.height = e.offsetHeight + "px", a.style.left = e.offsetLeft + "px", a.style.top = e.offsetTop + "px", a.style.boxSizing = "border-box", a.style.zIndex = 101, a.className = n.J("_shadow"); var o = document.createElement("div"); return o.className = n.J("_shadow_inner"), a.appendChild(o), i.firstChild.appendChild(a), a; }, this._ = {}, this._.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this._.timeFormat = function () { return "Auto" !== n.timeFormat ? n.timeFormat : this.locale().timeFormat; }, this._.aa = function () {
|
|
655
|
+
return "Disabled" !== n.xssProtection;
|
|
656
|
+
}, this._.ba = function () { if ("Auto" === n.weekStarts) {
|
|
657
|
+
var e = o.locale();
|
|
658
|
+
return e ? e.weekStarts : 0;
|
|
659
|
+
} return n.weekStarts || 0; };
|
|
659
660
|
var o = this._;
|
|
660
661
|
this.T = function (e, t) { if (e && 0 === e.indexOf("$$$")) {
|
|
661
662
|
if (!window.console)
|
|
@@ -940,7 +941,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
940
941
|
var r = a.insertCell(-1);
|
|
941
942
|
r.style.padding = "0px", r.style.border = "0px none", r.style.height = "0px", r.style.overflow = "visible", n.rtl || (r.style.textAlign = "left");
|
|
942
943
|
var s = document.createElement("div");
|
|
943
|
-
s.style.marginRight = n.columnMarginRight + "px", s.style.position = "relative", s.style.height = "1px", s.style.marginTop = "-1px";
|
|
944
|
+
s.style.marginRight = n.columnMarginRight + "px", s.style.marginLeft = n.columnMarginLeft + "px", s.style.position = "relative", s.style.height = "1px", s.style.marginTop = "-1px";
|
|
944
945
|
var l = document.createElement("div");
|
|
945
946
|
r.selection = l, r.appendChild(s), r.appendChild(l);
|
|
946
947
|
} return e; }, this.Ka = 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 = n.ka(), i = 0; i < t; i++)
|
|
@@ -973,7 +974,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
973
974
|
var c = l.insertCell(-1);
|
|
974
975
|
c.style.padding = "0px", c.style.border = "0px none", c.style.height = "0px", c.style.overflow = "visible", n.rtl || (c.style.textAlign = "left");
|
|
975
976
|
var u = document.createElement("div");
|
|
976
|
-
u.style.marginRight = n.columnMarginRight + "px", u.style.position = "relative", u.style.height = "1px", u.style.marginTop = "-1px";
|
|
977
|
+
u.style.marginRight = n.columnMarginRight + "px", u.style.marginLeft = n.columnMarginLeft + "px", u.style.position = "relative", u.style.height = "1px", u.style.marginTop = "-1px";
|
|
977
978
|
var h = document.createElement("div");
|
|
978
979
|
h.style.position = "relative", c.selection = h, c.appendChild(u), c.appendChild(h);
|
|
979
980
|
} for (var f = 0; f < a; f++) {
|
|
@@ -1050,9 +1051,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1050
1051
|
var t = this.data, i = n.Ta(t), a = {};
|
|
1051
1052
|
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 n.onHeaderClick && (n.onHeaderClick(a), a.preventDefault.value) || "function" == typeof n.onHeaderClicked && n.onHeaderClicked(a);
|
|
1052
1053
|
} }, this.Ta = function (e) { return new DayPilot.CalendarColumn(e, n); }, this.Ua = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.fa = function () { var e = this.nav.header, t = !0, i = this.ua; for (i.length; this.headerCreated && e && e.rows && e.rows.length > 0;)
|
|
1053
|
-
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.headerCreated = !0; this.Ra(t); }, this.loadingStart = function () {
|
|
1054
|
-
this.
|
|
1055
|
-
}, this.Va = function () { var e = this.nav.scroll; e.onscroll || (e.onscroll = function () { n.Wa(); }); var t = "undefined" != typeof this.Xa.scrollpos ? this.Xa.scrollpos : this.initScrollPos; t && ("Auto" === t && (t = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), e.root = this, 0 === e.scrollTop && (e.scrollTop = t)); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.Ya = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && (t.style.width = e + "px"); }, this.Za = 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)
|
|
1054
|
+
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.headerCreated = !0; this.Ra(t); }, this.loadingStart = function () {
|
|
1055
|
+
this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = "");
|
|
1056
|
+
}, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.R("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.Va = function () { var e = this.nav.scroll; e.onscroll || (e.onscroll = function () { n.Wa(); }); var t = "undefined" != typeof this.Xa.scrollpos ? this.Xa.scrollpos : this.initScrollPos; t && ("Auto" === t && (t = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), e.root = this, 0 === e.scrollTop && (e.scrollTop = t)); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.Ya = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && (t.style.width = e + "px"); }, this.Za = 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)
|
|
1056
1057
|
t = e.data;
|
|
1057
1058
|
else {
|
|
1058
1059
|
if ("object" != typeof e)
|
|
@@ -1172,10 +1173,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1172
1173
|
if ("Resources" === n.viewType && (b = b && d.id === r.resource), b) {
|
|
1173
1174
|
var D = new DayPilot.Event(r, n);
|
|
1174
1175
|
D.part.dayIndex = o, D.part.start = u < y ? r.start : c, D.part.end = f > g ? r.end : h;
|
|
1175
|
-
var
|
|
1176
|
-
if (C === P && (
|
|
1176
|
+
var w = this.getPixels(D.part.start, d.start), x = this.getPixels(D.part.end, d.start), C = w.top, P = x.top;
|
|
1177
|
+
if (C === P && (w.cut || x.cut))
|
|
1177
1178
|
continue;
|
|
1178
|
-
var k =
|
|
1179
|
+
var k = x.boxBottom;
|
|
1179
1180
|
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);
|
|
1180
1181
|
var p = D.part.top, v = D.part.top + D.part.height;
|
|
1181
1182
|
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.gb.events[m]), D.part.start.getTime() === y && D.part.end.getTime() === g && (a[m] = !0);
|
|
@@ -1229,7 +1230,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1229
1230
|
}
|
|
1230
1231
|
}(), "undefined" == typeof DayPilot)
|
|
1231
1232
|
var DayPilot = {};
|
|
1232
|
-
if (function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (e) { this.v = "2024.3.
|
|
1233
|
+
if (function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (e) { this.v = "2024.3.547-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._.locale().datePattern, this.theme = "navigator_default", this.patterns = [], this.zIndex = null, e)
|
|
1233
1234
|
for (var t in e)
|
|
1234
1235
|
this[t] = e[t]; }, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.tb(); this.resetTarget && !e ? this.ub(this.date) : this.resetTarget || (i.date = e); var t = this.B(); return t && t.addEventListener("input", function () { i.date = i.tb(), 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.ub(this.date); }, this.tb = function () { var e = this.B(); if (!e)
|
|
1235
1236
|
return this.date; var t = null; if (t = "INPUT" === e.tagName ? e.value : e.innerText, !t)
|
|
@@ -1259,7 +1260,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1259
1260
|
"use strict";
|
|
1260
1261
|
if ("undefined" == typeof DayPilot.Menu || !DayPilot.Menu.def) {
|
|
1261
1262
|
var e = function () { }, t = {};
|
|
1262
|
-
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.3.
|
|
1263
|
+
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.3.547-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.wb = 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.wb.submenu = null, null !== t.mouse) {
|
|
1263
1264
|
a.cssOnly || (a.cssOnly = !0);
|
|
1264
1265
|
var s = null;
|
|
1265
1266
|
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) {
|
|
@@ -1330,13 +1331,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1330
1331
|
if (h.icon) {
|
|
1331
1332
|
var D = document.createElement("span");
|
|
1332
1333
|
D.className = a.xb("item_icon");
|
|
1333
|
-
var
|
|
1334
|
-
|
|
1334
|
+
var w = document.createElement("i");
|
|
1335
|
+
w.className = h.icon, D.appendChild(w), p.appendChild(D);
|
|
1335
1336
|
}
|
|
1336
1337
|
if (h.symbol) {
|
|
1337
|
-
var
|
|
1338
|
+
var x = "http://www.w3.org/2000/svg", C = document.createElementNS(x, "svg");
|
|
1338
1339
|
C.setAttribute("width", "100%"), C.setAttribute("height", "100%");
|
|
1339
|
-
var P = document.createElementNS(
|
|
1340
|
+
var P = document.createElementNS(x, "use");
|
|
1340
1341
|
P.setAttribute("href", h.symbol), C.appendChild(P);
|
|
1341
1342
|
var k = document.createElement("span");
|
|
1342
1343
|
k.className = a.xb("item_symbol"), k.style.position = "absolute", k.style.top = "0px", k.style.left = "0px", k.appendChild(C), p.appendChild(k);
|
|
@@ -1373,10 +1374,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1373
1374
|
}
|
|
1374
1375
|
else
|
|
1375
1376
|
d.style.left = e + "px"; }(), o.parentLink) {
|
|
1376
|
-
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")),
|
|
1377
|
-
|
|
1377
|
+
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")), z = DayPilot.abs(o.parentLink.parentNode), R = z.x + N.offsetWidth, O = z.y - I;
|
|
1378
|
+
R + T > H && (R = Math.max(0, z.x - T));
|
|
1378
1379
|
var U = document.body.scrollTop + document.documentElement.scrollTop;
|
|
1379
|
-
|
|
1380
|
+
O + M - U > A && (O = Math.max(0, A - M + U)), d.style.left = R + "px", d.style.top = O + "px";
|
|
1380
1381
|
}
|
|
1381
1382
|
d.style.display = "", this.addShadow(d), this.wb.div = d, o.submenu || (DayPilot.Menu.active = this);
|
|
1382
1383
|
} }, this.yb = function (e, t) { var i = e, n = t.source; if ((!a.wb.submenu || a.wb.submenu.item !== e) && (a.wb.submenu && a.wb.submenu.item !== e && (DayPilot.Util.removeClass(a.wb.submenu.link.parentNode, a.xb("item_haschildren_active")), a.wb.submenu.menu.hide(), a.wb.submenu = null), e.items)) {
|
|
@@ -1573,8 +1574,8 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1573
1574
|
g && g.focus();
|
|
1574
1575
|
}
|
|
1575
1576
|
else {
|
|
1576
|
-
var
|
|
1577
|
-
o.autoFocus &&
|
|
1577
|
+
var w = h.firstFocusable();
|
|
1578
|
+
o.autoFocus && w ? w.focus() : o.div.focus();
|
|
1578
1579
|
} }); }, 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)
|
|
1579
1580
|
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)); });
|
|
1580
1581
|
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.dc = [], this.ec = null, this.canceling = !1, this.fc = [], this.f = [], this.gc = null, e = e || {}; for (var t in e)
|
|
@@ -1769,7 +1770,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1769
1770
|
if ("undefined" == typeof DayPilot.Month || !DayPilot.Month.events) {
|
|
1770
1771
|
var e = {};
|
|
1771
1772
|
e.Month = function (t, i) {
|
|
1772
|
-
this.v = "2024.3.
|
|
1773
|
+
this.v = "2024.3.547-lite", this.nav = {};
|
|
1773
1774
|
var a = this;
|
|
1774
1775
|
this.id = t, 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.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.N = !1, this.T = function (e, t) { var e = JSON.parse(e); return e.CallBackRedirect ? void (document.location.href = e.CallBackRedirect) : "None" === e.UpdateType ? void a.fireAfterRenderDetached(e.CallBackData, !0) : (a.events.list = e.Events, "Full" === e.UpdateType && (a.startDate = e.StartDate, a.timeFormat = e.TimeFormat ? e.TimeFormat : a.timeFormat, "undefined" != typeof e.WeekStarts && (a.weekStarts = e.WeekStarts), a.hashes = e.Hashes), a.V(), a.Jc(), a.da(), "Full" === e.UpdateType && (a.Kc(), a.Lc()), a.ia(), a.show(), a.ja(), void a.fireAfterRenderDetached(e.CallBackData, !0)); }, this.fireAfterRenderDetached = function (e, t) { var i = function (e, t) { return function () { a.afterRender && a.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)
|
|
1775
1776
|
t = e.data;
|
|
@@ -1822,7 +1823,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1822
1823
|
else {
|
|
1823
1824
|
var r = e, s = "start=" + a.visibleStart().toString() + "&end=" + a.visibleEnd().toString();
|
|
1824
1825
|
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": o, "error": n });
|
|
1825
|
-
} }, this.update = function (e) { if (a.ab(e), this.Aa) {
|
|
1826
|
+
} }, this.events.forRange = function (e, t) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var i = (a.events.list || []).map(function (e) { return new DayPilot.Event(e); }); return i.sort(a.ib), 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 (a.ab(e), this.Aa) {
|
|
1826
1827
|
if (a.N)
|
|
1827
1828
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");
|
|
1828
1829
|
if (this.cells) {
|
|
@@ -2000,8 +2001,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2000
2001
|
var a = t + this.getWeekStart();
|
|
2001
2002
|
a > 6 && (a -= 7), i.className = this.J("_header");
|
|
2002
2003
|
var o = document.createElement("div");
|
|
2003
|
-
o.setAttribute("unselectable", "on"), o.innerHTML = n.locale().dayNames[a], i.appendChild(o), o.style.position = "absolute", o.style.top = "0px", o.style.bottom = "0px",
|
|
2004
|
-
o.style.left = "0px", o.style.right = "0px", o.className = this.J("_header_inner"), o.innerHTML = n.locale().dayNames[a], e.appendChild(i);
|
|
2004
|
+
o.setAttribute("unselectable", "on"), o.innerHTML = n.locale().dayNames[a], i.appendChild(o), o.style.position = "absolute", o.style.top = "0px", o.style.bottom = "0px", o.style.left = "0px", o.style.right = "0px", o.className = this.J("_header_inner"), o.innerHTML = n.locale().dayNames[a], e.appendChild(i);
|
|
2005
2005
|
for (var r = 0; r < this.rows.length; r++)
|
|
2006
2006
|
this.Oc(t, r, e);
|
|
2007
2007
|
}
|
|
@@ -2186,18 +2186,20 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2186
2186
|
}
|
|
2187
2187
|
}(), "undefined" == typeof DayPilot)
|
|
2188
2188
|
var DayPilot = {};
|
|
2189
|
-
"undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function () {
|
|
2190
|
-
|
|
2189
|
+
"undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (DayPilot) {
|
|
2190
|
+
"use strict";
|
|
2191
|
+
if ("undefined" == typeof DayPilot.Navigator || !DayPilot.Navigator.def) {
|
|
2191
2192
|
DayPilot.Navigator = function (e, t) {
|
|
2192
|
-
this.v = "2024.3.
|
|
2193
|
+
this.v = "2024.3.547-lite";
|
|
2193
2194
|
var i = this;
|
|
2194
|
-
this.id = e, 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.gb = {}, this.Pc = function () { this.root.dp = this, this.root.className = this.J("_main"), "Horizontal" === this.orientation ? (this.root.style.width = this.showMonths * (7 * o.cellWidth() + this.
|
|
2195
|
-
|
|
2195
|
+
this.id = e, 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.gb = {}, this.Pc = function () { this.root.dp = this, this.root.className = this.J("_main"), "Horizontal" === this.orientation ? (o.Qc() || (this.root.style.width = this.showMonths * (7 * o.cellWidth() + this.Rc()) + "px"), this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : o.Qc() || (this.root.style.width = 7 * o.cellWidth() + this.Rc() + "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 = i.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.pa = function () { return 2 === i.api; }, this.Kc = function () { this.root.innerHTML = ""; }, this.J = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.Sc = function (e, t) { var i = this.J("_" + t); DayPilot.Util.addClass(e, i); }, this.Tc = function (e, t) { var i = this.J("_" + t); DayPilot.Util.removeClass(e, i); }, this.Uc = function () { if (!o.Qc())
|
|
2196
|
+
return null; var e = 7; return this.showWeekNumbers && e++, 100 / e; }, this.Vc = function () { return o.Qc() ? null : o.cellWidth(); }, this.Wc = function (e) { return "number" != typeof e && (e = 1), o.Qc() ? this.Uc() * e : this.Vc() * e; }, this.Xc = function (e) { var t = o.Qc() ? "%" : "px"; return this.Wc(e) + t; }, this.Lc = function (e, t) { var a = {}; a.cells = [], a.days = [], a.weeks = []; var n = this.startDate.addMonths(e), r = t.before, s = t.after, l = n.firstDayOfMonth(), d = l.firstDayOfWeek(o.weekStarts()), c = l.addMonths(1), u = DayPilot.DateUtil.daysDiff(d, c), h = "Auto" === this.rowsPerMonth ? Math.ceil(u / 7) : 6; a.rowCount = h; var f = (new DayPilot.Date).getDatePart(), m = 7 * o.cellWidth() + this.Rc(); a.width = m; var p = this.cellHeight * h + this.titleHeight + this.dayHeaderHeight; a.height = p; var v = document.createElement("div"); if (o.Qc() ? "Horizontal" === this.orientation && (v.style.width = 100 / i.showMonths + "%") : v.style.width = m + "px", v.style.height = p + "px", "Horizontal" === this.orientation)
|
|
2197
|
+
v.style.position = "absolute", o.Qc() ? (v.style.left = 100 / i.showMonths * e + "%", a.leftPct = 100 / i.showMonths * e) : v.style.left = m * e + "px", v.style.top = "0px", a.top = 0, a.left = m * e;
|
|
2196
2198
|
else {
|
|
2197
2199
|
v.style.position = "relative";
|
|
2198
2200
|
var y = e > 0 ? i.months[e - 1].top + i.months[e - 1].height : 0;
|
|
2199
|
-
a.top = y, a.left = 0;
|
|
2200
|
-
} v.className = this.J("_month"), v.style.cursor = "default", v.style.MozUserSelect = "none", v.style.KhtmlUserSelect = "none", v.style.WebkitUserSelect = "none", v.month = a, this.root.appendChild(v); var g = this.titleHeight + this.dayHeaderHeight, b = document.createElement("div"); b.style.position = "absolute", b.style.left = "0px", b.style.right = "0px", b.style.top = "0px", b.style.width =
|
|
2201
|
+
a.top = y, a.left = 0, a.leftPct = 0;
|
|
2202
|
+
} v.className = this.J("_month"), v.style.cursor = "default", v.style.MozUserSelect = "none", v.style.KhtmlUserSelect = "none", v.style.WebkitUserSelect = "none", v.month = a, a.div = v, this.root.appendChild(v); var g = this.titleHeight + this.dayHeaderHeight, b = document.createElement("div"); b.style.position = "absolute", b.style.left = "0px", b.style.right = "0px", b.style.top = "0px", b.style.width = i.Xc(), b.style.height = this.titleHeight + "px", b.style.lineHeight = this.titleHeight + "px", b.setAttribute("unselectable", "on"), b.className = this.J("_titleleft"), t.left && (b.style.cursor = "pointer", b.innerHTML = "<span><</span>", b.onclick = this.Yc), v.appendChild(b), this.tl = b; var D = document.createElement("div"); D.style.position = "absolute", D.style.left = i.Xc(), D.style.top = "0px", D.style.width = i.Xc(i.showWeekNumbers ? 6 : 5), D.style.height = this.titleHeight + "px", D.style.lineHeight = this.titleHeight + "px", D.setAttribute("unselectable", "on"), D.className = this.J("_title"), D.innerHTML = o.locale().monthNames[n.getMonth()] + " " + n.getYear(), v.appendChild(D), this.ti = D; var w = document.createElement("div"); w.style.position = "absolute", w.style.left = i.Xc(i.showWeekNumbers ? 7 : 6), w.style.right = i.Xc(i.showWeekNumbers ? 7 : 6), w.style.top = "0px", w.style.width = i.Xc(), w.style.height = this.titleHeight + "px", w.style.lineHeight = this.titleHeight + "px", w.setAttribute("unselectable", "on"), w.className = this.J("_titleright"), t.right && (w.style.cursor = "pointer", w.innerHTML = "<span>></span>", w.onclick = this.Zc), v.appendChild(w), this.tr = w; var x = (this.Rc(), i.showWeekNumbers ? 1 : 0); if (this.showWeekNumbers)
|
|
2201
2203
|
for (var C = 0; C < h; C++) {
|
|
2202
2204
|
var P = d.addDays(7 * C), k = null;
|
|
2203
2205
|
switch (this.weekNumberAlgorithm) {
|
|
@@ -2213,45 +2215,45 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2213
2215
|
default: throw "Unknown weekNumberAlgorithm value.";
|
|
2214
2216
|
}
|
|
2215
2217
|
var _ = document.createElement("div");
|
|
2216
|
-
_.style.position = "absolute", _.style.left = "0px", _.style.right = "0px", _.style.top = C * this.cellHeight + g + "px", _.style.width =
|
|
2218
|
+
_.style.position = "absolute", _.style.left = "0px", _.style.right = "0px", _.style.top = C * this.cellHeight + g + "px", _.style.width = i.Xc(), _.style.height = this.cellHeight + "px", _.style.lineHeight = this.cellHeight + "px", _.setAttribute("unselectable", "on"), _.className = this.J("_weeknumber"), _.innerHTML = "<span>" + k + "</span>", v.appendChild(_), a.weeks.push(_);
|
|
2217
2219
|
} for (var S = 0; S < 7; S++) {
|
|
2218
2220
|
a.cells[S] = [];
|
|
2219
2221
|
var _ = document.createElement("div");
|
|
2220
|
-
_.style.position = "absolute", _.style.left =
|
|
2222
|
+
_.style.position = "absolute", _.style.left = i.Xc(S + x), _.style.right = i.Xc(S + x), _.style.top = this.titleHeight + "px", _.style.width = i.Xc(), _.style.height = this.dayHeaderHeight + "px", _.style.lineHeight = this.dayHeaderHeight + "px", _.setAttribute("unselectable", "on"), _.className = this.J("_dayheader"), _.innerHTML = "<span>" + this.$c(S) + "</span>", v.appendChild(_), a.days.push(_);
|
|
2221
2223
|
for (var C = 0; C < h; C++) {
|
|
2222
|
-
var P = d.addDays(7 * C + S), M = this.
|
|
2223
|
-
if ("month" === this.
|
|
2224
|
+
var P = d.addDays(7 * C + S), M = this._c(P) && "none" !== this.ad(), T = P.firstDayOfMonth() === n, A = P < n, H = P >= n.addMonths(1);
|
|
2225
|
+
if ("month" === this.ad())
|
|
2224
2226
|
M = M && T;
|
|
2225
|
-
else if ("day" === this.
|
|
2227
|
+
else if ("day" === this.ad())
|
|
2226
2228
|
M = M && (T || r && A || s && H);
|
|
2227
|
-
else if ("week" === this.
|
|
2229
|
+
else if ("week" === this.ad()) {
|
|
2228
2230
|
var E = P.firstDayOfMonth() === n;
|
|
2229
2231
|
M = M && (E || r && A || s && H);
|
|
2230
2232
|
}
|
|
2231
2233
|
var N = document.createElement("div");
|
|
2232
2234
|
a.cells[S][C] = N;
|
|
2233
|
-
var I = i.
|
|
2234
|
-
N.day = P, N.x = S, N.y = C, N.left =
|
|
2235
|
-
var
|
|
2236
|
-
|
|
2237
|
-
var
|
|
2238
|
-
if (this.cells && this.cells[P.toStringSortable()] && (
|
|
2235
|
+
var I = i.bd(S, C), z = I.x, R = I.y, O = o.Qc() ? "%" : "px";
|
|
2236
|
+
N.day = P, N.x = S, N.y = C, N.left = z, N.top = R, N.isCurrentMonth = T, N.isNextMonth = H, N.isPrevMonth = A, N.showBefore = r, N.showAfter = s, N.className = this.J(T ? "_day" : "_dayother"), i.Sc(N, "cell"), P.getTime() === f.getTime() && T && this.Sc(N, "today"), 0 !== P.dayOfWeek() && 6 !== P.dayOfWeek() || this.Sc(N, "weekend"), N.style.position = "absolute", N.style.left = z + O, N.style.right = z + O, N.style.top = R + "px", N.style.width = i.Xc(), N.style.height = this.cellHeight + "px", N.style.lineHeight = this.cellHeight + "px";
|
|
2237
|
+
var U = document.createElement("div");
|
|
2238
|
+
U.style.position = "absolute", U.className = P.getTime() === f.getTime() && T ? this.J("_todaybox") : this.J("_daybox"), i.Sc(U, "cell_box"), U.style.left = "0px", U.style.top = "0px", U.style.right = "0px", U.style.bottom = "0px", N.appendChild(U);
|
|
2239
|
+
var L = null;
|
|
2240
|
+
if (this.cells && this.cells[P.toStringSortable()] && (L = this.cells[P.toStringSortable()]), "function" == typeof i.onBeforeCellRender) {
|
|
2239
2241
|
var B = {};
|
|
2240
|
-
B.cell =
|
|
2242
|
+
B.cell = L || {}, B.cell.day = P, B.cell.isCurrentMonth = T, B.cell.isToday = P.getTime() === f.getTime() && T, B.cell.isWeekend = 0 === P.dayOfWeek() || 6 === P.dayOfWeek(), L ? (B.cell.html = L.html || P.getDay(), B.cell.cssClass = L.css) : (B.cell.html = P.getDay(), B.cell.cssClass = null), i.onBeforeCellRender(B), L = B.cell;
|
|
2241
2243
|
}
|
|
2242
|
-
if (
|
|
2243
|
-
var
|
|
2244
|
-
|
|
2244
|
+
if (L && DayPilot.Util.addClass(N, L.cssClass || L.css), T || r && A || s && H) {
|
|
2245
|
+
var j = document.createElement("div");
|
|
2246
|
+
j.innerHTML = P.getDay(), j.style.position = "absolute", j.style.left = "0px", j.style.top = "0px", j.style.right = "0px", j.style.bottom = "0px", i.Sc(j, "cell_text"), N.isClickable = !0, L && L.html && (j.innerHTML = L.html), N.appendChild(j);
|
|
2245
2247
|
}
|
|
2246
|
-
N.setAttribute("unselectable", "on"), N.onclick = this.
|
|
2248
|
+
N.setAttribute("unselectable", "on"), N.onclick = this.cd, v.appendChild(N), M && (i.dd(v, S, C), this.selected.push(N));
|
|
2247
2249
|
}
|
|
2248
|
-
} var
|
|
2250
|
+
} var W = document.createElement("div"); W.style.position = "absolute", W.style.left = "0px", W.style.top = g - 2 + "px", W.style.width = i.Xc(7 + x), W.style.height = "1px", W.style.fontSize = "1px", W.style.lineHeight = "1px", W.className = this.J("_line"), v.appendChild(W), this.months.push(a); }, this.bd = function (e, t) { var a = this.titleHeight + this.dayHeaderHeight, n = (this.Rc(), this.showWeekNumbers ? 1 : 0); return { "x": i.Wc(e + n), "y": t * this.cellHeight + a }; }, this.dd = function (e, t, a) { var n = e.month.cells[t][a]; i.Sc(n, "select"); }, this.ed = function (e, t, a) { var n = e.month.cells[t][a]; i.Tc(n, "select"); }, this.Rc = function () { return this.showWeekNumbers ? o.cellWidth() : 0; }, this.fd = function () { if (this.items)
|
|
2249
2251
|
for (var e = 0; e < this.showMonths; e++)
|
|
2250
2252
|
for (var t = 0; t < 7; t++)
|
|
2251
2253
|
for (var i = 0; i < 6; i++) {
|
|
2252
2254
|
var a = this.months[e].cells[t][i];
|
|
2253
|
-
a && (1 === this.items[a.day.toStringSortable()] ? (this.
|
|
2254
|
-
} }, this.
|
|
2255
|
+
a && (1 === this.items[a.day.toStringSortable()] ? (this.Sc(a, "busy"), this.Tc(a, "free")) : (this.Tc(a, "busy"), this.Sc(a, "free")));
|
|
2256
|
+
} }, this.gd = function () { var e = {}; e.startDate = i.startDate, e.selectionStart = i.selectionStart, e.selectionEnd = i.selectionEnd.addDays(1), i.state.value = JSON.stringify(e); }, this.ad = function () { return (this.selectMode || "").toLowerCase(); }, this.hd = function () { var e = this.selectionDay || this.selectionStart; switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.ad()) {
|
|
2255
2257
|
case "day":
|
|
2256
2258
|
this.selectionStart = e, this.selectionDay = e, this.selectionEnd = e;
|
|
2257
2259
|
break;
|
|
@@ -2265,18 +2267,18 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2265
2267
|
this.selectionEnd = e;
|
|
2266
2268
|
break;
|
|
2267
2269
|
default: throw "Unknown selectMode value.";
|
|
2268
|
-
} }, this.
|
|
2269
|
-
return void (this.
|
|
2270
|
+
} }, this.jd = null, this.select = function (e, t, a) { 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 : a; if (!this.Aa)
|
|
2271
|
+
return void (this.jd = { "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) {
|
|
2270
2272
|
var m = this.startDate;
|
|
2271
|
-
(this.selectionStart < this.
|
|
2272
|
-
} s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.
|
|
2273
|
+
(this.selectionStart < this.kd() || this.selectionStart >= this.ld()) && (m = this.selectionStart.firstDayOfMonth()), m.toStringSortable() !== this.startDate.toStringSortable() && (f = !0), this.startDate = m;
|
|
2274
|
+
} s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.hd(), this.Kc(), this.Pc(), this.md(), this.fd(), this.gd(), !c || u.equals(this.selectionStart) && h.equals(this.selectionEnd) || this.L(), f && this.nd(); }, this.update = function (e) { if (i.ab(e), this.Aa) {
|
|
2273
2275
|
if (i.N)
|
|
2274
2276
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");
|
|
2275
|
-
i.
|
|
2277
|
+
i.od();
|
|
2276
2278
|
var t = { "day": i.selectionDay, "start": i.selectionStart, "end": i.selectionEnd };
|
|
2277
|
-
i.$a(), t.start === i.selectionStart && t.end
|
|
2278
|
-
} }, this.$a = function () { this.Kc(), this.Pc(), this.
|
|
2279
|
-
var t = { "events": { "preInit": function () { var e = this.data
|
|
2279
|
+
i.$a(), t.start === i.selectionStart && t.end === i.selectionEnd && t.day === i.selectionDay || i.L();
|
|
2280
|
+
} }, this.$a = function () { this.Kc(), this.Pc(), this.hd(), this.md(), this.da(), this.fd(), this.gd(), this.visible ? this.show() : this.hide(); }, this.od = function () { i.gb = {}; }, this.db = null, this.ab = function (e) { if (e) {
|
|
2281
|
+
var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? i.events.list = e.list : i.events.list = e); } } };
|
|
2280
2282
|
this.db = t;
|
|
2281
2283
|
for (var a in e)
|
|
2282
2284
|
if (t[a]) {
|
|
@@ -2288,32 +2290,35 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2288
2290
|
} }, this.eb = function () { var e = this.db; for (var t in e) {
|
|
2289
2291
|
var i = e[t];
|
|
2290
2292
|
i.postInit && i.postInit();
|
|
2291
|
-
} }, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, n, this.
|
|
2293
|
+
} }, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, n, this.pd) : WebForm_DoCallback(this.uniqueID, n, this.T, null, this.callbackError, !0); }, this.pd = function (e) { if ("function" == typeof i.onAjaxError) {
|
|
2292
2294
|
var t = {};
|
|
2293
2295
|
t.request = e, i.onAjaxError(t);
|
|
2294
2296
|
}
|
|
2295
2297
|
else
|
|
2296
|
-
"function" == typeof i.ajaxError && i.ajaxError(e); }, this.S = function (e) { i.T(e.responseText); }, this.P = function (e, t, a) { var n = {}; n.action = e, n.parameters = a, n.data = t, n.header = this.Q(); var o = "JSON" + JSON.stringify(n); __doPostBack(i.uniqueID, o); }, this.Q = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.
|
|
2298
|
+
"function" == typeof i.ajaxError && i.ajaxError(e); }, this.S = function (e) { i.T(e.responseText); }, this.P = function (e, t, a) { var n = {}; n.action = e, n.parameters = a, n.data = t, n.header = this.Q(); var o = "JSON" + JSON.stringify(n); __doPostBack(i.uniqueID, o); }, this.Q = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.qd = function (e, t) { "refresh" === e && this.nd(); }, this.$c = function (e) { var t = e + o.weekStarts(); return t > 6 && (t -= 7), o.locale().dayNamesShort[t]; }, this._c = function (e) { return null !== this.selectionStart && null !== this.selectionEnd && (this.selectionStart.getTime() <= e.getTime() && e.getTime() <= this.selectionEnd.getTime()); }, this.rd = function (e) { for (var t = 0; t < i.months.length; t++) {
|
|
2297
2299
|
var a = i.months[t];
|
|
2298
2300
|
if (!a)
|
|
2299
2301
|
return null;
|
|
2300
|
-
if (e.x < a.left
|
|
2302
|
+
if (e.x < a.left)
|
|
2301
2303
|
return null;
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2304
|
+
if (!(a.left + a.width < e.x)) {
|
|
2305
|
+
i.months[t].height;
|
|
2306
|
+
if (a.top <= e.y && e.y < a.top + a.height)
|
|
2307
|
+
return t;
|
|
2308
|
+
}
|
|
2309
|
+
} return null; }, this.sd = function (e) { }, this.td = function () { if (!o.Qc())
|
|
2310
|
+
return void (i.ud = i.cellWidth); var e = i.months[0].cells[0][0], t = e.clientWidth; i.ud = 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; }); }); }); }, this.vd = function (e) { i.td(); var t = DayPilot.mo3(i.nav.top, e), a = i.rd(t); if (null === a)
|
|
2306
2311
|
return null; var n = i.months[a], o = this.titleHeight + this.dayHeaderHeight; if (n.top <= t.y && t.y < n.top + o)
|
|
2307
2312
|
return { "month": a, "x": 0, "y": 0, "coords": t, "header": !0 }; for (var r = 0; r < n.cells.length; r++)
|
|
2308
2313
|
for (var s = 0; s < n.cells[r].length; s++) {
|
|
2309
2314
|
var l = n.cells[r][s], d = l.top + n.top, c = l.left + n.left;
|
|
2310
|
-
if (c <= t.x && t.x < c + i.
|
|
2315
|
+
if (c <= t.x && t.x < c + i.ud && d <= t.y && t.y < d + i.cellHeight)
|
|
2311
2316
|
return { "month": a, "x": r, "y": s, "coords": t };
|
|
2312
|
-
} return null; }, this.
|
|
2313
|
-
var t = i.
|
|
2317
|
+
} return null; }, this.wd = function (e) { if (i.freeHandSelectionEnabled) {
|
|
2318
|
+
var t = i.vd(e);
|
|
2314
2319
|
t && !t.header && (a.start = t), i.months[t.month].cells[t.x][t.y], e.preventDefault();
|
|
2315
|
-
} }, this.
|
|
2316
|
-
var t = i.
|
|
2320
|
+
} }, this.xd = function (e) { if (a.start) {
|
|
2321
|
+
var t = i.vd(e);
|
|
2317
2322
|
if (a.end)
|
|
2318
2323
|
a.end = t;
|
|
2319
2324
|
else if (t) {
|
|
@@ -2321,9 +2326,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2321
2326
|
o > n && (a.end = t);
|
|
2322
2327
|
}
|
|
2323
2328
|
a.end && (a.clear(), a.draw());
|
|
2324
|
-
} }, this.
|
|
2325
|
-
var a = this.
|
|
2326
|
-
a.start = null, a.drawCell = function (e) { var t = i.months[e.month], n = i.
|
|
2329
|
+
} }, this.yd = {};
|
|
2330
|
+
var a = this.yd;
|
|
2331
|
+
a.start = null, a.drawCell = function (e) { var t = i.months[e.month], n = i.bd(e.x, e.y), r = t.top + n.y, s = t.left + n.x, l = "px", d = i.Xc(); if (o.Qc()) {
|
|
2332
|
+
var c = "Horizontal" === i.orientation ? i.showMonths : 1;
|
|
2333
|
+
s = t.leftPct + n.x / c, l = "%", d = i.Xc(1 / c);
|
|
2334
|
+
} var u = document.createElement("div"); u.style.position = "absolute", u.style.left = s + l, u.style.top = r + "px", u.style.height = i.cellHeight + "px", u.style.width = d, u.style.backgroundColor = "#ccc", u.style.opacity = .5, u.style.cursor = "default", i.nav.preselection.appendChild(u), a.cells.push(u); }, a.clear = function () { if (a.cells) {
|
|
2327
2335
|
for (var e = 0; e < a.cells.length; e++)
|
|
2328
2336
|
i.nav.preselection.removeChild(a.cells[e]);
|
|
2329
2337
|
a.cells = [];
|
|
@@ -2334,13 +2342,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2334
2342
|
o.x = 6, o.y = r.rowCount - 1;
|
|
2335
2343
|
}
|
|
2336
2344
|
for (a.cells = []; !t.is(o);) {
|
|
2337
|
-
a.drawCell(t);
|
|
2345
|
+
t.visible() && a.drawCell(t);
|
|
2338
2346
|
var s = new n(t).next();
|
|
2339
2347
|
if (!s)
|
|
2340
2348
|
return;
|
|
2341
2349
|
t.month = s.month, t.x = s.x, t.y = s.y;
|
|
2342
2350
|
}
|
|
2343
|
-
a.drawCell(t);
|
|
2351
|
+
t.visible() && a.drawCell(t);
|
|
2344
2352
|
} }, a.ordered = function () { var e = a.start, t = a.end, i = {}; return !t || new n(e).before(t) ? (i.start = e, i.end = t) : (i.start = t, i.end = e), i; };
|
|
2345
2353
|
var n = function (e, t, a) { if (e instanceof n)
|
|
2346
2354
|
return e; if ("object" == typeof e) {
|
|
@@ -2365,48 +2373,48 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2365
2373
|
return null;
|
|
2366
2374
|
e = new n(t);
|
|
2367
2375
|
} return e; }, this.cell = function () { return i.months[this.month].cells[this.x][this.y]; }, this.date = function () { return this.cell().day; }, this.before = function (e) { return this.date() < new n(e).date(); }; };
|
|
2368
|
-
this.
|
|
2376
|
+
this.cd = function (e) { var t = this.parentNode, a = this.parentNode.month, n = this.x, o = this.y, r = a.cells[n][o].day; if (a.cells[n][o].isClickable) {
|
|
2369
2377
|
i.clearSelection(), i.selectionDay = r;
|
|
2370
2378
|
var r = i.selectionDay;
|
|
2371
|
-
switch (i.
|
|
2379
|
+
switch (i.ad()) {
|
|
2372
2380
|
case "none":
|
|
2373
2381
|
i.selectionStart = r, i.selectionEnd = r;
|
|
2374
2382
|
break;
|
|
2375
2383
|
case "day":
|
|
2376
2384
|
if (i.autoFocusOnClick) {
|
|
2377
2385
|
var s = r;
|
|
2378
|
-
if (r < i.
|
|
2386
|
+
if (r < i.kd() || r >= i.ld())
|
|
2379
2387
|
return void i.select(r);
|
|
2380
2388
|
}
|
|
2381
2389
|
var l = a.cells[n][o];
|
|
2382
|
-
i
|
|
2390
|
+
i.dd(t, n, o), i.selected.push(l), i.selectionStart = l.day, i.selectionEnd = l.day;
|
|
2383
2391
|
break;
|
|
2384
2392
|
case "week":
|
|
2385
2393
|
if (i.autoFocusOnClick) {
|
|
2386
2394
|
var s = a.cells[0][o].day, d = a.cells[6][o].day;
|
|
2387
|
-
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s < i.
|
|
2395
|
+
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s < i.kd() || d >= i.ld()))
|
|
2388
2396
|
return void i.select(r);
|
|
2389
2397
|
}
|
|
2390
2398
|
for (var c = 0; c < 7; c++)
|
|
2391
|
-
i
|
|
2399
|
+
i.dd(t, c, o), i.selected.push(a.cells[c][o]);
|
|
2392
2400
|
i.selectionStart = a.cells[0][o].day, i.selectionEnd = a.cells[6][o].day;
|
|
2393
2401
|
break;
|
|
2394
2402
|
case "month":
|
|
2395
2403
|
if (i.autoFocusOnClick) {
|
|
2396
2404
|
var s = r;
|
|
2397
|
-
if (r < i.
|
|
2405
|
+
if (r < i.kd() || r >= i.ld())
|
|
2398
2406
|
return void i.select(r);
|
|
2399
2407
|
}
|
|
2400
2408
|
for (var s = null, d = null, o = 0; o < 6; o++)
|
|
2401
2409
|
for (var n = 0; n < 7; n++) {
|
|
2402
2410
|
var l = a.cells[n][o];
|
|
2403
|
-
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (i
|
|
2411
|
+
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (i.dd(t, n, o), i.selected.push(l), null === s && (s = l.day), d = l.day);
|
|
2404
2412
|
}
|
|
2405
2413
|
i.selectionStart = s, i.selectionEnd = d;
|
|
2406
2414
|
break;
|
|
2407
2415
|
default: throw "unknown selectMode";
|
|
2408
2416
|
}
|
|
2409
|
-
i.
|
|
2417
|
+
i.gd(), i.L();
|
|
2410
2418
|
} }, this.L = function (e) { var t = i.selectionStart, a = i.selectionEnd.addDays(1), n = DayPilot.DateUtil.daysDiff(t, a), o = i.selectionDay; if (e = e || {}, i.pa()) {
|
|
2411
2419
|
var r = {};
|
|
2412
2420
|
if (r.start = t, r.end = a, r.day = o, r.days = n, r.mode = e.mode || i.selectMode, r.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(r), r.preventDefault.value))
|
|
@@ -2436,7 +2444,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2436
2444
|
break;
|
|
2437
2445
|
case "None": break;
|
|
2438
2446
|
case "PostBack": i.timeRangeSelectedPostBack(t, a, o);
|
|
2439
|
-
} }, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.P("TimeRangeSelected", i, n); }, this.
|
|
2447
|
+
} }, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.P("TimeRangeSelected", i, n); }, this.Zc = function (e) { i.zd(i.skipMonths); }, this.Yc = function (e) { i.zd(-i.skipMonths); }, this.zd = function (e) { this.startDate = this.startDate.addMonths(e), this.Kc(), this.Pc(), this.md(), this.gd(), this.nd(), this.fd(); }, this.kd = function () { return i.startDate.firstDayOfMonth(); }, this.ld = function () { return i.startDate.firstDayOfMonth().addMonths(this.showMonths); }, this.visibleStart = function () { return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts()); }, this.visibleEnd = function () {
|
|
2448
|
+
return i.startDate.firstDayOfMonth().addMonths(this.showMonths - 1).firstDayOfWeek(o.weekStarts()).addDays(42);
|
|
2449
|
+
}, this.nd = function () { var e = this.visibleStart(), t = this.visibleEnd(); if (i.pa()) {
|
|
2440
2450
|
var a = {};
|
|
2441
2451
|
if (a.start = e, a.end = t, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onVisibleRangeChange && (i.onVisibleRangeChange(a), a.preventDefault.value))
|
|
2442
2452
|
return;
|
|
@@ -2463,13 +2473,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2463
2473
|
this.onVisibleRangeChanged(e, t);
|
|
2464
2474
|
break;
|
|
2465
2475
|
case "Disabled":
|
|
2466
|
-
} }, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.R("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.P("Visible", e, t); }, this.T = function (e, t) { var e = JSON.parse(e); i.items = e.Items, i.cells = e.Cells, i.cells ? i.update() : i.
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
}
|
|
2471
|
-
this.root.style.height = this.td() + "px", this.nav.preselection = document.createElement("div"), this.nav.preselection.style.position = "absolute", this.nav.preselection.style.left = "0px", this.nav.preselection.style.top = "0px", this.root.appendChild(this.nav.preselection);
|
|
2472
|
-
}, this.td = function () { if ("Horizontal" === this.orientation) {
|
|
2476
|
+
} }, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.R("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.P("Visible", e, t); }, this.T = function (e, t) { var e = JSON.parse(e); i.items = e.Items, i.cells = e.Cells, i.cells ? i.update() : i.fd(); }, this.md = function () { for (var e = 0; e < this.showMonths; e++) {
|
|
2477
|
+
var t = this.Ad(e);
|
|
2478
|
+
this.Lc(e, t);
|
|
2479
|
+
} this.root.style.height = this.Bd() + "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.Bd = function () { if ("Horizontal" === this.orientation) {
|
|
2473
2480
|
for (var e = 0, t = 0; t < this.months.length; t++) {
|
|
2474
2481
|
var i = this.months[t];
|
|
2475
2482
|
i.height > e && (e = i.height);
|
|
@@ -2478,27 +2485,27 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2478
2485
|
} for (var a = 0, t = 0; t < this.months.length; t++) {
|
|
2479
2486
|
var i = this.months[t];
|
|
2480
2487
|
a += i.height;
|
|
2481
|
-
} return a; }, this.
|
|
2488
|
+
} return a; }, this.Ad = function (e) { if (this.internal.showLinks)
|
|
2482
2489
|
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.ra = {}, this.ra.scope = null, this.ra.notify = function () { i.ra.scope && i.ra.scope["$apply"](); }, this.internal = {}, this.internal.loadOptions = i.ab, this.internal.initialized = function () { return i.Aa; }, this._ = {};
|
|
2483
2490
|
var o = this._;
|
|
2484
2491
|
o.locale = function () { return DayPilot.Locale.find(i.locale); }, o.weekStarts = function () { if ("Auto" === i.weekStarts) {
|
|
2485
2492
|
var e = o.locale();
|
|
2486
2493
|
return e ? e.weekStarts : 0;
|
|
2487
2494
|
} return i.weekStarts; }, o.cellWidth = function () { if (i.gb.cellWidth)
|
|
2488
|
-
return i.gb.cellWidth; var e = i.
|
|
2495
|
+
return i.gb.cellWidth; var e = i.Cd("_cell_dimensions").width; return e || (e = i.cellWidth), i.gb.cellWidth = e, e; }, o.Qc = function () { return "Auto" === i._.cellWidth(); }, this.clearSelection = function () { for (var e = 0; e < this.selected.length; e++) {
|
|
2489
2496
|
var t = this.selected[e];
|
|
2490
|
-
i.
|
|
2491
|
-
} this.selected = []; }, this.
|
|
2497
|
+
i.ed(t.parentNode, t.x, t.y);
|
|
2498
|
+
} this.selected = []; }, this.Dd = function () { return !!this.backendUrl && ("undefined" == typeof i.items || !i.items); }, this.events = {}, this.da = function () { if (DayPilot.isArray(this.events.list)) {
|
|
2492
2499
|
this.items = {};
|
|
2493
2500
|
for (var e = 0; e < this.events.list.length; e++) {
|
|
2494
2501
|
var t = this.events.list[e];
|
|
2495
2502
|
if (!t.hidden) {
|
|
2496
|
-
var i = this.
|
|
2503
|
+
var i = this.Ed(t);
|
|
2497
2504
|
for (var a in i)
|
|
2498
2505
|
this.items[a] = 1;
|
|
2499
2506
|
}
|
|
2500
2507
|
}
|
|
2501
|
-
} }, this.
|
|
2508
|
+
} }, this.Cd = function (e) { var t = document.createElement("div"); t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.J(e); var a = i.root || document.body; a.appendChild(t); var n = t.offsetHeight, o = t.offsetWidth; a.removeChild(t); var r = {}; return r.height = n, r.width = o, r; }, this.Ed = function (e) { for (var t = new DayPilot.Date(e.start), i = new DayPilot.Date(e.end), a = {}, n = t.getDatePart(); n.getTime() <= i.getTime();)
|
|
2502
2509
|
a[n.toStringSortable()] = 1, n = n.addDays(1); return a; }, this.show = function () { i.visible = !0, i.root.style.display = ""; }, this.hide = function () { i.visible = !1, i.root.style.display = "none"; }, this.fb = function () { if (this.id && this.id.tagName)
|
|
2503
2510
|
this.nav.top = this.id;
|
|
2504
2511
|
else {
|
|
@@ -2507,19 +2514,19 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2507
2514
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
2508
2515
|
throw "DayPilot.Navigator: The placeholder element not found: '" + e + "'.";
|
|
2509
2516
|
} this.root = this.nav.top; }, this.init = function () { if (this.fb(), !this.root.dp) {
|
|
2510
|
-
this.
|
|
2511
|
-
if (this.
|
|
2512
|
-
var e = this.
|
|
2513
|
-
this.select(e.date1, e.date2, e.options), this.
|
|
2517
|
+
this.hd(), this.Pc(), this.md(), this.da(), this.fd(), this.Y(), this.Fd(), this.Za();
|
|
2518
|
+
if (this.Dd() && this.nd(), this.Aa = !0, this.eb(), this.jd) {
|
|
2519
|
+
var e = this.jd;
|
|
2520
|
+
this.select(e.date1, e.date2, e.options), this.jd = null;
|
|
2514
2521
|
}
|
|
2515
2522
|
return this;
|
|
2516
|
-
} }, this.
|
|
2523
|
+
} }, this.Fd = function () { i.nav.top.onmousedown = this.wd, i.nav.top.onmousemove = this.xd; }, this.Za = function () { DayPilot.re(document, "mouseup", i.Gd); }, this.Gd = function (e) { if (a.start && a.end) {
|
|
2517
2524
|
var t = DayPilot.mo3(i.nav.top, e);
|
|
2518
2525
|
if (t.x === a.start.coords.x && t.y === a.start.coords.y)
|
|
2519
2526
|
return a.start = null, void a.clear();
|
|
2520
2527
|
a.clear();
|
|
2521
2528
|
var o = a.ordered();
|
|
2522
|
-
o.start = new n(o.start).nextVisible(), o.end = new n(o.end).previousVisible(), i.selectionDay = new n(o.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new n(o.end).date(), a.start = null, a.end = null, i.Kc(), i.Pc(), i.
|
|
2529
|
+
o.start = new n(o.start).nextVisible(), o.end = new n(o.end).previousVisible(), i.selectionDay = new n(o.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new n(o.end).date(), a.start = null, a.end = null, i.Kc(), i.Pc(), i.md(), i.fd(), i.gd();
|
|
2523
2530
|
i.L({ "mode": "FreeHand" });
|
|
2524
2531
|
} a.start = null, a.end = null; }, this.dispose = function () { var e = i; e.root && (e.root.removeAttribute("style"), e.root.removeAttribute("class"), e.root.dp = null, e.root.innerHTML = null, e.root = null, e.N = !0); }, this.Y = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.ab(t);
|
|
2525
2532
|
}, "undefined" != typeof jQuery && !function (e) { e.fn.daypilotNavigator = function (e) { var t = null, i = this.each(function () { if (!this.daypilot) {
|
|
@@ -2535,9 +2542,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2535
2542
|
var l = DayPilot.Util.shouldApply(s);
|
|
2536
2543
|
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);
|
|
2537
2544
|
} 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)
|
|
2538
|
-
n[i] = e[i]; n.update(); }, !0), d.call(t, u, function (e) { n.events.list = e, n.da(), n.
|
|
2545
|
+
n[i] = e[i]; n.update(); }, !0), d.call(t, u, function (e) { n.events.list = e, n.da(), n.fd(); }, !0); }; } }; }]); }(), DayPilot.Navigator.def = {}, "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded();
|
|
2539
2546
|
}
|
|
2540
|
-
}();
|
|
2547
|
+
}(DayPilot);
|
|
2541
2548
|
|
|
2542
2549
|
function rand() {
|
|
2543
2550
|
return ((1 + Math.random()) * 0x10000) | 0;
|