@daypilot/daypilot-lite-angular 4.7.0 → 4.8.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/README.md +10 -1
- package/esm2020/lib/core/daypilot-core.mjs +706 -705
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +913 -910
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +702 -701
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/lib/core/daypilot-core.d.ts +1 -0
- package/package.json +2 -2
|
@@ -132,7 +132,7 @@ DayPilot Lite
|
|
|
132
132
|
Copyright (c) 2005 - 2025 Annpoint s.r.o.
|
|
133
133
|
https://www.daypilot.org/
|
|
134
134
|
Licensed under Apache Software License 2.0
|
|
135
|
-
Version: 2025.4.
|
|
135
|
+
Version: 2025.4.750-lite
|
|
136
136
|
*/
|
|
137
137
|
"use strict";
|
|
138
138
|
var DayPilot = { Global: {} };
|
|
@@ -980,7 +980,7 @@ var DayPilot = { Global: {} };
|
|
|
980
980
|
if (this instanceof t.Calendar && !this.P && (r = !0, this.P = !0), !r)
|
|
981
981
|
throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
|
|
982
982
|
var o = this;
|
|
983
|
-
this.uniqueID = null, this.isCalendar = !0, this.v = "${v}", 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.cellDuration = 30, 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.snapToGrid = !0, this.showToolTip = !0, this.startDate = (new DayPilot.Date).getDatePart(), this.cssClassPrefix = "calendar_default", this.theme = null, this.timeFormat = "Auto", this.useEventBoxes = "Always", 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.Q = !1, this.R = {};
|
|
983
|
+
this.uniqueID = null, this.isCalendar = !0, this.v = "${v}", 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.cellDuration = 30, 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.rtl = !1, this.snapToGrid = !0, this.showToolTip = !0, this.startDate = (new DayPilot.Date).getDatePart(), this.cssClassPrefix = "calendar_default", this.theme = null, this.timeFormat = "Auto", this.useEventBoxes = "Always", 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.Q = !1, this.R = {};
|
|
984
984
|
var s = this.R;
|
|
985
985
|
this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.S(); }, this.S = function () { DayPilot.de(o.elements.selection), o.elements.selection = [], o.nav.activeSelection = null; }, this.T = function (e, t, n) { var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var i = "JSON" + JSON.stringify(a); __doPostBack(o.uniqueID, i); }, this.V = function (e, t, n) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.callbackTimeout = window.setTimeout(function () { o.loadingStart(); }, 100); var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var i = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.W, i, this.ajaxError) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, i, this.X, this.clientName, this.onCallbackError, !0); }, this.onCallbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.dispose = function () { var e = o; e.Q || (e.Q = !0, clearInterval(e.Y), e.Z(), e.nav.scroll.root = null, DayPilot.pu(e.nav.loading), e._(), e.aa(), 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.Q; }, this.ba = function () { this.nav.top.dispose = this.dispose; }, this.W = function (e) { o.X(e.responseText); }, this.U = function () { var e = {}; return e.control = "dpc", e.id = this.id, e.v = this.v, e.days = o.days, e.startDate = o.startDate, e.heightSpec = o.heightSpec, e.businessBeginsHour = o.businessBeginsHour, e.businessEndsHour = o.businessEndsHour, e.hashes = o.hashes, e.timeFormat = o.timeFormat, e.viewType = o.viewType, e.locale = o.locale, e; }, this.ca = function (e) {
|
|
986
986
|
for (var t = e.parentNode; t && "TD" !== t.tagName;)
|
|
@@ -1208,9 +1208,10 @@ var DayPilot = { Global: {} };
|
|
|
1208
1208
|
if (!DayPilot.Global.selecting && "Disabled" !== o.timeRangeSelectedHandling) {
|
|
1209
1209
|
var t = e.which;
|
|
1210
1210
|
if (1 === t || 0 === t) {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1211
|
+
var n = o.nav.scrollable;
|
|
1212
|
+
o.coords = DayPilot.mo3(n, e), DayPilot.Global.selecting = { calendar: o, start: o.coords };
|
|
1213
|
+
var a = DayPilot.Global.selecting;
|
|
1214
|
+
return a.start.time = o.Da(o.coords.x, o.coords.y), a.start.columnIndex = o.Ea(o.coords.x), a.start.column = o.Ba[a.start.columnIndex], o.Fa(), o.Ga(), !1;
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1216
1217
|
}, this.Ga = function () {
|
|
@@ -1230,20 +1231,21 @@ var DayPilot = { Global: {} };
|
|
|
1230
1231
|
}();
|
|
1231
1232
|
u.className = o.L("_shadow"), u.firstChild.innerHTML = "", u.style.top = s + "px", u.style.height = d + "px", o.nav.events.rows[0].cells[n].selection.appendChild(u);
|
|
1232
1233
|
}();
|
|
1233
|
-
}, this.Fa = function () { var e = DayPilot.Global.selecting; e.end = o.coords, e.end.time = o.Da(e.start.x, e.end.y), e.end.column = o.Ba[o.Ea(e.end.x)], o.Ha
|
|
1234
|
+
}, this.Fa = function () { var e = DayPilot.Global.selecting; e.end = o.coords, e.end.time = o.Da(e.start.x, e.end.y), e.end.column = o.Ba[o.Ea(e.end.x)], o.Ha(e); }, this.Ha = function (e) { var t, n, a; o.snapToGrid ? e.end.time < e.start.time ? (t = o.Ia(e.end.time, e.start.column.start), n = o.Ja(e.start.time, e.start.column.start), a = e.endTime) : (t = o.Ia(e.start.time, e.start.column.start), n = o.Ja(e.end.time, e.start.column.start), a = e.startTime) : e.end.time < e.start.time ? (t = e.end.time, n = e.start.time, a = e.endTime) : (t = e.start.time, n = e.end.time, a = e.startTime), e.startTime = t, e.endTime = n, e.anchor = a; }, this.getSelection = function () {
|
|
1234
1235
|
if (!o.N)
|
|
1235
1236
|
return null;
|
|
1236
1237
|
var e = o.N;
|
|
1237
1238
|
return new DayPilot.Selection(e.startTime, e.endTime, e.start.column.id, o);
|
|
1238
1239
|
}, this.Ea = function (e) {
|
|
1239
|
-
if (e
|
|
1240
|
-
return
|
|
1240
|
+
if (e < 0)
|
|
1241
|
+
return 0;
|
|
1242
|
+
o.rtl ? e = o.nav.main.offsetWidth - e : e -= o.hourWidth;
|
|
1241
1243
|
for (var t = 0, n = o.nav.events.rows[0].cells, a = 0; a < n.length; a++) {
|
|
1242
1244
|
if (t += n[a].offsetWidth, e < t)
|
|
1243
1245
|
return a;
|
|
1244
1246
|
}
|
|
1245
1247
|
return null;
|
|
1246
|
-
}, this.Da = function (e, t) { e = DayPilot.Util.atLeast(e, 0); var n = this.Ea(e), a = t / (60 / s.fa()) / o.cellHeight, i = 60 * a * 60 * 1e3, r = 6e4 * Math.floor(i / 6e4), l = this.Ba[n]; return l ? l.start.addTime(r) : null; }, this.
|
|
1248
|
+
}, this.Da = function (e, t) { e = DayPilot.Util.atLeast(e, 0); var n = this.Ea(e), a = t / (60 / s.fa()) / o.cellHeight, i = 60 * a * 60 * 1e3, r = 6e4 * Math.floor(i / 6e4), l = this.Ba[n]; return l ? l.start.addTime(r) : null; }, this.Ia = function (e, t) { var n = e.getTime(); t && (n -= t.getTime()); var a = 60 * s.fa() * 1e3, i = n % a; return e.addTime(-i); }, this.Ja = function (e, t) { var n = this.Ia(e, t); return n.getTime() === e.getTime() ? n : n.addTime(60 * s.fa() * 1e3); }, this.Ka = {}, this.Ka.getCellCoords = function () {
|
|
1247
1249
|
var e = {};
|
|
1248
1250
|
if (e.x = 0, e.y = 0, !o.coords)
|
|
1249
1251
|
return null;
|
|
@@ -1266,18 +1268,18 @@ var DayPilot = { Global: {} };
|
|
|
1266
1268
|
var s = {};
|
|
1267
1269
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = n, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1268
1270
|
return;
|
|
1269
|
-
o.columns.list = n, o.
|
|
1271
|
+
o.columns.list = n, o.La && o.update();
|
|
1270
1272
|
}
|
|
1271
1273
|
};
|
|
1272
1274
|
o.columnsLoadMethod && "POST" === o.columnsLoadMethod.toUpperCase() ? DayPilot.ajax({ "method": "POST", "url": e, "success": i, "error": a }) : DayPilot.ajax({ "method": "GET", "url": e, "success": i, "error": a });
|
|
1273
1275
|
}, this.ga = function () {
|
|
1274
1276
|
var e;
|
|
1275
|
-
e = "Resources" !== o.viewType ? this.
|
|
1277
|
+
e = "Resources" !== o.viewType ? this.Ma() : o.columns.list, this.Ba = [];
|
|
1276
1278
|
for (var t = 0; t < e.length; t++) {
|
|
1277
|
-
var n = this.
|
|
1279
|
+
var n = this.Na(e[t]);
|
|
1278
1280
|
this.Ba.push(n);
|
|
1279
1281
|
}
|
|
1280
|
-
}, this.
|
|
1282
|
+
}, this.Na = function (e) {
|
|
1281
1283
|
var t = {};
|
|
1282
1284
|
if (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(o.startDate), "BusinessHoursNoScroll" === this.heightSpec) {
|
|
1283
1285
|
var n = t.start.getDatePart();
|
|
@@ -1322,7 +1324,7 @@ var DayPilot = { Global: {} };
|
|
|
1322
1324
|
return !0;
|
|
1323
1325
|
}, a.push(e), this.lines.push(a), this.lines.length - 1;
|
|
1324
1326
|
}, t;
|
|
1325
|
-
}, this.
|
|
1327
|
+
}, this.Ma = function () {
|
|
1326
1328
|
var e = [], t = this.startDate.getDatePart(), n = this.days;
|
|
1327
1329
|
switch (this.viewType) {
|
|
1328
1330
|
case "Day":
|
|
@@ -1361,16 +1363,16 @@ var DayPilot = { Global: {} };
|
|
|
1361
1363
|
if (this.elements.events)
|
|
1362
1364
|
for (var e = 0; e < this.elements.events.length; e++) {
|
|
1363
1365
|
var t = this.elements.events[e];
|
|
1364
|
-
o.
|
|
1366
|
+
o.Oa(t);
|
|
1365
1367
|
}
|
|
1366
1368
|
this.elements.events = [];
|
|
1367
|
-
}, this.
|
|
1369
|
+
}, this.Oa = function (e) {
|
|
1368
1370
|
!function () {
|
|
1369
1371
|
var t = e.domArgs;
|
|
1370
1372
|
if (e.domArgs = null, t && "function" == typeof o.onBeforeEventDomRemove && o.onBeforeEventDomRemove(t), t && "function" == typeof o.onBeforeEventDomAdd) {
|
|
1371
|
-
var a = t && t.
|
|
1373
|
+
var a = t && t.Pa;
|
|
1372
1374
|
if (a) {
|
|
1373
|
-
o.
|
|
1375
|
+
o.Ra.Qa && n(t.element) && (o.Ra.Sa = !0, o.Ra.Ta(a), o.Ra.Sa = !1);
|
|
1374
1376
|
}
|
|
1375
1377
|
}
|
|
1376
1378
|
}();
|
|
@@ -1380,7 +1382,7 @@ var DayPilot = { Global: {} };
|
|
|
1380
1382
|
a.onmousedown = null, a.onmousemove = null, a.onclick = null;
|
|
1381
1383
|
}
|
|
1382
1384
|
e.helper = null, e.data = null, e.event = null, DayPilot.de(e);
|
|
1383
|
-
}, this.
|
|
1385
|
+
}, this.Ua = function (e) {
|
|
1384
1386
|
var a = e.cache || e.data, i = this.nav.events, r = a.borderRadius || o.eventBorderRadius;
|
|
1385
1387
|
"number" == typeof r && (r += "px");
|
|
1386
1388
|
var s = document.createElement("div");
|
|
@@ -1430,11 +1432,11 @@ var DayPilot = { Global: {} };
|
|
|
1430
1432
|
if (t.control = o, t.e = e, t.element = null, s.domArgs = t, "function" == typeof o.onBeforeEventDomAdd && o.onBeforeEventDomAdd(t), t.element) {
|
|
1431
1433
|
var a = l;
|
|
1432
1434
|
if (a) {
|
|
1433
|
-
t.
|
|
1435
|
+
t.Pa = a;
|
|
1434
1436
|
if (n(t.element)) {
|
|
1435
|
-
if (!o.
|
|
1437
|
+
if (!o.Ra.Qa)
|
|
1436
1438
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
1437
|
-
o.Sa
|
|
1439
|
+
o.Ra.Sa = !0, o.Ra.Va(t.element, a), o.Ra.Sa = !1;
|
|
1438
1440
|
}
|
|
1439
1441
|
else
|
|
1440
1442
|
a.appendChild(t.element);
|
|
@@ -1456,10 +1458,10 @@ var DayPilot = { Global: {} };
|
|
|
1456
1458
|
var s = r[o];
|
|
1457
1459
|
s.part.width = 100 / a.lines.length, s.part.left = s.part.width * i;
|
|
1458
1460
|
var l = i === a.lines.length - 1;
|
|
1459
|
-
l || (s.part.width = 1.5 * s.part.width), this.
|
|
1461
|
+
l || (s.part.width = 1.5 * s.part.width), this.Ua(s);
|
|
1460
1462
|
}
|
|
1461
1463
|
}
|
|
1462
|
-
}, this.
|
|
1464
|
+
}, this.Wa = function () { var e = this.nav.top; e.innerHTML = "", DayPilot.Util.addClass(e, this.L("_main")), e.style.MozUserSelect = "none", e.style.KhtmlUserSelect = "none", e.style.position = "relative", e.style.width = this.width ? this.width : "100%", this.hideUntilInit && (e.style.visibility = "hidden"), this.visible || (e.style.display = "none"), this.rtl && (e.style.direction = "rtl"), this.nav.scroll = document.createElement("div"), this.nav.scroll.style.height = this.Xa() + "px", "BusinessHours" === this.heightSpec ? this.nav.scroll.style.overflow = "auto" : this.nav.scroll.style.overflow = "hidden", this.nav.scroll.style.position = "relative"; var t = this.Ya(); this.nav.top.appendChild(t), this.nav.scroll.style.zoom = 1; var n = this.Za(); this.nav.scrollable = n.firstChild, this.nav.scroll.appendChild(n), e.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", e.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 = o.$a(o.loadingLabelText, o.loadingLabelHtml), this.nav.loading.style.display = "none", e.appendChild(this.nav.loading); }, this.la = function () { this.fasterDispose || DayPilot.pu(this.nav.hourTable), this.nav.scrollable.rows[0].cells[0].innerHTML = "", this.nav.hourTable = this._a(), this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable); }, this.Za = 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 n, a = t.insertRow(-1); n = a.insertCell(-1), n.valign = "top", n.style.padding = "0px", n.style.border = "0px none", this.nav.hourTable = this._a(), n.appendChild(this.nav.hourTable), n = a.insertCell(-1), n.valign = "top", n.width = "100%", n.style.padding = "0px", n.style.border = "0px none"; var i = document.createElement("div"); return i.style.position = "relative", n.appendChild(i), i.appendChild(this.ab()), i.appendChild(this.bb()), e.appendChild(t), this.nav.zoom = e, e; }, this.ab = 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.bb = function () {
|
|
1463
1465
|
var e = document.createElement("table");
|
|
1464
1466
|
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;
|
|
1465
1467
|
for (var t = this.Ba, n = t.length, a = e.insertRow(-1), i = 0; i < n; i++) {
|
|
@@ -1471,13 +1473,13 @@ var DayPilot = { Global: {} };
|
|
|
1471
1473
|
r.selection = l, r.appendChild(s), r.appendChild(l);
|
|
1472
1474
|
}
|
|
1473
1475
|
return e;
|
|
1474
|
-
}, this.
|
|
1476
|
+
}, this._a = function () {
|
|
1475
1477
|
var e = document.createElement("table");
|
|
1476
1478
|
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; };
|
|
1477
1479
|
for (var t = o.oa(), n = 0; n < t; n++)
|
|
1478
|
-
this.
|
|
1480
|
+
this.cb(e, n);
|
|
1479
1481
|
return e;
|
|
1480
|
-
}, this.
|
|
1482
|
+
}, this.cb = function (e, t) { var n = 60 * o.cellHeight / s.fa(), a = e.insertRow(-1); a.style.height = n + "px"; var i = a.insertCell(-1); i.valign = "bottom", i.unselectable = "on", i.style.cursor = "default", i.style.padding = "0px", i.style.border = "0px none"; var r = document.createElement("div"); r.style.position = "relative", r.className = this.L("_rowheader"), r.style.width = this.hourWidth + "px", r.style.height = n + "px", r.style.overflow = "hidden", r.unselectable = "on"; var l = document.createElement("div"); l.className = this.L("_rowheader_inner"), l.unselectable = "on"; var d = document.createElement("div"); d.unselectable = "on"; var c = this.startDate.addHours(t).addHours(o.sa()), u = c.getHours(), h = u < 12, f = s.timeFormat(); "Clock12Hours" === f && (u %= 12, 0 === u && (u = 12)), d.innerHTML = u; var v = document.createElement("span"); v.unselectable = "on", v.className = this.L("_rowheader_minutes"); var p; p = "Clock12Hours" === f ? h ? "AM" : "PM" : "00", v.innerHTML = p, d.appendChild(v), l.appendChild(d), r.appendChild(l), i.appendChild(r); }, this.Xa = function () {
|
|
1481
1483
|
var e = s.fa(), t = 60 / e;
|
|
1482
1484
|
switch (this.heightSpec) {
|
|
1483
1485
|
case "Full": return 24 * t * this.cellHeight;
|
|
@@ -1489,21 +1491,21 @@ var DayPilot = { Global: {} };
|
|
|
1489
1491
|
return n * this.cellHeight * t;
|
|
1490
1492
|
default: throw "DayPilot.Calendar: Unexpected 'heightSpec' value.";
|
|
1491
1493
|
}
|
|
1492
|
-
}, this.
|
|
1494
|
+
}, this.db = function () {
|
|
1493
1495
|
var e = o.nav.corner ? o.nav.corner.parentNode : null;
|
|
1494
1496
|
if (e) {
|
|
1495
1497
|
e.innerHTML = "";
|
|
1496
|
-
var t = this.
|
|
1498
|
+
var t = this.eb();
|
|
1497
1499
|
e.appendChild(t), o.nav.corner = t;
|
|
1498
1500
|
}
|
|
1499
|
-
}, this.
|
|
1501
|
+
}, this.Ya = function () {
|
|
1500
1502
|
var e = document.createElement("div");
|
|
1501
1503
|
e.style.overflow = "auto";
|
|
1502
1504
|
var t = document.createElement("table");
|
|
1503
1505
|
t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = "100%", t.style.borderCollapse = "separate", t.style.border = "0px none";
|
|
1504
1506
|
var n = t.insertRow(-1), a = n.insertCell(-1);
|
|
1505
1507
|
a.style.padding = "0px", a.style.border = "0px none";
|
|
1506
|
-
var i = this.
|
|
1508
|
+
var i = this.eb();
|
|
1507
1509
|
a.appendChild(i), this.nav.corner = i, a = n.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; };
|
|
1508
1510
|
var r = "hidden" !== this.nav.scroll.style.overflow;
|
|
1509
1511
|
if (a.appendChild(this.nav.header), r) {
|
|
@@ -1514,22 +1516,22 @@ var DayPilot = { Global: {} };
|
|
|
1514
1516
|
s.className = this.L("_cornerright_inner"), o.appendChild(s), a.appendChild(o), this.nav.cornerRight = o;
|
|
1515
1517
|
}
|
|
1516
1518
|
return e.appendChild(t), e;
|
|
1517
|
-
}, this.
|
|
1519
|
+
}, this.eb = function () { var e = document.createElement("div"); e.style.position = "relative", e.className = this.L("_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.L("_corner_inner"), e.appendChild(t), e; }, this._ = function () {
|
|
1518
1520
|
var e = this.nav.main;
|
|
1519
1521
|
e.root = null, e.onmouseup = null;
|
|
1520
1522
|
for (var t = 0; t < e.rows.length; t++)
|
|
1521
1523
|
for (var n = e.rows[t], a = 0; a < n.cells.length; a++) {
|
|
1522
1524
|
var i = n.cells[a];
|
|
1523
|
-
o.
|
|
1525
|
+
o.fb(i);
|
|
1524
1526
|
}
|
|
1525
1527
|
this.fasterDispose || DayPilot.pu(e);
|
|
1526
|
-
}, this.
|
|
1528
|
+
}, this.fb = function (e) {
|
|
1527
1529
|
e && (!function () {
|
|
1528
1530
|
var t = e, a = t.domArgs;
|
|
1529
1531
|
if (t.domArgs = null, a && "function" == typeof o.onBeforeCellDomRemove && o.onBeforeCellDomRemove(a), a && "function" == typeof o.onBeforeCellDomAdd) {
|
|
1530
|
-
var i = a && a.
|
|
1532
|
+
var i = a && a.Pa;
|
|
1531
1533
|
if (i) {
|
|
1532
|
-
o.
|
|
1534
|
+
o.Ra.Qa && n(a.element) && (o.Ra.Sa = !0, o.Ra.Ta(i), o.Ra.Sa = !1);
|
|
1533
1535
|
}
|
|
1534
1536
|
}
|
|
1535
1537
|
}(), e.root = null, e.onmousedown = null, e.onmousemove = null, e.onmouseout = null, e.onmouseup = null);
|
|
@@ -1556,7 +1558,7 @@ var DayPilot = { Global: {} };
|
|
|
1556
1558
|
a.start = t.start.addTime(m * i), a.end = a.start.addTime(i), a.resource = t.id, a.onmousedown = b.Ca, a.onmouseup = function () { return !1; }, a.onclick = function () { return !1; }, a.root = b, a.style.padding = "0px", a.style.border = "0px none", a.style.verticalAlign = "top", a.style.height = o.cellHeight + "px", a.style.overflow = "hidden", a.unselectable = "on";
|
|
1557
1559
|
var r = document.createElement("div");
|
|
1558
1560
|
r.unselectable = "on", r.style.height = o.cellHeight + "px", r.style.position = "relative", r.className = b.L("_cell");
|
|
1559
|
-
var s = b.
|
|
1561
|
+
var s = b.gb(a.start, a.end), l = { "business": s, "text": null, "html": null, "cssClass": null, "backColor": null, "backImage": null, "backRepeat": null, "fontColor": null }, d = { "start": a.start, "end": a.end, "resource": a.resource, "properties": l, "x": e, "y": m };
|
|
1560
1562
|
!function () {
|
|
1561
1563
|
if ("function" == typeof o.onBeforeCellRender) {
|
|
1562
1564
|
var e = {};
|
|
@@ -1572,11 +1574,11 @@ var DayPilot = { Global: {} };
|
|
|
1572
1574
|
if (e.control = o, e.cell = d, e.element = null, a.domArgs = e, "function" == typeof o.onBeforeCellDomAdd && o.onBeforeCellDomAdd(e), e.element) {
|
|
1573
1575
|
var t = c;
|
|
1574
1576
|
if (t) {
|
|
1575
|
-
e.
|
|
1577
|
+
e.Pa = t;
|
|
1576
1578
|
if (n(e.element)) {
|
|
1577
|
-
if (!o.
|
|
1579
|
+
if (!o.Ra.Qa)
|
|
1578
1580
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
1579
|
-
o.Sa
|
|
1581
|
+
o.Ra.Sa = !0, o.Ra.Va(e.element, t), o.Ra.Sa = !1;
|
|
1580
1582
|
}
|
|
1581
1583
|
else
|
|
1582
1584
|
t.appendChild(e.element);
|
|
@@ -1622,13 +1624,13 @@ var DayPilot = { Global: {} };
|
|
|
1622
1624
|
o.snapToGrid && (c = Math.floor((o.coords.y - v - r + i / 2) / i) * i + r), c < r && (c = r);
|
|
1623
1625
|
var p = o.nav.events, d = o.nav.main.clientHeight + r, m = parseInt(t.movingShadow.style.height);
|
|
1624
1626
|
c + m > d && (c = d - m), DayPilot.Util.addClass(t.moving, o.L("_event_moving_source")), t.movingShadow.parentNode.style.display = "none", t.movingShadow.style.top = c + "px", t.movingShadow.parentNode.style.display = "";
|
|
1625
|
-
var g = p.clientWidth / p.rows[0].cells.length, y = Math.floor((o.coords.x -
|
|
1626
|
-
y < 0 && (y = 0), y < p.rows[0].cells.length && y >= 0 && t.movingShadow.column !== y && (t.movingShadow.column = y, t.moveShadow(p.rows[0].cells[y]));
|
|
1627
|
+
var g = p.clientWidth / p.rows[0].cells.length, y = Math.floor((o.coords.x - o.hourWidth) / g);
|
|
1628
|
+
o.rtl && (y = o.Ba.length - y - 1), y < 0 && (y = 0), y < p.rows[0].cells.length && y >= 0 && t.movingShadow.column !== y && (t.movingShadow.column = y, t.moveShadow(p.rows[0].cells[y]));
|
|
1627
1629
|
}
|
|
1628
1630
|
else
|
|
1629
1631
|
DayPilot.Global.selecting && (o.Fa(), o.Ga());
|
|
1630
1632
|
}, o.nav.scrollable.style.display = "";
|
|
1631
|
-
}, this.
|
|
1633
|
+
}, this.gb = function (e) { 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.aa = function () {
|
|
1632
1634
|
var e = this.nav.header;
|
|
1633
1635
|
if (e && e.rows)
|
|
1634
1636
|
for (var t = 0; t < e.rows.length; t++)
|
|
@@ -1637,14 +1639,14 @@ var DayPilot = { Global: {} };
|
|
|
1637
1639
|
i.onclick = null, i.onmousemove = null, i.onmouseout = null;
|
|
1638
1640
|
}
|
|
1639
1641
|
this.fasterDispose || DayPilot.pu(e);
|
|
1640
|
-
}, this.
|
|
1642
|
+
}, this.hb = function (e) {
|
|
1641
1643
|
function t(t) {
|
|
1642
1644
|
var i = a[t], r = e ? n.insertCell(-1) : n.cells[t];
|
|
1643
|
-
r.data = i, r.style.overflow = "hidden", r.style.padding = "0px", r.style.border = "0px none", r.style.height = o.headerHeight + "px", r.onclick = o.
|
|
1645
|
+
r.data = i, r.style.overflow = "hidden", r.style.padding = "0px", r.style.border = "0px none", r.style.height = o.headerHeight + "px", r.onclick = o.ib;
|
|
1644
1646
|
var s, l = e ? document.createElement("div") : r.firstChild;
|
|
1645
1647
|
e ? (l.unselectable = "on", l.style.MozUserSelect = "none", l.style.cursor = "default", l.style.position = "relative", l.className = o.L("_colheader"), l.style.height = o.headerHeight + "px", o.headerTextWrappingEnabled || (l.style.whiteSpace = "nowrap"), s = document.createElement("div"), s.className = o.L("_colheader_inner"), s.unselectable = "on", l.appendChild(s), r.appendChild(l)) : s = l.firstChild;
|
|
1646
1648
|
var d = {};
|
|
1647
|
-
d.header = {}, d.header.cssClass = null, d.header.verticalAlignment = "center", d.header.horizontalAlignment = "center", d.column = o.
|
|
1649
|
+
d.header = {}, d.header.cssClass = null, d.header.verticalAlignment = "center", d.header.horizontalAlignment = "center", d.column = o.jb(i, o), "function" == typeof o.onBeforeHeaderRender && (DayPilot.Util.copyProps(i, d.header, ["id", "start", "name", "html", "backColor", "toolTip", "areas"]), o.onBeforeHeaderRender(d), DayPilot.Util.copyProps(d.header, i, ["html", "backColor", "toolTip", "areas", "cssClass", "verticalAlignment", "horizontalAlignment"])), i.toolTip && (s.title = i.toolTip), i.cssClass && DayPilot.Util.addClass(l, i.cssClass), i.backColor && (s.style.background = i.backColor), i.areas && DayPilot.Areas.attach(l, i);
|
|
1648
1650
|
var c = i.verticalAlignment;
|
|
1649
1651
|
if (c)
|
|
1650
1652
|
switch (s.style.display = "flex", c) {
|
|
@@ -1667,21 +1669,21 @@ var DayPilot = { Global: {} };
|
|
|
1667
1669
|
break;
|
|
1668
1670
|
case "right": s.style.justifyContent = "flex-end";
|
|
1669
1671
|
}
|
|
1670
|
-
l.firstChild.innerHTML = o
|
|
1672
|
+
l.firstChild.innerHTML = o.$a(i.name, i.html);
|
|
1671
1673
|
}
|
|
1672
1674
|
for (var n = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], a = this.Ba, i = a.length, r = 0; r < i; r++)
|
|
1673
1675
|
t(r);
|
|
1674
|
-
}, this.
|
|
1676
|
+
}, this.ib = function (e) {
|
|
1675
1677
|
if ("Disabled" !== o.headerClickHandling) {
|
|
1676
|
-
var t = this.data, n = o.
|
|
1678
|
+
var t = this.data, n = o.jb(t), a = {};
|
|
1677
1679
|
a.header = {}, a.header.id = t.id, a.header.name = t.name, a.header.start = t.start, a.column = n, a.originalEvent = e, a.shift = e.shiftKey, a.ctrl = e.ctrlKey, a.meta = e.metaKey, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof o.onHeaderClick && (o.onHeaderClick(a), a.preventDefault.value) || "function" == typeof o.onHeaderClicked && o.onHeaderClicked(a);
|
|
1678
1680
|
}
|
|
1679
|
-
}, this.
|
|
1681
|
+
}, this.jb = function (e) { return new DayPilot.CalendarColumn(e, o); }, this.kb = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.ja = function () {
|
|
1680
1682
|
for (var e = this.nav.header, t = !0; this.headerCreated && e && e.rows && e.rows.length > 0;)
|
|
1681
1683
|
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0);
|
|
1682
1684
|
this.headerCreated = !0;
|
|
1683
|
-
this.
|
|
1684
|
-
}, 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 n = {}; n.command = e, this.V("Command", t, n); }, this.loadingStop = function () { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.
|
|
1685
|
+
this.hb(t);
|
|
1686
|
+
}, 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 n = {}; n.command = e, this.V("Command", t, n); }, this.loadingStop = function () { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.lb = function () { var e = this.nav.scroll; e.root = this, o.mb(), e.onscroll || (e.onscroll = function () { o.nb(); }); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.ob = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && (t.style.width = e + "px"); }, this.pb = function () { t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mouseup", t.gMouseUp)); }, this.events = {}, this.events.add = function (e) {
|
|
1685
1687
|
var t = null;
|
|
1686
1688
|
if (e instanceof DayPilot.Event)
|
|
1687
1689
|
t = e.data;
|
|
@@ -1690,7 +1692,7 @@ var DayPilot = { Global: {} };
|
|
|
1690
1692
|
throw "DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";
|
|
1691
1693
|
t = e;
|
|
1692
1694
|
}
|
|
1693
|
-
o.events.list || (o.events.list = []), o.events.list.push(t), o.
|
|
1695
|
+
o.events.list || (o.events.list = []), o.events.list.push(t), o.qb({ "eventsOnly": !0 }), o.wa.notify();
|
|
1694
1696
|
}, this.events.find = function (e) {
|
|
1695
1697
|
if (!o.events.list)
|
|
1696
1698
|
return null;
|
|
@@ -1718,7 +1720,7 @@ var DayPilot = { Global: {} };
|
|
|
1718
1720
|
o.events.list.splice(n, 1, e);
|
|
1719
1721
|
}
|
|
1720
1722
|
}
|
|
1721
|
-
o.
|
|
1723
|
+
o.qb({ "eventsOnly": !0 }), o.wa.notify();
|
|
1722
1724
|
}, this.events.remove = function (e) {
|
|
1723
1725
|
var t;
|
|
1724
1726
|
if (e instanceof DayPilot.Event)
|
|
@@ -1732,7 +1734,7 @@ var DayPilot = { Global: {} };
|
|
|
1732
1734
|
n && (t = n.data);
|
|
1733
1735
|
}
|
|
1734
1736
|
var a = DayPilot.indexOf(o.events.list, t);
|
|
1735
|
-
o.events.list.splice(a, 1), o.
|
|
1737
|
+
o.events.list.splice(a, 1), o.qb({ "eventsOnly": !0 }), o.wa.notify();
|
|
1736
1738
|
}, this.events.load = function (e, t, n) {
|
|
1737
1739
|
var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof n && n(t); }, i = function (e) {
|
|
1738
1740
|
var n, i = e.request;
|
|
@@ -1747,7 +1749,7 @@ var DayPilot = { Global: {} };
|
|
|
1747
1749
|
var s = {};
|
|
1748
1750
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = n, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1749
1751
|
return;
|
|
1750
|
-
o.events.list = n, o.
|
|
1752
|
+
o.events.list = n, o.La && o.qb({ "eventsOnly": !0 });
|
|
1751
1753
|
}
|
|
1752
1754
|
};
|
|
1753
1755
|
if (o.eventsLoadMethod && "POST" === o.eventsLoadMethod.toUpperCase())
|
|
@@ -1756,28 +1758,29 @@ var DayPilot = { Global: {} };
|
|
|
1756
1758
|
var r = e, s = "start=" + o.visibleStart().toString() + "&end=" + o.visibleEnd().toString();
|
|
1757
1759
|
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": i, "error": a });
|
|
1758
1760
|
}
|
|
1759
|
-
}, this.
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1761
|
+
}, this.rb = function () {
|
|
1762
|
+
var e = o.L("_main");
|
|
1763
|
+
if (o.cssClass && (e += " " + o.cssClass), o.rtl && (e += " " + o.L("_direction_rtl")), o.nav.top.className !== e) {
|
|
1764
|
+
o.nav.top.className = e;
|
|
1765
|
+
var t = o.nav.corner;
|
|
1766
|
+
t.className = o.L("_corner"), t.firstChild.className = o.L("_corner_inner");
|
|
1767
|
+
var n = o.nav.cornerRight;
|
|
1768
|
+
n && (n.className = o.L("_cornerright"), n.firstChild.className = o.L("_cornerright_inner"));
|
|
1766
1769
|
}
|
|
1767
1770
|
}, this.update = function (e) {
|
|
1768
1771
|
if (o.Q)
|
|
1769
1772
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");
|
|
1770
|
-
o.
|
|
1771
|
-
}, this.
|
|
1772
|
-
if (this.
|
|
1773
|
+
o.sb(e), o.qb();
|
|
1774
|
+
}, this.qb = function (e) {
|
|
1775
|
+
if (this.La) {
|
|
1773
1776
|
e = e || {};
|
|
1774
1777
|
var t = !e.eventsOnly;
|
|
1775
|
-
o.
|
|
1778
|
+
o.tb(), o.Z(), o.nav.top.style.cursor = "auto", t && (o.ga(), o.ja(), o.ka(), o.la(), o.ma(), o.db(), o.ob(), o.rb(), o.mb()), o.ha(), o.ia(), o.na(), o.clearSelection(), this.visible ? this.show() : this.hide();
|
|
1776
1779
|
}
|
|
1777
|
-
}, this.
|
|
1780
|
+
}, this.ub = null, this.sb = function (e) {
|
|
1778
1781
|
if (e) {
|
|
1779
1782
|
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? o.events.list = e.list : o.events.list = e; } }, "columns": { "preInit": function () { o.columns.list = this.data; } } };
|
|
1780
|
-
this.
|
|
1783
|
+
this.ub = t;
|
|
1781
1784
|
for (var n in e)
|
|
1782
1785
|
if (t[n]) {
|
|
1783
1786
|
var a = t[n];
|
|
@@ -1786,13 +1789,13 @@ var DayPilot = { Global: {} };
|
|
|
1786
1789
|
else
|
|
1787
1790
|
o[n] = e[n];
|
|
1788
1791
|
}
|
|
1789
|
-
}, this.
|
|
1790
|
-
var e = this.
|
|
1792
|
+
}, this.vb = function () {
|
|
1793
|
+
var e = this.ub;
|
|
1791
1794
|
for (var t in e) {
|
|
1792
1795
|
var n = e[t];
|
|
1793
1796
|
n.postInit && n.postInit();
|
|
1794
1797
|
}
|
|
1795
|
-
}, this.
|
|
1798
|
+
}, this.wb = function () {
|
|
1796
1799
|
if (this.id && this.id.tagName)
|
|
1797
1800
|
this.nav.top = this.id;
|
|
1798
1801
|
else {
|
|
@@ -1801,8 +1804,8 @@ var DayPilot = { Global: {} };
|
|
|
1801
1804
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
1802
1805
|
throw "DayPilot.Calendar: The placeholder element not found: '" + e + "'.";
|
|
1803
1806
|
}
|
|
1804
|
-
}, this.
|
|
1805
|
-
var t = this.
|
|
1807
|
+
}, this.xb = {}, this.xb.events = [], this.yb = function (e) {
|
|
1808
|
+
var t = this.xb.events, n = this.events.list[e], a = {};
|
|
1806
1809
|
for (var i in n)
|
|
1807
1810
|
a[i] = n[i];
|
|
1808
1811
|
if (a.start = new DayPilot.Date(n.start), a.end = new DayPilot.Date(n.end), "function" == typeof this.onBeforeEventRender) {
|
|
@@ -1812,7 +1815,7 @@ var DayPilot = { Global: {} };
|
|
|
1812
1815
|
t[e] = a;
|
|
1813
1816
|
}, this.ha = function () {
|
|
1814
1817
|
var e = this.events.list;
|
|
1815
|
-
if (o.
|
|
1818
|
+
if (o.xb.events = [], e) {
|
|
1816
1819
|
if (!DayPilot.isArray(e))
|
|
1817
1820
|
throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: " + typeof e);
|
|
1818
1821
|
var t = e.length, n = 864e5;
|
|
@@ -1832,7 +1835,7 @@ var DayPilot = { Global: {} };
|
|
|
1832
1835
|
}
|
|
1833
1836
|
if ("function" == typeof this.onBeforeEventRender)
|
|
1834
1837
|
for (var i = 0; i < t; i++)
|
|
1835
|
-
this.
|
|
1838
|
+
this.yb(i);
|
|
1836
1839
|
for (var i = 0; i < this.Ba.length; i++) {
|
|
1837
1840
|
var l = {};
|
|
1838
1841
|
l.minEnd = 1e6, l.maxStart = -1, this.scrollLabels.push(l);
|
|
@@ -1852,21 +1855,21 @@ var DayPilot = { Global: {} };
|
|
|
1852
1855
|
var D = _.boxBottom, S = "Always" === o.useEventBoxes;
|
|
1853
1856
|
S ? (w.part.top = Math.floor(C / this.cellHeight) * this.cellHeight + 1, w.part.height = Math.max(Math.ceil(D / this.cellHeight) * this.cellHeight - w.part.top, this.cellHeight - 1) + 1) : (w.part.top = C + 1, w.part.height = k - C), w.part.barTop = Math.max(C - w.part.top - 1, 0), w.part.barHeight = Math.max(k - C - 2, 1);
|
|
1854
1857
|
var M = w.part.top, T = w.part.top + w.part.height;
|
|
1855
|
-
M > l.maxStart && (l.maxStart = M), T < l.minEnd && (l.minEnd = T), M < this.minStart && (this.minStart = M), T > this.maxEnd && (this.maxEnd = T), d.events.push(w), "function" == typeof this.onBeforeEventRender && (w.cache = this.
|
|
1858
|
+
M > l.maxStart && (l.maxStart = M), T < l.minEnd && (l.minEnd = T), M < this.minStart && (this.minStart = M), T > this.maxEnd && (this.maxEnd = T), d.events.push(w), "function" == typeof this.onBeforeEventRender && (w.cache = this.xb.events[v]), w.part.start.getTime() === g && w.part.end.getTime() === y && (a[v] = !0);
|
|
1856
1859
|
}
|
|
1857
1860
|
}
|
|
1858
1861
|
}
|
|
1859
1862
|
}
|
|
1860
1863
|
for (var i = 0; i < this.Ba.length; i++) {
|
|
1861
1864
|
var d = this.Ba[i];
|
|
1862
|
-
d.events.sort(this.
|
|
1865
|
+
d.events.sort(this.zb);
|
|
1863
1866
|
for (var v = 0; v < d.events.length; v++) {
|
|
1864
1867
|
var r = d.events[v];
|
|
1865
1868
|
d.putIntoBlock(r);
|
|
1866
1869
|
}
|
|
1867
1870
|
for (var v = 0; v < d.blocks.length; v++) {
|
|
1868
1871
|
var A = d.blocks[v];
|
|
1869
|
-
A.events.sort(this.
|
|
1872
|
+
A.events.sort(this.zb);
|
|
1870
1873
|
for (var E = 0; E < A.events.length; E++) {
|
|
1871
1874
|
var r = A.events[E];
|
|
1872
1875
|
A.putIntoLine(r);
|
|
@@ -1874,7 +1877,7 @@ var DayPilot = { Global: {} };
|
|
|
1874
1877
|
}
|
|
1875
1878
|
}
|
|
1876
1879
|
}
|
|
1877
|
-
}, this.
|
|
1880
|
+
}, this.zb = function (e, t) {
|
|
1878
1881
|
if (!(e && t && e.start && t.start))
|
|
1879
1882
|
return 0;
|
|
1880
1883
|
var n = e.start().getTime() - t.start().getTime();
|
|
@@ -1888,42 +1891,42 @@ var DayPilot = { Global: {} };
|
|
|
1888
1891
|
var o = 60 * i * 1e3, l = a - n, d = l % o, c = l - d, u = c + o;
|
|
1889
1892
|
0 === d && (u = c);
|
|
1890
1893
|
var h = {};
|
|
1891
|
-
return h.cut = !1, h.top = this.
|
|
1892
|
-
}, this.
|
|
1893
|
-
if (o.nav.scroll && o.
|
|
1894
|
+
return h.cut = !1, h.top = this.Ab(l), h.boxTop = this.Ab(c), h.boxBottom = this.Ab(u), this.cache.pixels[a + "_" + n] = h, h;
|
|
1895
|
+
}, this.Ab = function (e) { return Math.floor(this.cellHeight * e / (6e4 * s.fa())); }, this.tb = function () { this.startDate = new DayPilot.Date(this.startDate).getDatePart(); }, this.ia = function () { this.nav.corner && (this.nav.corner.style.height = this.headerHeight + "px"); }, this.ma = function () { var e = this.Xa(); this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px"); }, this.wa = {}, this.wa.scope = null, this.wa.notify = function () { o.wa.scope && o.wa.scope["$apply"](); }, this.wa.apply = function (e) { e(); }, this.nb = function () {
|
|
1896
|
+
if (o.nav.scroll && o.Bb()) {
|
|
1894
1897
|
var e = o.nav.scroll.scrollTop, t = s.fa(), n = 60 / t, a = e / (n * o.cellHeight);
|
|
1895
|
-
o.
|
|
1898
|
+
o.Cb.scrollHour = a;
|
|
1896
1899
|
}
|
|
1897
|
-
}, this.
|
|
1898
|
-
for (var e = this.
|
|
1900
|
+
}, this.mb = function () { var e = 0, t = 60 / s.fa(); e = "number" == typeof o.Cb.scrollHour ? t * o.cellHeight * o.Cb.scrollHour : "Auto" === o.initScrollPos ? "BusinessHours" === this.heightSpec ? t * this.cellHeight * this.businessBeginsHour : 0 : this.initScrollPos; var n = o.nav.top; "none" === n.style.display ? (n.style.display = "", o.nav.scroll.scrollTop = e, n.style.display = "none") : o.nav.scroll.scrollTop = e; }, this.getScrollY = function () { return o.nav.scroll.scrollTop; }, this.setScrollY = function (e) { o.nav.scroll.scrollTop = e, o.nb(); }, this.Db = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof o.events.list || !o.events.list); }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { o.visible = !0, o.nav.top.style.display = "", this.ob(); }, this.hide = function () { o.visible = !1, o.nav.top.style.display = "none"; }, this.Eb = function () { this.tb(), this.ga(), this.Wa(), this.ja(), this.ka(), this.ob(), this.lb(), this.pb(), t.register(this), this.Fb(), this.V("Init"); }, this.Cb = {}, this.Gb = function () { this.Cb.themes = [], this.Cb.themes.push(this.theme || this.cssClassPrefix); }, this.Hb = function () {
|
|
1901
|
+
for (var e = this.Cb.themes, t = 0; t < e.length; t++) {
|
|
1899
1902
|
var n = e[t];
|
|
1900
1903
|
DayPilot.Util.removeClass(this.nav.top, n + "_main");
|
|
1901
1904
|
}
|
|
1902
|
-
this.
|
|
1903
|
-
}, this.
|
|
1905
|
+
this.Cb.themes = [];
|
|
1906
|
+
}, this.Ib = function () {
|
|
1904
1907
|
if (this.afterRender(null, !1), "function" == typeof this.onAfterRender) {
|
|
1905
1908
|
var e = {};
|
|
1906
1909
|
e.isCallBack = !1, this.onAfterRender(e);
|
|
1907
1910
|
}
|
|
1908
|
-
}, this.
|
|
1909
|
-
if ("function" == typeof this.onInit && !this.
|
|
1910
|
-
this.
|
|
1911
|
+
}, this.Jb = function () {
|
|
1912
|
+
if ("function" == typeof this.onInit && !this.Kb) {
|
|
1913
|
+
this.Kb = !0;
|
|
1911
1914
|
var e = {};
|
|
1912
1915
|
this.onInit(e);
|
|
1913
1916
|
}
|
|
1914
|
-
}, this.
|
|
1915
|
-
var a = o.
|
|
1917
|
+
}, this.Bb = function () { var e = o.nav.top; return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0); }, this.Fb = function () { var e = o.Bb; e() || (o.Y = setInterval(function () { e() && (o.lb(), o.ob(), clearInterval(o.Y)); }, 100)); }, this.$a = function (e, t) { return o.R.da() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Ra = {}, this.Ra.Qa = null, this.Ra.Lb = function (e, t, n) {
|
|
1918
|
+
var a = o.Ra.Qa;
|
|
1916
1919
|
if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
1917
1920
|
var i = a.createVNode(e, n);
|
|
1918
1921
|
a.render(i, t);
|
|
1919
1922
|
}
|
|
1920
|
-
}, this.
|
|
1921
|
-
var n = o.
|
|
1923
|
+
}, this.Ra.Va = function (e, t) {
|
|
1924
|
+
var n = o.Ra.Qa;
|
|
1922
1925
|
if ("function" == typeof n.render) {
|
|
1923
1926
|
var a = e;
|
|
1924
1927
|
DayPilot.isArray(e) && (a = n.h("div", null, e)), n.render(a, t);
|
|
1925
1928
|
}
|
|
1926
|
-
}, this.
|
|
1929
|
+
}, this.Ra.Ta = function (e) { var t = o.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = o.sb, this.internal.xssTextHtml = o.$a, this.internal.enableVue = function (e) { o.Ra.Qa = e; }, this.internal.vueRef = function () { return o.Ra.Qa; }, this.internal.vueRendering = function () { return o.Ra.Sa; }, this.init = function () { this.wb(); var e = this.Db(); return this.Gb(), e ? void this.Eb() : (this.tb(), this.ga(), this.ha(), this.Wa(), this.ja(), this.ka(), this.u(), this.ob(), this.lb(), this.pb(), t.register(this), this.events && (this.ia(), this.na()), this.Ib(), this.Jb(), this.Fb(), this.La = !0, this); }, this.Init = this.init, this.sb(i);
|
|
1927
1930
|
}, DayPilot.CalendarColumn = function (e, t) { var n = this; n.id = e.id, n.name = e.name, n.data = e.data, n.start = new DayPilot.Date(e.start), n.calendar = t, n.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) {
|
|
1928
1931
|
e.fn.daypilotCalendar = function (e) {
|
|
1929
1932
|
var t = null, n = this.each(function () {
|
|
@@ -1955,7 +1958,7 @@ var DayPilot = { Global: {} };
|
|
|
1955
1958
|
l.call(t, d, function (e) {
|
|
1956
1959
|
for (var t in e)
|
|
1957
1960
|
i[t] = e[t];
|
|
1958
|
-
i.update(), i.
|
|
1961
|
+
i.update(), i.Jb();
|
|
1959
1962
|
}, !0), l.call(t, c, function (e) { i.events.list = e, i.update(); }, !0);
|
|
1960
1963
|
} };
|
|
1961
1964
|
}]);
|
|
@@ -1969,7 +1972,7 @@ var DayPilot = { Global: {} };
|
|
|
1969
1972
|
if (this.locale = "en-us", this.target = null, this.targetAlignment = "left", this.resetTarget = !0, this.pattern = this.R.locale().datePattern, this.theme = "navigator_default", this.patterns = [], this.zIndex = null, this.showToday = !0, this.todayText = "Today", this.weekStarts = "Auto", e)
|
|
1970
1973
|
for (var t in e)
|
|
1971
1974
|
this[t] = e[t];
|
|
1972
|
-
}, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.
|
|
1975
|
+
}, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.Mb(); this.resetTarget && !e ? this.Nb(this.date) : !this.resetTarget && e && (n.date = e); var t = this.D(); return t && t.addEventListener("input", function () { n.date = n.Mb(), n.date && n.navigator.select(n.date, { dontNotify: !0 }); }), this; }, this.close = function () { document.removeEventListener("mousedown", n.close), document.removeEventListener("wheel", n.close), window.removeEventListener("resize", n.close), n.Bb && (n.Bb = !1, n.navigator && n.navigator.dispose(), n.div.innerHTML = "", n.div && n.div.parentNode === document.body && document.body.removeChild(n.div)); }, this.Ob = function (e) { this.date = new DayPilot.Date(e), this.Nb(this.date); }, this.select = function (e) { var t = {}; t.date = new DayPilot.Date(e), t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onTimeRangeSelect && (n.onTimeRangeSelect(t), t.preventDefault.value) || (this.Ob(e), "function" == typeof n.onTimeRangeSelected && n.onTimeRangeSelected(t)); }, this.Mb = function () {
|
|
1973
1976
|
var e = this.D();
|
|
1974
1977
|
if (!e)
|
|
1975
1978
|
return this.date;
|
|
@@ -1982,29 +1985,29 @@ var DayPilot = { Global: {} };
|
|
|
1982
1985
|
a = DayPilot.Date.parse(t, n.patterns[i]);
|
|
1983
1986
|
}
|
|
1984
1987
|
return a;
|
|
1985
|
-
}, this.
|
|
1988
|
+
}, this.Nb = function (e) {
|
|
1986
1989
|
var t = this.D();
|
|
1987
1990
|
if (t) {
|
|
1988
1991
|
var a = e.toString(n.pattern, n.locale);
|
|
1989
1992
|
"INPUT" === t.tagName ? t.value = a : t.innerHTML = a;
|
|
1990
1993
|
}
|
|
1991
|
-
}, this.R = {}, this.R.locale = function () { return DayPilot.Locale.find(n.locale); }, this.D = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return n.
|
|
1992
|
-
if (!this.
|
|
1994
|
+
}, this.R = {}, this.R.locale = function () { return DayPilot.Locale.find(n.locale); }, this.D = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return n.Bb; } }), this.show = function () {
|
|
1995
|
+
if (!this.Bb) {
|
|
1993
1996
|
document.addEventListener("mousedown", n.close), document.addEventListener("wheel", n.close), window.addEventListener("resize", n.close);
|
|
1994
1997
|
var e = this.D(), a = new DayPilot.Navigator(t);
|
|
1995
|
-
a.api = 2, a.cssOnly = !0, a.theme = n.theme, a.weekStarts = "Auto", a.locale = n.locale, a.showToday = n.showToday, a.todayText = n.todayText, a.weekStarts = n.weekStarts, a.onTodayClick = function (e) { a.onTimeRangeSelected({ start: DayPilot.Date.today() }), e.preventDefault(); }, a.onTimeRangeSelected = function (e) { n.date = e.start; var t = e.start.addTime(a.
|
|
1998
|
+
a.api = 2, a.cssOnly = !0, a.theme = n.theme, a.weekStarts = "Auto", a.locale = n.locale, a.showToday = n.showToday, a.todayText = n.todayText, a.weekStarts = n.weekStarts, a.onTodayClick = function (e) { a.onTimeRangeSelected({ start: DayPilot.Date.today() }), e.preventDefault(); }, a.onTimeRangeSelected = function (e) { n.date = e.start; var t = e.start.addTime(a.Pb), i = t.toString(n.pattern, n.locale), r = {}; r.start = t, r.date = t, r.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onTimeRangeSelect && (n.onTimeRangeSelect(r), r.preventDefault.value) || (n.Nb(i), n.close(), "function" == typeof n.onTimeRangeSelected && n.onTimeRangeSelected(r)); }, this.navigator = a;
|
|
1996
1999
|
var i = { x: 0, y: 0, w: 0, h: 0 };
|
|
1997
2000
|
e && (i = DayPilot.abs(e));
|
|
1998
2001
|
var r = i.h, o = n.targetAlignment, s = document.createElement("div");
|
|
1999
2002
|
s.style.position = "absolute", "left" === o && (s.style.left = i.x + "px"), s.style.top = i.y + r + "px", n.zIndex && (s.style.zIndex = n.zIndex);
|
|
2000
2003
|
var l = document.createElement("div");
|
|
2001
2004
|
l.id = t, s.appendChild(l), s.addEventListener("mousedown", function (e) { e.stopPropagation(); }), document.body.appendChild(s), this.div = s;
|
|
2002
|
-
var d = n.
|
|
2003
|
-
if (a.startDate = d, a.
|
|
2005
|
+
var d = n.Mb() || n.date;
|
|
2006
|
+
if (a.startDate = d, a.Pb = d.getTimePart(), a.selectionDay = d.getDatePart(), a.init(), "right" === o) {
|
|
2004
2007
|
var c = i.x + i.w - a.nav.top.offsetWidth;
|
|
2005
2008
|
s.style.left = c + "px";
|
|
2006
2009
|
}
|
|
2007
|
-
if (this.
|
|
2010
|
+
if (this.Bb = !0, this.onShow) {
|
|
2008
2011
|
var u = {};
|
|
2009
2012
|
this.onShow(u);
|
|
2010
2013
|
}
|
|
@@ -2018,10 +2021,10 @@ var DayPilot = { Global: {} };
|
|
|
2018
2021
|
var a = this, i = null;
|
|
2019
2022
|
this.v = "${v}", 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;
|
|
2020
2023
|
var r = DayPilot.isArray(n) ? null : n;
|
|
2021
|
-
if (this.
|
|
2024
|
+
if (this.Qb = function () { }, n && DayPilot.isArray(n) && (this.items = n), this.toJSON = function () { return null; }, this.show = function (n, r) {
|
|
2022
2025
|
r = r || {};
|
|
2023
2026
|
var o = null;
|
|
2024
|
-
if (n ? "string" == typeof n.id || "number" == typeof n.id ? o = n.id : "function" == typeof n.id ? o = n.id() : "function" == typeof n.value && (o = n.value()) : o = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), r.submenu || t.menuClean(), this.
|
|
2027
|
+
if (n ? "string" == typeof n.id || "number" == typeof n.id ? o = n.id : "function" == typeof n.id ? o = n.id() : "function" == typeof n.value && (o = n.value()) : o = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), r.submenu || t.menuClean(), this.Qb.submenu = null, null !== t.mouse) {
|
|
2025
2028
|
a.cssOnly || (a.cssOnly = !0);
|
|
2026
2029
|
var s = null;
|
|
2027
2030
|
if (n && n.isRow && n.$.row.task ? (s = new DayPilot.Task(n.$.row.task, n.calendar), s.menuType = "resource") : s = n && n.isEvent && n.data.task ? new DayPilot.Task(n, n.calendar) : n, "function" == typeof a.onShow) {
|
|
@@ -2030,15 +2033,15 @@ var DayPilot = { Global: {} };
|
|
|
2030
2033
|
return;
|
|
2031
2034
|
}
|
|
2032
2035
|
var d = document.createElement("div");
|
|
2033
|
-
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.
|
|
2036
|
+
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.Rb("main"), d.onclick = function (e) { e.cancelBubble = !0, this.parentNode.removeChild(this); }, this.hideOnMouseOut && (d.onmousemove = function () { clearTimeout(t.hideTimeout); }, d.onmouseleave = function () { a.delayedHide({ "hideParent": !0 }); }), !this.items || 0 === this.items.length)
|
|
2034
2037
|
throw "No menu items defined.";
|
|
2035
2038
|
if (this.showMenuTitle) {
|
|
2036
2039
|
var c = document.createElement("div");
|
|
2037
|
-
c.innerHTML = this.menuTitle, c.className = this.
|
|
2040
|
+
c.innerHTML = this.menuTitle, c.className = this.Rb("title"), d.appendChild(c);
|
|
2038
2041
|
}
|
|
2039
2042
|
for (var u = 0; u < this.items.length; u++) {
|
|
2040
2043
|
var h = this.items[u], f = document.createElement("div");
|
|
2041
|
-
if (DayPilot.Util.addClass(f, this.
|
|
2044
|
+
if (DayPilot.Util.addClass(f, this.Rb("item")), h.items && (DayPilot.Util.addClass(f, this.Rb("item_haschildren")), DayPilot.Util.addClass(d, this.Rb("withchildren"))), "undefined" != typeof h && !h.hidden) {
|
|
2042
2045
|
if ("-" === h.text) {
|
|
2043
2046
|
var v = document.createElement("div");
|
|
2044
2047
|
v.addEventListener("click", function (e) { e.stopPropagation(); }), f.appendChild(v);
|
|
@@ -2046,7 +2049,7 @@ var DayPilot = { Global: {} };
|
|
|
2046
2049
|
else {
|
|
2047
2050
|
var p = document.createElement("a");
|
|
2048
2051
|
if (p.style.position = "relative", p.style.display = "block", h.cssClass && DayPilot.Util.addClass(p, h.cssClass), h.disabled)
|
|
2049
|
-
DayPilot.Util.addClass(p, a.
|
|
2052
|
+
DayPilot.Util.addClass(p, a.Rb("item_disabled"));
|
|
2050
2053
|
else {
|
|
2051
2054
|
if (h.onclick || h.onClick) {
|
|
2052
2055
|
p.item = h, p.onclick = function (e, t) {
|
|
@@ -2074,7 +2077,7 @@ var DayPilot = { Global: {} };
|
|
|
2074
2077
|
DayPilot.reNonPassive(p, "touchstart", m(h, p)), DayPilot.reNonPassive(p, "touchend", g(h, p));
|
|
2075
2078
|
}
|
|
2076
2079
|
if (h.items && !h.disabled) {
|
|
2077
|
-
var y = function (e, t) { return function (n) { n.preventDefault(), n.stopPropagation(), a.
|
|
2080
|
+
var y = function (e, t) { return function (n) { n.preventDefault(), n.stopPropagation(), a.Sb(e, t); }; };
|
|
2078
2081
|
p.ontouchend = y(h, p);
|
|
2079
2082
|
}
|
|
2080
2083
|
if (h.onclick)
|
|
@@ -2112,13 +2115,13 @@ var DayPilot = { Global: {} };
|
|
|
2112
2115
|
}
|
|
2113
2116
|
h.items && p.addEventListener("click", function (e) { e.stopPropagation(); }), p.source = s, p.menuSource = n;
|
|
2114
2117
|
var b = document.createElement("span");
|
|
2115
|
-
if (b.className = a.
|
|
2118
|
+
if (b.className = a.Rb("item_text"), b.innerHTML = DayPilot.Util.escapeTextHtml(h.text, h.html), p.appendChild(b), h.image) {
|
|
2116
2119
|
var w = document.createElement("img");
|
|
2117
2120
|
w.src = h.image, w.style.position = "absolute", w.style.top = "0px", w.style.left = "0px", p.appendChild(w);
|
|
2118
2121
|
}
|
|
2119
2122
|
if (h.icon) {
|
|
2120
2123
|
var x = document.createElement("span");
|
|
2121
|
-
x.className = a.
|
|
2124
|
+
x.className = a.Rb("item_icon");
|
|
2122
2125
|
var _ = document.createElement("i");
|
|
2123
2126
|
_.className = h.icon, x.appendChild(_), p.appendChild(x);
|
|
2124
2127
|
}
|
|
@@ -2128,7 +2131,7 @@ var DayPilot = { Global: {} };
|
|
|
2128
2131
|
var D = document.createElementNS(C, "use");
|
|
2129
2132
|
D.setAttribute("href", h.symbol), k.appendChild(D);
|
|
2130
2133
|
var S = document.createElement("span");
|
|
2131
|
-
S.className = a.
|
|
2134
|
+
S.className = a.Rb("item_symbol"), S.style.position = "absolute", S.style.top = "0px", S.style.left = "0px", S.appendChild(k), p.appendChild(S);
|
|
2132
2135
|
}
|
|
2133
2136
|
var M = function (e, n) {
|
|
2134
2137
|
return function () {
|
|
@@ -2138,7 +2141,7 @@ var DayPilot = { Global: {} };
|
|
|
2138
2141
|
return;
|
|
2139
2142
|
clearTimeout(r.timeout), t.waitingSubmenu = null;
|
|
2140
2143
|
}
|
|
2141
|
-
e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = i, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.
|
|
2144
|
+
e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = i, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.Sb(i, n); }, 300));
|
|
2142
2145
|
};
|
|
2143
2146
|
};
|
|
2144
2147
|
p.onmouseover = M(h, p), f.appendChild(p);
|
|
@@ -2147,10 +2150,10 @@ var DayPilot = { Global: {} };
|
|
|
2147
2150
|
}
|
|
2148
2151
|
}
|
|
2149
2152
|
var T = function () { window.setTimeout(function () { t.menuClean(), DayPilot.MenuBar.deactivate(); }, 100); };
|
|
2150
|
-
d.onclick = T, d.ontouchend = T, d.onmousedown = function (e) { e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.
|
|
2153
|
+
d.onclick = T, d.ontouchend = T, d.onmousedown = function (e) { e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.Qb.visible = !0, a.Qb.source = n, d.style.display = "";
|
|
2151
2154
|
var A = d.offsetHeight, E = d.offsetWidth;
|
|
2152
2155
|
d.style.display = "none";
|
|
2153
|
-
var H = document.documentElement.clientHeight,
|
|
2156
|
+
var H = document.documentElement.clientHeight, R = window.innerWidth, N = "number" == typeof r.windowMargin ? r.windowMargin : 5;
|
|
2154
2157
|
if (function () {
|
|
2155
2158
|
var e = r.initiator;
|
|
2156
2159
|
if (e) {
|
|
@@ -2163,39 +2166,39 @@ var DayPilot = { Global: {} };
|
|
|
2163
2166
|
}(), function () {
|
|
2164
2167
|
var e = "number" == typeof r.x ? r.x : t.mouse.x + 1, n = "number" == typeof r.y ? r.y : t.mouse.y + 1, i = document.body.scrollTop || document.documentElement.scrollTop, o = document.body.scrollLeft || document.documentElement.scrollLeft, s = 0, l = 0;
|
|
2165
2168
|
if (n - i > H - A && 0 !== H) {
|
|
2166
|
-
s = n - (n - i - (H - A) +
|
|
2169
|
+
s = n - (n - i - (H - A) + N);
|
|
2167
2170
|
}
|
|
2168
2171
|
else
|
|
2169
2172
|
s = n;
|
|
2170
|
-
if (a.
|
|
2171
|
-
l = e - (e - o - (
|
|
2173
|
+
if (a.Qb.y = s, d.style.top = s + "px", "right" === r.align && (e -= E), e - o > R - E && 0 !== R) {
|
|
2174
|
+
l = e - (e - o - (R - E) + N);
|
|
2172
2175
|
}
|
|
2173
2176
|
else
|
|
2174
2177
|
l = e;
|
|
2175
|
-
a.
|
|
2178
|
+
a.Qb.x = l, d.style.left = l + "px";
|
|
2176
2179
|
}(), r.parentLink) {
|
|
2177
|
-
var I = r.parentLink, L = parseInt(new DayPilot.StyleReader(d).get("border-top-width")), P = DayPilot.abs(r.parentLink.parentNode),
|
|
2178
|
-
|
|
2180
|
+
var I = r.parentLink, L = parseInt(new DayPilot.StyleReader(d).get("border-top-width")), P = DayPilot.abs(r.parentLink.parentNode), B = P.x + I.offsetWidth, z = P.y - L;
|
|
2181
|
+
B + E > R && (B = Math.max(0, P.x - E));
|
|
2179
2182
|
var U = document.body.scrollTop + document.documentElement.scrollTop;
|
|
2180
|
-
|
|
2183
|
+
z + A - U > H && (z = Math.max(0, H - A + U)), d.style.left = B + "px", d.style.top = z + "px";
|
|
2181
2184
|
}
|
|
2182
|
-
d.style.display = "", this.addShadow(d), this.
|
|
2185
|
+
d.style.display = "", this.addShadow(d), this.Qb.div = d, r.submenu || (DayPilot.Menu.active = this);
|
|
2183
2186
|
}
|
|
2184
2187
|
}, this.update = function () {
|
|
2185
|
-
if (a.
|
|
2186
|
-
var e = a.
|
|
2187
|
-
a.hide(), a.show(e, { "x": a.
|
|
2188
|
+
if (a.Qb.visible) {
|
|
2189
|
+
var e = a.Qb.source;
|
|
2190
|
+
a.hide(), a.show(e, { "x": a.Qb.x, "y": a.Qb.y });
|
|
2188
2191
|
}
|
|
2189
|
-
}, this.
|
|
2192
|
+
}, this.Sb = function (e, t) {
|
|
2190
2193
|
var n = e, i = t.source;
|
|
2191
|
-
if ((!a.
|
|
2194
|
+
if ((!a.Qb.submenu || a.Qb.submenu.item !== e) && (a.Qb.submenu && a.Qb.submenu.item !== e && (DayPilot.Util.removeClass(a.Qb.submenu.link.parentNode, a.Rb("item_haschildren_active")), a.Qb.submenu.menu.hide(), a.Qb.submenu = null), e.items)) {
|
|
2192
2195
|
var r = a.cloneOptions();
|
|
2193
|
-
r.items = e.items, a.
|
|
2196
|
+
r.items = e.items, a.Qb.submenu = {}, a.Qb.submenu.menu = new DayPilot.Menu(r), a.Qb.submenu.menu.Tb = a, a.Qb.submenu.menu.show(i, { "submenu": !0, "parentLink": t, "parentItem": n }), a.Qb.submenu.item = e, a.Qb.submenu.link = t, DayPilot.Util.addClass(t.parentNode, a.Rb("item_haschildren_active"));
|
|
2194
2197
|
}
|
|
2195
|
-
}, this.
|
|
2196
|
-
e = e || {}, this.
|
|
2198
|
+
}, this.Rb = function (e) { var t = this.theme || this.cssClassPrefix, n = this.cssOnly ? "_" : ""; return t ? t + n + e : ""; }, this.cloneOptions = function () { return DayPilot.Util.copyProps(r, {}, ["cssClassPrefix", "theme", "hideAfter", "hideOnMouseOut", "zIndex"]); }, this.hide = function (e) {
|
|
2199
|
+
e = e || {}, this.Qb.submenu && this.Qb.submenu.menu.hide();
|
|
2197
2200
|
var n = t.waitingSubmenu;
|
|
2198
|
-
if (n && (t.waitingSubmenu = null, clearTimeout(n.timeout)), this.removeShadow(), this.
|
|
2201
|
+
if (n && (t.waitingSubmenu = null, clearTimeout(n.timeout)), this.removeShadow(), this.Qb.div && this.Qb.div.parentNode === document.body && document.body.removeChild(this.Qb.div), i && (DayPilot.de(i), i = null), a.Qb.visible = !1, a.Qb.source = null, a.Tb && e.hideParent && a.Tb.hide(e), DayPilot.Menu.active === a && (DayPilot.Menu.active = null), "function" == typeof this.onHide) {
|
|
2199
2202
|
var r = {};
|
|
2200
2203
|
this.onHide(r);
|
|
2201
2204
|
}
|
|
@@ -2204,31 +2207,31 @@ var DayPilot = { Global: {} };
|
|
|
2204
2207
|
this[o] = r[o];
|
|
2205
2208
|
}, DayPilot.MenuBar = function (e, t) {
|
|
2206
2209
|
var n = this;
|
|
2207
|
-
t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.l = null, this.
|
|
2210
|
+
t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.l = null, this.La = !1;
|
|
2208
2211
|
for (var a in t)
|
|
2209
2212
|
this[a] = t[a];
|
|
2210
|
-
this.
|
|
2213
|
+
this.Ub = function (e) { return this.theme + "_" + e; }, this.u = function () {
|
|
2211
2214
|
this.nav.top = document.getElementById(e);
|
|
2212
2215
|
var t = this.nav.top;
|
|
2213
|
-
t.className = this.
|
|
2216
|
+
t.className = this.Ub("main"), DayPilot.list(n.items).forEach(function (e) {
|
|
2214
2217
|
var a = document.createElement("span");
|
|
2215
|
-
a.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), a.className = n.
|
|
2218
|
+
a.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), a.className = n.Ub("item"), e.cssClass && a.classList.add(e.cssClass), a.data = e, a.onclick = function (t) {
|
|
2216
2219
|
if (n.active && n.active.item === e)
|
|
2217
|
-
n.
|
|
2220
|
+
n.Vb();
|
|
2218
2221
|
else if (e.children)
|
|
2219
|
-
return void n.
|
|
2222
|
+
return void n.Wb(a);
|
|
2220
2223
|
if ("function" == typeof e.onClick) {
|
|
2221
2224
|
var i = {};
|
|
2222
2225
|
i.item = e, i.originalEvent = t, e.onClick(i);
|
|
2223
2226
|
}
|
|
2224
|
-
}, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { n.active && n.active.item !== e && n.
|
|
2227
|
+
}, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { n.active && n.active.item !== e && n.Wb(a); }, t.appendChild(a), n.elements.items.push(a);
|
|
2225
2228
|
});
|
|
2226
|
-
}, this.
|
|
2227
|
-
if (!n.
|
|
2228
|
-
n.
|
|
2229
|
+
}, this.Vb = function () { var e = n.Ub("item_active"); n.elements.items.forEach(function (t) { DayPilot.Util.removeClass(t, e); }), n.active && n.active.menu && n.active.menu.hide(), n.active = null; }, this.Xb = function (e) { return !!n.active && n.active.item === e.data; }, this.Wb = function (e) {
|
|
2230
|
+
if (!n.Xb(e)) {
|
|
2231
|
+
n.Vb();
|
|
2229
2232
|
var t = e.data, a = n.active = {};
|
|
2230
2233
|
a.item = t, a.div = e;
|
|
2231
|
-
var i = n.
|
|
2234
|
+
var i = n.Ub("item_active");
|
|
2232
2235
|
DayPilot.Util.addClass(e, i);
|
|
2233
2236
|
var r = DayPilot.abs(e);
|
|
2234
2237
|
if (t.children) {
|
|
@@ -2238,8 +2241,8 @@ var DayPilot = { Global: {} };
|
|
|
2238
2241
|
}
|
|
2239
2242
|
DayPilot.MenuBar.active = n;
|
|
2240
2243
|
}
|
|
2241
|
-
}, this.init = function () { return this.u(), this.
|
|
2242
|
-
}, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.
|
|
2244
|
+
}, this.init = function () { return this.u(), this.La = !0, this; }, this.dispose = function () { this.La && (this.nav.top.innerHTML = "", this.elements.items = []); };
|
|
2245
|
+
}, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.Vb(), 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 () { "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate()); }, t.wheel = function () { "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate()); }, t.resize = function () { "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 () { }, t.touchPosition = function (e) {
|
|
2243
2246
|
if (!e || !e.touches)
|
|
2244
2247
|
return null;
|
|
2245
2248
|
var t = e.touches[0], n = {};
|
|
@@ -2248,7 +2251,7 @@ var DayPilot = { Global: {} };
|
|
|
2248
2251
|
if (e = e || {}, e.calendar) {
|
|
2249
2252
|
var n = DayPilot.Menu.active;
|
|
2250
2253
|
if (n) {
|
|
2251
|
-
var a = n.
|
|
2254
|
+
var a = n.Qb.source;
|
|
2252
2255
|
a && a.calendar === e.calendar && t.menuClean();
|
|
2253
2256
|
}
|
|
2254
2257
|
}
|
|
@@ -2268,7 +2271,7 @@ var DayPilot = { Global: {} };
|
|
|
2268
2271
|
}
|
|
2269
2272
|
}
|
|
2270
2273
|
function t(e) {
|
|
2271
|
-
this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.
|
|
2274
|
+
this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.yc = [], this.zc = null, this.canceling = !1, this.Ac = [], this.f = [], this.Bc = null, e = e || {};
|
|
2272
2275
|
for (var t in e)
|
|
2273
2276
|
this[t] = e[t];
|
|
2274
2277
|
}
|
|
@@ -2283,16 +2286,16 @@ var DayPilot = { Global: {} };
|
|
|
2283
2286
|
return t;
|
|
2284
2287
|
}
|
|
2285
2288
|
function r(e) {
|
|
2286
|
-
this.data = [], this.name = null, this.theme = "searchable_default", this.
|
|
2287
|
-
var t = this, n = { "selected": { post: function (e) { "object" == typeof e && e.id ? t.
|
|
2288
|
-
Object.defineProperty(this, "selected", { get: function () { return this.
|
|
2289
|
+
this.data = [], this.name = null, this.theme = "searchable_default", this.Hc = !1, this.listZIndex = 1e5, this.onSelect = null, this.Ic = null, this.Jc = null, this.Kc = !1, this.Lc = null, this.Mc = null, this.q = [], this.Nc = null, e = e || {};
|
|
2290
|
+
var t = this, n = { "selected": { post: function (e) { "object" == typeof e && e.id ? t.Ic = e : "string" != typeof e && "number" != typeof e || t.select(e); } } };
|
|
2291
|
+
Object.defineProperty(this, "selected", { get: function () { return this.Ic; } }), Object.defineProperty(this, "disabled", { get: function () { return this.Hc; }, set: function (e) { this.Hc = e, this.Lc && (this.Lc.disabled = e, e && this.Oc()); } });
|
|
2289
2292
|
for (var a in e)
|
|
2290
2293
|
n[a] || (this[a] = e[a]);
|
|
2291
2294
|
for (var i in e)
|
|
2292
2295
|
n[i] && n[i].post(e[i]);
|
|
2293
2296
|
}
|
|
2294
2297
|
function o(e) {
|
|
2295
|
-
this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.
|
|
2298
|
+
this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.Qc = null, this.yc = [], e = e || {};
|
|
2296
2299
|
for (var t in e)
|
|
2297
2300
|
this[t] = e[t];
|
|
2298
2301
|
}
|
|
@@ -2364,32 +2367,32 @@ var DayPilot = { Global: {} };
|
|
|
2364
2367
|
d.add(".modal_default_main", "border: 10px solid #ccc; max-width: 90%;"), d.add(".modal_default_main:focus", "outline: none;"), d.add(".modal_default_content", "padding: 10px 0px;"), d.add(".modal_default_inner", "padding: 20px;"), d.add(".modal_default_input", "padding: 10px 0px;"), d.add(".modal_default_buttons", "margin-top: 10px;"), d.add(".modal_default_buttons", "padding: 10px 0px;"), d.add(".modal_default_form_item", "padding: 10px 0px; position: relative;"), d.add(".modal_default_form_item_level1", "border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"), d.add(".modal_default_form_item.modal_default_form_title", "font-size: 1.5rem; font-weight: bold;"), d.add(".modal_default_form_item input[type=text]", "width: 100%; box-sizing: border-box;"), d.add(".modal_default_form_item textarea", "width: 100%; height: 200px; box-sizing: border-box;"), d.add(".modal_default_form_item input[type=select]", "width: 100%; box-sizing: border-box;"), d.add(".modal_default_form_item label", "display: block;"), d.add(".modal_default_form_item select", "width: 100%; box-sizing: border-box;"), d.add(".modal_default_form_item_label", "margin: 2px 0px;"), d.add(".modal_default_form_item_image img", "max-width: 100%; height: auto;"), d.add(".modal_default_form_item_invalid", ""), d.add(".modal_default_form_item_invalid_message", "position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"), d.add(".modal_default_background", "opacity: 0.5; background-color: #000;"), d.add(".modal_default_ok", "padding: 3px; width: 80px;"), d.add(".modal_default_cancel", "padding: 3px; width: 80px;"), d.add(".modal_default_form_item_date", "position: relative;"), d.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 && d.add(".modal_default_form_item_date input::-ms-clear", "display: none;"), d.add(".modal_default_form_item_scrollable_scroll", "width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"), d.add(".modal_default_form_item_scrollable_scroll_content", "padding: 5px;"), d.add(".modal_default_form_item_searchable", "position: relative;"), d.add(".modal_default_form_item_searchable_icon", ""), d.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(" + l + ");"), d.add(".modal_default_form_item_searchable_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), d.add(".modal_default_form_item_searchable_list_item", "background: white; padding: 2px; cursor: default;"), d.add(".modal_default_form_item_searchable_list_item_highlight", "background: #ccc;"), d.add(".modal_default_form_item_time", "position: relative;"), d.add(".modal_default_form_item_time_icon", ""), d.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(" + l + ");"), d.add(".modal_default_form_item_time_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), d.add(".modal_default_form_item_time_list_item", "background: white; padding: 2px; cursor: default;"), d.add(".modal_default_form_item_time_list_item_highlight", "background: #ccc;"), d.add(".modal_default_form_item_datetime_parent", "display: flex;"), d.add(".modal_default_form_item_datetime .modal_default_form_item_time_main", "margin-left: 5px;"), d.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ", ""), d.add(".modal_default_form_item_tabular_main", "margin-top: 10px;"), d.add(".modal_default_form_item_tabular_table", "display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"), d.add(".modal_default_form_item_tabular_tbody", "display: table-row-group;"), d.add(".modal_default_form_item_tabular_row", "display: table-row;"), d.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header", ""), d.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction", "padding: 0px; width: 23px;"), d.add(".modal_default_form_item_tabular_cell", "display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"), d.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell", "padding-left: 0px; padding-bottom: 0px;"), d.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;"), d.add(".modal_default_form_item_tabular_table select", "width:100%; height:100%; box-sizing: border-box;"), d.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;"), d.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==\")"), d.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;"), d.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==\")"), d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus", "display: none;"), d.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus", "display: none;"), d.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete", "visibility: hidden;"), d.add(".modal_default_form_item_tabular_empty", "height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"), d.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell", "padding: 0px;"), d.add(".modal_min_main", "border: 1px solid #ccc; max-width: 90%;"), d.add(".modal_min_background", "opacity: 0.5; background-color: #000;"), d.add(".modal_min_ok", "padding: 3px 10px;"), d.add(".modal_min_cancel", "padding: 3px 10px;"), d.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;"), d.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after", "box-sizing: content-box;"), d.add(".navigator_modal_month", "font-size: 11px;"), d.add(".navigator_modal_day", "color: black;"), d.add(".navigator_modal_weekend", "background-color: #f0f0f0;"), d.add(".navigator_modal_dayheader", "color: black;"), d.add(".navigator_modal_line", "border-bottom: 1px solid #c0c0c0;"), d.add(".navigator_modal_dayother", "color: gray;"), d.add(".navigator_modal_todaybox", "border: 1px solid red;"), d.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), d.add(".navigator_modal_busy", "font-weight: bold;"), d.add(".navigator_modal_cell", "text-align: center;"), d.add(".navigator_modal_select .navigator_modal_cell_box", "background-color: #FFE794; opacity: 0.5;"), d.add(".navigator_modal_title", "text-align: center;"), d.add(".navigator_modal_titleleft, .navigator_modal_titleright", "text-align: center;"), d.add(".navigator_modal_dayheader", "text-align: center;"), d.add(".navigator_modal_weeknumber", "text-align: center;"), d.add(".navigator_modal_cell_text", "cursor: pointer;"), d.add(".navigator_modal_todaysection", "box-sizing: border-box; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--dp-nav-border-color);"), d.add(".navigator_modal_todaysection_button", "cursor: pointer; color: #333; background-color: #f0f0f0; border: 1px solid var(--dp-nav-border-color); padding: 5px 10px; border-radius: 0px; "), d.commit(), DayPilot.Modal = function (e) {
|
|
2365
2368
|
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;
|
|
2366
2369
|
var t = this;
|
|
2367
|
-
this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.
|
|
2370
|
+
this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.Yb = !1, this.Zb = null, this.$b = null, this.showHtml = function (e) {
|
|
2368
2371
|
if (DayPilot.ModalStatic.displayed(this))
|
|
2369
2372
|
throw "This modal dialog is already displayed.";
|
|
2370
|
-
if (this.div || this.
|
|
2373
|
+
if (this.div || this._b(), this.qb(), this.useIframe) {
|
|
2371
2374
|
var t = function (e, t) { return function () { e.setInnerHTML(e.id + "iframe", t); }; };
|
|
2372
2375
|
window.setTimeout(t(this, e), 0);
|
|
2373
2376
|
}
|
|
2374
2377
|
else
|
|
2375
2378
|
e.nodeType ? this.div.appendChild(e) : this.div.innerHTML = e;
|
|
2376
|
-
this.
|
|
2379
|
+
this.qb(), this.bc(), this.cc();
|
|
2377
2380
|
}, this.showUrl = function (e) {
|
|
2378
2381
|
if (DayPilot.ModalStatic.displayed(this))
|
|
2379
2382
|
throw "This modal dialog is already displayed.";
|
|
2380
2383
|
if (this.useIframe) {
|
|
2381
|
-
this.div || this.
|
|
2384
|
+
this.div || this._b();
|
|
2382
2385
|
var n = this.loadingHtml;
|
|
2383
|
-
n && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", n)), this.re(this.iframe, "load", this.
|
|
2386
|
+
n && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", n)), this.re(this.iframe, "load", this.dc), this.iframe.src = e, this.qb(), this.bc(), this.cc();
|
|
2384
2387
|
}
|
|
2385
2388
|
else
|
|
2386
|
-
t.
|
|
2387
|
-
}, this.
|
|
2389
|
+
t.ec({ "url": e, "success": function (e) { var n = e.request.responseText; t.showHtml(n); }, "error": function () { t.showHtml("Error loading the modal dialog"); } });
|
|
2390
|
+
}, this.cc = function () {
|
|
2388
2391
|
if ("function" == typeof t.onShow) {
|
|
2389
2392
|
var e = {};
|
|
2390
|
-
e.root = t.
|
|
2393
|
+
e.root = t.fc(), e.modal = t, t.onShow(e);
|
|
2391
2394
|
}
|
|
2392
|
-
}, this.
|
|
2395
|
+
}, this.fc = function () { return t.iframe ? t.iframe.contentWindow.document : t.div; }, this.ec = function (e) {
|
|
2393
2396
|
var t = new XMLHttpRequest;
|
|
2394
2397
|
if (t) {
|
|
2395
2398
|
var n = e.method || "GET", a = e.success || function () { }, i = e.error || function () { }, r = e.data, o = e.url;
|
|
@@ -2407,30 +2410,30 @@ var DayPilot = { Global: {} };
|
|
|
2407
2410
|
window.console && console.log("HTTP error " + t.status);
|
|
2408
2411
|
}, 4 !== t.readyState && ("object" == typeof r && (r = JSON.stringify(r)), t.send(r));
|
|
2409
2412
|
}
|
|
2410
|
-
}, this.
|
|
2411
|
-
var e = function () { return t.
|
|
2413
|
+
}, this.qb = function () { delete this.result; var e = window, n = document, a = e.pageYOffset ? e.pageYOffset : n.documentElement && n.documentElement.scrollTop ? n.documentElement.scrollTop : n.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.gc(), DayPilot.ModalStatic.remove(this), DayPilot.ModalStatic.list.push(this); }, this.dc = function () { t.iframe.contentWindow.modal = t, t.autoStretch && t.stretch(); }, this.stretch = function () {
|
|
2414
|
+
var e = function () { return t.hc().y; }, n = function () { return t.hc().x; };
|
|
2412
2415
|
if (this.useIframe) {
|
|
2413
|
-
for (var a = n() - 40, i = this.width; i < a && this.
|
|
2416
|
+
for (var a = n() - 40, i = this.width; i < a && this.ic(); i += 10)
|
|
2414
2417
|
this.div.style.width = i + "px", this.div.style.marginLeft = "-" + Math.floor(i / 2) + "px";
|
|
2415
|
-
for (var r = this.maxHeight || e() - 2 * this.top, o = this.height; o < r && this.
|
|
2418
|
+
for (var r = this.maxHeight || e() - 2 * this.top, o = this.height; o < r && this.jc(); o += 10)
|
|
2416
2419
|
this.iframe.style.height = o + "px", this.div.style.height = o + "px";
|
|
2417
|
-
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.
|
|
2420
|
+
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.dc);
|
|
2418
2421
|
}
|
|
2419
2422
|
else
|
|
2420
2423
|
this.div.style.height = "";
|
|
2421
|
-
}, this.
|
|
2424
|
+
}, this.ic = function () {
|
|
2422
2425
|
for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, n = t.scrollWidth, a = e.body.children, i = 0; i < a.length; i++) {
|
|
2423
2426
|
var r = a[i].offsetLeft + a[i].offsetWidth;
|
|
2424
2427
|
n = Math.max(n, r);
|
|
2425
2428
|
}
|
|
2426
2429
|
return n > t.clientWidth;
|
|
2427
|
-
}, this.
|
|
2430
|
+
}, this.jc = function () {
|
|
2428
2431
|
for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, n = t.scrollHeight, a = e.body.children, i = 0; i < a.length; i++) {
|
|
2429
2432
|
var r = a[i].offsetTop + a[i].offsetHeight;
|
|
2430
2433
|
n = Math.max(n, r);
|
|
2431
2434
|
}
|
|
2432
2435
|
return n > t.clientHeight;
|
|
2433
|
-
}, this.
|
|
2436
|
+
}, this.hc = function () {
|
|
2434
2437
|
var e = document;
|
|
2435
2438
|
if ("CSS1Compat" === e.compatMode && e.documentElement && e.documentElement.clientWidth) {
|
|
2436
2439
|
var t = e.documentElement.clientWidth, n = e.documentElement.clientHeight;
|
|
@@ -2438,32 +2441,32 @@ var DayPilot = { Global: {} };
|
|
|
2438
2441
|
}
|
|
2439
2442
|
var t = e.body.clientWidth, n = e.body.clientHeight;
|
|
2440
2443
|
return { x: t, y: n };
|
|
2441
|
-
}, this.
|
|
2442
|
-
if (t
|
|
2443
|
-
var n = t.mc(e), a = n.x - t.
|
|
2444
|
-
t.div.style.marginLeft = "0px", t.div.style.top = t
|
|
2444
|
+
}, this.bc = function () { this.Yb || (this.re(window, "resize", this.kc), this.re(window, "scroll", this.lc), this.dragDrop && (this.re(document, "mousemove", this.nc), this.re(document, "mouseup", this.oc)), this.Yb = !0); }, this.pc = function () { this.ue(window, "resize", this.kc), this.ue(window, "scroll", this.lc), this.dragDrop && (this.ue(document, "mousemove", this.nc), this.ue(document, "mouseup", this.oc)), this.Yb = !1; }, this.qc = function (e) { e.target === t.div && (e.preventDefault(), t.div.style.cursor = "move", t.rc(), t.$b = t.mc(e || window.event), t.Zb = { x: t.div.offsetLeft, y: t.div.offsetTop }); }, this.nc = function (e) {
|
|
2445
|
+
if (t.$b) {
|
|
2446
|
+
var n = t.mc(e), a = n.x - t.$b.x, i = n.y - t.$b.y;
|
|
2447
|
+
t.div.style.marginLeft = "0px", t.div.style.top = t.Zb.y + i + "px", t.div.style.left = t.Zb.x + a + "px";
|
|
2445
2448
|
}
|
|
2446
|
-
}, this.
|
|
2449
|
+
}, this.oc = function () { t.$b && (t.sc(), t.div.style.cursor = null, t.$b = null); }, this.rc = function () {
|
|
2447
2450
|
if (this.useIframe) {
|
|
2448
2451
|
var e = document.createElement("div");
|
|
2449
2452
|
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;
|
|
2450
2453
|
}
|
|
2451
|
-
}, this.
|
|
2454
|
+
}, this.sc = function () { this.useIframe && (this.div.removeChild(this.mask), this.mask = null); }, this.kc = function () { t.tc(), t.gc(); }, this.lc = function () { t.tc(); }, this.gc = function () {
|
|
2452
2455
|
if (!t.left && t.div) {
|
|
2453
2456
|
var e = t.div.offsetWidth;
|
|
2454
2457
|
t.div.style.marginLeft = "-" + Math.floor(e / 2) + "px";
|
|
2455
2458
|
}
|
|
2456
|
-
}, this.
|
|
2459
|
+
}, this.tc = function () {
|
|
2457
2460
|
if (t.hideDiv && t.div && "none" !== t.hideDiv.style.display && "none" !== t.div.style.display) {
|
|
2458
|
-
var e = t.
|
|
2461
|
+
var e = t.uc.scrollY();
|
|
2459
2462
|
t.scrollWithPage || (t.div.style.top = e + t.top + "px");
|
|
2460
2463
|
}
|
|
2461
|
-
}, this.
|
|
2464
|
+
}, this.uc = {}, this.uc.container = function () { return t.container || document.body; }, this.uc.scrollY = function () { var e = t.uc.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, n) { e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent && e.attachEvent("on" + t, n); }, this.ue = function (e, t, n) { e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent && e.detachEvent("on" + t, n); }, 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) {
|
|
2462
2465
|
for (var t = { x: e.offsetLeft, y: e.offsetTop }; e.offsetParent;)
|
|
2463
2466
|
e = e.offsetParent, t.x += e.offsetLeft, t.y += e.offsetTop;
|
|
2464
2467
|
return t;
|
|
2465
|
-
}, this.
|
|
2466
|
-
for (var e = t.
|
|
2468
|
+
}, this._b = function () { var e = t.uc.container(), n = e === document.body, a = n ? "fixed" : "absolute", i = document.createElement("div"); i.id = this.id + "hide", i.style.position = a, i.style.left = "0px", i.style.top = "0px", i.style.right = "0px", i.style.bottom = "0px", i.oncontextmenu = function () { return !1; }, i.onmousedown = function () { return !1; }, e.appendChild(i); var r = document.createElement("div"); r.id = this.id + "popup", r.style.position = a, r.style.left = "50%", r.style.top = "0px", r.style.backgroundColor = "white", r.style.width = "50px", r.style.height = "50px", this.dragDrop && (r.onmousedown = this.qc), r.addEventListener("keydown", function (e) { e.stopPropagation(); }); var o = null; this.useIframe && (o = document.createElement("iframe"), o.id = this.id + "iframe", o.name = this.id + "iframe", o.frameBorder = "0", o.style.width = "100%", o.style.height = "50px", r.appendChild(o)), e.appendChild(r), this.div = r, this.iframe = o, this.hideDiv = i; }, this.setInnerHTML = function (e, n) { var a = window.frames[e], i = a.contentWindow || a.document || a.contentDocument; i.document && (i = i.document), null == i.body && i.write("<body></body>"), n.nodeType ? i.body.appendChild(n) : i.body.innerHTML = n, t.autoStretch && (t.autoStretchFirstLoadOnly && t.vc || (t.stretch(), t.vc = !0)); }, this.close = function (e) { this.result = e, this.hide(); }, this.closeSerialized = function () {
|
|
2469
|
+
for (var e = t.fc(), n = e.querySelectorAll("input, textarea, select"), a = {}, i = 0; i < n.length; i++) {
|
|
2467
2470
|
var r = n[i], o = r.name;
|
|
2468
2471
|
if (o) {
|
|
2469
2472
|
var s = r.value;
|
|
@@ -2471,11 +2474,11 @@ var DayPilot = { Global: {} };
|
|
|
2471
2474
|
}
|
|
2472
2475
|
}
|
|
2473
2476
|
t.close(a);
|
|
2474
|
-
}, this.hide = function (e) { e = e || {}; var n = {}; n.backgroundClick = !!e.backgroundClick, n.result = this.result, n.canceled = "undefined" == typeof this.result, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(n), n.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(n) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.
|
|
2477
|
+
}, this.hide = function (e) { e = e || {}; var n = {}; n.backgroundClick = !!e.backgroundClick, n.result = this.result, n.canceled = "undefined" == typeof this.result, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(n), n.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(n) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.pc(), t.wc(t.div), t.wc(t.hideDiv), t.div = null, t.hideDiv = null, t.iframe = null)); }, this.wc = function (e) { var t; e && (null === (t = e.parentNode) || void 0 === t ? void 0 : t.removeChild(e)); }, this.xc = function () {
|
|
2475
2478
|
if (e)
|
|
2476
2479
|
for (var t in e)
|
|
2477
2480
|
this[t] = e[t];
|
|
2478
|
-
}, this.
|
|
2481
|
+
}, this.xc();
|
|
2479
2482
|
}, DayPilot.Modal.alert = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var n = t.okText || "OK"; return DayPilot.getPromise(function (a) { t.onClosed = function (e) { a(e); }; var i = new DayPilot.Modal(t), r = document.createElement("div"); r.className = i.theme + "_inner"; var o = document.createElement("div"); o.className = i.theme + "_content", o.innerHTML = e; var s = document.createElement("div"); s.className = i.theme + "_buttons"; var l = document.createElement("button"); l.innerText = n, l.className = i.theme + "_ok", l.onclick = function () { DayPilot.ModalStatic.close("OK"); }, s.appendChild(l), r.appendChild(o), r.appendChild(s), i.showHtml(r), i.autoFocus && l.focus(); }); }, DayPilot.Modal.confirm = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var n = t.okText || "OK", a = t.cancelText || "Cancel"; return DayPilot.getPromise(function (i) { t.onClosed = function (e) { i(e); }; var r = new DayPilot.Modal(t), o = document.createElement("div"); o.className = r.theme + "_inner"; var s = document.createElement("div"); s.className = r.theme + "_content", s.innerHTML = e; var l = document.createElement("div"); l.className = r.theme + "_buttons"; var d = document.createElement("button"); d.innerText = n, d.className = r.theme + "_ok", d.onclick = function () { DayPilot.ModalStatic.close("OK"); }; var c = document.createTextNode(" "), u = document.createElement("button"); u.innerText = a, u.className = r.theme + "_cancel", u.onclick = function () { DayPilot.ModalStatic.close(); }, l.appendChild(d), l.appendChild(c), l.appendChild(u), o.appendChild(s), o.appendChild(l), r.showHtml(o), r.autoFocus && d.focus(); }); }, DayPilot.Modal.prompt = function (e, t, n) {
|
|
2480
2483
|
"object" == typeof t && (n = t, t = ""), n = n || {}, n.height = n.height || 40, n.useIframe = !1;
|
|
2481
2484
|
var a = n.okText || "OK", i = n.cancelText || "Cancel", r = t || "";
|
|
@@ -2585,7 +2588,7 @@ var DayPilot = { Global: {} };
|
|
|
2585
2588
|
if (!e)
|
|
2586
2589
|
throw "Unable to find the opener DayPilot.Modal instance.";
|
|
2587
2590
|
e.stretch();
|
|
2588
|
-
}, 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]; }, "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, n) { return t = t || function () { }, n = n || function () { }, e(t, n), DayPilot.getPromise(e); }, this["catch"] = function (n) { return t.then(null, n), DayPilot.getPromise(e); }; }, new DayPilot.Promise(e)); }), t.prototype.create = function () { return this.load(), this.render(), this.
|
|
2591
|
+
}, 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]; }, "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, n) { return t = t || function () { }, n = n || function () { }, e(t, n), DayPilot.getPromise(e); }, this["catch"] = function (n) { return t.then(null, n), DayPilot.getPromise(e); }; }, new DayPilot.Promise(e)); }), t.prototype.create = function () { return this.load(), this.render(), this.Bc; }, t.prototype.render = function () { var e = this; this.Bc = document.createElement("div"), this.yc.forEach(function (t) { e.createView(t); }), this.applyState(); }, t.prototype.createView = function (e) {
|
|
2589
2592
|
var t = this.theme, n = this, a = document.createElement("div");
|
|
2590
2593
|
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) {
|
|
2591
2594
|
var i = document.createElement("div");
|
|
@@ -2593,13 +2596,13 @@ var DayPilot = { Global: {} };
|
|
|
2593
2596
|
}
|
|
2594
2597
|
var r = this.createInteractive(e);
|
|
2595
2598
|
r.onInput = function (e) {
|
|
2596
|
-
if (e = e || {}, n.
|
|
2599
|
+
if (e = e || {}, n.Cc(r, { "debounce": !e.immediate }), "function" == typeof n.onChange) {
|
|
2597
2600
|
var t = {};
|
|
2598
2601
|
t.result = n.serialize(), n.onChange(t);
|
|
2599
2602
|
}
|
|
2600
|
-
}, r.onBlur = function () { n.canceling || n.
|
|
2601
|
-
}, t.prototype.validate = function () { var e = this, t = !0; return this.f.forEach(function (n) { var a = e.
|
|
2602
|
-
function n() { e.
|
|
2603
|
+
}, r.onBlur = function () { n.canceling || n.Cc(r); }, r.apply(e), r.Bc = a, r.row = e, r.element && a.appendChild(r.element), this.f.push(r), this.Bc.appendChild(a);
|
|
2604
|
+
}, t.prototype.validate = function () { var e = this, t = !0; return this.f.forEach(function (n) { var a = e.Cc(n); t = t && a; }), t; }, t.prototype.Cc = function (e, t) {
|
|
2605
|
+
function n() { e.Dc && (e.Dc.remove(), e.Dc = null), e.Bc.classList.add(u); var t = document.createElement("div"); t.classList.add(h), t.innerText = c.message, e.Dc = t, e.Bc.appendChild(t); }
|
|
2603
2606
|
t = t || {};
|
|
2604
2607
|
var a = t.debounce, i = t.silent, r = e.row, o = !0, s = "function" == typeof r.data.onValidate ? r.data.onValidate : null, l = "function" == typeof r.data.validate ? r.data.validate : null, d = s || l;
|
|
2605
2608
|
if (d) {
|
|
@@ -2607,11 +2610,11 @@ var DayPilot = { Global: {} };
|
|
|
2607
2610
|
c.valid = !0, c.value = e.save()[r.field], c.message = "Error", c.values = this.serialize(), c.result = this.serialize(), d(c);
|
|
2608
2611
|
var u = this.theme + "_form_item_invalid", h = this.theme + "_form_item_invalid_message";
|
|
2609
2612
|
if (c.valid)
|
|
2610
|
-
clearTimeout(this.
|
|
2613
|
+
clearTimeout(this.Ac[r.field]), e.Dc && (e.Dc.remove(), e.Dc = null), e.Bc.classList.remove(u);
|
|
2611
2614
|
else if (!i)
|
|
2612
2615
|
if (a) {
|
|
2613
2616
|
var f = 1e3;
|
|
2614
|
-
clearTimeout(this.
|
|
2617
|
+
clearTimeout(this.Ac[r.field]), this.Ac[r.field] = setTimeout(function () { n(); }, f);
|
|
2615
2618
|
}
|
|
2616
2619
|
else
|
|
2617
2620
|
n();
|
|
@@ -2631,38 +2634,38 @@ var DayPilot = { Global: {} };
|
|
|
2631
2634
|
}
|
|
2632
2635
|
for (var a in t)
|
|
2633
2636
|
this.setValue(a, t[a]);
|
|
2634
|
-
}, t.prototype.setValue = function (e, t) { this.
|
|
2637
|
+
}, t.prototype.setValue = function (e, t) { this.yc.forEach(function (n) { n.applyValue(e, t); }); }, t.prototype.updateDependentState = function () { var e = this, t = [!0]; (this.zc ? this.zc : this.yc).forEach(function (n) { var a = e.updateState(n, { enabled: t[n.level] && !n.data.disabled }); a.isValue && (t[a.level + 1] = a.enabled && a.checked); }); }, t.prototype.processFormItem = function (e, t) {
|
|
2635
2638
|
var a = this, i = this.getFieldType(e), r = [];
|
|
2636
2639
|
if ("radio" === i) {
|
|
2637
2640
|
if (e.name) {
|
|
2638
2641
|
var o = new n;
|
|
2639
|
-
o.field = e.id, o.data = e, o.level = t, o.type = "label", o.interactive = !1, o.text = e.name, a.
|
|
2642
|
+
o.field = e.id, o.data = e, o.level = t, o.type = "label", o.interactive = !1, o.text = e.name, a.yc.push(o), r.push(o);
|
|
2640
2643
|
}
|
|
2641
2644
|
e.options.forEach(function (o) {
|
|
2642
2645
|
var s = new n;
|
|
2643
2646
|
s.field = e.id, s.data = o, s.level = t, s.type = i, s.isValue = !0, s.text = o.name, s.resolved = o.id,
|
|
2644
|
-
a.
|
|
2647
|
+
a.yc.push(s), r.push(s), o.children && o.children.forEach(function (e) { var n = a.processFormItem(e, t + 1); r = r.concat(n); });
|
|
2645
2648
|
});
|
|
2646
2649
|
}
|
|
2647
2650
|
else if ("title" === i) {
|
|
2648
2651
|
var o = new n;
|
|
2649
|
-
o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = e.name, a.
|
|
2652
|
+
o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = e.name, a.yc.push(o), r.push(o);
|
|
2650
2653
|
}
|
|
2651
2654
|
else if ("image" === i) {
|
|
2652
2655
|
var o = new n;
|
|
2653
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.
|
|
2656
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.yc.push(o), r.push(o);
|
|
2654
2657
|
}
|
|
2655
2658
|
else if ("html" === i) {
|
|
2656
2659
|
var o = new n;
|
|
2657
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.
|
|
2660
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.yc.push(o), r.push(o);
|
|
2658
2661
|
}
|
|
2659
2662
|
else if ("scrollable" === i) {
|
|
2660
2663
|
var o = new n;
|
|
2661
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.
|
|
2664
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = i, o.interactive = !1, o.text = null, a.yc.push(o), r.push(o);
|
|
2662
2665
|
}
|
|
2663
2666
|
else {
|
|
2664
2667
|
var o = new n;
|
|
2665
|
-
o.field = e.id, o.data = e, o.level = t, o.type = i, o.text = e.name, o.children = [], a.
|
|
2668
|
+
o.field = e.id, o.data = e, o.level = t, o.type = i, o.text = e.name, o.children = [], a.yc.push(o), r.push(o), "checkbox" === i && (o.isValue = !0, o.resolved = !0, e.children && e.children.forEach(function (e) { var n = a.processFormItem(e, t + 1); r = r.concat(n); }));
|
|
2666
2669
|
}
|
|
2667
2670
|
return r;
|
|
2668
2671
|
}, t.prototype.doOnKey = function (e) {
|
|
@@ -2727,21 +2730,21 @@ var DayPilot = { Global: {} };
|
|
|
2727
2730
|
}
|
|
2728
2731
|
n || (e.preventDefault(), e.stopPropagation());
|
|
2729
2732
|
}, i.onfocus = function () { r.show(); }, i.onclick = function () { r.show(); }, i.oninput = function () { n.onInput(); }, i.onblur = function () { n.onBlur(); }, n.element = i, n.picker = r, n.canFocus = function () { return !n.element.disabled; }, n.focus = function () { n.element.focus(); }, n.save = function () { var t = r.date ? r.date.toString() : null, n = {}; return n[e.field] = t, n; }, n;
|
|
2730
|
-
}, "time": function () { return t.
|
|
2733
|
+
}, "time": function () { return t.Ec(e); }, "datetime": function () { return t.Fc(e); }, "select": function () { var t = new a; t.apply = function (e) { t.row = e; var n = t.element; n.value = e.value, n.disabled = !e.enabled; }; var n = document.createElement("select"); return n.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.Gc = e.id, n.appendChild(t); }), n.onchange = function () { t.onInput({ "immediate": !0 }); }, n.onblur = function () { t.onBlur(); }, t.element = n, t.canFocus = function () { return !t.element.disabled; }, t.focus = function () { t.element.focus(); }, t.save = function () { var t = null, a = n.options[n.selectedIndex]; a && "undefined" != typeof a.Gc && (t = a.Gc); var i = {}; return i[e.field] = t, i; }, t; }, "searchable": function () { var n = new a; n.apply = function (e) { n.row = e; var t = n.searchable; t.disabled = !e.enabled, t.select(e.value); }; var i = new r({ data: e.data.options || [], name: e.field, theme: t.theme + "_form_item_searchable", listZIndex: t.zIndex + 1, onSelect: function (e) { e.ui && n.onInput({ "immediate": !0 }); } }), o = i.create(); return n.element = o, n.searchable = i, n.canFocus = function () { return !n.searchable.disabled; }, n.focus = function () { n.searchable.focus(); }, n.save = function () { var t = i.selected && i.selected.id, n = {}; return n[e.field] = t, n; }, n; }, "radio": function () {
|
|
2731
2734
|
var n = new a;
|
|
2732
2735
|
n.apply = function (e) { n.row = e; var t = n.radio; t.checked = e.checked, t.disabled = !e.enabled; };
|
|
2733
2736
|
var i = document.createElement("label"), r = document.createElement("input");
|
|
2734
|
-
r.type = "radio", r.name = e.field, r.
|
|
2737
|
+
r.type = "radio", r.name = e.field, r.Gc = e.resolved, r.onchange = function () { var e = n.row; t.findRowsByField(e.field).forEach(function (e) { t.updateState(e, { checked: !1 }); }), t.updateState(e, { checked: !0 }), t.applyState(), n.onInput({ "immediate": !0 }); }, r.onblur = function () { n.onBlur(); }, i.appendChild(r);
|
|
2735
2738
|
var o = document.createTextNode(e.text);
|
|
2736
2739
|
return i.append(o), n.element = i, n.radio = r, n.canFocus = function () { return !1; }, n.focus = function () { n.radio.focus(); }, n.save = function () {
|
|
2737
2740
|
if (!r.checked)
|
|
2738
2741
|
return {};
|
|
2739
|
-
var t = r.
|
|
2742
|
+
var t = r.Gc, n = {};
|
|
2740
2743
|
return n[e.field] = t, n;
|
|
2741
2744
|
}, n;
|
|
2742
|
-
}, "checkbox": function () { var n = new a; n.apply = function (e) { n.row = e; var t = n.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var i = document.createElement("label"), r = document.createElement("input"); r.type = "checkbox", r.name = e.field, r.
|
|
2745
|
+
}, "checkbox": function () { var n = new a; n.apply = function (e) { n.row = e; var t = n.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var i = document.createElement("label"), r = document.createElement("input"); r.type = "checkbox", r.name = e.field, r.Gc = e.resolved, r.onchange = function () { var e = n.row; t.updateState(e, { checked: this.checked }), t.applyState(), n.onInput({ "immediate": !0 }); }, r.onblur = function () { n.onBlur(); }, i.appendChild(r); var o = document.createTextNode(e.text); return i.append(o), n.element = i, n.checkbox = r, n.canFocus = function () { return !1; }, n.focus = function () { n.checkbox.focus(); }, n.save = function () { var t = r.checked, n = {}; return n[e.field] = t, n; }, n; }, "table": function () { var n = new a; n.apply = function (e) { n.row = e; var t = n.table; t.disabled = !e.enabled, t.load(e.value || []); }; var i = new o({ name: e.field, form: t, theme: t.theme + "_form_item_tabular", item: e.data, onInput: function () { n.onInput(); } }), r = i.create(); return n.element = r, n.table = i, n.canFocus = function () { return !1; }, n.focus = function () { n.table.focus(); }, n.save = function () { var t = i.save(), n = {}; return n[e.field] = t, n; }, n; } };
|
|
2743
2746
|
return t.plugins && t.plugins[e.type] ? t.plugins[e.type](e) : n[e.type]();
|
|
2744
|
-
}, t.prototype.
|
|
2747
|
+
}, t.prototype.Ec = function (e) {
|
|
2745
2748
|
var t = this, n = new a;
|
|
2746
2749
|
n.apply = function (e) { n.row = e; var t = n.searchable; t.disabled = !e.enabled, t.select(e.value); };
|
|
2747
2750
|
var i = [], o = e.data.timeInterval || 15;
|
|
@@ -2752,7 +2755,7 @@ var DayPilot = { Global: {} };
|
|
|
2752
2755
|
}
|
|
2753
2756
|
var v = new r({ data: i, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && n.onInput({ "immediate": !0 }); } }), p = v.create();
|
|
2754
2757
|
return n.element = p, n.searchable = v, n.canFocus = function () { return !n.searchable.disabled; }, n.focus = function () { n.searchable.focus(); }, n.save = function () { var t = v.selected && v.selected.id, n = {}; return n[e.field] = t, n; }, n;
|
|
2755
|
-
}, t.prototype.
|
|
2758
|
+
}, t.prototype.Fc = function (e) {
|
|
2756
2759
|
var t = this, n = new a;
|
|
2757
2760
|
n.apply = function (e) {
|
|
2758
2761
|
n.row = e;
|
|
@@ -2802,9 +2805,9 @@ var DayPilot = { Global: {} };
|
|
|
2802
2805
|
return n.searchable = f, f.create();
|
|
2803
2806
|
}(), s = document.createElement("div");
|
|
2804
2807
|
return s.className = t.theme + "_form_item_datetime_parent", s.appendChild(i), s.appendChild(o), n.element = s, n.canFocus = function () { return !n.searchable.disabled; }, n.focus = function () { n.dateInput.focus(); }, n.save = function () { var t = n.searchable.selected && n.searchable.selected.id, a = n.picker.date ? n.picker.date.toString() : null, i = new DayPilot.Date(a).getDatePart(), r = DayPilot.Date.parse(i.toString("yyyy-dd-MM ") + t, "yyyy-dd-MM HH:mm"), o = {}; return o[e.field] = r, o; }, n;
|
|
2805
|
-
}, t.prototype.findRowsByField = function (e) { return this.
|
|
2806
|
-
var n = this.
|
|
2807
|
-
return this.
|
|
2808
|
+
}, t.prototype.findRowsByField = function (e) { return this.yc.filter(function (t) { return t.field === e; }); }, t.prototype.findViewById = function (e, t) { return this.f.find(function (n) { return n.row.field === e && ("radio" !== n.row.type || n.row.resolved === t); }); }, t.prototype.firstFocusable = function () { return this.f.find(function (e) { return e.canFocus && e.canFocus(); }); }, t.prototype.updateState = function (e, t) {
|
|
2809
|
+
var n = this.zc ? this.zc : this.yc, a = n.indexOf(e);
|
|
2810
|
+
return this.zc = n.map(function (n) {
|
|
2808
2811
|
if (n !== e)
|
|
2809
2812
|
return n;
|
|
2810
2813
|
if (e.propsEqual(t))
|
|
@@ -2813,11 +2816,11 @@ var DayPilot = { Global: {} };
|
|
|
2813
2816
|
for (var i in t)
|
|
2814
2817
|
a[i] = t[i];
|
|
2815
2818
|
return a;
|
|
2816
|
-
}), this.
|
|
2817
|
-
}, t.prototype.updateInteractive = function (e) { var t = this.
|
|
2819
|
+
}), this.zc[a];
|
|
2820
|
+
}, t.prototype.updateInteractive = function (e) { var t = this.zc.indexOf(e); this.f[t].apply(e); }, t.prototype.applyState = function () {
|
|
2818
2821
|
var e = this;
|
|
2819
|
-
if (this.updateDependentState(), this.
|
|
2820
|
-
this.
|
|
2822
|
+
if (this.updateDependentState(), this.zc) {
|
|
2823
|
+
this.zc.filter(function (t, n) { return e.yc[n] !== t; }).forEach(function (t) { e.updateInteractive(t); }), this.yc = this.zc, this.zc = null;
|
|
2821
2824
|
}
|
|
2822
2825
|
}, t.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"; }, t.prototype.serialize = function () {
|
|
2823
2826
|
var e = {};
|
|
@@ -2836,10 +2839,10 @@ var DayPilot = { Global: {} };
|
|
|
2836
2839
|
if (this[t] !== e[t])
|
|
2837
2840
|
return !1;
|
|
2838
2841
|
return !0;
|
|
2839
|
-
}, n.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(); }, n.prototype.applyValue = function (e, t) { this.field === e && (this.value = t, this.isValue && t === this.resolved && (this.checked = !0)); }, DayPilot.Modal.Experimental = {}, DayPilot.Modal.Experimental.Form = t, r.prototype.select = function (e) { return this.
|
|
2842
|
+
}, n.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(); }, n.prototype.applyValue = function (e, t) { this.field === e && (this.value = t, this.isValue && t === this.resolved && (this.checked = !0)); }, DayPilot.Modal.Experimental = {}, DayPilot.Modal.Experimental.Form = t, r.prototype.select = function (e) { return this.Ic = this.data.find(function (t) { return t.id === e; }), this.Pc(!1), this; }, r.prototype.create = function () {
|
|
2840
2843
|
function e(e) {
|
|
2841
2844
|
var n = l.strategy;
|
|
2842
|
-
"includes" !== l.strategy && "startsWith" !== l.strategy && (n = "includes"), e = e || n || "includes", h.style.display = "", h.style.top = v.offsetHeight + "px", h.style.left = "0px", h.style.width = v.offsetWidth + "px", h.innerHTML = "", h.addEventListener("mousedown", function (e) { e.preventDefault(); }), l.
|
|
2845
|
+
"includes" !== l.strategy && "startsWith" !== l.strategy && (n = "includes"), e = e || n || "includes", h.style.display = "", h.style.top = v.offsetHeight + "px", h.style.left = "0px", h.style.width = v.offsetWidth + "px", h.innerHTML = "", h.addEventListener("mousedown", function (e) { e.preventDefault(); }), l.Jc = null, l.q = [];
|
|
2843
2846
|
var i = null;
|
|
2844
2847
|
l.data.forEach(function (n) {
|
|
2845
2848
|
var r = n.name || n.id;
|
|
@@ -2850,27 +2853,27 @@ var DayPilot = { Global: {} };
|
|
|
2850
2853
|
else if ("startsWith" === e && 0 !== r.toLowerCase().indexOf(v.value.toLowerCase()))
|
|
2851
2854
|
return;
|
|
2852
2855
|
var o = document.createElement("div");
|
|
2853
|
-
o.className = l.theme + "_list_item", o.innerText = r, o.item = n, n === l.
|
|
2854
|
-
}), l.
|
|
2856
|
+
o.className = l.theme + "_list_item", o.innerText = r, o.item = n, n === l.Ic && (l.Jc = o), i || (i = o), o.addEventListener("mousedown", function (e) { a(o), e.preventDefault(); }), o.addEventListener("mousemove", function () { l.Jc !== o && (l.Jc = o, t({ dontScroll: !0 })); }), h.appendChild(o), l.q.push(o);
|
|
2857
|
+
}), l.Jc || (l.Jc = i), t();
|
|
2855
2858
|
}
|
|
2856
|
-
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.
|
|
2859
|
+
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.Jc && (l.Jc.className += " " + l.theme + "_list_item_highlight", t && !n(l.Jc, h) && l.Jc.scrollIntoView()); }
|
|
2857
2860
|
function n(e, t) { var n = e.getBoundingClientRect(), a = t.getBoundingClientRect(); return n.top >= a.top && n.bottom <= a.bottom; }
|
|
2858
|
-
function a(e) { var t = e.item; l.
|
|
2859
|
-
function i() { l.
|
|
2861
|
+
function a(e) { var t = e.item; l.Ic = t, l.Pc(!0), r(), o(); }
|
|
2862
|
+
function i() { l.Oc(); }
|
|
2860
2863
|
function r() { l.s(); }
|
|
2861
|
-
function o() { l.
|
|
2862
|
-
function s() { l.
|
|
2864
|
+
function o() { l.Kc = !0, v.setAttribute("readonly", "readonly"), v.focus(); }
|
|
2865
|
+
function s() { l.Kc = !1, v.removeAttribute("readonly"), v.select(), e("all"); }
|
|
2863
2866
|
var l = this, d = this, c = document.createElement("div");
|
|
2864
2867
|
c.className = this.theme + "_main", c.style.position = "relative";
|
|
2865
2868
|
var u = document.createElement("div");
|
|
2866
|
-
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.
|
|
2869
|
+
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.Kc ? (l.focus(), s()) : (i(), o()); });
|
|
2867
2870
|
var h = document.createElement("div");
|
|
2868
2871
|
h.className = this.theme + "_list", h.style.display = "none", h.style.position = "absolute", h.style.zIndex = this.listZIndex;
|
|
2869
2872
|
var f = document.createElement("input");
|
|
2870
|
-
f.type = "hidden", f.name = this.name, f.searchable = d, this.
|
|
2873
|
+
f.type = "hidden", f.name = this.name, f.searchable = d, this.Nc = f;
|
|
2871
2874
|
var v = document.createElement("input");
|
|
2872
|
-
return v.type = "text", v.className = this.theme + "_input", v.disabled = this.
|
|
2873
|
-
if (l.
|
|
2875
|
+
return v.type = "text", v.className = this.theme + "_input", v.disabled = this.Hc, v.addEventListener("click", function () { s(); }), v.addEventListener("focus", function () { e("all"); }), v.addEventListener("input", function () { e(); }), v.addEventListener("blur", function () { v.removeAttribute("readonly"), i(); }), v.addEventListener("keydown", function (e) {
|
|
2876
|
+
if (l.Kc) {
|
|
2874
2877
|
if ("Enter" === e.key)
|
|
2875
2878
|
return;
|
|
2876
2879
|
if ("Esc" === e.key || "Escape" === e.key)
|
|
@@ -2878,18 +2881,18 @@ var DayPilot = { Global: {} };
|
|
|
2878
2881
|
s();
|
|
2879
2882
|
}
|
|
2880
2883
|
if ("ArrowDown" === e.key) {
|
|
2881
|
-
var n = d.q.indexOf(d.
|
|
2882
|
-
n + 1 < d.q.length && (d.
|
|
2884
|
+
var n = d.q.indexOf(d.Jc);
|
|
2885
|
+
n + 1 < d.q.length && (d.Jc = d.q[n + 1]), t();
|
|
2883
2886
|
}
|
|
2884
2887
|
else if ("ArrowUp" === e.key) {
|
|
2885
|
-
var n = d.q.indexOf(d.
|
|
2886
|
-
n - 1 >= 0 && (d.
|
|
2888
|
+
var n = d.q.indexOf(d.Jc);
|
|
2889
|
+
n - 1 >= 0 && (d.Jc = d.q[n - 1]), t();
|
|
2887
2890
|
}
|
|
2888
2891
|
else
|
|
2889
|
-
"Enter" === e.key ? l.
|
|
2890
|
-
}), this.
|
|
2891
|
-
}, r.prototype.
|
|
2892
|
-
if (this.
|
|
2892
|
+
"Enter" === e.key ? l.Jc ? (e.stopPropagation(), a(l.Jc)) : (e.stopPropagation(), i(), o()) : "Esc" !== e.key && "Escape" !== e.key || (e.stopPropagation(), i(), o());
|
|
2893
|
+
}), this.Lc = v, this.Mc = h, this.Ic || (this.Ic = this.data[0], this.Ic && (v.value = this.Ic.name)), c.appendChild(v), c.appendChild(u), c.appendChild(f), c.appendChild(h), c;
|
|
2894
|
+
}, r.prototype.Oc = function () { this.s(), this.Ic ? this.Lc.value = this.Ic.name : (this.Lc.value = "", this.Pc(!0)); }, r.prototype.focus = function () { this.Kc = !0, this.Lc.setAttribute("readonly", "readonly"), this.Lc.focus(), this.Oc(); }, r.prototype.s = function () { this.Mc.style.display = "none"; }, r.prototype.Pc = function (e) {
|
|
2895
|
+
if (this.Nc.value = this.selected ? this.selected.id : null, this.Ic ? this.Lc.value = this.Ic.name : this.Lc.value = "", "function" == typeof this.onSelect) {
|
|
2893
2896
|
var t = { control: this, ui: e };
|
|
2894
2897
|
this.onSelect(t);
|
|
2895
2898
|
}
|
|
@@ -2900,11 +2903,11 @@ var DayPilot = { Global: {} };
|
|
|
2900
2903
|
n.type = "hidden", n.name = e.name, n.table = this, t.appendChild(n);
|
|
2901
2904
|
var a = document.createElement("div");
|
|
2902
2905
|
a.className = this.theme + "_table";
|
|
2903
|
-
var i = this.
|
|
2906
|
+
var i = this.Rc();
|
|
2904
2907
|
a.appendChild(i);
|
|
2905
|
-
var r = e.
|
|
2908
|
+
var r = e.Sc({});
|
|
2906
2909
|
r.spacer = !0;
|
|
2907
|
-
var o = this.
|
|
2910
|
+
var o = this.Tc(r);
|
|
2908
2911
|
o.classList.add(e.theme + "_spacer"), a.appendChild(o);
|
|
2909
2912
|
var s = document.createElement("div");
|
|
2910
2913
|
s.className = e.theme + "_tbody", a.appendChild(s), t.appendChild(a);
|
|
@@ -2918,18 +2921,18 @@ var DayPilot = { Global: {} };
|
|
|
2918
2921
|
var a = {};
|
|
2919
2922
|
a.result = e.form.serialize(), a.value = {}, t(a), n = a.value;
|
|
2920
2923
|
}
|
|
2921
|
-
var i = e.
|
|
2922
|
-
e.
|
|
2924
|
+
var i = e.Sc(n);
|
|
2925
|
+
e.yc.push(i), e.Uc(), e.Vc();
|
|
2923
2926
|
}
|
|
2924
2927
|
}), this.nav.plus = c, d.appendChild(c), t.appendChild(d), t;
|
|
2925
|
-
}, o.prototype.
|
|
2928
|
+
}, o.prototype.Rc = 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 (n) { var a = document.createElement("div"); a.classList.add(e.theme + "_cell"), a.innerText = n.name, t.appendChild(a); }), t; }, o.prototype.Wc = function () { var e = this.item.max || 0; return !!(e && this.yc.length >= e); }, o.prototype.save = function () { var e = this, t = []; return e.yc.forEach(function (e) { var n = {}; e.cells.forEach(function (e) { n[e.id] = e.value; }), t.push(n); }), t; }, o.prototype.load = function (e) {
|
|
2926
2929
|
if ("[object Array]" !== Object.prototype.toString.call(e))
|
|
2927
2930
|
throw new Error("Array expected");
|
|
2928
|
-
this.data = e, this.
|
|
2929
|
-
}, o.prototype.
|
|
2931
|
+
this.data = e, this.Xc(), this.Uc();
|
|
2932
|
+
}, o.prototype.Yc = function () { this.disabled ? this.nav.main.classList.add(this.theme + "_disabled") : this.nav.main.classList.remove(this.theme + "_disabled"), this.Wc() ? this.nav.plus.classList.add(this.theme + "_plus_max") : this.nav.plus.classList.remove(this.theme + "_plus_max"); }, o.prototype.Xc = function () { var e = this; this.yc = [], this.data.forEach(function (t) { var n = e.Sc(t); e.yc.push(n); }); }, o.prototype.Zc = function (e) { var t = this, n = t.yc.indexOf(e); t.yc.splice(n, 1); }, o.prototype.Sc = function (e) {
|
|
2930
2933
|
var t = this, n = {};
|
|
2931
2934
|
return n.data = e, n.cells = [], t.item.columns.forEach(function (a) {
|
|
2932
|
-
var i = a.id, r = e[i], o = t
|
|
2935
|
+
var i = a.id, r = e[i], o = t.$c(a);
|
|
2933
2936
|
if ("undefined" == typeof r)
|
|
2934
2937
|
if ("text" === o)
|
|
2935
2938
|
r = "";
|
|
@@ -2942,19 +2945,19 @@ var DayPilot = { Global: {} };
|
|
|
2942
2945
|
var l = {};
|
|
2943
2946
|
l.id = i, l.value = r, l.type = o, l.data = a, n.cells.push(l);
|
|
2944
2947
|
}), n;
|
|
2945
|
-
}, o.prototype
|
|
2948
|
+
}, o.prototype.$c = function (e) { var t = e.type; return t || (t = e.options ? "select" : "text"), t; }, o.prototype.Uc = function () {
|
|
2946
2949
|
var e = this;
|
|
2947
|
-
if (this.nav.body.innerHTML = "", this.nav.after.innerHTML = "", this.
|
|
2948
|
-
var t = e.
|
|
2950
|
+
if (this.nav.body.innerHTML = "", this.nav.after.innerHTML = "", this.yc.forEach(function (t) { var n = e.Tc(t); e.nav.body.appendChild(n); }), 0 === this.yc.length) {
|
|
2951
|
+
var t = e._c();
|
|
2949
2952
|
e.nav.after.appendChild(t);
|
|
2950
2953
|
}
|
|
2951
|
-
this.
|
|
2952
|
-
}, o.prototype.
|
|
2954
|
+
this.Yc();
|
|
2955
|
+
}, o.prototype._c = function () { var e = document.createElement("div"); return e.className = this.theme + "_empty", e; }, o.prototype.Tc = function (e) {
|
|
2953
2956
|
var t = this, n = document.createElement("div");
|
|
2954
2957
|
n.className = t.theme + "_row", e.cells.forEach(function (a) {
|
|
2955
2958
|
var i = document.createElement("div");
|
|
2956
2959
|
i.className = t.theme + "_cell";
|
|
2957
|
-
var r = t.
|
|
2960
|
+
var r = t.ad(a);
|
|
2958
2961
|
if (e.spacer) {
|
|
2959
2962
|
var o = document.createElement("div");
|
|
2960
2963
|
o.style.height = "0px", o.style.overflow = "hidden", o.appendChild(r), i.appendChild(o);
|
|
@@ -2966,22 +2969,22 @@ var DayPilot = { Global: {} };
|
|
|
2966
2969
|
var a = document.createElement("div");
|
|
2967
2970
|
a.classList.add(t.theme + "_cell"), a.classList.add(t.theme + "_rowaction");
|
|
2968
2971
|
var i = document.createElement("span");
|
|
2969
|
-
return i.className = this.theme + "_delete", i.addEventListener("click", function () { t.disabled || (t
|
|
2970
|
-
}, o.prototype.
|
|
2972
|
+
return i.className = this.theme + "_delete", i.addEventListener("click", function () { t.disabled || (t.Zc(e), t.Uc(), t.Vc()); }), e.spacer || a.appendChild(i), n.appendChild(a), n;
|
|
2973
|
+
}, o.prototype.Vc = function () {
|
|
2971
2974
|
var e = this;
|
|
2972
2975
|
if ("function" == typeof e.onInput) {
|
|
2973
2976
|
var t = {};
|
|
2974
2977
|
e.onInput(t);
|
|
2975
2978
|
}
|
|
2976
|
-
}, o.prototype.
|
|
2979
|
+
}, o.prototype.ad = function (e) {
|
|
2977
2980
|
var t = this, n = e.type;
|
|
2978
2981
|
if ("text" === n || "number" === n) {
|
|
2979
2982
|
var a = document.createElement("input");
|
|
2980
|
-
return a.type = n, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function () { "number" === n ? e.value = Number(this.value) : e.value = this.value, t.
|
|
2983
|
+
return a.type = n, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function () { "number" === n ? e.value = Number(this.value) : e.value = this.value, t.Vc(); }), a;
|
|
2981
2984
|
}
|
|
2982
2985
|
if ("select" === n) {
|
|
2983
2986
|
var i = document.createElement("select");
|
|
2984
|
-
return t.disabled && (i.disabled = !0), e.data.options.forEach(function (t) { var n = document.createElement("option"); n.innerText = t.name, n.value = t.id, n.
|
|
2987
|
+
return t.disabled && (i.disabled = !0), e.data.options.forEach(function (t) { var n = document.createElement("option"); n.innerText = t.name, n.value = t.id, n.Gc = t.id, i.appendChild(n), e.value === t.id && n.setAttribute("selected", !0); }), i.addEventListener("change", function () { var n = i.options[i.selectedIndex]; n && "undefined" != typeof n.Gc && (e.value = n.Gc), t.Vc(); }), i;
|
|
2985
2988
|
}
|
|
2986
2989
|
throw new Error("Unsupported item type: " + n);
|
|
2987
2990
|
}, o.prototype.focus = function () { };
|
|
@@ -2994,7 +2997,7 @@ var DayPilot = { Global: {} };
|
|
|
2994
2997
|
var i = this;
|
|
2995
2998
|
this.id = n, 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.Q = !1, this.R = {};
|
|
2996
2999
|
var r = this.R;
|
|
2997
|
-
this.X = function (e) { var t = JSON.parse(e); return t.CallBackRedirect ? void (document.location.href = t.CallBackRedirect) : "None" === t.UpdateType ? void i.fireAfterRenderDetached(t.CallBackData, !0) : (i.events.list = t.Events, "Full" === t.UpdateType && (i.startDate = t.StartDate, i.timeFormat = t.TimeFormat ? t.TimeFormat : i.timeFormat, "undefined" != typeof t.WeekStarts && (i.weekStarts = t.WeekStarts), i.hashes = t.Hashes), i.Z(), i.
|
|
3000
|
+
this.X = function (e) { var t = JSON.parse(e); return t.CallBackRedirect ? void (document.location.href = t.CallBackRedirect) : "None" === t.UpdateType ? void i.fireAfterRenderDetached(t.CallBackData, !0) : (i.events.list = t.Events, "Full" === t.UpdateType && (i.startDate = t.StartDate, i.timeFormat = t.TimeFormat ? t.TimeFormat : i.timeFormat, "undefined" != typeof t.WeekStarts && (i.weekStarts = t.WeekStarts), i.hashes = t.Hashes), i.Z(), i.bd(), i.ha(), "Full" === t.UpdateType && (i.cd(), i.dd()), i.ma(), i.show(), i.na(), void i.fireAfterRenderDetached(t.CallBackData, !0)); }, this.fireAfterRenderDetached = function (e, t) { var n = function (e, t) { return function () { i.afterRender && i.afterRender(e, t); }; }; window.setTimeout(n(e, t), 0); }, this.lineHeight = function () { return this.eventHeight + this.lineSpace; }, this.events = {}, this.events.add = function (e) {
|
|
2998
3001
|
var t = null;
|
|
2999
3002
|
if (e instanceof DayPilot.Event)
|
|
3000
3003
|
t = e.data;
|
|
@@ -3060,7 +3063,7 @@ var DayPilot = { Global: {} };
|
|
|
3060
3063
|
var s = {};
|
|
3061
3064
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = n, "function" == typeof t && t(s), s.preventDefault.value)
|
|
3062
3065
|
return;
|
|
3063
|
-
i.events.list = n, i.
|
|
3066
|
+
i.events.list = n, i.La && i.update();
|
|
3064
3067
|
}
|
|
3065
3068
|
};
|
|
3066
3069
|
if (i.eventsLoadMethod && "POST" === i.eventsLoadMethod.toUpperCase())
|
|
@@ -3069,18 +3072,18 @@ var DayPilot = { Global: {} };
|
|
|
3069
3072
|
var o = e, s = "start=" + i.visibleStart().toString() + "&end=" + i.visibleEnd().toString();
|
|
3070
3073
|
o += o.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": o, "success": r, "error": a });
|
|
3071
3074
|
}
|
|
3072
|
-
}, this.events.forRange = function (e, t) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var n = (i.events.list || []).map(function (e) { return new DayPilot.Event(e); }); return n.sort(i.
|
|
3073
|
-
if (i.
|
|
3075
|
+
}, this.events.forRange = function (e, t) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var n = (i.events.list || []).map(function (e) { return new DayPilot.Event(e); }); return n.sort(i.zb), n.filter(function (n) { var a = n.start(), i = n.end(); return a === i && a === e || DayPilot.Util.overlaps(e, t, a, i); }); }, this.update = function (e) {
|
|
3076
|
+
if (i.sb(e), this.La) {
|
|
3074
3077
|
if (i.Q)
|
|
3075
3078
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");
|
|
3076
3079
|
if (this.cells) {
|
|
3077
|
-
i.Z(), i.
|
|
3080
|
+
i.Z(), i.bd(), i.ha(), i.cd(), i.dd(), i.ma(), i.u(), i.na(), this.visible ? this.show() : this.hide();
|
|
3078
3081
|
}
|
|
3079
3082
|
}
|
|
3080
|
-
}, this.
|
|
3083
|
+
}, this.ub = null, this.sb = function (e) {
|
|
3081
3084
|
if (e) {
|
|
3082
3085
|
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? i.events.list = e.list : i.events.list = e; } } };
|
|
3083
|
-
this.
|
|
3086
|
+
this.ub = t;
|
|
3084
3087
|
for (var n in e)
|
|
3085
3088
|
if (t[n]) {
|
|
3086
3089
|
var a = t[n];
|
|
@@ -3089,14 +3092,14 @@ var DayPilot = { Global: {} };
|
|
|
3089
3092
|
else
|
|
3090
3093
|
i[n] = e[n];
|
|
3091
3094
|
}
|
|
3092
|
-
}, this.
|
|
3093
|
-
var e = this.
|
|
3095
|
+
}, this.vb = function () {
|
|
3096
|
+
var e = this.ub;
|
|
3094
3097
|
for (var t in e) {
|
|
3095
3098
|
var n = e[t];
|
|
3096
3099
|
n.postInit && n.postInit();
|
|
3097
3100
|
}
|
|
3098
|
-
}, this.
|
|
3099
|
-
var t = this.
|
|
3101
|
+
}, this.xb = {}, this.xb.events = [], this.yb = function (e) {
|
|
3102
|
+
var t = this.xb.events, n = this.events.list[e], a = {};
|
|
3100
3103
|
for (var r in n)
|
|
3101
3104
|
a[r] = n[r];
|
|
3102
3105
|
if ("function" == typeof this.onBeforeEventRender) {
|
|
@@ -3111,7 +3114,7 @@ var DayPilot = { Global: {} };
|
|
|
3111
3114
|
throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: " + typeof e);
|
|
3112
3115
|
if ("function" == typeof this.onBeforeEventRender)
|
|
3113
3116
|
for (var t = 0; t < e.length; t++)
|
|
3114
|
-
this.
|
|
3117
|
+
this.yb(t);
|
|
3115
3118
|
for (var n = 0; n < e.length; n++) {
|
|
3116
3119
|
var a = e[n];
|
|
3117
3120
|
if ("object" != typeof a)
|
|
@@ -3124,12 +3127,12 @@ var DayPilot = { Global: {} };
|
|
|
3124
3127
|
if (!(i.getTime() > r.getTime()))
|
|
3125
3128
|
for (var t = 0; t < this.rows.length; t++) {
|
|
3126
3129
|
var o = this.rows[t], s = new DayPilot.Event(a, this);
|
|
3127
|
-
o.belongsHere(s) && (o.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.
|
|
3130
|
+
o.belongsHere(s) && (o.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.xb.events[n]));
|
|
3128
3131
|
}
|
|
3129
3132
|
}
|
|
3130
3133
|
for (var l = 0; l < this.rows.length; l++) {
|
|
3131
3134
|
var o = this.rows[l];
|
|
3132
|
-
o.events.sort(this.
|
|
3135
|
+
o.events.sort(this.zb);
|
|
3133
3136
|
for (var d = 0; d < this.rows[l].events.length; d++) {
|
|
3134
3137
|
var c = o.events[d], u = o.getStartColumn(c), h = o.getWidth(c);
|
|
3135
3138
|
o.putIntoLine(c, u, h, l);
|
|
@@ -3139,26 +3142,26 @@ var DayPilot = { Global: {} };
|
|
|
3139
3142
|
}, this.Z = function () {
|
|
3140
3143
|
for (var e = 0; e < this.elements.events.length; e++) {
|
|
3141
3144
|
var t = this.elements.events[e];
|
|
3142
|
-
i.
|
|
3145
|
+
i.Oa(t);
|
|
3143
3146
|
}
|
|
3144
3147
|
this.elements.events = [];
|
|
3145
|
-
}, this.
|
|
3148
|
+
}, this.Oa = function (e) {
|
|
3146
3149
|
!function () {
|
|
3147
3150
|
var n = e.domArgs;
|
|
3148
3151
|
if (e.domArgs = null, n && "function" == typeof i.onBeforeEventDomRemove && i.onBeforeEventDomRemove(n), n && "function" == typeof i.onBeforeEventDomAdd) {
|
|
3149
|
-
var a = n && n.
|
|
3152
|
+
var a = n && n.Pa;
|
|
3150
3153
|
if (a) {
|
|
3151
|
-
i.
|
|
3154
|
+
i.Ra.Qa && t(n.element) && (i.Ra.Sa = !0, i.Ra.Ta(a), i.Ra.Sa = !1);
|
|
3152
3155
|
}
|
|
3153
3156
|
}
|
|
3154
3157
|
}(), e.event = null, e.click = null, e.parentNode.removeChild(e);
|
|
3155
|
-
}, this.na = function () { this.
|
|
3158
|
+
}, this.na = function () { this.ed(); }, this.ed = function () {
|
|
3156
3159
|
this.elements.events = [];
|
|
3157
3160
|
for (var e = 0; e < this.rows.length; e++)
|
|
3158
3161
|
for (var t = this.rows[e], n = 0; n < t.lines.length; n++)
|
|
3159
3162
|
for (var a = t.lines[n], i = 0; i < a.length; i++)
|
|
3160
|
-
this.
|
|
3161
|
-
}, this.
|
|
3163
|
+
this.Ua(a[i]);
|
|
3164
|
+
}, this.zb = function (e, t) {
|
|
3162
3165
|
if (!(e && t && e.start && t.start))
|
|
3163
3166
|
return 0;
|
|
3164
3167
|
var n = e.start().getTime() - t.start().getTime();
|
|
@@ -3196,11 +3199,11 @@ var DayPilot = { Global: {} };
|
|
|
3196
3199
|
for (var n = this.headerHeight, a = 0; a < e; a++)
|
|
3197
3200
|
n += this.rows[a].getHeight();
|
|
3198
3201
|
return n += this.cellHeaderHeight, n += t * this.lineHeight();
|
|
3199
|
-
}, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.
|
|
3202
|
+
}, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.Ua = function (n) {
|
|
3200
3203
|
var a = n.cache || n.data, r = a.borderRadius || i.eventBorderRadius;
|
|
3201
3204
|
"number" == typeof r && (r += "px");
|
|
3202
3205
|
var o = n.part.row, s = n.part.line, l = n.part.colStart, d = n.part.colWidth, c = this.getCellWidth() * l, u = this.getCellWidth() * d, h = this.getEventTop(o, s), f = document.createElement("div");
|
|
3203
|
-
f.setAttribute("unselectable", "on"), f.style.height = this.eventHeight + "px", f.style.overflow = "hidden", f.className = this.L("_event"), a.cssClass && DayPilot.Util.addClass(f, a.cssClass), n.part.startsHere || DayPilot.Util.addClass(f, this.L("_event_continueleft")), n.part.endsHere || DayPilot.Util.addClass(f, this.L("_event_continueright")), f.event = n, f.style.width = u + "%", f.style.position = "absolute", f.style.left = c + "%", f.style.top = h + "px", this.showToolTip && n.client.toolTip() && (f.title = n.client.toolTip()), f.onclick = i.va, f.oncontextmenu = i.
|
|
3206
|
+
f.setAttribute("unselectable", "on"), f.style.height = this.eventHeight + "px", f.style.overflow = "hidden", f.className = this.L("_event"), a.cssClass && DayPilot.Util.addClass(f, a.cssClass), n.part.startsHere || DayPilot.Util.addClass(f, this.L("_event_continueleft")), n.part.endsHere || DayPilot.Util.addClass(f, this.L("_event_continueright")), f.event = n, f.style.width = u + "%", f.style.position = "absolute", f.style.left = c + "%", f.style.top = h + "px", this.showToolTip && n.client.toolTip() && (f.title = n.client.toolTip()), f.onclick = i.va, f.oncontextmenu = i.fd, f.onmousedown = function (t) {
|
|
3204
3207
|
t = t || window.event;
|
|
3205
3208
|
var a = t.which || t.button;
|
|
3206
3209
|
if (t.cancelBubble = !0, t.stopPropagation && t.stopPropagation(), 1 === a)
|
|
@@ -3250,11 +3253,11 @@ var DayPilot = { Global: {} };
|
|
|
3250
3253
|
if (e.control = i, e.e = n, e.element = null, f.domArgs = e, "function" == typeof i.onBeforeEventDomAdd && i.onBeforeEventDomAdd(e), e.element) {
|
|
3251
3254
|
var a = v;
|
|
3252
3255
|
if (a) {
|
|
3253
|
-
e.
|
|
3256
|
+
e.Pa = a;
|
|
3254
3257
|
if (t(e.element)) {
|
|
3255
|
-
if (!i.
|
|
3258
|
+
if (!i.Ra.Qa)
|
|
3256
3259
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
3257
|
-
i.Sa
|
|
3260
|
+
i.Ra.Sa = !0, i.Ra.Va(e.element, a, { "style": { "flexGrow": 1 } }), i.Ra.Sa = !1;
|
|
3258
3261
|
}
|
|
3259
3262
|
else
|
|
3260
3263
|
a.appendChild(e.element);
|
|
@@ -3263,7 +3266,7 @@ var DayPilot = { Global: {} };
|
|
|
3263
3266
|
else
|
|
3264
3267
|
v.innerHTML = n.client.innerHTML();
|
|
3265
3268
|
}(), this.elements.events.push(f), this.nav.events.appendChild(f);
|
|
3266
|
-
}, this.lastVisibleDayOfMonth = function () { return this.startDate.lastDayOfMonth(); }, this.
|
|
3269
|
+
}, this.lastVisibleDayOfMonth = function () { return this.startDate.lastDayOfMonth(); }, this.bd = function () {
|
|
3267
3270
|
"string" == typeof this.startDate && (this.startDate = new DayPilot.Date(this.startDate)), this.startDate = this.startDate.firstDayOfMonth(), this.firstDate = this.startDate.firstDayOfWeek(this.getWeekStart());
|
|
3268
3271
|
var e = this.lastVisibleDayOfMonth(), t = DayPilot.DateUtil.daysDiff(this.firstDate, e) + 1, n = Math.ceil(t / 7);
|
|
3269
3272
|
this.days = 7 * n, this.rows = [];
|
|
@@ -3289,7 +3292,7 @@ var DayPilot = { Global: {} };
|
|
|
3289
3292
|
for (var e = this.headerHeight, t = 0; t < this.rows.length; t++)
|
|
3290
3293
|
e += this.rows[t].getHeight();
|
|
3291
3294
|
return e;
|
|
3292
|
-
}, 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.L = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.
|
|
3295
|
+
}, 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.L = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.Wa = function () {
|
|
3293
3296
|
var t = this.nav.top;
|
|
3294
3297
|
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 () { return !1; }, this.hideUntilInit && (t.style.visibility = "hidden"), this.visible || (t.style.display = "none"), t.className = this.L("_main");
|
|
3295
3298
|
var n = document.createElement("div");
|
|
@@ -3360,7 +3363,7 @@ var DayPilot = { Global: {} };
|
|
|
3360
3363
|
for (var t = DayPilot.DateUtil.daysDiff(this.firstDate, e), n = { x: 0, y: 0 }; t >= 7;)
|
|
3361
3364
|
n.y++, t -= 7;
|
|
3362
3365
|
return n.x = t, n;
|
|
3363
|
-
}, this.
|
|
3366
|
+
}, this.dd = function () {
|
|
3364
3367
|
var e = document.createElement("div");
|
|
3365
3368
|
e.oncontextmenu = function () { return !1; }, this.nav.cells.appendChild(e), this.cells = [];
|
|
3366
3369
|
for (var t = 0; t < this.getColCount(); t++) {
|
|
@@ -3372,26 +3375,26 @@ var DayPilot = { Global: {} };
|
|
|
3372
3375
|
var i = document.createElement("div");
|
|
3373
3376
|
i.setAttribute("unselectable", "on"), i.innerHTML = r.locale().dayNames[a], n.appendChild(i), i.style.position = "absolute", i.style.top = "0px", i.style.bottom = "0px", i.style.left = "0px", i.style.right = "0px", i.className = this.L("_header_inner"), i.innerHTML = r.locale().dayNames[a], e.appendChild(n);
|
|
3374
3377
|
for (var o = 0; o < this.rows.length; o++)
|
|
3375
|
-
this.
|
|
3378
|
+
this.gd(t, o, e);
|
|
3376
3379
|
}
|
|
3377
|
-
}, this.
|
|
3380
|
+
}, this.cd = function () {
|
|
3378
3381
|
for (var e = 0; e < this.cells.length; e++)
|
|
3379
3382
|
for (var t = 0; t < this.cells[e].length; t++) {
|
|
3380
3383
|
var n = i.cells[e][t];
|
|
3381
|
-
i.
|
|
3384
|
+
i.fb(n);
|
|
3382
3385
|
}
|
|
3383
3386
|
this.nav.cells.innerHTML = "";
|
|
3384
|
-
}, this.
|
|
3387
|
+
}, this.fb = function (e) {
|
|
3385
3388
|
!function () {
|
|
3386
3389
|
var n = e.domArgs;
|
|
3387
3390
|
if (e.domArgs = null, n && "function" == typeof i.onBeforeCellDomRemove && i.onBeforeCellDomRemove(n), n && "function" == typeof i.onBeforeCellDomAdd) {
|
|
3388
|
-
var a = n && n.
|
|
3391
|
+
var a = n && n.Pa;
|
|
3389
3392
|
if (a) {
|
|
3390
|
-
i.
|
|
3393
|
+
i.Ra.Qa && t(n.element) && (i.Ra.Sa = !0, i.Ra.Ta(a), i.Ra.Sa = !1);
|
|
3391
3394
|
}
|
|
3392
3395
|
}
|
|
3393
3396
|
}(), e.onclick = null;
|
|
3394
|
-
}, this.ta = function () { return 2 === i.api; }, this.
|
|
3397
|
+
}, this.ta = function () { return 2 === i.api; }, this.gd = function (n, a, o) {
|
|
3395
3398
|
var s = this.rows[a], l = this.firstDate.addDays(7 * a + n), d = l.getDay(), c = null;
|
|
3396
3399
|
c = 1 === d ? r.locale().monthNames[l.getMonth()] + " " + d : "" + d;
|
|
3397
3400
|
var u = !i.isWeekend(l), h = { "start": l, "end": l.addDays(1), "properties": { "headerHtml": c, "backColor": null, "business": u, "html": null } }, f = {};
|
|
@@ -3424,11 +3427,11 @@ var DayPilot = { Global: {} };
|
|
|
3424
3427
|
if (e.control = i, e.cell = h, e.element = null, p.domArgs = e, "function" == typeof i.onBeforeCellDomAdd && i.onBeforeCellDomAdd(e), e.element) {
|
|
3425
3428
|
var n = g;
|
|
3426
3429
|
if (n) {
|
|
3427
|
-
e.
|
|
3430
|
+
e.Pa = n;
|
|
3428
3431
|
if (t(e.element)) {
|
|
3429
|
-
if (!i.
|
|
3432
|
+
if (!i.Ra.Qa)
|
|
3430
3433
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
3431
|
-
i.Sa
|
|
3434
|
+
i.Ra.Sa = !0, i.Ra.Va(e.element, n), i.Ra.Sa = !1;
|
|
3432
3435
|
}
|
|
3433
3436
|
else
|
|
3434
3437
|
n.appendChild(e.element);
|
|
@@ -3470,7 +3473,7 @@ var DayPilot = { Global: {} };
|
|
|
3470
3473
|
break;
|
|
3471
3474
|
case "JavaScript": i.onEventClick(n);
|
|
3472
3475
|
}
|
|
3473
|
-
}, this.
|
|
3476
|
+
}, this.fd = function (e) { var t = e.currentTarget; return i.xa(t.event), !1; }, this.xa = function (e) {
|
|
3474
3477
|
if (this.event = e, !e.client.rightClickEnabled())
|
|
3475
3478
|
return !1;
|
|
3476
3479
|
var t = {};
|
|
@@ -3587,7 +3590,7 @@ var DayPilot = { Global: {} };
|
|
|
3587
3590
|
break;
|
|
3588
3591
|
case "JavaScript": i.onTimeRangeSelected(e, t);
|
|
3589
3592
|
}
|
|
3590
|
-
}, this.wa = {}, this.wa.scope = null, this.wa.notify = function () { i.wa.scope && i.wa.scope["$apply"](); }, this.wa.apply = function (e) { e(); }, this.clearSelection = function () { i.clearShadow(); }, this.commandCallBack = function (e, t) { var n = {}; n.command = e, this.V("Command", t, n); }, this.isWeekend = function (e) { return e = new DayPilot.Date(e), 0 === e.dayOfWeek() || 6 === e.dayOfWeek(); }, this.R.locale = function () { var e = DayPilot.Locale.find(i.locale); return e ? e : DayPilot.Locale.US; }, this.R.da = function () { return "Disabled" !== i.xssProtection; }, this.debug = function (e) { this.debuggingEnabled && (i.debugMessages || (i.debugMessages = []), i.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.dispose = function () { var e = i; e.Q || (e.Q = !0, e.
|
|
3593
|
+
}, this.wa = {}, this.wa.scope = null, this.wa.notify = function () { i.wa.scope && i.wa.scope["$apply"](); }, this.wa.apply = function (e) { e(); }, this.clearSelection = function () { i.clearShadow(); }, this.commandCallBack = function (e, t) { var n = {}; n.command = e, this.V("Command", t, n); }, this.isWeekend = function (e) { return e = new DayPilot.Date(e), 0 === e.dayOfWeek() || 6 === e.dayOfWeek(); }, this.R.locale = function () { var e = DayPilot.Locale.find(i.locale); return e ? e : DayPilot.Locale.US; }, this.R.da = function () { return "Disabled" !== i.xssProtection; }, this.debug = function (e) { this.debuggingEnabled && (i.debugMessages || (i.debugMessages = []), i.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.dispose = function () { var e = i; e.Q || (e.Q = !0, e.cd(), e.Z(), 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.Q; }, this.pb = function () { e.globalHandlers || (e.globalHandlers = !0, DayPilot.re(document, "mouseup", e.gMouseUp)); }, this.loadFromServer = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof i.events.list || !i.events.list); }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { i.visible = !0, i.nav.top.style.display = ""; }, this.hide = function () { i.visible = !1, i.nav.top.style.display = "none"; }, this.wb = function () {
|
|
3591
3594
|
if (this.id && this.id.tagName)
|
|
3592
3595
|
this.nav.top = this.id;
|
|
3593
3596
|
else {
|
|
@@ -3596,19 +3599,19 @@ var DayPilot = { Global: {} };
|
|
|
3596
3599
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
3597
3600
|
throw "DayPilot.Month: The placeholder element not found: '" + this.id + "'.";
|
|
3598
3601
|
}
|
|
3599
|
-
}, this.
|
|
3600
|
-
var a = i.
|
|
3602
|
+
}, this.Eb = function () { this.bd(), this.Wa(), this.dd(), this.pb(), this.V("Init"); }, this.$a = function (e, t) { return i.R.da() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Ra = {}, this.Ra.Qa = null, this.Ra.Lb = function (e, t, n) {
|
|
3603
|
+
var a = i.Ra.Qa;
|
|
3601
3604
|
if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
3602
3605
|
var r = a.createVNode(e, n);
|
|
3603
3606
|
a.render(r, t);
|
|
3604
3607
|
}
|
|
3605
|
-
}, this.
|
|
3606
|
-
var a = i.
|
|
3608
|
+
}, this.Ra.Va = function (e, t, n) {
|
|
3609
|
+
var a = i.Ra.Qa;
|
|
3607
3610
|
if ("function" == typeof a.render) {
|
|
3608
3611
|
var r = e;
|
|
3609
3612
|
DayPilot.isArray(e) && (r = a.h("div", n, e)), a.render(r, t);
|
|
3610
3613
|
}
|
|
3611
|
-
}, this.
|
|
3614
|
+
}, this.Ra.Ta = function (e) { var t = i.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = this.sb, this.internal.xssTextHtml = i.$a, this.internal.enableVue = function (e) { i.Ra.Qa = e; }, this.internal.vueRef = function () { return i.Ra.Qa; }, this.internal.vueRendering = function () { return i.Ra.Sa; }, this.init = function () { return this.wb(), this.loadFromServer() ? void this.Eb() : (this.bd(), this.ha(), this.Wa(), this.dd(), this.u(), this.na(), this.pb(), this.fireAfterRenderDetached(null, !1), this.La = !0, this); }, this.Init = this.init, Object.defineProperty(this, "durationBarVisible", { get: function () { return i.eventBarVisible; } }), this.sb(a);
|
|
3612
3615
|
}, e.gMouseUp = function (t) {
|
|
3613
3616
|
if (e.movingEvent) {
|
|
3614
3617
|
var n = e.movingEvent;
|
|
@@ -3733,25 +3736,25 @@ var DayPilot = { Global: {} };
|
|
|
3733
3736
|
var i = this;
|
|
3734
3737
|
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.showToday = !1, this.showWeekNumbers = !1, this.todayHtml = null, this.todayHeight = 40, this.todayPosition = "Bottom", this.todayText = "Today", 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.onTodayClick = null, this.R = {};
|
|
3735
3738
|
var r = this.R;
|
|
3736
|
-
this.
|
|
3737
|
-
var o = this.
|
|
3738
|
-
this.nav = {}, this.
|
|
3739
|
-
if (!r.
|
|
3739
|
+
this.hd = {};
|
|
3740
|
+
var o = this.hd;
|
|
3741
|
+
this.nav = {}, this.xb = {}, this.jd = function () { this.root.dp = this, this.root.className = this.L("_main"), "Horizontal" === this.orientation ? (r.kd() || (this.root.style.width = this.showMonths * (7 * r.cellWidth() + this.ld()) + "px"), this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : r.kd() || (this.root.style.width = 7 * r.cellWidth() + this.ld() + "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.ta = function () { return 2 === i.api; }, this.cd = function () { this.root.innerHTML = ""; }, this.L = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.md = function (e, t) { var n = this.L("_" + t); DayPilot.Util.addClass(e, n); }, this.nd = function (e, t) { var n = this.L("_" + t); DayPilot.Util.removeClass(e, n); }, this.od = function () {
|
|
3742
|
+
if (!r.kd())
|
|
3740
3743
|
return null;
|
|
3741
3744
|
var e = 7;
|
|
3742
3745
|
return this.showWeekNumbers && e++, 100 / e;
|
|
3743
|
-
}, this.
|
|
3746
|
+
}, this.pd = function () { return r.kd() ? null : r.cellWidth(); }, this.qd = function (e) { return "number" != typeof e && (e = 1), r.kd() ? this.od() * e : this.pd() * e; }, this.rd = function (e) { var t = r.kd() ? "%" : "px"; return this.qd(e) + t; }, this.dd = function (t, n) {
|
|
3744
3747
|
var a = {};
|
|
3745
3748
|
a.cells = [], a.days = [], a.weeks = [];
|
|
3746
3749
|
var o = this.startDate.addMonths(t), s = n.before, l = n.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;
|
|
3747
3750
|
a.rowCount = f;
|
|
3748
|
-
var v = (new DayPilot.Date).getDatePart(), p = 7 * r.cellWidth() + this.
|
|
3751
|
+
var v = (new DayPilot.Date).getDatePart(), p = 7 * r.cellWidth() + this.ld();
|
|
3749
3752
|
a.width = p;
|
|
3750
3753
|
var m = this.cellHeight * f + this.titleHeight + this.dayHeaderHeight;
|
|
3751
3754
|
a.height = m;
|
|
3752
3755
|
var g = document.createElement("div");
|
|
3753
|
-
if (r.
|
|
3754
|
-
g.style.position = "absolute", r.
|
|
3756
|
+
if (r.kd() ? "Horizontal" === this.orientation && (g.style.width = 100 / i.showMonths + "%") : g.style.width = p + "px", g.style.height = m + "px", "Horizontal" === this.orientation)
|
|
3757
|
+
g.style.position = "absolute", r.kd() ? (g.style.left = 100 / i.showMonths * t + "%", a.leftPct = 100 / i.showMonths * t) : g.style.left = p * t + "px", g.style.top = "0px", a.top = 0, a.left = p * t;
|
|
3755
3758
|
else {
|
|
3756
3759
|
g.style.position = "relative";
|
|
3757
3760
|
var y = t > 0 ? i.months[t - 1].top + i.months[t - 1].height : 0;
|
|
@@ -3759,11 +3762,11 @@ var DayPilot = { Global: {} };
|
|
|
3759
3762
|
}
|
|
3760
3763
|
g.className = this.L("_month"), g.style.cursor = "default", g.style.userSelect = "none", g.style.webkitUserSelect = "none", g.month = a, a.div = g, this.root.appendChild(g);
|
|
3761
3764
|
var b = this.titleHeight + this.dayHeaderHeight, w = document.createElement("div");
|
|
3762
|
-
w.style.position = "absolute", w.style.left = "0px", w.style.right = "0px", w.style.top = "0px", w.style.width = i.
|
|
3765
|
+
w.style.position = "absolute", w.style.left = "0px", w.style.right = "0px", w.style.top = "0px", w.style.width = i.rd(), w.style.height = this.titleHeight + "px", w.style.lineHeight = this.titleHeight + "px", w.className = this.L("_titleleft"), n.left && (w.style.cursor = "pointer", w.innerHTML = "<span><</span>", w.onclick = this.sd), g.appendChild(w);
|
|
3763
3766
|
var x = document.createElement("div");
|
|
3764
|
-
x.style.position = "absolute", x.style.left = i.
|
|
3767
|
+
x.style.position = "absolute", x.style.left = i.rd(), x.style.top = "0px", x.style.width = i.rd(i.showWeekNumbers ? 6 : 5), x.style.height = this.titleHeight + "px", x.style.lineHeight = this.titleHeight + "px", x.className = this.L("_title"), x.innerHTML = r.locale().monthNames[o.getMonth()] + " " + o.getYear(), g.appendChild(x), this.ti = x;
|
|
3765
3768
|
var _ = document.createElement("div");
|
|
3766
|
-
_.style.position = "absolute", _.style.left = i.
|
|
3769
|
+
_.style.position = "absolute", _.style.left = i.rd(i.showWeekNumbers ? 7 : 6), _.style.right = i.rd(i.showWeekNumbers ? 7 : 6), _.style.top = "0px", _.style.width = i.rd(), _.style.height = this.titleHeight + "px", _.style.lineHeight = this.titleHeight + "px", _.className = this.L("_titleright"), n.right && (_.style.cursor = "pointer", _.innerHTML = "<span>></span>", _.onclick = this.td), g.appendChild(_), this.tr = _;
|
|
3767
3770
|
var C = i.showWeekNumbers ? 1 : 0;
|
|
3768
3771
|
if (this.showWeekNumbers)
|
|
3769
3772
|
for (var k = 0; k < f; k++) {
|
|
@@ -3781,32 +3784,32 @@ var DayPilot = { Global: {} };
|
|
|
3781
3784
|
default: throw "Unknown weekNumberAlgorithm value.";
|
|
3782
3785
|
}
|
|
3783
3786
|
var M = document.createElement("div");
|
|
3784
|
-
M.style.position = "absolute", M.style.left = "0px", M.style.right = "0px", M.style.top = k * this.cellHeight + b + "px", M.style.width = i.
|
|
3787
|
+
M.style.position = "absolute", M.style.left = "0px", M.style.right = "0px", M.style.top = k * this.cellHeight + b + "px", M.style.width = i.rd(), M.style.height = this.cellHeight + "px", M.style.lineHeight = this.cellHeight + "px", M.className = this.L("_weeknumber"), M.innerHTML = "<span>" + S + "</span>", g.appendChild(M), a.weeks.push(M);
|
|
3785
3788
|
}
|
|
3786
3789
|
if (i.showWeekNumbers) {
|
|
3787
3790
|
var M = document.createElement("div");
|
|
3788
|
-
M.style.position = "absolute", M.style.left = "0px", M.style.right = "0px", M.style.top = this.titleHeight + "px", M.style.width = i.
|
|
3791
|
+
M.style.position = "absolute", M.style.left = "0px", M.style.right = "0px", M.style.top = this.titleHeight + "px", M.style.width = i.rd(), M.style.height = this.dayHeaderHeight + "px", M.className = this.L("_dayheader"), g.appendChild(M);
|
|
3789
3792
|
}
|
|
3790
3793
|
for (var T = 0; T < 7; T++) {
|
|
3791
3794
|
a.cells[T] = [];
|
|
3792
3795
|
var M = document.createElement("div");
|
|
3793
|
-
M.style.position = "absolute", M.style.left = i.
|
|
3796
|
+
M.style.position = "absolute", M.style.left = i.rd(T + C), M.style.right = i.rd(T + C), M.style.top = this.titleHeight + "px", M.style.width = i.rd(), M.style.height = this.dayHeaderHeight + "px", M.style.lineHeight = this.dayHeaderHeight + "px", M.className = this.L("_dayheader"), M.innerHTML = "<span>" + this.ud(T) + "</span>", g.appendChild(M), a.days.push(M);
|
|
3794
3797
|
for (var A = function (t) {
|
|
3795
|
-
var n = c.addDays(7 * t + T), d = E.
|
|
3796
|
-
if ("month" === E.
|
|
3798
|
+
var n = c.addDays(7 * t + T), d = E.vd(n) && "none" !== E.wd(), u = n.firstDayOfMonth() === o, h = n < o, f = n >= o.addMonths(1);
|
|
3799
|
+
if ("month" === E.wd())
|
|
3797
3800
|
d = d && u;
|
|
3798
|
-
else if ("day" === E.
|
|
3801
|
+
else if ("day" === E.wd())
|
|
3799
3802
|
d = d && (u || s && h || l && f);
|
|
3800
|
-
else if ("week" === E.
|
|
3803
|
+
else if ("week" === E.wd()) {
|
|
3801
3804
|
var p = n.firstDayOfMonth() === o;
|
|
3802
3805
|
d = d && (p || s && h || l && f);
|
|
3803
3806
|
}
|
|
3804
3807
|
var m = document.createElement("div");
|
|
3805
3808
|
a.cells[T][t] = m;
|
|
3806
|
-
var y = i.
|
|
3807
|
-
m.day = n, m.x = T, m.y = t, m.left = b, m.top = w, m.isCurrentMonth = u, m.isNextMonth = f, m.isPrevMonth = h, m.showBefore = s, m.showAfter = l, m.className = E.L(u ? "_day" : "_dayother"), i.
|
|
3809
|
+
var y = i.xd(T, t), b = y.x, w = y.y, x = r.kd() ? "%" : "px";
|
|
3810
|
+
m.day = n, m.x = T, m.y = t, m.left = b, m.top = w, m.isCurrentMonth = u, m.isNextMonth = f, m.isPrevMonth = h, m.showBefore = s, m.showAfter = l, m.className = E.L(u ? "_day" : "_dayother"), i.md(m, "cell"), n.getTime() === v.getTime() && u && E.md(m, "today"), 0 !== n.dayOfWeek() && 6 !== n.dayOfWeek() || E.md(m, "weekend"), m.style.position = "absolute", m.style.left = b + x, m.style.right = b + x, m.style.top = w + "px", m.style.width = i.rd(), m.style.height = E.cellHeight + "px", m.style.lineHeight = E.cellHeight + "px";
|
|
3808
3811
|
var _ = document.createElement("div");
|
|
3809
|
-
_.style.position = "absolute", _.className = n.getTime() === v.getTime() && u ? E.L("_todaybox") : E.L("_daybox"), i.
|
|
3812
|
+
_.style.position = "absolute", _.className = n.getTime() === v.getTime() && u ? E.L("_todaybox") : E.L("_daybox"), i.md(_, "cell_box"), _.style.left = "0px", _.style.top = "0px", _.style.right = "0px", _.style.bottom = "0px", m.appendChild(_);
|
|
3810
3813
|
var C = null;
|
|
3811
3814
|
E.cells && E.cells[n.toStringSortable()] && (C = E.cells[n.toStringSortable()]);
|
|
3812
3815
|
var k = C || {};
|
|
@@ -3816,43 +3819,43 @@ var DayPilot = { Global: {} };
|
|
|
3816
3819
|
}
|
|
3817
3820
|
if (C && DayPilot.Util.addClass(m, C.cssClass || C.css), u || s && h || l && f) {
|
|
3818
3821
|
var S = document.createElement("div");
|
|
3819
|
-
S.innerHTML = n.getDay(), S.style.position = "absolute", S.style.left = "0px", S.style.top = "0px", S.style.right = "0px", S.style.bottom = "0px", i.
|
|
3822
|
+
S.innerHTML = n.getDay(), S.style.position = "absolute", S.style.left = "0px", S.style.top = "0px", S.style.right = "0px", S.style.bottom = "0px", i.md(S, "cell_text"), m.isClickable = !0, C && C.html && (S.innerHTML = C.html), m.appendChild(S);
|
|
3820
3823
|
}
|
|
3821
|
-
m.onclick = E.
|
|
3824
|
+
m.onclick = E.yd, function () {
|
|
3822
3825
|
if ("function" == typeof i.onBeforeCellDomAdd || "function" == typeof i.onBeforeCellDomRemove) {
|
|
3823
3826
|
var t = {};
|
|
3824
3827
|
if (t.control = i, t.cell = k, t.element = null, m.domArgs = t, "function" == typeof i.onBeforeCellDomAdd && i.onBeforeCellDomAdd(t), t.element) {
|
|
3825
3828
|
var n = _;
|
|
3826
3829
|
if (n) {
|
|
3827
|
-
t.
|
|
3830
|
+
t.Pa = n;
|
|
3828
3831
|
if (e(t.element)) {
|
|
3829
|
-
if (!i.
|
|
3832
|
+
if (!i.Ra.Qa)
|
|
3830
3833
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
3831
|
-
i.Sa
|
|
3834
|
+
i.Ra.Sa = !0, i.Ra.Va(t.element, n), i.Ra.Sa = !1;
|
|
3832
3835
|
}
|
|
3833
3836
|
else
|
|
3834
3837
|
n.appendChild(t.element);
|
|
3835
3838
|
}
|
|
3836
3839
|
}
|
|
3837
3840
|
}
|
|
3838
|
-
}(), g.appendChild(m), d && (i.
|
|
3841
|
+
}(), g.appendChild(m), d && (i.zd(g, T, t), E.selected.push(m));
|
|
3839
3842
|
}, E = this, k = 0; k < f; k++)
|
|
3840
3843
|
A(k);
|
|
3841
3844
|
}
|
|
3842
3845
|
var H = document.createElement("div");
|
|
3843
|
-
H.style.position = "absolute", H.style.left = "0px", H.style.top = b - 2 + "px", H.style.width = i.
|
|
3844
|
-
}, this.
|
|
3846
|
+
H.style.position = "absolute", H.style.left = "0px", H.style.top = b - 2 + "px", H.style.width = i.rd(7 + C), H.style.height = "1px", H.style.fontSize = "1px", H.style.lineHeight = "1px", H.className = this.L("_line"), g.appendChild(H), this.months.push(a);
|
|
3847
|
+
}, this.xd = function (e, t) { var n = this.titleHeight + this.dayHeaderHeight, a = this.showWeekNumbers ? 1 : 0; return { "x": i.qd(e + a), "y": t * this.cellHeight + n }; }, this.zd = function (e, t, n) { var a = e.month.cells[t][n]; i.md(a, "select"); }, this.Ad = function (e, t, n) { var a = e.month.cells[t][n]; i.nd(a, "select"); }, this.ld = function () { return this.showWeekNumbers ? r.cellWidth() : 0; }, this.Bd = function () {
|
|
3845
3848
|
if (this.items)
|
|
3846
3849
|
for (var e = 0; e < this.showMonths; e++)
|
|
3847
3850
|
for (var t = 0; t < 7; t++)
|
|
3848
3851
|
for (var n = 0; n < 6; n++) {
|
|
3849
3852
|
var a = this.months[e].cells[t][n];
|
|
3850
|
-
a && (1 === this.items[a.day.toStringSortable()] ? (this.
|
|
3851
|
-
this.
|
|
3853
|
+
a && (1 === this.items[a.day.toStringSortable()] ? (this.md(a, "busy"), this.nd(a, "free")) : (this.nd(a, "busy"),
|
|
3854
|
+
this.md(a, "free")));
|
|
3852
3855
|
}
|
|
3853
|
-
}, this.
|
|
3856
|
+
}, this.Cd = function () { var e = {}; e.startDate = i.startDate, e.selectionStart = i.selectionStart, e.selectionEnd = i.selectionEnd.addDays(1), i.state.value = JSON.stringify(e); }, this.wd = function () { return (this.selectMode || "").toLowerCase(); }, this.Dd = function () {
|
|
3854
3857
|
var e = this.selectionDay || this.selectionStart;
|
|
3855
|
-
switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.
|
|
3858
|
+
switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.wd()) {
|
|
3856
3859
|
case "day":
|
|
3857
3860
|
this.selectionStart = e, this.selectionDay = e, this.selectionEnd = e;
|
|
3858
3861
|
break;
|
|
@@ -3867,10 +3870,10 @@ var DayPilot = { Global: {} };
|
|
|
3867
3870
|
break;
|
|
3868
3871
|
default: throw "Unknown selectMode value.";
|
|
3869
3872
|
}
|
|
3870
|
-
}, this.
|
|
3873
|
+
}, this.Ed = null, this.select = function (e, t, n) {
|
|
3871
3874
|
var a = t && (t instanceof DayPilot.Date || "string" == typeof t), r = t && "object" == typeof t || "boolean" == typeof t, o = e, s = a ? t : null, l = r ? t : n;
|
|
3872
|
-
if (!this.
|
|
3873
|
-
return void (this.
|
|
3875
|
+
if (!this.La)
|
|
3876
|
+
return void (this.Ed = { "date1": o, "date2": s, "options": l });
|
|
3874
3877
|
var d = !0, c = !0;
|
|
3875
3878
|
l && "object" == typeof l ? (l.dontFocus && (d = !1), l.dontNotify && (c = !1)) : "boolean" == typeof l && (d = !l);
|
|
3876
3879
|
var u = this.selectionStart, h = this.selectionEnd;
|
|
@@ -3878,21 +3881,21 @@ var DayPilot = { Global: {} };
|
|
|
3878
3881
|
var f = !1;
|
|
3879
3882
|
if (d) {
|
|
3880
3883
|
var v = this.startDate;
|
|
3881
|
-
(this.selectionStart < this.
|
|
3884
|
+
(this.selectionStart < this.Fd() || this.selectionStart >= this.Gd()) && (v = this.selectionStart.firstDayOfMonth()), v.toStringSortable() !== this.startDate.toStringSortable() && (f = !0), this.startDate = v;
|
|
3882
3885
|
}
|
|
3883
|
-
s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.
|
|
3884
|
-
}, this.update = function (e) { i.
|
|
3885
|
-
if (i.
|
|
3886
|
+
s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.Dd(), this.cd(), this.jd(), this.Hd(), this.Bd(), this.Cd(), !c || u.equals(this.selectionStart) && h.equals(this.selectionEnd) || this.O(), f && this.Id();
|
|
3887
|
+
}, this.update = function (e) { i.Jd(e); }, this.Jd = function (e) {
|
|
3888
|
+
if (i.sb(e), this.La) {
|
|
3886
3889
|
if (i.Q)
|
|
3887
3890
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");
|
|
3888
|
-
i.
|
|
3891
|
+
i.Kd();
|
|
3889
3892
|
var t = { "day": i.selectionDay, "start": i.selectionStart, "end": i.selectionEnd };
|
|
3890
|
-
i.
|
|
3893
|
+
i.qb(), t.start === i.selectionStart && t.end === i.selectionEnd && t.day === i.selectionDay || i.O();
|
|
3891
3894
|
}
|
|
3892
|
-
}, this.
|
|
3895
|
+
}, this.qb = function () { this.cd(), this.jd(), this.Dd(), this.Hd(), this.ha(), this.Bd(), this.Cd(), this.visible ? this.show() : this.hide(); }, this.Kd = function () { i.xb = {}; }, this.ub = null, this.sb = function (e) {
|
|
3893
3896
|
if (e) {
|
|
3894
3897
|
var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? i.events.list = e.list : i.events.list = e); } } };
|
|
3895
|
-
this.
|
|
3898
|
+
this.ub = t;
|
|
3896
3899
|
for (var n in e)
|
|
3897
3900
|
if (t[n]) {
|
|
3898
3901
|
var a = t[n];
|
|
@@ -3901,20 +3904,20 @@ var DayPilot = { Global: {} };
|
|
|
3901
3904
|
else
|
|
3902
3905
|
i[n] = e[n];
|
|
3903
3906
|
}
|
|
3904
|
-
}, this.
|
|
3905
|
-
var e = this.
|
|
3907
|
+
}, this.vb = function () {
|
|
3908
|
+
var e = this.ub;
|
|
3906
3909
|
for (var t in e) {
|
|
3907
3910
|
var n = e[t];
|
|
3908
3911
|
n.postInit && n.postInit();
|
|
3909
3912
|
}
|
|
3910
|
-
}, this.V = function (e, t, n) { var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var i = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.W, i, this.
|
|
3913
|
+
}, this.V = function (e, t, n) { var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var i = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.W, i, this.Ld) : WebForm_DoCallback(this.uniqueID, i, this.X, null, this.callbackError, !0); }, this.Ld = function (e) {
|
|
3911
3914
|
if ("function" == typeof i.onAjaxError) {
|
|
3912
3915
|
var t = {};
|
|
3913
3916
|
t.request = e, i.onAjaxError(t);
|
|
3914
3917
|
}
|
|
3915
3918
|
else
|
|
3916
3919
|
"function" == typeof i.ajaxError && i.ajaxError(e);
|
|
3917
|
-
}, this.W = function (e) { i.X(e.responseText); }, this.T = function (e, t, n) { var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var r = "JSON" + JSON.stringify(a); __doPostBack(i.uniqueID, r); }, this.U = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.
|
|
3920
|
+
}, this.W = function (e) { i.X(e.responseText); }, this.T = function (e, t, n) { var a = {}; a.action = e, a.parameters = n, a.data = t, a.header = this.U(); var r = "JSON" + JSON.stringify(a); __doPostBack(i.uniqueID, r); }, this.U = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.ud = function (e) { var t = e + r.weekStarts(); return t > 6 && (t -= 7), r.locale().dayNamesShort[t]; }, this.vd = function (e) { return null !== this.selectionStart && null !== this.selectionEnd && (this.selectionStart.getTime() <= e.getTime() && e.getTime() <= this.selectionEnd.getTime()); }, this.Md = function (e) {
|
|
3918
3921
|
for (var t = 0; t < i.months.length; t++) {
|
|
3919
3922
|
var n = i.months[t];
|
|
3920
3923
|
if (!n)
|
|
@@ -3925,14 +3928,14 @@ var DayPilot = { Global: {} };
|
|
|
3925
3928
|
return t;
|
|
3926
3929
|
}
|
|
3927
3930
|
return null;
|
|
3928
|
-
}, this.
|
|
3929
|
-
if (!r.
|
|
3930
|
-
return void (i.
|
|
3931
|
+
}, this.Nd = function () {
|
|
3932
|
+
if (!r.kd())
|
|
3933
|
+
return void (i.Od = i.cellWidth);
|
|
3931
3934
|
var e = i.months[0].cells[0][0], t = e.clientWidth;
|
|
3932
|
-
i.
|
|
3933
|
-
}, this.
|
|
3934
|
-
i.
|
|
3935
|
-
var t = DayPilot.mo3(i.nav.top, e), n = i.
|
|
3935
|
+
i.Od = t, i.months.forEach(function (e) { e.width = e.div.clientWidth, "Horizontal" === i.orientation && (e.left = e.div.offsetLeft), e.cells.forEach(function (e, n) { e.forEach(function (e) { e.width = t, e.left = n * t; }); }); });
|
|
3936
|
+
}, this.Pd = function (e) {
|
|
3937
|
+
i.Nd();
|
|
3938
|
+
var t = DayPilot.mo3(i.nav.top, e), n = i.Md(t);
|
|
3936
3939
|
if (null === n)
|
|
3937
3940
|
return null;
|
|
3938
3941
|
var a = i.months[n], r = this.titleHeight + this.dayHeaderHeight;
|
|
@@ -3941,18 +3944,18 @@ var DayPilot = { Global: {} };
|
|
|
3941
3944
|
for (var o = 0; o < a.cells.length; o++)
|
|
3942
3945
|
for (var s = 0; s < a.cells[o].length; s++) {
|
|
3943
3946
|
var l = a.cells[o][s], d = l.top + a.top, c = l.left + a.left;
|
|
3944
|
-
if (c <= t.x && t.x < c + i.
|
|
3947
|
+
if (c <= t.x && t.x < c + i.Od && d <= t.y && t.y < d + i.cellHeight)
|
|
3945
3948
|
return { "month": n, "x": o, "y": s, "coords": t };
|
|
3946
3949
|
}
|
|
3947
3950
|
return null;
|
|
3948
|
-
}, this.
|
|
3951
|
+
}, this.Qd = function (e) {
|
|
3949
3952
|
if (i.freeHandSelectionEnabled) {
|
|
3950
|
-
var t = i.
|
|
3953
|
+
var t = i.Pd(e);
|
|
3951
3954
|
t && !t.header && (o.start = t), e.preventDefault();
|
|
3952
3955
|
}
|
|
3953
|
-
}, this.
|
|
3956
|
+
}, this.Rd = function (e) {
|
|
3954
3957
|
if (o.start) {
|
|
3955
|
-
var t = i.
|
|
3958
|
+
var t = i.Pd(e);
|
|
3956
3959
|
if (o.end)
|
|
3957
3960
|
o.end = t;
|
|
3958
3961
|
else if (t) {
|
|
@@ -3962,10 +3965,10 @@ var DayPilot = { Global: {} };
|
|
|
3962
3965
|
o.end && (o.clear(), o.draw());
|
|
3963
3966
|
}
|
|
3964
3967
|
}, o.start = null, o.drawCell = function (e) {
|
|
3965
|
-
var t = i.months[e.month], n = i.
|
|
3966
|
-
if (r.
|
|
3968
|
+
var t = i.months[e.month], n = i.xd(e.x, e.y), a = t.top + n.y, s = t.left + n.x, l = "px", d = i.rd();
|
|
3969
|
+
if (r.kd()) {
|
|
3967
3970
|
var c = "Horizontal" === i.orientation ? i.showMonths : 1;
|
|
3968
|
-
s = t.leftPct + n.x / c, l = "%", d = i.
|
|
3971
|
+
s = t.leftPct + n.x / c, l = "%", d = i.rd(1 / c);
|
|
3969
3972
|
}
|
|
3970
3973
|
var u = document.createElement("div");
|
|
3971
3974
|
u.style.position = "absolute", u.style.left = s + l, u.style.top = a + "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), o.cells.push(u);
|
|
@@ -3992,42 +3995,42 @@ var DayPilot = { Global: {} };
|
|
|
3992
3995
|
}
|
|
3993
3996
|
t.visible() && o.drawCell(t);
|
|
3994
3997
|
}
|
|
3995
|
-
}, o.ordered = function () { var e = o.start, t = o.end, n = {}; return !t || new a(e).before(t) ? (n.start = e, n.end = t) : (n.start = t, n.end = e), n; }, this.
|
|
3998
|
+
}, o.ordered = function () { var e = o.start, t = o.end, n = {}; return !t || new a(e).before(t) ? (n.start = e, n.end = t) : (n.start = t, n.end = e), n; }, this.yd = function (e) {
|
|
3996
3999
|
var t = e.currentTarget, n = t.parentNode, a = t.parentNode.month, r = t.x, o = t.y, s = a.cells[r][o].day;
|
|
3997
4000
|
if (a.cells[r][o].isClickable) {
|
|
3998
|
-
switch (i.clearSelection(), i.selectionDay = s, i.
|
|
4001
|
+
switch (i.clearSelection(), i.selectionDay = s, i.wd()) {
|
|
3999
4002
|
case "none":
|
|
4000
4003
|
i.selectionStart = s, i.selectionEnd = s;
|
|
4001
4004
|
break;
|
|
4002
4005
|
case "day":
|
|
4003
|
-
if (i.autoFocusOnClick && (s < i.
|
|
4006
|
+
if (i.autoFocusOnClick && (s < i.Fd() || s >= i.Gd()))
|
|
4004
4007
|
return void i.select(s);
|
|
4005
4008
|
var l = a.cells[r][o];
|
|
4006
|
-
i.
|
|
4009
|
+
i.zd(n, r, o), i.selected.push(l), i.selectionStart = l.day, i.selectionEnd = l.day;
|
|
4007
4010
|
break;
|
|
4008
4011
|
case "week":
|
|
4009
4012
|
if (i.autoFocusOnClick) {
|
|
4010
4013
|
var d = a.cells[0][o].day, c = a.cells[6][o].day;
|
|
4011
|
-
if (d.firstDayOfMonth() === c.firstDayOfMonth() && (d < i.
|
|
4014
|
+
if (d.firstDayOfMonth() === c.firstDayOfMonth() && (d < i.Fd() || c >= i.Gd()))
|
|
4012
4015
|
return void i.select(s);
|
|
4013
4016
|
}
|
|
4014
4017
|
for (var u = 0; u < 7; u++)
|
|
4015
|
-
i.
|
|
4018
|
+
i.zd(n, u, o), i.selected.push(a.cells[u][o]);
|
|
4016
4019
|
i.selectionStart = a.cells[0][o].day, i.selectionEnd = a.cells[6][o].day;
|
|
4017
4020
|
break;
|
|
4018
4021
|
case "month":
|
|
4019
|
-
if (i.autoFocusOnClick && (s < i.
|
|
4022
|
+
if (i.autoFocusOnClick && (s < i.Fd() || s >= i.Gd()))
|
|
4020
4023
|
return void i.select(s);
|
|
4021
4024
|
for (var d = null, c = null, h = 0; h < 6; h++)
|
|
4022
4025
|
for (var f = 0; f < 7; f++) {
|
|
4023
4026
|
var l = a.cells[f][h];
|
|
4024
|
-
l && l.day.getYear() === s.getYear() && l.day.getMonth() === s.getMonth() && (i.
|
|
4027
|
+
l && l.day.getYear() === s.getYear() && l.day.getMonth() === s.getMonth() && (i.zd(n, f, h), i.selected.push(l), null === d && (d = l.day), c = l.day);
|
|
4025
4028
|
}
|
|
4026
4029
|
i.selectionStart = d, i.selectionEnd = c;
|
|
4027
4030
|
break;
|
|
4028
4031
|
default: throw "unknown selectMode";
|
|
4029
4032
|
}
|
|
4030
|
-
i.
|
|
4033
|
+
i.Cd(), i.O();
|
|
4031
4034
|
}
|
|
4032
4035
|
}, this.O = function (e) {
|
|
4033
4036
|
var t = i.selectionStart, n = i.selectionEnd.addDays(1), a = DayPilot.DateUtil.daysDiff(t, n), r = i.selectionDay;
|
|
@@ -4063,7 +4066,7 @@ var DayPilot = { Global: {} };
|
|
|
4063
4066
|
case "None": break;
|
|
4064
4067
|
case "PostBack": i.timeRangeSelectedPostBack(t, n, r);
|
|
4065
4068
|
}
|
|
4066
|
-
}, this.timeRangeSelectedPostBack = function (e, t, n, a) { var i = {}; i.start = e, i.end = t, i.day = a, this.T("TimeRangeSelected", n, i); }, this.
|
|
4069
|
+
}, this.timeRangeSelectedPostBack = function (e, t, n, a) { var i = {}; i.start = e, i.end = t, i.day = a, this.T("TimeRangeSelected", n, i); }, this.td = function () { i.Sd(i.skipMonths); }, this.sd = function () { i.Sd(-i.skipMonths); }, this.Sd = function (e) { this.startDate = this.startDate.addMonths(e), this.cd(), this.jd(), this.Hd(), this.Cd(), this.Id(), this.Bd(); }, this.Fd = function () { return i.startDate.firstDayOfMonth(); }, this.Gd = function () { return i.startDate.firstDayOfMonth().addMonths(this.showMonths); }, this.visibleStart = function () { return i.startDate.firstDayOfMonth().firstDayOfWeek(r.weekStarts()); }, this.visibleEnd = function () { return i.startDate.firstDayOfMonth().addMonths(this.showMonths - 1).firstDayOfWeek(r.weekStarts()).addDays(42); }, this.Id = function () {
|
|
4067
4070
|
var e = this.visibleStart(), t = this.visibleEnd();
|
|
4068
4071
|
if (i.ta()) {
|
|
4069
4072
|
var n = {};
|
|
@@ -4093,14 +4096,14 @@ var DayPilot = { Global: {} };
|
|
|
4093
4096
|
break;
|
|
4094
4097
|
case "Disabled":
|
|
4095
4098
|
}
|
|
4096
|
-
}, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.V("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.T("Visible", e, t); }, this.X = function (e) { var t = JSON.parse(e); i.items = t.Items, i.cells = t.Cells, i.cells ? i.update() : i.
|
|
4097
|
-
this.showToday && "Top" === this.todayPosition && this.
|
|
4099
|
+
}, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.V("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.T("Visible", e, t); }, this.X = function (e) { var t = JSON.parse(e); i.items = t.Items, i.cells = t.Cells, i.cells ? i.update() : i.Bd(); }, this.Hd = function () {
|
|
4100
|
+
this.showToday && "Top" === this.todayPosition && this.Td();
|
|
4098
4101
|
for (var e = 0; e < this.showMonths; e++) {
|
|
4099
|
-
var t = this.
|
|
4100
|
-
this.
|
|
4102
|
+
var t = this.Ud(e);
|
|
4103
|
+
this.dd(e, t);
|
|
4101
4104
|
}
|
|
4102
|
-
this.showToday && "Bottom" === this.todayPosition && this.
|
|
4103
|
-
}, this.
|
|
4105
|
+
this.showToday && "Bottom" === this.todayPosition && this.Td(), this.root.style.height = this.Vd() + "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);
|
|
4106
|
+
}, this.Td = function () {
|
|
4104
4107
|
if (this.showToday) {
|
|
4105
4108
|
var e = document.createElement("span");
|
|
4106
4109
|
e.className = this.L("_todaysection_button"), this.todayHtml ? e.innerHTML = this.todayHtml : e.innerText = this.todayText, e.onclick = function () {
|
|
@@ -4114,7 +4117,7 @@ var DayPilot = { Global: {} };
|
|
|
4114
4117
|
var t = document.createElement("div");
|
|
4115
4118
|
t.style.height = this.todayHeight + "px", t.className = this.L("_todaysection"), t.appendChild(e), this.root.appendChild(t);
|
|
4116
4119
|
}
|
|
4117
|
-
}, this.
|
|
4120
|
+
}, this.Vd = function () {
|
|
4118
4121
|
var e = 0;
|
|
4119
4122
|
if (this.showToday && (e += this.todayHeight), "Horizontal" === this.orientation) {
|
|
4120
4123
|
for (var t = 0; t < this.months.length; t++) {
|
|
@@ -4128,57 +4131,57 @@ var DayPilot = { Global: {} };
|
|
|
4128
4131
|
e += n.height;
|
|
4129
4132
|
}
|
|
4130
4133
|
return e;
|
|
4131
|
-
}, this.
|
|
4134
|
+
}, this.Ud = function (e) {
|
|
4132
4135
|
if (this.internal.showLinks)
|
|
4133
4136
|
return this.internal.showLinks;
|
|
4134
4137
|
var t = {};
|
|
4135
4138
|
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;
|
|
4136
|
-
}, this.wa = {}, this.wa.scope = null, this.wa.notify = function () { i.wa.scope && i.wa.scope["$apply"](); }, this.
|
|
4137
|
-
var a = i.
|
|
4139
|
+
}, this.wa = {}, this.wa.scope = null, this.wa.notify = function () { i.wa.scope && i.wa.scope["$apply"](); }, this.Ra = {}, this.Ra.Qa = null, this.Ra.Lb = function (e, t, n) {
|
|
4140
|
+
var a = i.Ra.Qa;
|
|
4138
4141
|
if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
4139
4142
|
var r = a.createVNode(e, n);
|
|
4140
4143
|
a.render(r, t);
|
|
4141
4144
|
}
|
|
4142
|
-
}, this.
|
|
4143
|
-
var n = i.
|
|
4145
|
+
}, this.Ra.Va = function (e, t) {
|
|
4146
|
+
var n = i.Ra.Qa;
|
|
4144
4147
|
if ("function" == typeof n.render) {
|
|
4145
4148
|
var a = e;
|
|
4146
4149
|
DayPilot.isArray(e) && (a = n.h("div", null, e)), n.render(a, t);
|
|
4147
4150
|
}
|
|
4148
|
-
}, this.
|
|
4151
|
+
}, this.Ra.Ta = function (e) { var t = i.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.loadOptions = i.sb, this.internal.initialized = function () { return i.La; }, this.internal.enableVue = function (e) { i.Ra.Qa = e; }, this.internal.vueRef = function () { return i.Ra.Qa; }, this.internal.vueRendering = function () { return i.Ra.Sa; }, this.internal.upd = function (e) { i.Jd(e); }, r.locale = function () { return DayPilot.Locale.find(i.locale); }, r.weekStarts = function () {
|
|
4149
4152
|
if ("Auto" === i.weekStarts) {
|
|
4150
4153
|
var e = r.locale();
|
|
4151
4154
|
return e ? e.weekStarts : 0;
|
|
4152
4155
|
}
|
|
4153
4156
|
return i.weekStarts;
|
|
4154
4157
|
}, r.cellWidth = function () {
|
|
4155
|
-
if (i.
|
|
4156
|
-
return i.
|
|
4157
|
-
var e = i.
|
|
4158
|
-
return e || (e = i.cellWidth), i.
|
|
4159
|
-
}, r.
|
|
4158
|
+
if (i.xb.cellWidth)
|
|
4159
|
+
return i.xb.cellWidth;
|
|
4160
|
+
var e = i.Wd("_cell_dimensions").width;
|
|
4161
|
+
return e || (e = i.cellWidth), i.xb.cellWidth = e, e;
|
|
4162
|
+
}, r.kd = function () { return "Auto" === i.R.cellWidth(); }, this.clearSelection = function () {
|
|
4160
4163
|
for (var e = 0; e < this.selected.length; e++) {
|
|
4161
4164
|
var t = this.selected[e];
|
|
4162
|
-
i.
|
|
4165
|
+
i.Ad(t.parentNode, t.x, t.y);
|
|
4163
4166
|
}
|
|
4164
4167
|
this.selected = [];
|
|
4165
|
-
}, this.
|
|
4168
|
+
}, this.Xd = function () { return !!this.backendUrl && ("undefined" == typeof i.items || !i.items); }, this.events = {}, this.ha = function () {
|
|
4166
4169
|
if (DayPilot.isArray(this.events.list)) {
|
|
4167
4170
|
this.items = {};
|
|
4168
4171
|
for (var e = 0; e < this.events.list.length; e++) {
|
|
4169
4172
|
var t = this.events.list[e];
|
|
4170
4173
|
if (!t.hidden) {
|
|
4171
|
-
var n = this.
|
|
4174
|
+
var n = this.Yd(t);
|
|
4172
4175
|
for (var a in n)
|
|
4173
4176
|
this.items[a] = 1;
|
|
4174
4177
|
}
|
|
4175
4178
|
}
|
|
4176
4179
|
}
|
|
4177
|
-
}, this.
|
|
4180
|
+
}, this.Wd = function (e) { var t = document.createElement("div"); t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.L(e); var n = i.root || document.body; n.appendChild(t); var a = t.offsetHeight, r = t.offsetWidth; n.removeChild(t); var o = {}; return o.height = a, o.width = r, o; }, this.Yd = function (e) {
|
|
4178
4181
|
for (var t = new DayPilot.Date(e.start), n = new DayPilot.Date(e.end), a = {}, i = t.getDatePart(); i.getTime() <= n.getTime();)
|
|
4179
4182
|
a[i.toStringSortable()] = 1, i = i.addDays(1);
|
|
4180
4183
|
return a;
|
|
4181
|
-
}, this.show = function () { i.visible = !0, i.root.style.display = ""; }, this.hide = function () { i.visible = !1, i.root.style.display = "none"; }, this.
|
|
4184
|
+
}, this.show = function () { i.visible = !0, i.root.style.display = ""; }, this.hide = function () { i.visible = !1, i.root.style.display = "none"; }, this.wb = function () {
|
|
4182
4185
|
if (this.id && this.id.tagName)
|
|
4183
4186
|
this.nav.top = this.id;
|
|
4184
4187
|
else {
|
|
@@ -4189,26 +4192,26 @@ var DayPilot = { Global: {} };
|
|
|
4189
4192
|
}
|
|
4190
4193
|
this.root = this.nav.top;
|
|
4191
4194
|
}, this.init = function () {
|
|
4192
|
-
if (this.
|
|
4193
|
-
this.
|
|
4194
|
-
if (this.
|
|
4195
|
-
var e = this.
|
|
4196
|
-
this.select(e.date1, e.date2, e.options), this.
|
|
4195
|
+
if (this.wb(), !this.root.dp) {
|
|
4196
|
+
this.Dd(), this.jd(), this.Hd(), this.ha(), this.Bd(), this.ba(), this.Zd(), this.pb();
|
|
4197
|
+
if (this.Xd() && this.Id(), this.La = !0, this.vb(), this.Ed) {
|
|
4198
|
+
var e = this.Ed;
|
|
4199
|
+
this.select(e.date1, e.date2, e.options), this.Ed = null;
|
|
4197
4200
|
}
|
|
4198
4201
|
return this;
|
|
4199
4202
|
}
|
|
4200
|
-
}, this
|
|
4203
|
+
}, this.Zd = function () { i.nav.top.onmousedown = this.Qd, i.nav.top.onmousemove = this.Rd; }, this.pb = function () { DayPilot.re(document, "mouseup", i.$d); }, this.$d = function (e) {
|
|
4201
4204
|
if (o.start && o.end) {
|
|
4202
4205
|
var t = DayPilot.mo3(i.nav.top, e);
|
|
4203
4206
|
if (t.x === o.start.coords.x && t.y === o.start.coords.y)
|
|
4204
4207
|
return o.start = null, void o.clear();
|
|
4205
4208
|
o.clear();
|
|
4206
4209
|
var n = o.ordered();
|
|
4207
|
-
n.start = new a(n.start).nextVisible(), n.end = new a(n.end).previousVisible(), i.selectionDay = new a(n.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new a(n.end).date(), o.start = null, o.end = null, i.
|
|
4210
|
+
n.start = new a(n.start).nextVisible(), n.end = new a(n.end).previousVisible(), i.selectionDay = new a(n.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new a(n.end).date(), o.start = null, o.end = null, i.cd(), i.jd(), i.Hd(), i.Bd(), i.Cd();
|
|
4208
4211
|
i.O({ "mode": "FreeHand" });
|
|
4209
4212
|
}
|
|
4210
4213
|
o.start = null, o.end = null;
|
|
4211
|
-
}, 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.Q = !0); }, this.disposed = function () { return this.Q; }, this.ba = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.
|
|
4214
|
+
}, 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.Q = !0); }, this.disposed = function () { return this.Q; }, this.ba = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.sb(n);
|
|
4212
4215
|
}, "undefined" != typeof jQuery && !function (e) {
|
|
4213
4216
|
e.fn.daypilotNavigator = function (e) {
|
|
4214
4217
|
var t = null, n = this.each(function () {
|
|
@@ -4245,7 +4248,7 @@ var DayPilot = { Global: {} };
|
|
|
4245
4248
|
for (var t in e)
|
|
4246
4249
|
i[t] = e[t];
|
|
4247
4250
|
i.update();
|
|
4248
|
-
}, !0), d.call(t, u, function (e) { i.events.list = e, i.ha(), i.
|
|
4251
|
+
}, !0), d.call(t, u, function (e) { i.events.list = e, i.ha(), i.Bd(); }, !0);
|
|
4249
4252
|
};
|
|
4250
4253
|
} };
|
|
4251
4254
|
}]);
|
|
@@ -4258,16 +4261,16 @@ var DayPilot = { Global: {} };
|
|
|
4258
4261
|
DayPilot.Scheduler = function (a, o) {
|
|
4259
4262
|
this.v = "${v}";
|
|
4260
4263
|
var s = this;
|
|
4261
|
-
this.isScheduler = !0, this.id = a, this.beforeCellRenderCaching = !0, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.businessWeekends = !1, this.cellDuration = 60, this.cellGroupBy = "Day", this.cellSweeping = !0, this.cellSweepingCacheSize = 1e3, this.cellWidth = 40, this.cellsMarkBusiness = !0, this.cssClassPrefix = "scheduler_default", this.days = 1, this.durationBarHeight = 3, this.durationBarVisible = !0, this.dynamicEventRendering = "Progressive", this.dynamicEventRenderingMargin = 50, this.dynamicEventRenderingMarginX = null, this.dynamicEventRenderingMarginY = null, this.dynamicEventRenderingCacheSweeping = !1, this.dynamicEventRenderingCacheSize = 200, this.eventBorderRadius = null, this.eventEndSpec = "DateTime", this.eventHeight = 35, this.eventMinWidth = 1, this.eventPadding = null, this.eventResizeMargin = 5, this.eventTapAndHoldHandling = "Move", this.eventTextWrappingEnabled = !1, this.eventsLoadMethod = "GET", this.floatingEvents = !DayPilot.browser.ios, this.floatingTimeHeaders = !0, this.headerHeight = 30, this.heightSpec = "Max", this.height = 600, this.locale = "en-us", this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowHeaderWidth = 80, this.rowMarginTop = 0, this.rowMarginBottom = 0, this.rowsLoadMethod = "GET", this.scale = "CellDuration", this.scrollDelayEvents = 200, this.scrollDelayCells = DayPilot.browser.ios ? 100 : 0, this.scrollDelayFloats = 0, this.scrollDelayRows = 0, this.showToolTip = !0, this.snapToGrid = !0, this.startDate = DayPilot.Date.today(), this.tapAndHoldTimeout = 300, this.timeHeaders = [{ "groupBy": "Default" }, { "groupBy": "Cell" }], this.timeHeaderTextWrappingEnabled = !1, this.timeFormat = "Auto", this.useEventBoxes = "Always", this.visible = !0, this.weekStarts = "Auto", this.width = null, this.xssProtection = "Enabled", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.timeHeaderClickHandling = "Enabled", this.timeHeaderRightClickHandling = "Enabled", this.timeRangeClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onEventClick = null, this.onEventClicked = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onRowClick = null, this.onRowClicked = null, this.onTimeHeaderClick = null, this.onTimeHeaderClicked = null, this.onTimeHeaderRightClick = null, this.onTimeHeaderRightClicked = null, this.onTimeRangeClick = null, this.onTimeRangeClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeCellRender = null, this.onBeforeEventRender = null, this.onBeforeRowHeaderRender = null, this.onBeforeTimeHeaderRender = null, this.onAfterUpdate = null, this.Q = !1, this.
|
|
4264
|
+
this.isScheduler = !0, this.id = a, this.beforeCellRenderCaching = !0, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.businessWeekends = !1, this.cellDuration = 60, this.cellGroupBy = "Day", this.cellSweeping = !0, this.cellSweepingCacheSize = 1e3, this.cellWidth = 40, this.cellsMarkBusiness = !0, this.cssClassPrefix = "scheduler_default", this.days = 1, this.durationBarHeight = 3, this.durationBarVisible = !0, this.dynamicEventRendering = "Progressive", this.dynamicEventRenderingMargin = 50, this.dynamicEventRenderingMarginX = null, this.dynamicEventRenderingMarginY = null, this.dynamicEventRenderingCacheSweeping = !1, this.dynamicEventRenderingCacheSize = 200, this.eventBorderRadius = null, this.eventEndSpec = "DateTime", this.eventHeight = 35, this.eventMinWidth = 1, this.eventPadding = null, this.eventResizeMargin = 5, this.eventTapAndHoldHandling = "Move", this.eventTextWrappingEnabled = !1, this.eventsLoadMethod = "GET", this.floatingEvents = !DayPilot.browser.ios, this.floatingTimeHeaders = !0, this.headerHeight = 30, this.heightSpec = "Max", this.height = 600, this.locale = "en-us", this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowHeaderWidth = 80, this.rowMarginTop = 0, this.rowMarginBottom = 0, this.rowsLoadMethod = "GET", this.scale = "CellDuration", this.scrollDelayEvents = 200, this.scrollDelayCells = DayPilot.browser.ios ? 100 : 0, this.scrollDelayFloats = 0, this.scrollDelayRows = 0, this.showToolTip = !0, this.snapToGrid = !0, this.startDate = DayPilot.Date.today(), this.tapAndHoldTimeout = 300, this.timeHeaders = [{ "groupBy": "Default" }, { "groupBy": "Cell" }], this.timeHeaderTextWrappingEnabled = !1, this.timeFormat = "Auto", this.useEventBoxes = "Always", this.visible = !0, this.weekStarts = "Auto", this.width = null, this.xssProtection = "Enabled", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.timeHeaderClickHandling = "Enabled", this.timeHeaderRightClickHandling = "Enabled", this.timeRangeClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onEventClick = null, this.onEventClicked = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onRowClick = null, this.onRowClicked = null, this.onTimeHeaderClick = null, this.onTimeHeaderClicked = null, this.onTimeHeaderRightClick = null, this.onTimeHeaderRightClicked = null, this.onTimeRangeClick = null, this.onTimeRangeClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeCellRender = null, this.onBeforeEventRender = null, this.onBeforeRowHeaderRender = null, this.onBeforeTimeHeaderRender = null, this.onAfterUpdate = null, this.Q = !1, this._d = -1, this.ae = !0, this.rowlist = [], this.events = {}, this.cells = {}, this.elements = {}, this.elements.events = [], this.elements.bars = [], this.elements.text = [], this.elements.cells = [], this.elements.linesVertical = [], this.elements.range = [], this.elements.timeHeader = [], this.xb = {}, this.xb.cells = [], this.xb.linesVertical = {}, this.xb.linesHorizontal = {}, this.xb.timeHeaderGroups = [], this.xb.timeHeader = {}, this.xb.events = [], this.nav = {}, this.R = {};
|
|
4262
4265
|
var l = this.R;
|
|
4266
|
+
this.be = {};
|
|
4267
|
+
var d = s.be;
|
|
4263
4268
|
this.ce = {};
|
|
4264
|
-
var
|
|
4265
|
-
this.ee = {
|
|
4266
|
-
var c = this.ee, u = {};
|
|
4267
|
-
this.scrollTo = function (e) { s.fe(e); }, this.fe = function (e) {
|
|
4269
|
+
var c = this.ce, u = {};
|
|
4270
|
+
this.scrollTo = function (e) { s.ee(e); }, this.ee = function (e) {
|
|
4268
4271
|
if (e) {
|
|
4269
|
-
if (!s.
|
|
4270
|
-
return void (s.
|
|
4272
|
+
if (!s.La)
|
|
4273
|
+
return void (s.fe = e);
|
|
4271
4274
|
var t;
|
|
4272
4275
|
if (e instanceof DayPilot.Date)
|
|
4273
4276
|
t = this.getPixels(e).left;
|
|
@@ -4278,51 +4281,51 @@ var DayPilot = { Global: {} };
|
|
|
4278
4281
|
throw new DayPilot.Exception("Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object");
|
|
4279
4282
|
t = e;
|
|
4280
4283
|
}
|
|
4281
|
-
var n = s.
|
|
4282
|
-
t < 0 && (t = 0), t > n - a && (t = n - a), s.
|
|
4284
|
+
var n = s.ge.clientWidth, a = s.nav.scroll.clientWidth;
|
|
4285
|
+
t < 0 && (t = 0), t > n - a && (t = n - a), s.he(t);
|
|
4283
4286
|
}
|
|
4284
4287
|
}, this.scrollToResource = function (e) {
|
|
4285
4288
|
DayPilot.complete(function () {
|
|
4286
4289
|
var t;
|
|
4287
4290
|
if ("string" == typeof e || "number" == typeof e)
|
|
4288
|
-
t = s.
|
|
4291
|
+
t = s.ie(e);
|
|
4289
4292
|
else {
|
|
4290
4293
|
if (!(e instanceof DayPilot.Row))
|
|
4291
4294
|
throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");
|
|
4292
|
-
t = s.
|
|
4295
|
+
t = s.ie(e.id);
|
|
4293
4296
|
}
|
|
4294
4297
|
t && setTimeout(function () { var e = t.top; s.nav.scroll.scrollTop = e; }, 100);
|
|
4295
4298
|
});
|
|
4296
|
-
}, this.
|
|
4299
|
+
}, this.je = function () {
|
|
4297
4300
|
if (this.floatingTimeHeaders && this.timeHeader) {
|
|
4298
|
-
var e = s.
|
|
4301
|
+
var e = s.ke();
|
|
4299
4302
|
if (e) {
|
|
4300
|
-
s.
|
|
4303
|
+
s.le();
|
|
4301
4304
|
for (var t = e.pixels.left, n = e.pixels.right + e.sw, a = [], i = 0; i < this.timeHeader.length; i++)
|
|
4302
4305
|
for (var r = 0; r < this.timeHeader[i].length; r++) {
|
|
4303
4306
|
var o = this.timeHeader[i][r], l = o.left, d = o.left + o.width, c = null;
|
|
4304
|
-
if (l < t && t < d && (c = {}, c.x = r, c.y = i, c.marginLeft = t - l, c.marginRight = 0, c.div = s.
|
|
4305
|
-
c || (c = {}, c.x = r, c.y = i, c.marginLeft = 0, c.div = s.
|
|
4307
|
+
if (l < t && t < d && (c = {}, c.x = r, c.y = i, c.marginLeft = t - l, c.marginRight = 0, c.div = s.xb.timeHeader[r + "_" + i], a.push(c)), l < n && n < d) {
|
|
4308
|
+
c || (c = {}, c.x = r, c.y = i, c.marginLeft = 0, c.div = s.xb.timeHeader[r + "_" + i], a.push(c)), c.marginRight = d - n;
|
|
4306
4309
|
break;
|
|
4307
4310
|
}
|
|
4308
4311
|
}
|
|
4309
4312
|
for (var u = 0; u < a.length; u++) {
|
|
4310
4313
|
var c = a[u];
|
|
4311
|
-
s.
|
|
4314
|
+
s.me(c.div, c.marginLeft, c.marginRight);
|
|
4312
4315
|
}
|
|
4313
4316
|
}
|
|
4314
4317
|
}
|
|
4315
|
-
}, this.
|
|
4316
|
-
var h = s.
|
|
4317
|
-
h.
|
|
4318
|
+
}, this.ne = function () { s.je(), s.oe(); }, this.pe = {};
|
|
4319
|
+
var h = s.pe;
|
|
4320
|
+
h.qe = function (e, t, n, a) {
|
|
4318
4321
|
var i = e, r = e + n, o = t, l = t + a;
|
|
4319
4322
|
return s.elements.events.filter(function (e) {
|
|
4320
4323
|
var t = e.event, n = t.part.left, a = t.part.left + t.part.width, d = s.rowlist[t.part.dayIndex], c = d.top + t.part.top, u = c + s.eventHeight;
|
|
4321
4324
|
if (DayPilot.Util.overlaps(n, a, i, r) && DayPilot.Util.overlaps(c, u, o, l))
|
|
4322
4325
|
return !0;
|
|
4323
4326
|
});
|
|
4324
|
-
}, h.
|
|
4325
|
-
var e = [], t = s.
|
|
4327
|
+
}, h.se = function () {
|
|
4328
|
+
var e = [], t = s.ke();
|
|
4326
4329
|
if (!t)
|
|
4327
4330
|
return e;
|
|
4328
4331
|
for (var n = t.pixels.left, a = 0; a < s.elements.events.length; a++) {
|
|
@@ -4330,30 +4333,30 @@ var DayPilot = { Global: {} };
|
|
|
4330
4333
|
o < n && n < l && e.push(i);
|
|
4331
4334
|
}
|
|
4332
4335
|
return e.area = t, e;
|
|
4333
|
-
}, this.
|
|
4336
|
+
}, this.oe = function () {
|
|
4334
4337
|
if (this.floatingEvents) {
|
|
4335
|
-
var e = h.
|
|
4336
|
-
s.
|
|
4338
|
+
var e = h.se();
|
|
4339
|
+
s.te = performance.now(), e.forEach(function (t) { var n = t.event, a = e.area.pixels.left, i = n.part.left, r = a - i; s.ve(t, r, 0); }), s.we();
|
|
4337
4340
|
}
|
|
4338
|
-
}, this.elements.sections = [], this.elements.hsections = [], this.
|
|
4341
|
+
}, this.elements.sections = [], this.elements.hsections = [], this.me = function (e, t, n) { var a = r(); a.className = s.L("_timeheader_float"), a.style.position = "absolute", a.style.left = t + "px", a.style.right = n + "px", a.style.top = "0px", a.style.bottom = "0px", a.style.overflow = "hidden"; var i = r(); i.className = s.L("_timeheader_float_inner"); var o = e.cell.th; i.innerHTML = s.$a(o.text, o.html), o.fontColor && (i.style.color = o.fontColor), a.appendChild(i), a.xe = { marginLeft: t, marginRight: n }, e.section = a, e.insertBefore(a, e.firstChild.nextSibling), e.firstChild.innerHTML = "", this.elements.hsections.push(e); }, this.le = function () {
|
|
4339
4342
|
for (var e = 0; e < this.elements.hsections.length; e++) {
|
|
4340
4343
|
var t = this.elements.hsections[e], n = t.cell;
|
|
4341
|
-
n && t.firstChild && (t.firstChild.innerHTML = s
|
|
4344
|
+
n && t.firstChild && (t.firstChild.innerHTML = s.$a(n.th.text, n.th.html)), DayPilot.de(t.section), t.section = null;
|
|
4342
4345
|
}
|
|
4343
4346
|
this.elements.hsections = [];
|
|
4344
|
-
}, this.
|
|
4347
|
+
}, this.ve = function (e, t, n) {
|
|
4345
4348
|
var a = e.section;
|
|
4346
4349
|
if (a)
|
|
4347
|
-
return a.
|
|
4350
|
+
return a.xe && a.xe.marginLeft === t && a.xe.marginRight === n ? void (a.xe.stamp = s.te) : (e.section.style.left = t + "px", e.section.style.right = n + "px", void (a.xe = { marginLeft: t, marginRight: n, stamp: s.te }));
|
|
4348
4351
|
a = r(), a.className = s.L("_event_float"), a.style.position = "absolute", a.style.left = t + "px", a.style.right = n + "px", a.style.top = "0px", a.style.bottom = "0px", a.style.overflow = "hidden";
|
|
4349
4352
|
var i = r();
|
|
4350
|
-
i.className = s.L("_event_float_inner"), i.innerHTML = e.event.client.html(), a.appendChild(i), a.
|
|
4353
|
+
i.className = s.L("_event_float_inner"), i.innerHTML = e.event.client.html(), a.appendChild(i), a.xe = { marginLeft: t, marginRight: n, stamp: s.te }, e.section = a, e.insertBefore(a, e.firstChild.nextSibling), e.firstChild.innerHTML = "";
|
|
4351
4354
|
var o = e.event, l = o.cache || o.data;
|
|
4352
4355
|
l.fontColor && (i.style.color = l.fontColor), this.elements.sections.push(e);
|
|
4353
|
-
}, this.
|
|
4356
|
+
}, this.we = function () {
|
|
4354
4357
|
for (var e = [], t = 0; t < this.elements.sections.length; t++) {
|
|
4355
4358
|
var n = this.elements.sections[t];
|
|
4356
|
-
if (n.section && n.section.
|
|
4359
|
+
if (n.section && n.section.xe && n.section.xe.stamp === s.te)
|
|
4357
4360
|
e.push(n);
|
|
4358
4361
|
else {
|
|
4359
4362
|
var a = n.event;
|
|
@@ -4361,20 +4364,20 @@ var DayPilot = { Global: {} };
|
|
|
4361
4364
|
}
|
|
4362
4365
|
}
|
|
4363
4366
|
this.elements.sections = e;
|
|
4364
|
-
}, this.setScrollX = function (e) { s.
|
|
4367
|
+
}, this.setScrollX = function (e) { s.ye.enabled ? (s.ye.scrollXRequested = e, setTimeout(function () { var e = s.ye.scrollXRequested; "number" == typeof e && s.he(e); }, 0)) : s.he(e); }, this.he = function (e) { var t = s.nav.scroll, n = s.ze(); t.clientWidth + e > n && (e = n - t.clientWidth), s.divTimeScroll.scrollLeft = e, t.scrollLeft = e; }, this.setScrollY = function (e) { s.ye.enabled ? (s.ye.scrollYRequested = e, setTimeout(function () { var e = s.ye.scrollYRequested; "number" == typeof e && s.Ae(e); }, 0)) : s.Ae(e); }, this.Ae = function (e) { var t = s.nav.scroll, n = s._d; t.clientHeight + e > n && (e = n - t.clientHeight), s.divResScroll.scrollTop = e, t.scrollTop = e; }, this.setScroll = function (e, t) { s.setScrollX(e), s.setScrollY(t); }, this.ma = function () {
|
|
4365
4368
|
if (this.nav.scroll) {
|
|
4366
|
-
!function () { var e = s.
|
|
4369
|
+
!function () { var e = s.ze(); s.ge.style.height = s._d + "px", s.ge.style.width = e + "px", e > s.nav.scroll.clientWidth ? s.nav.scroll.style.overflowX = "auto" : s.nav.scroll.style.overflowX = "hidden"; }();
|
|
4367
4370
|
var e = 1;
|
|
4368
4371
|
this.nav.scroll.style.height = "30px";
|
|
4369
|
-
var t = this.
|
|
4370
|
-
if (t >= 0 && (this.nav.scroll.style.height = t + "px", this.
|
|
4372
|
+
var t = this.Xa(), n = t + this.Be() + e;
|
|
4373
|
+
if (t >= 0 && (this.nav.scroll.style.height = t + "px", this.Ce.style.height = t + "px"), this.nav.divider && ((!n || isNaN(n) || n < 0) && (n = 0), this.nav.divider.style.height = n + "px"), this.nav.top.style.height = n + "px", s.nav.resScrollSpace) {
|
|
4371
4374
|
var a = 30;
|
|
4372
4375
|
"Auto" === s.heightSpec && (a = DayPilot.sh(s.nav.scroll)), s.nav.resScrollSpace.style.height = a + "px";
|
|
4373
4376
|
}
|
|
4374
4377
|
for (var i = 0; i < this.elements.linesVertical.length; i++)
|
|
4375
|
-
this.elements.linesVertical[i].style.height = this.
|
|
4378
|
+
this.elements.linesVertical[i].style.height = this._d + "px";
|
|
4376
4379
|
}
|
|
4377
|
-
}, this.
|
|
4380
|
+
}, this.De = function () {
|
|
4378
4381
|
this.startDate = new DayPilot.Date(this.startDate).getDatePart(), this.timeHeader = [];
|
|
4379
4382
|
var e = this.timeHeaders;
|
|
4380
4383
|
e || (e = [{ "groupBy": this.cellGroupBy }, { "groupBy": "Cell" }]);
|
|
@@ -4383,14 +4386,14 @@ var DayPilot = { Global: {} };
|
|
|
4383
4386
|
"Default" === a && (a = this.cellGroupBy);
|
|
4384
4387
|
for (var r = [], o = s.startDate; o.ticks < t.ticks;) {
|
|
4385
4388
|
var d = {};
|
|
4386
|
-
if (d.start = o, d.end = this.
|
|
4389
|
+
if (d.start = o, d.end = this.Ee(d.start, a), d.start.ticks === d.end.ticks)
|
|
4387
4390
|
break;
|
|
4388
4391
|
d.left = this.getPixels(d.start).left;
|
|
4389
4392
|
var c = this.getPixels(d.end).left, u = c - d.left;
|
|
4390
|
-
if (d.width = u, "string" == typeof i ? d.text = d.start.toString(i, l.
|
|
4393
|
+
if (d.width = u, "string" == typeof i ? d.text = d.start.toString(i, l.Fe()) : d.text = this.Ge(d, a), u > 0) {
|
|
4391
4394
|
if ("function" == typeof this.onBeforeTimeHeaderRender) {
|
|
4392
4395
|
var h = {};
|
|
4393
|
-
h.start = d.start, h.end = d.end, h.text = d.text, h.html = null, h.toolTip = s
|
|
4396
|
+
h.start = d.start, h.end = d.end, h.text = d.text, h.html = null, h.toolTip = s.$a(d.text), h.backColor = null, h.fontColor = null, h.level = this.timeHeader.length, h.cssClass = null;
|
|
4394
4397
|
var f = {};
|
|
4395
4398
|
f.header = h, f.control = s, this.onBeforeTimeHeaderRender(f), d.text = h.text, d.html = h.html, d.backColor = h.backColor, d.fontColor = h.fontColor, d.toolTip = h.toolTip, d.areas = h.areas, d.cssClass = h.cssClass;
|
|
4396
4399
|
}
|
|
@@ -4400,34 +4403,34 @@ var DayPilot = { Global: {} };
|
|
|
4400
4403
|
}
|
|
4401
4404
|
this.timeHeader.push(r);
|
|
4402
4405
|
}
|
|
4403
|
-
}, this.getPixels = function (e) { var t = e.ticks - this.startDate.ticks, n = s.
|
|
4404
|
-
var a = this.
|
|
4406
|
+
}, this.getPixels = function (e) { var t = e.ticks - this.startDate.ticks, n = s.Ab(t), a = s.cellWidth, i = Math.floor(n / a), r = i * a; r = r < 0 ? 0 : r; var o = r + a; n % a === 0 && (o = r); var l = s.ze(); return o = o > l ? l : o, { left: n, boxLeft: r, boxRight: o, i: i }; }, this.getDate = function (e, t, n) {
|
|
4407
|
+
var a = this.He(e, n);
|
|
4405
4408
|
if (!a)
|
|
4406
4409
|
return null;
|
|
4407
|
-
var i = a.x, r = s.
|
|
4410
|
+
var i = a.x, r = s.Ie(i);
|
|
4408
4411
|
if (!r)
|
|
4409
4412
|
return null;
|
|
4410
4413
|
var o = n && !t ? r.end : r.start;
|
|
4411
|
-
return t ? o.addTime(this.
|
|
4412
|
-
}, this.
|
|
4414
|
+
return t ? o.addTime(this.Je(a.offset)) : o;
|
|
4415
|
+
}, this.He = function (e, t) {
|
|
4413
4416
|
t && (e -= 1);
|
|
4414
|
-
var n = Math.floor(e / s.cellWidth), a = s.
|
|
4417
|
+
var n = Math.floor(e / s.cellWidth), a = s.Ie(n);
|
|
4415
4418
|
if (!a)
|
|
4416
4419
|
return null;
|
|
4417
4420
|
var i = {};
|
|
4418
4421
|
return i.x = n, i.offset = e % s.cellWidth, i.cell = a, i;
|
|
4419
|
-
}, this.
|
|
4420
|
-
var t = e.ticks - this.startDate.ticks, n = 60 * s.
|
|
4422
|
+
}, this.Ke = function (e) {
|
|
4423
|
+
var t = e.ticks - this.startDate.ticks, n = 60 * s.Le() * 1e3;
|
|
4421
4424
|
if (t < 0)
|
|
4422
4425
|
return { past: !0 };
|
|
4423
4426
|
var a = Math.floor(t / n);
|
|
4424
|
-
return { i: a, current: s.
|
|
4425
|
-
}, this.
|
|
4427
|
+
return { i: a, current: s.Ie(a) };
|
|
4428
|
+
}, this.Ab = function (e) { var t = 60 * s.Le() * 1e3, n = s.cellWidth; return Math.floor(n * e / t); }, this.Je = function (e) { var t = 60 * s.Le() * 1e3, n = s.cellWidth; return Math.floor(e / n * t); }, this.Me = function (e) { DayPilot.Global.touch.start || t.Ne || (s.Oe = {}, s.va(this, e)); }, this.va = function (e, t) { e.event && s.Pe(e, t); }, this.xa = function (e) {
|
|
4426
4429
|
if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
|
|
4427
4430
|
var t = this.event;
|
|
4428
4431
|
if (e.cancelBubble = !0, e.preventDefault(), !this.event.client.rightClickEnabled())
|
|
4429
4432
|
return !1;
|
|
4430
|
-
s.
|
|
4433
|
+
s.Qe(e);
|
|
4431
4434
|
var n = {};
|
|
4432
4435
|
if (n.e = t, n.div = this, n.originalEvent = e, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onEventRightClick && (s.onEventRightClick(n), n.preventDefault.value))
|
|
4433
4436
|
return !1;
|
|
@@ -4438,14 +4441,14 @@ var DayPilot = { Global: {} };
|
|
|
4438
4441
|
}
|
|
4439
4442
|
return "function" == typeof s.onEventRightClicked && s.onEventRightClicked(n), !1;
|
|
4440
4443
|
}
|
|
4441
|
-
}, this.
|
|
4444
|
+
}, this.Ie = function (e) { var t = s.Le(), n = 60 * t * 1e3; return { start: s.startDate.addTime(e * n), end: s.startDate.addTime((e + 1) * n), left: e * s.cellWidth, width: s.cellWidth }; }, this.Pe = function (e, t) {
|
|
4442
4445
|
if ("boolean" == typeof t)
|
|
4443
4446
|
throw new DayPilot.Exception("Invalid _eventClickSingle parameters");
|
|
4444
4447
|
var n = e.event;
|
|
4445
4448
|
if (n) {
|
|
4446
4449
|
var a = t.ctrlKey, i = t.metaKey;
|
|
4447
4450
|
if (n.client.clickEnabled()) {
|
|
4448
|
-
s.
|
|
4451
|
+
s.Qe(t);
|
|
4449
4452
|
var r = {};
|
|
4450
4453
|
r.e = n, r.control = s, r.div = e, r.originalEvent = t, r.ctrl = a, r.meta = i, r.shift = t.shiftKey, r.preventDefault = function () { this.preventDefault.value = !0; }, r.toJSON = function () { return DayPilot.Util.copyProps(r, {}, ["e", "ctrl", "meta", "shift"]); }, "function" == typeof s.onEventClick && (s.onEventClick(r), r.preventDefault.value) || "function" == typeof s.onEventClicked && s.onEventClicked(r);
|
|
4451
4454
|
}
|
|
@@ -4462,55 +4465,55 @@ var DayPilot = { Global: {} };
|
|
|
4462
4465
|
function i() {
|
|
4463
4466
|
if (!r.preventDefault.value) {
|
|
4464
4467
|
switch (r.loaded = {}, t = r.newStart, n = r.newEnd, s.eventResizeHandling) {
|
|
4465
|
-
case "Update": s.
|
|
4468
|
+
case "Update": s.Se(r);
|
|
4466
4469
|
}
|
|
4467
4470
|
"function" == typeof s.onEventResized && s.onEventResized(r);
|
|
4468
4471
|
}
|
|
4469
4472
|
}
|
|
4470
4473
|
if ("Disabled" !== this.eventResizeHandling) {
|
|
4471
|
-
n = s.
|
|
4474
|
+
n = s.Re(n);
|
|
4472
4475
|
var r = {};
|
|
4473
4476
|
r.e = e, r.async = !1, r.loaded = function () { i(); }, r.newStart = t, r.newEnd = n, r.what = a, r.preventDefault = function () { this.preventDefault.value = !0; }, r.control = s, r.toJSON = function () { return DayPilot.Util.copyProps(r, {}, ["e", "async", "newStart", "newEnd"]); }, "function" == typeof s.onEventResize && s.onEventResize(r), r.async || i();
|
|
4474
4477
|
}
|
|
4475
|
-
}, this.
|
|
4478
|
+
}, this.qb = function (e) { e = e || {}, clearTimeout(s.Te), s.timeHeader = null, s.cellProperties = {}, s.De(), s.Ue(), s.events.Ve(), s.R.Kd(), s.clearSelection(), s.ha(), s.We(), s.Xe(), s.rb(), s.Ye(), s.Ze(), s.$e(), s.ia(), s.Z(), s._e(), s.af = {}, s.bf(), s.ma(), s.cf(), e.immediateEvents ? s.na() : setTimeout(function () { s.na(); }, 100), this.visible ? s.ae !== s.visible && this.show() : this.hide(), this.ae = this.visible, this.ne(), s.df(), this.ef(); }, this.ef = function () {
|
|
4476
4479
|
if ("function" == typeof s.onAfterUpdate) {
|
|
4477
4480
|
var e = {};
|
|
4478
4481
|
s.onAfterUpdate(e);
|
|
4479
4482
|
}
|
|
4480
4483
|
}, this.update = function (e) {
|
|
4481
|
-
if (!s.
|
|
4484
|
+
if (!s.La)
|
|
4482
4485
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that hasn't been initialized.");
|
|
4483
4486
|
if (s.Q)
|
|
4484
4487
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Scheduler object that has been disposed already. Calling .dispose() destroys the object and makes it unusable.");
|
|
4485
4488
|
u.request(e);
|
|
4486
|
-
}, u.timeout = null, u.options = null, u.enabled = !1, u.request = function (e) { u.enabled ? (clearTimeout(u.timeout), u.
|
|
4489
|
+
}, u.timeout = null, u.options = null, u.enabled = !1, u.request = function (e) { u.enabled ? (clearTimeout(u.timeout), u.ff(e), u.timeout = setTimeout(u.doit)) : (u.ff(e), u.doit()); }, u.ff = function (e) {
|
|
4487
4490
|
if (e) {
|
|
4488
4491
|
u.options || (u.options = {});
|
|
4489
4492
|
for (var t in e)
|
|
4490
4493
|
u.options[t] = e[t];
|
|
4491
4494
|
}
|
|
4492
|
-
}, u.doit = function () { var e = u.options; return u.options = null, s.
|
|
4493
|
-
if (s.
|
|
4494
|
-
n = s.
|
|
4495
|
+
}, u.doit = function () { var e = u.options; return u.options = null, s.La ? (s.sb(e), s.qb({ "immediateEvents": !0 }), void s.vb()) : void s.sb(e); }, this.gf = function (e) { e.forEach(function (e) { s.hf(e.index); }); }, this.if = function (e) { return e && 0 !== e.length ? e[0].isRow ? e : e.map(function (e) { return s.rowlist[e]; }) : []; }, this.jf = function (e, t, n) { e = DayPilot.ua(e), e = s.if(e), s.gf(e), this.kf ? (this.We(), this.Ze(), this._e(), e.forEach(function (e) { s.lf(e.index); }), e.forEach(function (e) { s.mf(e.index); }), this.cf(), this.nf()) : (e.forEach(function (e) { t || s.lf(e.index), s.mf(e.index); }), e.forEach(function (e) { s.of(e.index); }), s.cf()), s.oe(), n && n(), this.bf(); }, this.Re = function (e) { return "DateTime" === s.eventEndSpec ? e : e.getDatePart().ticks === e.ticks ? e.addDays(-1) : e.getDatePart(); }, this.pf = function (e) { return "DateTime" === s.eventEndSpec ? e : e.getDatePart().addDays(1); }, this.qf = function (e) { return "DateTime" === s.eventEndSpec ? e : e.getDatePart(); }, this.M = function (e, t, n, a, i) {
|
|
4496
|
+
if (s.rf = null, "Disabled" !== s.eventMoveHandling) {
|
|
4497
|
+
n = s.Re(n);
|
|
4495
4498
|
var r = {};
|
|
4496
4499
|
r.e = e, r.newStart = t, r.newEnd = n, r.newResource = a, r.ctrl = !1, r.meta = !1, r.shift = !1, i && (r.shift = i.shiftKey, r.ctrl = i.ctrlKey, r.meta = i.metaKey), r.control = s, r.areaData = DayPilot.Global.movingAreaData, r.toJSON = function () { return DayPilot.Util.copyProps(r, {}, ["e", "newStart", "newEnd", "newResource", "ctrl", "meta", "shift"]); }, r.preventDefault = function () { this.preventDefault.value = !0; };
|
|
4497
4500
|
var o = function () {
|
|
4498
4501
|
if (r.loaded = function () { }, r.preventDefault.value)
|
|
4499
|
-
return void s.
|
|
4502
|
+
return void s.sf();
|
|
4500
4503
|
switch (t = r.newStart, n = r.newEnd, s.eventMoveHandling) {
|
|
4501
|
-
case "Update": s.
|
|
4504
|
+
case "Update": s.Se(r);
|
|
4502
4505
|
}
|
|
4503
|
-
s.
|
|
4506
|
+
s.sf(), "function" == typeof s.onEventMoved && s.onEventMoved(r);
|
|
4504
4507
|
};
|
|
4505
4508
|
r.async = !1, r.loaded = function () { o(); }, "function" == typeof s.onEventMove && s.onEventMove(r),
|
|
4506
4509
|
r.async || o();
|
|
4507
4510
|
}
|
|
4508
|
-
}, this.
|
|
4511
|
+
}, this.Se = function (e) { var t = e.e, n = e.newStart, a = e.newEnd, i = e.newResource; t.start(n), t.end(a), t.resource(i), s.events.update(t), s.events.tf(); }, this.uf = function (e) {
|
|
4509
4512
|
if (e)
|
|
4510
4513
|
if (e.args)
|
|
4511
4514
|
s.O(e.args.start, e.args.end, e.args.resource);
|
|
4512
4515
|
else {
|
|
4513
|
-
var t = s.
|
|
4516
|
+
var t = s.vf(e);
|
|
4514
4517
|
if (!t)
|
|
4515
4518
|
return;
|
|
4516
4519
|
s.O(t.start, t.end, t.resource);
|
|
@@ -4518,24 +4521,24 @@ var DayPilot = { Global: {} };
|
|
|
4518
4521
|
}, this.O = function (e, t, n) {
|
|
4519
4522
|
if ("Disabled" !== s.timeRangeSelectedHandling) {
|
|
4520
4523
|
var a = t;
|
|
4521
|
-
t = s.
|
|
4524
|
+
t = s.Re(a);
|
|
4522
4525
|
var i = {};
|
|
4523
4526
|
if (i.control = s, i.start = e, i.end = t, i.resource = n, i.preventDefault = function () { this.preventDefault.value = !0; }, i.toJSON = function () { return DayPilot.Util.copyProps(i, {}, ["start", "end", "resource"]); }, "function" == typeof s.onTimeRangeSelect) {
|
|
4524
4527
|
if (s.onTimeRangeSelect(i), i.preventDefault.value)
|
|
4525
4528
|
return;
|
|
4526
4529
|
e = i.start, t = i.end;
|
|
4527
4530
|
}
|
|
4528
|
-
t = s.
|
|
4531
|
+
t = s.pf(t), s.wf(s.xf, e, t), s.yf(s.xf), "function" == typeof s.onTimeRangeSelected && s.onTimeRangeSelected(i);
|
|
4529
4532
|
}
|
|
4530
|
-
}, this.
|
|
4533
|
+
}, this.wf = function (e, t, n) {
|
|
4531
4534
|
if (e) {
|
|
4532
4535
|
var a, i = n;
|
|
4533
|
-
t.getTime() < s.startDate.getTime() ? (e.start.x = 0, e.start.time = s.startDate.getTime()) : (a = s.
|
|
4536
|
+
t.getTime() < s.startDate.getTime() ? (e.start.x = 0, e.start.time = s.startDate.getTime()) : (a = s.Ke(t), e.start.x = a.i, e.start.time = t);
|
|
4534
4537
|
var r = s.startDate.addDays(s.days);
|
|
4535
|
-
i.getTime() > r.getTime() ? (e.end.x = s.
|
|
4538
|
+
i.getTime() > r.getTime() ? (e.end.x = s.zf(), e.end.time = r.getTime()) : (a = s.Ke(i.addMilliseconds(-1)), e.end.x = a.i, e.end.time = n);
|
|
4536
4539
|
}
|
|
4537
|
-
}, this.
|
|
4538
|
-
e || (e = this.
|
|
4540
|
+
}, this.Af = function (e, t) { s.Bf(e, t); }, this.Bf = function (e, t) { var n = {}; n.resource = e, n.row = e, n.ctrl = t.ctrlKey, n.shift = t.shiftKey, n.meta = t.metaKey, n.originalEvent = t, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onRowClick && (s.onRowClick(n), n.preventDefault.value) || "function" == typeof s.onRowClicked && s.onRowClicked(n); }, this.Cf = function (e) { var t = {}; t.header = e, t.control = s, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onTimeHeaderClick && (s.onTimeHeaderClick(t), t.preventDefault.value) || "function" == typeof s.onTimeHeaderClicked && s.onTimeHeaderClicked(t); }, this.getViewport = function () { var e = this.nav.scroll.scrollLeft, t = this.nav.scroll.scrollTop, n = {}, a = s.Df(e, t), i = s.Ef(a), r = s.Ie(a.start.x), o = s.Ie(a.end.x); return n.start = s.getDate(e, !0), n.end = s.getDate(e + s.nav.scroll.clientWidth, !0, !0), n.resources = i, r && (n.topLeft = { "start": r.start, "end": r.end, x: a.start.x, y: a.start.y, "resource": i[0] }), o && (n.bottomRight = { "start": o.start, "end": o.end, x: a.end.x, y: a.end.y, "resource": i[i.length - 1] }), n.rows = function () { return n.resources.map(function (e) { return s.rows.find(e); }); }, n.events = function () { var e = []; return n.rows().forEach(function (t) { e = e.concat(t.events.forRange(n.start, n.end)); }), e; }, n; }, this.Df = function (e, t) { var n = {}; n.start = {}, n.end = {}; var a = s.He(e), i = s.He(e + s.nav.scroll.clientWidth); a && (n.start.x = a.x), i && (n.end.x = i.x); var r = t, o = t + s.nav.scroll.clientHeight; n.start.y = s.Ff(r).i, n.end.y = s.Ff(o).i, n.start.x = DayPilot.Util.atLeast(n.start.x, 0); var l = s.zf(); return n.end.x >= l && (n.end.x = l - 1), n; }, this.Ef = function (e) {
|
|
4541
|
+
e || (e = this.Df(this.nav.scroll.scrollLeft, this.nav.scroll.scrollTop));
|
|
4539
4542
|
var t = [];
|
|
4540
4543
|
t.ignoreToJSON = !0;
|
|
4541
4544
|
for (var n = e.start.y; n <= e.end.y; n++) {
|
|
@@ -4543,24 +4546,24 @@ var DayPilot = { Global: {} };
|
|
|
4543
4546
|
a && t.push(a.id);
|
|
4544
4547
|
}
|
|
4545
4548
|
return t;
|
|
4546
|
-
}, this.L = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.
|
|
4549
|
+
}, this.L = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.rb = function () { s.nav.top.className !== s.L("_main") && (s.nav.top.className = s.L("_main"), s.nav.dh1.className = s.L("_divider_horizontal"), s.nav.dh2.className = s.L("_divider_horizontal"), s.divResScroll.className = s.L("_rowheader_scroll"), s.nav.divider.className = s.L("_divider") + " " + s.L("_splitter"), s.nav.scroll.className = s.L("_scrollable"), s.ge.className = s.L("_matrix") + " " + s.L("_grid_main")); }, this.ba = function () { this.nav.top.dispose = this.dispose; }, this.dispose = function () {
|
|
4547
4550
|
var e = s;
|
|
4548
|
-
if (e.
|
|
4551
|
+
if (e.La && !e.Q) {
|
|
4549
4552
|
e.Q = !0;
|
|
4550
|
-
for (var n in e.
|
|
4551
|
-
var a = e.
|
|
4553
|
+
for (var n in e.Gf) {
|
|
4554
|
+
var a = e.Gf[n];
|
|
4552
4555
|
DayPilot.isArray(a) ? a.forEach(function (e) { clearTimeout(e); }) : clearTimeout(a);
|
|
4553
4556
|
}
|
|
4554
|
-
e.Z(), e.divCells = null, e.divCorner = null, e.divEvents = null, e.divHeader && (e.divHeader.rows = null), e.divHeader = null, e.divLines = null, e.divNorth = null, e.divRange = null, e.divResScroll = null, e.divStretch = null, e.divTimeScroll = null, e.
|
|
4557
|
+
e.Z(), e.divCells = null, e.divCorner = null, e.divEvents = null, e.divHeader && (e.divHeader.rows = null), e.divHeader = null, e.divLines = null, e.divNorth = null, e.divRange = null, e.divResScroll = null, e.divStretch = null, e.divTimeScroll = null, e.Ce = null, e.ge.calendar = null, e.ge = null, e.nav.top.onmousemove = null, e.nav.top.onmouseout = null, e.nav.top.dispose = null, e.nav.top.ontouchstart = null, e.nav.top.ontouchmove = null, e.nav.top.ontouchend = null, e.nav.top.removeAttribute("style"), e.nav.top.removeAttribute("class"), e.nav.top.innerHTML = "", e.nav.top.dp = null, e.nav.top = null, e.nav.scroll.onscroll = null, e.nav.scroll.root = null, e.nav.scroll = null, t.pc(e), c = null;
|
|
4555
4558
|
}
|
|
4556
|
-
}, this.disposed = function () { return s.Q; }, this.ca = function (e) { var t = null; t = e.nodeType ? e.event : e; var n = s.eventBorderRadius; "number" == typeof n && (n += "px"); var a = s.
|
|
4559
|
+
}, this.disposed = function () { return s.Q; }, this.ca = function (e) { var t = null; t = e.nodeType ? e.event : e; var n = s.eventBorderRadius; "number" == typeof n && (n += "px"); var a = s.Hf(t), i = s.rowlist, o = s.eventHeight, l = t.part && t.part.top && i[t.part.dayIndex] ? t.part.top + i[t.part.dayIndex].top : a.top, d = a.left, c = a.width, u = document.createElement("div"); u.style.position = "absolute", u.style.width = c + "px", u.style.height = o + "px", u.style.left = d + "px", u.style.top = l + "px", u.style.overflow = "hidden"; var h = r(); return u.appendChild(h), u.className = this.L("_shadow"), h.className = this.L("_shadow_inner"), n && (u.style.borderRadius = n, h.style.borderRadius = n), s.divShadow.appendChild(u), u.calendar = s, u; }, this.Ff = function (e) {
|
|
4557
4560
|
for (var t, n = s.rowlist, a = {}, i = 0, r = 0, o = n.length, l = 0; l < o; l++) {
|
|
4558
4561
|
var d = n[l];
|
|
4559
4562
|
if (r += d.height, i = r - d.height, t = d, a.top = i, a.bottom = r, a.i = l, a.element = t, e < r)
|
|
4560
4563
|
break;
|
|
4561
4564
|
}
|
|
4562
4565
|
return a;
|
|
4563
|
-
}, this.
|
|
4566
|
+
}, this.If = function (e) {
|
|
4564
4567
|
if (e > this.rowlist.length - 1)
|
|
4565
4568
|
throw new DayPilot.Exception("Row index too high");
|
|
4566
4569
|
for (var t = 0, n = 0; n <= e; n++)
|
|
@@ -4571,7 +4574,7 @@ var DayPilot = { Global: {} };
|
|
|
4571
4574
|
if (!s.events.list || "undefined" == typeof s.events.list.length)
|
|
4572
4575
|
return null;
|
|
4573
4576
|
if ("function" == typeof e)
|
|
4574
|
-
return s.
|
|
4577
|
+
return s.Jf(e);
|
|
4575
4578
|
for (var t = s.events.list.length, n = 0; n < t; n++)
|
|
4576
4579
|
if (s.events.list[n].id === e)
|
|
4577
4580
|
return new DayPilot.Event(s.events.list[n], s);
|
|
@@ -4592,17 +4595,17 @@ var DayPilot = { Global: {} };
|
|
|
4592
4595
|
return !0;
|
|
4593
4596
|
});
|
|
4594
4597
|
throw new DayPilot.Exception("function or object argument expected");
|
|
4595
|
-
}, this.
|
|
4598
|
+
}, this.Jf = function (e) {
|
|
4596
4599
|
for (var t = s.events.list.length, n = 0; n < t; n++) {
|
|
4597
4600
|
var a = new DayPilot.Event(s.events.list[n], s);
|
|
4598
4601
|
if (e(a))
|
|
4599
4602
|
return a;
|
|
4600
4603
|
}
|
|
4601
4604
|
return null;
|
|
4602
|
-
}, this.events.focus = function (e) { var t = s.
|
|
4603
|
-
if (s.
|
|
4605
|
+
}, this.events.focus = function (e) { var t = s.Kf(e); null === t || void 0 === t ? void 0 : t.focus(); }, this.events.scrollIntoView = function (e) {
|
|
4606
|
+
if (s.Kf(e)) {
|
|
4604
4607
|
var t = e.start(), n = s.getViewport();
|
|
4605
|
-
!DayPilot.Util.overlaps(n.start, n.end, e.start(), e.end()) && DayPilot.Util.overlaps(s.sa(), s.
|
|
4608
|
+
!DayPilot.Util.overlaps(n.start, n.end, e.start(), e.end()) && DayPilot.Util.overlaps(s.sa(), s.Lf(), e.start(), e.end()) && s.scrollTo(t, "fast", "middle");
|
|
4606
4609
|
var a = e.resource();
|
|
4607
4610
|
s.getViewport().resources.indexOf(a) === -1 && s.scrollToResource(a);
|
|
4608
4611
|
}
|
|
@@ -4635,7 +4638,7 @@ var DayPilot = { Global: {} };
|
|
|
4635
4638
|
var o = {};
|
|
4636
4639
|
if (o.preventDefault = function () { this.preventDefault.value = !0; }, o.data = n, "function" == typeof t && t(o), o.preventDefault.value)
|
|
4637
4640
|
return;
|
|
4638
|
-
s.events.list = o.data, s.
|
|
4641
|
+
s.events.list = o.data, s.La && s.update();
|
|
4639
4642
|
}
|
|
4640
4643
|
};
|
|
4641
4644
|
if (s.eventsLoadMethod && "POST" === s.eventsLoadMethod.toUpperCase())
|
|
@@ -4644,51 +4647,51 @@ var DayPilot = { Global: {} };
|
|
|
4644
4647
|
var r = e, o = "start=" + s.visibleStart().toString() + "&end=" + s.visibleEnd().toString();
|
|
4645
4648
|
r += r.indexOf("?") > -1 ? "&" + o : "?" + o, DayPilot.ajax({ "method": "GET", "url": r, "success": i, "error": a });
|
|
4646
4649
|
}
|
|
4647
|
-
}, this.events.
|
|
4650
|
+
}, this.events.Mf = function (e) {
|
|
4648
4651
|
var t = [];
|
|
4649
4652
|
return s.rowlist.forEach(function (n) {
|
|
4650
|
-
s.
|
|
4653
|
+
s.Nf(n.index);
|
|
4651
4654
|
for (var a = 0; a < n.events.length; a++) {
|
|
4652
4655
|
var i = n.events[a].data;
|
|
4653
|
-
if (s.
|
|
4656
|
+
if (s.Of(i, e)) {
|
|
4654
4657
|
t.push(n), n.events.splice(a, 1);
|
|
4655
4658
|
break;
|
|
4656
4659
|
}
|
|
4657
4660
|
}
|
|
4658
4661
|
}), t;
|
|
4659
|
-
}, this.events.
|
|
4662
|
+
}, this.events.Pf = function (e) {
|
|
4660
4663
|
if (!e)
|
|
4661
4664
|
return null;
|
|
4662
4665
|
for (var t = s.rowlist, n = 0; n < t.length; n++) {
|
|
4663
4666
|
var a = t[n];
|
|
4664
|
-
s.
|
|
4667
|
+
s.Nf(a.index);
|
|
4665
4668
|
for (var i = 0; i < a.events.length; i++) {
|
|
4666
4669
|
var r = a.events[i];
|
|
4667
|
-
if (s.
|
|
4670
|
+
if (s.Of(r.data, e))
|
|
4668
4671
|
return a.events[i];
|
|
4669
4672
|
}
|
|
4670
4673
|
}
|
|
4671
4674
|
return null;
|
|
4672
|
-
}, this.events.
|
|
4673
|
-
var t = [], n = s.
|
|
4674
|
-
s.
|
|
4675
|
+
}, this.events.Qf = function (e) {
|
|
4676
|
+
var t = [], n = s.Rf(), a = DayPilot.indexOf(s.events.list, e);
|
|
4677
|
+
s.yb(a);
|
|
4675
4678
|
var i = s.rowlist, r = !1;
|
|
4676
4679
|
return i.forEach(function (i) {
|
|
4677
4680
|
if (!r) {
|
|
4678
|
-
s.
|
|
4679
|
-
var o = s.
|
|
4680
|
-
o && ("function" == typeof s.onBeforeEventRender && (o.cache = s.
|
|
4681
|
+
s.Nf(i.index);
|
|
4682
|
+
var o = s.Sf(e, i);
|
|
4683
|
+
o && ("function" == typeof s.onBeforeEventRender && (o.cache = s.xb.events[a]), t.push(i), n || (r = !0));
|
|
4681
4684
|
}
|
|
4682
4685
|
}), t;
|
|
4683
|
-
}, this.
|
|
4686
|
+
}, this.Of = function (e, t) { return DayPilot.Util.isSameEvent(e, t); }, this.events.update = function (e) {
|
|
4684
4687
|
if ("object" == typeof e && !(e instanceof DayPilot.Event)) {
|
|
4685
4688
|
var t = s.events.find(e.id);
|
|
4686
4689
|
return s.events.remove(t), void s.events.add(e);
|
|
4687
4690
|
}
|
|
4688
|
-
if (s.events.list.find(function (t) { return s.
|
|
4689
|
-
s.
|
|
4690
|
-
var n = s.events.
|
|
4691
|
-
e.commit(), n = n.concat(s.events.
|
|
4691
|
+
if (s.events.list.find(function (t) { return s.Of(t, e.data); })) {
|
|
4692
|
+
s.ye.Tf && (s.ye.skip = !0);
|
|
4693
|
+
var n = s.events.Mf(e.data);
|
|
4694
|
+
e.commit(), n = n.concat(s.events.Qf(e.data)), s.events.Uf(n);
|
|
4692
4695
|
}
|
|
4693
4696
|
}, this.events.remove = function (e) {
|
|
4694
4697
|
if (e) {
|
|
@@ -4696,16 +4699,16 @@ var DayPilot = { Global: {} };
|
|
|
4696
4699
|
var t = s.events.find(e);
|
|
4697
4700
|
return void s.events.remove(t);
|
|
4698
4701
|
}
|
|
4699
|
-
var n = s.
|
|
4700
|
-
n && s.events.list.splice(n.index, 1), s.
|
|
4701
|
-
var a = s.events.
|
|
4702
|
-
s.events.
|
|
4702
|
+
var n = s.Vf(e.data);
|
|
4703
|
+
n && s.events.list.splice(n.index, 1), s.ye.Tf && (s.ye.skip = !0);
|
|
4704
|
+
var a = s.events.Mf(e.data);
|
|
4705
|
+
s.events.Uf(a);
|
|
4703
4706
|
}
|
|
4704
4707
|
}, this.events.add = function (e, t, n) {
|
|
4705
4708
|
n = n || {};
|
|
4706
4709
|
var a = n.renderOnly;
|
|
4707
4710
|
e instanceof DayPilot.Event || (e = new DayPilot.Event(e)), e.calendar = s, s.events.list || (s.events.list = []);
|
|
4708
|
-
var i = s.
|
|
4711
|
+
var i = s.Vf(e);
|
|
4709
4712
|
if (a) {
|
|
4710
4713
|
if (!i)
|
|
4711
4714
|
throw new DayPilot.Exception("Unexpected: event not found in list");
|
|
@@ -4715,62 +4718,62 @@ var DayPilot = { Global: {} };
|
|
|
4715
4718
|
throw new DayPilot.Exception("The event you are trying to add using DayPilot.Scheduler.events.add() is already loaded. A unique ID is required.");
|
|
4716
4719
|
i || s.events.list.push(e.data);
|
|
4717
4720
|
}
|
|
4718
|
-
if (s.
|
|
4719
|
-
s.
|
|
4720
|
-
var r = s.events.
|
|
4721
|
-
s.events.
|
|
4721
|
+
if (s.La) {
|
|
4722
|
+
s.ye.Tf && (s.ye.skip = !0);
|
|
4723
|
+
var r = s.events.Qf(e.data);
|
|
4724
|
+
s.events.Uf(r);
|
|
4722
4725
|
}
|
|
4723
|
-
}, this.events.
|
|
4726
|
+
}, this.events.Wf = function (e) {
|
|
4724
4727
|
var t = e instanceof DayPilot.Event ? e.data : e, n = new DayPilot.Date(t.start), a = new DayPilot.Date(t.end);
|
|
4725
4728
|
return !!s.events.list.find(function (e) {
|
|
4726
|
-
if (s.
|
|
4729
|
+
if (s.Of(t, e))
|
|
4727
4730
|
return !1;
|
|
4728
4731
|
if (t.resource !== e.resource)
|
|
4729
4732
|
return !1;
|
|
4730
4733
|
var i = new DayPilot.Date(e.start), r = new DayPilot.Date(e.end);
|
|
4731
4734
|
return DayPilot.Util.overlaps(n, a, i, r);
|
|
4732
4735
|
});
|
|
4733
|
-
}, this.events.
|
|
4736
|
+
}, this.events.Xf = { "rows": [] }, this.events.Yf = null, this.events.Ve = function () { clearTimeout(s.events.Yf), s.events.Yf = null, s.events.Xf.rows = []; }, this.events.Zf = 0, this.events.Uf = function (e) { var t = s.events.Xf.rows; e.forEach(function (e) { t.push(e); }), s.events.Xf.rows = DayPilot.ua(t); var n = s.events.tf; s.events.Yf || (s.events.Yf = setTimeout(n, s.events.Zf)); }, this.events.tf = function () { clearTimeout(s.events.Yf), s.events.Yf = null; var e = s.events.Xf.rows; s.events.Xf.rows = [], s.$f(e), s._f(), s.La && (s.kf && s.We(), s.ma(), s.jf(e)); }, this.ye = {}, this.ye.enabled = !1, this.ye.skip = !1, this.ye.skipUpdate = function () { return s.ye.skip; }, this.ye.skipped = function () { s.ye.skip = !1; }, this.ye.ag = !1, this.ye.Tf = !1, this.bg = {}, this.bg.reactDOM = null, this.bg.react = null, this.cg = function (e) {
|
|
4734
4737
|
var t = s.startDate;
|
|
4735
4738
|
if (e.ticks === t.ticks)
|
|
4736
4739
|
return e;
|
|
4737
4740
|
var n = t;
|
|
4738
4741
|
if (e.ticks < t.ticks) {
|
|
4739
4742
|
for (; n.ticks > e.ticks;)
|
|
4740
|
-
n = n.addTime(60 * -s.
|
|
4743
|
+
n = n.addTime(60 * -s.Le() * 1e3);
|
|
4741
4744
|
return n;
|
|
4742
4745
|
}
|
|
4743
|
-
var a = this.
|
|
4746
|
+
var a = this.Ke(e);
|
|
4744
4747
|
if (a.current)
|
|
4745
4748
|
return a.current.start;
|
|
4746
4749
|
throw new DayPilot.Exception("getBoxStart(): time not found");
|
|
4747
|
-
}, this.
|
|
4748
|
-
var n = this.
|
|
4750
|
+
}, this.Hf = function (e) {
|
|
4751
|
+
var n = this.Ff(s.coords.y);
|
|
4749
4752
|
if ("function" != typeof e.end)
|
|
4750
4753
|
throw new DayPilot.Exception("e.end function is not defined");
|
|
4751
4754
|
if (!e.end())
|
|
4752
4755
|
throw new DayPilot.Exception("e.end() returns null");
|
|
4753
4756
|
var a = DayPilot.DateUtil.diff(e.rawend(), e.start());
|
|
4754
4757
|
a = DayPilot.Util.atLeast(a, 1);
|
|
4755
|
-
var i = l.
|
|
4756
|
-
i && (r = e.start().getTime() - this.
|
|
4758
|
+
var i = l.dg(a), r = 0, o = s.coords.x;
|
|
4759
|
+
i && (r = e.start().getTime() - this.cg(e.start()).getTime());
|
|
4757
4760
|
var d = 0;
|
|
4758
|
-
if (t.
|
|
4761
|
+
if (t.eg)
|
|
4759
4762
|
if (i) {
|
|
4760
|
-
var c = e.start(), u = this.
|
|
4761
|
-
d = t.
|
|
4762
|
-
var h = 60 * s.
|
|
4763
|
+
var c = e.start(), u = this.cg(c);
|
|
4764
|
+
d = t.eg.getTime() - u.getTime();
|
|
4765
|
+
var h = 60 * s.Le() * 1e3;
|
|
4763
4766
|
d = Math.floor(d / h) * h;
|
|
4764
4767
|
}
|
|
4765
4768
|
else
|
|
4766
|
-
d = t.
|
|
4769
|
+
d = t.eg.getTime() - e.start().getTime();
|
|
4767
4770
|
var f = this.getDate(o, !0).addTime(-d);
|
|
4768
|
-
t.
|
|
4771
|
+
t.fg && (f = e.start());
|
|
4769
4772
|
var v = s.snapToGrid;
|
|
4770
|
-
v && (f = this.
|
|
4773
|
+
v && (f = this.cg(f)), f = f.addTime(r);
|
|
4771
4774
|
var p = f.addTime(a), m = f, g = p, y = this.getPixels(m), b = this.getPixels(g), w = v ? y.boxLeft : y.left, x = v && i ? b.boxRight - w : b.left - w, _ = {};
|
|
4772
4775
|
return _.top = n.top, _.left = w, _.row = n.element, _.rowIndex = n.i, _.width = x, _.start = f, _.end = p, _.relativeY = s.coords.y - n.top, _;
|
|
4773
|
-
}, this.
|
|
4776
|
+
}, this.Le = function () {
|
|
4774
4777
|
switch (this.scale) {
|
|
4775
4778
|
case "CellDuration": return this.cellDuration;
|
|
4776
4779
|
case "Minute": return 1;
|
|
@@ -4779,77 +4782,77 @@ var DayPilot = { Global: {} };
|
|
|
4779
4782
|
case "Week": return 10080;
|
|
4780
4783
|
}
|
|
4781
4784
|
throw new DayPilot.Exception("can't guess cellDuration value");
|
|
4782
|
-
}, this.
|
|
4783
|
-
var e = s.coords, n = t.
|
|
4785
|
+
}, this.gg = function (e) { return e.end.ticks - e.start.ticks; }, this.hg = function () { var e = t.ig.width, n = t.ig.left, a = t.jg, i = t.fg.dpBorder, r = null, o = null, l = s.snapToGrid, d = !l; "left" === i ? (r = s.getDate(n, d), o = a.rawend()) : "right" === i && (r = a.start(), o = s.getDate(n + e, d, !0)), t.ig.start = r, t.ig.end = o; }, this.kg = function () {
|
|
4786
|
+
var e = s.coords, n = t.fg.dpBorder, a = t.fg.event, i = a.part.left;
|
|
4784
4787
|
"right" === n && (i += a.part.width);
|
|
4785
|
-
var r, o, l = t.
|
|
4788
|
+
var r, o, l = t.fg.event.calendar.cellWidth, d = a.part.width, c = a.part.left, u = 0, h = e.x - i, f = s.snapToGrid;
|
|
4786
4789
|
if ("right" === n) {
|
|
4787
4790
|
if (r = c, f) {
|
|
4788
|
-
var v = s.
|
|
4791
|
+
var v = s.He(d + c + h).cell, p = s.He(c).cell, m = p.left + p.width - c;
|
|
4789
4792
|
o = v.left + v.width - c, o < m && (o = m);
|
|
4790
4793
|
}
|
|
4791
4794
|
else
|
|
4792
4795
|
o = d + h;
|
|
4793
|
-
var g = s.
|
|
4794
|
-
c + o > g && (o = g - c), t.
|
|
4796
|
+
var g = s.ze();
|
|
4797
|
+
c + o > g && (o = g - c), t.ig.left = c, t.ig.width = o, t.ig.style.left = c + "px", t.ig.style.width = o + "px";
|
|
4795
4798
|
}
|
|
4796
4799
|
else {
|
|
4797
4800
|
if ("left" !== n)
|
|
4798
4801
|
throw new DayPilot.Exception("Invalid dpBorder.");
|
|
4799
4802
|
f ? (h >= d && (h = d), r = Math.floor((c + h + 0) / l) * l, r < u && (r = u)) : r = c + h, o = d - (r - c);
|
|
4800
4803
|
var y = c + d, b = l;
|
|
4801
|
-
f ? "Never" === s.useEventBoxes && (b = d < l ? d : 1) : b = 1, o < b && (o = b, r = y - o), t.
|
|
4804
|
+
f ? "Never" === s.useEventBoxes && (b = d < l ? d : 1) : b = 1, o < b && (o = b, r = y - o), t.ig.left = r, t.ig.width = o, t.ig.style.left = r + "px", t.ig.style.width = o + "px";
|
|
4802
4805
|
}
|
|
4803
|
-
s.
|
|
4804
|
-
}, this.
|
|
4805
|
-
if (s.coords && t.
|
|
4806
|
-
var e = t.
|
|
4806
|
+
s.hg();
|
|
4807
|
+
}, this.lg = function () {
|
|
4808
|
+
if (s.coords && t.mg) {
|
|
4809
|
+
var e = t.ng, n = this.Hf(t.mg);
|
|
4807
4810
|
e.row = n.row, e.style.height = DayPilot.Util.atLeast(n.row.height, 0) + "px", e.style.top = n.top + "px", e.style.left = n.left + "px", e.style.width = n.width + "px", e.start = n.start, e.end = n.end;
|
|
4808
4811
|
}
|
|
4809
|
-
}, this.
|
|
4812
|
+
}, this.og = function () { return this.rowHeaderWidth; }, this.pg = function () { return this.qg(s.progressiveRowRenderingPreload); }, this.qg = function (e) {
|
|
4810
4813
|
e = e || 0;
|
|
4811
4814
|
var t = 0, n = s.rowlist.length;
|
|
4812
4815
|
if (s.progressiveRowRendering) {
|
|
4813
|
-
var a = s.
|
|
4816
|
+
var a = s.ke();
|
|
4814
4817
|
t = a.yStart, n = a.yEnd + 1, t = DayPilot.Util.atLeast(0, t - e), n = Math.min(s.rowlist.length, n + e);
|
|
4815
4818
|
}
|
|
4816
4819
|
return { "start": t, "end": n };
|
|
4817
|
-
}, this.
|
|
4820
|
+
}, this.Xe = function () {
|
|
4818
4821
|
function e() { var e = s.divHeader; e && (e.rows = []); var t = e; t && (t.innerHTML = ""); }
|
|
4819
|
-
this.
|
|
4820
|
-
var t = this.
|
|
4822
|
+
this.rg = !0;
|
|
4823
|
+
var t = this.og();
|
|
4821
4824
|
e();
|
|
4822
4825
|
var a = this.divHeader;
|
|
4823
|
-
if (a.style.width = t + "px", a.style.height = s.
|
|
4826
|
+
if (a.style.width = t + "px", a.style.height = s._d + "px", s.divHeader = a, s.progressiveRowRendering)
|
|
4824
4827
|
n();
|
|
4825
4828
|
else
|
|
4826
4829
|
for (var i = this.rowlist.length, r = 0; r < i; r++)
|
|
4827
|
-
s.
|
|
4828
|
-
s.
|
|
4829
|
-
}, this.vg = function () {
|
|
4830
|
-
if (s.progressiveRowRendering)
|
|
4831
|
-
for (var e = this.qg(), t = 0; t < s.rowlist.length; t++)
|
|
4832
|
-
e.start <= t && t < e.end ? s.tg(t) : s.wg(t);
|
|
4830
|
+
s.sg(r);
|
|
4831
|
+
s.tg(), this.divResScroll.appendChild(a);
|
|
4833
4832
|
}, this.ug = function () {
|
|
4834
|
-
if (
|
|
4833
|
+
if (s.progressiveRowRendering)
|
|
4834
|
+
for (var e = this.pg(), t = 0; t < s.rowlist.length; t++)
|
|
4835
|
+
e.start <= t && t < e.end ? s.sg(t) : s.vg(t);
|
|
4836
|
+
}, this.tg = function () {
|
|
4837
|
+
if (!s.R.wg()) {
|
|
4835
4838
|
var e = s.divHeader, t = r();
|
|
4836
4839
|
t.style.position = "absolute", e.appendChild(t), s.nav.resScrollSpace = t;
|
|
4837
4840
|
var n = r();
|
|
4838
4841
|
n.style.position = "relative", n.style.height = "100%", n.className = this.L("_rowheader"), t.appendChild(n);
|
|
4839
|
-
var a = this.
|
|
4840
|
-
t.style.width = a + "px", t.style.top = this.
|
|
4842
|
+
var a = this.og();
|
|
4843
|
+
t.style.width = a + "px", t.style.top = this._d + "px";
|
|
4841
4844
|
}
|
|
4842
|
-
}, this.
|
|
4845
|
+
}, this.vg = function (e) { var t = s.divHeader.rows[e]; t && (DayPilot.de(t), s.divHeader.rows[e] = null); }, this.hf = function (e) { this.vg(e), this.sg(e); }, this.sg = function (e) {
|
|
4843
4846
|
var t = s.rowlist, n = s.divHeader;
|
|
4844
4847
|
if (n && !n.rows[e]) {
|
|
4845
|
-
var a = this.
|
|
4848
|
+
var a = this.og(), i = t[e];
|
|
4846
4849
|
if (i) {
|
|
4847
|
-
var o = this.
|
|
4850
|
+
var o = this.xg(i), l = r();
|
|
4848
4851
|
l.style.position = "absolute", l.style.top = i.top + "px", n.rows[e] = l, l.row = i, l.index = e;
|
|
4849
4852
|
var d = o.row, c = this.rowHeaderWidth;
|
|
4850
4853
|
l.style.width = c + "px", l.style.border = "0px none";
|
|
4851
4854
|
var u = d.toolTip || d.toolTip;
|
|
4852
|
-
u && (l.title = u), "undefined" != typeof d.ariaLabel ? l.setAttribute("aria-label", d.ariaLabel) : l.setAttribute("aria-label", d.text || ""), l.onclick = s.
|
|
4855
|
+
u && (l.title = u), "undefined" != typeof d.ariaLabel ? l.setAttribute("aria-label", d.ariaLabel) : l.setAttribute("aria-label", d.text || ""), l.onclick = s.yg;
|
|
4853
4856
|
var h = r();
|
|
4854
4857
|
h.style.width = c + "px", h.className = this.L("_rowheader"), d.cssClass && DayPilot.Util.addClass(h, d.cssClass), d.cssClass && DayPilot.Util.addClass(h, d.cssClass);
|
|
4855
4858
|
var f = d.backColor || d.backColor;
|
|
@@ -4869,12 +4872,12 @@ var DayPilot = { Global: {} };
|
|
|
4869
4872
|
case "center": m.style.justifyContent = "center";
|
|
4870
4873
|
}
|
|
4871
4874
|
h.appendChild(m);
|
|
4872
|
-
var g = d.areas || [], y = s.
|
|
4875
|
+
var g = d.areas || [], y = s.zg(i);
|
|
4873
4876
|
DayPilot.Areas.attach(h, y, { areas: g });
|
|
4874
4877
|
var b = r();
|
|
4875
4878
|
b.style.position = "absolute", b.style.bottom = "0px", b.style.width = "100%", b.style.height = "0px", b.style.boxSizing = "content-box", b.style.borderBottom = "1px solid transparent", b.className = this.L("_resourcedivider"), h.appendChild(b);
|
|
4876
4879
|
var w = r(), x = r();
|
|
4877
|
-
x.innerHTML = s
|
|
4880
|
+
x.innerHTML = s.$a(d.text, d.html), x.className = s.L("_rowheader_inner_text"), l.textDiv = x, l.cellDiv = h, w.appendChild(x), m.appendChild(w);
|
|
4878
4881
|
var _ = d.verticalAlignment || d.verticalAlignment;
|
|
4879
4882
|
if (_)
|
|
4880
4883
|
switch (m.style.display = "flex", _) {
|
|
@@ -4889,25 +4892,25 @@ var DayPilot = { Global: {} };
|
|
|
4889
4892
|
l.appendChild(h), n.appendChild(l), h.style.width = a + "px";
|
|
4890
4893
|
}
|
|
4891
4894
|
}
|
|
4892
|
-
}, this.
|
|
4895
|
+
}, this.yg = function (e) { var t = this.row, n = s.zg(t, this.index); s.Af(n, e); }, this.Ag = function () {
|
|
4893
4896
|
if ("Disabled" !== s.timeHeaderClickHandling) {
|
|
4894
4897
|
var e = {};
|
|
4895
|
-
e.start = this.cell.start, e.level = this.cell.level, e.end = this.cell.end, e.end || (e.end = new DayPilot.Date(e.start).addMinutes(s.
|
|
4898
|
+
e.start = this.cell.start, e.level = this.cell.level, e.end = this.cell.end, e.end || (e.end = new DayPilot.Date(e.start).addMinutes(s.Le())), s.Cf(e);
|
|
4896
4899
|
}
|
|
4897
|
-
}, this.
|
|
4900
|
+
}, this.Bg = function (e) {
|
|
4898
4901
|
if ("Disabled" !== s.timeHeaderRightClickHandling) {
|
|
4899
4902
|
e.cancelBubble = !0, e.preventDefault();
|
|
4900
4903
|
var t = {};
|
|
4901
|
-
t.start = this.cell.start, t.level = this.cell.level, t.end = this.cell.end, t.end || (t.end = new DayPilot.Date(t.start).addMinutes(s.
|
|
4904
|
+
t.start = this.cell.start, t.level = this.cell.level, t.end = this.cell.end, t.end || (t.end = new DayPilot.Date(t.start).addMinutes(s.Le()));
|
|
4902
4905
|
var n = {};
|
|
4903
4906
|
n.header = t, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onTimeHeaderRightClick && (s.onTimeHeaderRightClick(n), n.preventDefault.value) || "function" == typeof s.onTimeHeaderRightClicked && s.onTimeHeaderRightClicked(n);
|
|
4904
4907
|
}
|
|
4905
|
-
}, this.
|
|
4908
|
+
}, this.zg = function (e) { return new DayPilot.Row(e, s); }, this.Nf = function (e) { var t = s.rowlist, n = t[e]; n.events || n.resetEvents(); }, this.Cg = {}, this.ha = function (e) {
|
|
4906
4909
|
if (e ? this.events.list = e : this.events.list || (this.events.list = []), null != this.events.list && !DayPilot.isArray(this.events.list))
|
|
4907
4910
|
throw new DayPilot.Exception("DayPilot.Scheduler.events.list expects an array object");
|
|
4908
4911
|
c.prepareRows(!0);
|
|
4909
4912
|
var t, n = this.events.list, a = "function" == typeof this.onBeforeEventRender;
|
|
4910
|
-
s.
|
|
4913
|
+
s.Cg = {};
|
|
4911
4914
|
for (var i = 0; i < n.length; i++) {
|
|
4912
4915
|
var r = n[i];
|
|
4913
4916
|
if (r) {
|
|
@@ -4920,26 +4923,26 @@ var DayPilot = { Global: {} };
|
|
|
4920
4923
|
if (!("string" == typeof r.id || "number" == typeof r.id))
|
|
4921
4924
|
throw new DayPilot.Exception("All events must have an id property (string or number)");
|
|
4922
4925
|
var o = "_" + r.id;
|
|
4923
|
-
if (s.
|
|
4926
|
+
if (s.Cg[o])
|
|
4924
4927
|
throw new DayPilot.Exception("Duplicate event IDs are not allowed: " + o);
|
|
4925
|
-
s.
|
|
4928
|
+
s.Cg[o] = !0, a && this.yb(i), t = s.Dg(r.resource);
|
|
4926
4929
|
for (var l = 0; t && l < t.length; l++) {
|
|
4927
|
-
var d = t[l], u = this.
|
|
4928
|
-
u && a && (u.cache = this.
|
|
4930
|
+
var d = t[l], u = this.Sf(r, d);
|
|
4931
|
+
u && a && (u.cache = this.xb.events[i]);
|
|
4929
4932
|
}
|
|
4930
4933
|
}
|
|
4931
4934
|
}
|
|
4932
|
-
s.rowlist.forEach(function (e) { s.
|
|
4935
|
+
s.rowlist.forEach(function (e) { s.Eg(e); }), s._f();
|
|
4933
4936
|
}, c.rowcache = {}, c.prepareRows = function (e) {
|
|
4934
4937
|
c.rowcache = {};
|
|
4935
4938
|
for (var t = s.rowlist, n = 0; n < t.length; n++) {
|
|
4936
4939
|
var a = t[n];
|
|
4937
|
-
if (e && a.resetEvents(), s.
|
|
4940
|
+
if (e && a.resetEvents(), s.Nf(a.index), a.id) {
|
|
4938
4941
|
var i = typeof a.id + "_" + a.id;
|
|
4939
4942
|
c.rowcache[i] || (c.rowcache[i] = []), c.rowcache[i].push(a);
|
|
4940
4943
|
}
|
|
4941
4944
|
}
|
|
4942
|
-
}, this.
|
|
4945
|
+
}, this.Dg = function (e) { var t = typeof e + "_" + e; return c.rowcache[t] || []; }, this.Rf = function () {
|
|
4943
4946
|
for (var e = {}, t = 0; t < s.rowlist.length; t++) {
|
|
4944
4947
|
var n = s.rowlist[t], a = n.id;
|
|
4945
4948
|
if (e[a])
|
|
@@ -4947,8 +4950,8 @@ var DayPilot = { Global: {} };
|
|
|
4947
4950
|
e[a] = !0;
|
|
4948
4951
|
}
|
|
4949
4952
|
return !1;
|
|
4950
|
-
}, this.
|
|
4951
|
-
var t = this.
|
|
4953
|
+
}, this.yb = function (e) {
|
|
4954
|
+
var t = this.xb.events, n = this.events.list[e], a = {};
|
|
4952
4955
|
n instanceof DayPilot.Event && (n = n.data);
|
|
4953
4956
|
for (var i in n)
|
|
4954
4957
|
a[i] = n[i];
|
|
@@ -4957,22 +4960,22 @@ var DayPilot = { Global: {} };
|
|
|
4957
4960
|
r.e = a, r.data = a, this.onBeforeEventRender(r);
|
|
4958
4961
|
}
|
|
4959
4962
|
t[e] = a;
|
|
4960
|
-
}, this.
|
|
4961
|
-
e.lines = [], e.sections = null, e.events.sort(this.
|
|
4963
|
+
}, this.Eg = function (e) {
|
|
4964
|
+
e.lines = [], e.sections = null, e.events.sort(this.zb);
|
|
4962
4965
|
for (var t = 0; t < e.events.length; t++) {
|
|
4963
4966
|
var n = e.events[t];
|
|
4964
4967
|
e.putIntoLine(n);
|
|
4965
4968
|
}
|
|
4966
|
-
}, this
|
|
4969
|
+
}, this.$f = function (e) { e = DayPilot.ua(e), e = s.if(e), e.forEach(function (e) { s.Eg(e); }), e.forEach(function (e) { s.Fg(e); }); }, this.Sf = function (e, t) {
|
|
4967
4970
|
var n = new DayPilot.Date(e.start), a = new DayPilot.Date(e.end);
|
|
4968
|
-
a = s.
|
|
4971
|
+
a = s.pf(a);
|
|
4969
4972
|
var i = n.ticks, r = a.ticks, o = s.startDate.ticks, d = s.startDate.addDays(s.days).ticks;
|
|
4970
4973
|
if (r < i)
|
|
4971
4974
|
return null;
|
|
4972
4975
|
var c = null;
|
|
4973
4976
|
if ("function" == typeof s.onBeforeEventRender) {
|
|
4974
4977
|
var u = DayPilot.indexOf(s.events.list, e);
|
|
4975
|
-
c = s.
|
|
4978
|
+
c = s.xb.events[u];
|
|
4976
4979
|
}
|
|
4977
4980
|
if (t.id !== e.resource || (r <= o || i >= d) && (i !== r || i !== o))
|
|
4978
4981
|
return null;
|
|
@@ -4981,7 +4984,7 @@ var DayPilot = { Global: {} };
|
|
|
4981
4984
|
var f = this.getPixels(h.part.start), v = this.getPixels(h.part.end);
|
|
4982
4985
|
h.part.start === h.part.end && (v = this.getPixels(h.part.end.addMilliseconds(1)));
|
|
4983
4986
|
var p = f.left, m = v.left;
|
|
4984
|
-
if (l.
|
|
4987
|
+
if (l.dg(r - i)) {
|
|
4985
4988
|
var g = f.boxLeft, y = v.boxRight;
|
|
4986
4989
|
h.part.left = g, h.part.width = y - g, h.part.barLeft = Math.max(p - h.part.left, 0), h.part.barWidth = Math.max(m - p, 1);
|
|
4987
4990
|
}
|
|
@@ -4989,29 +4992,29 @@ var DayPilot = { Global: {} };
|
|
|
4989
4992
|
h.part.left = p, h.part.width = Math.max(m - p, 1), h.part.barLeft = 0, h.part.barWidth = Math.max(m - p, 1);
|
|
4990
4993
|
var b = s.eventMinWidth;
|
|
4991
4994
|
return h.part.width = Math.max(h.part.width, b), h.part.right = h.part.left + h.part.width, h.cache = c, t.events.push(h), h;
|
|
4992
|
-
}, this.
|
|
4995
|
+
}, this.zb = function (e, t) {
|
|
4993
4996
|
if (!(e && t && e.start && t.start))
|
|
4994
4997
|
return 0;
|
|
4995
4998
|
var n = e.start().ticks - t.start().ticks;
|
|
4996
4999
|
return 0 !== n ? n : t.end().ticks - e.end().ticks;
|
|
4997
5000
|
}, this.rows = {}, this.rows.all = function () {
|
|
4998
5001
|
for (var e = [], t = 0; t < s.rowlist.length; t++) {
|
|
4999
|
-
var n = s.
|
|
5002
|
+
var n = s.zg(s.rowlist[t]);
|
|
5000
5003
|
e.push(n);
|
|
5001
5004
|
}
|
|
5002
5005
|
return e;
|
|
5003
5006
|
}, this.rows.each = function (e) { s.rows.all().forEach(e); }, this.rows.forEach = function (e) { s.rows.all().forEach(e); }, this.rows.find = function (e, t) {
|
|
5004
5007
|
if ("string" == typeof e || "number" == typeof e || !e && t) {
|
|
5005
|
-
var n = s.
|
|
5008
|
+
var n = s.Dg(e);
|
|
5006
5009
|
e || (n = s.rowlist);
|
|
5007
5010
|
var a = null;
|
|
5008
5011
|
return "string" == typeof t || t instanceof DayPilot.Date ? (t = new DayPilot.Date(t), a = n.find(function (e) { return t === e.start; })) : a = n[0], a ? new DayPilot.Row(a, s) : null;
|
|
5009
5012
|
}
|
|
5010
5013
|
if ("function" != typeof e)
|
|
5011
5014
|
throw new DayPilot.Exception("Invalid rows.find() argument: id or function expected");
|
|
5012
|
-
var i = t || 0, r = s.rowlist.find(function (t, n) { return !(n < i) && e(s.
|
|
5015
|
+
var i = t || 0, r = s.rowlist.find(function (t, n) { return !(n < i) && e(s.zg(t)); });
|
|
5013
5016
|
if (r)
|
|
5014
|
-
return s.
|
|
5017
|
+
return s.zg(r);
|
|
5015
5018
|
}, this.rows.load = function (e, t, n) {
|
|
5016
5019
|
if (!e)
|
|
5017
5020
|
throw new DayPilot.Exception("rows.load(): 'url' parameter required");
|
|
@@ -5028,7 +5031,7 @@ var DayPilot = { Global: {} };
|
|
|
5028
5031
|
var o = {};
|
|
5029
5032
|
if (o.preventDefault = function () { this.preventDefault.value = !0; }, o.data = n, "function" == typeof t && t(o), o.preventDefault.value)
|
|
5030
5033
|
return;
|
|
5031
|
-
s.resources = o.data, s.
|
|
5034
|
+
s.resources = o.data, s.La && s.update();
|
|
5032
5035
|
}
|
|
5033
5036
|
};
|
|
5034
5037
|
s.rowsLoadMethod && "POST" === s.rowsLoadMethod.toUpperCase() ? DayPilot.ajax({ "method": "POST", "url": e, "success": i, "error": a }) : DayPilot.ajax({ "method": "GET", "url": e, "success": i, "error": a });
|
|
@@ -5041,7 +5044,7 @@ var DayPilot = { Global: {} };
|
|
|
5041
5044
|
}
|
|
5042
5045
|
var n = e.$.row.resource, a = DayPilot.indexOf(s.resources, n);
|
|
5043
5046
|
s.resources.splice(a, 1), s.update();
|
|
5044
|
-
}, this.rows.add = function (e) { s.resources.push(e), s.
|
|
5047
|
+
}, this.rows.add = function (e) { s.resources.push(e), s.qb(); }, this.rows.update = function (e) {
|
|
5045
5048
|
if (!(e instanceof DayPilot.Row || "object" == typeof e))
|
|
5046
5049
|
throw new DayPilot.Exception("DayPilot.Scheduler.rows.update() expects a DayPilot.Row object or a data object.");
|
|
5047
5050
|
if (!(e instanceof DayPilot.Row)) {
|
|
@@ -5050,39 +5053,39 @@ var DayPilot = { Global: {} };
|
|
|
5050
5053
|
return;
|
|
5051
5054
|
e.data = t;
|
|
5052
5055
|
}
|
|
5053
|
-
var n = e.index, a = s.rowlist, i = a[n], r = e.data, o = s.
|
|
5054
|
-
l.level = i.level, l.index = n, l.top = i.top, l.height = i.height, a[n] = l, l.resetEvents(), s.
|
|
5055
|
-
}, this.
|
|
5056
|
+
var n = e.index, a = s.rowlist, i = a[n], r = e.data, o = s.Gg(r), l = s.Hg(o);
|
|
5057
|
+
l.level = i.level, l.index = n, l.top = i.top, l.height = i.height, a[n] = l, l.resetEvents(), s.Nf(l.index), s.Ig(l), s.Eg(l), s.hf(l.index), s._e(), s.cf();
|
|
5058
|
+
}, this.Ig = function (e) {
|
|
5056
5059
|
for (var t = s.events.list, n = t.length, a = "function" == typeof s.onBeforeEventRender, i = 0; i < n; i++) {
|
|
5057
5060
|
var r = t[i];
|
|
5058
5061
|
if (r) {
|
|
5059
5062
|
if (r instanceof DayPilot.Event)
|
|
5060
5063
|
throw new DayPilot.Exception("DayPilot.Scheduler: DayPilot.Event object detected in events.list array. Use raw event data instead.");
|
|
5061
5064
|
if (r.resource === e.id) {
|
|
5062
|
-
a && this.
|
|
5063
|
-
var o = this.
|
|
5064
|
-
o && a && (o.cache = this.
|
|
5065
|
+
a && this.yb(i);
|
|
5066
|
+
var o = this.Sf(r, e);
|
|
5067
|
+
o && a && (o.cache = this.xb.events[i]);
|
|
5065
5068
|
}
|
|
5066
5069
|
}
|
|
5067
5070
|
}
|
|
5068
|
-
}, this.
|
|
5071
|
+
}, this.Ue = function () {
|
|
5069
5072
|
var e = this.resources;
|
|
5070
5073
|
if ({}.i = 0, null != e && !DayPilot.isArray(e))
|
|
5071
5074
|
throw new DayPilot.Exception("DayPilot.Scheduler.resources expects an array object");
|
|
5072
|
-
e = e || [], s.rowlist = [], this.
|
|
5073
|
-
}, this.sa = function () { return new DayPilot.Date(this.startDate); }, this.
|
|
5075
|
+
e = e || [], s.rowlist = [], this.Jg(e);
|
|
5076
|
+
}, this.sa = function () { return new DayPilot.Date(this.startDate); }, this.Lf = function () { return new DayPilot.Date(s.startDate).addDays(s.days); }, this.visibleStart = function () { return this.sa(); }, this.visibleEnd = function () { return this.Lf(); }, this.Hg = function (e) {
|
|
5074
5077
|
var t = {};
|
|
5075
|
-
return t.backColor = e.backColor, t.fontColor = e.fontColor, t.cssClass = e.cssClass, t.name = e.name, t.html = s
|
|
5078
|
+
return t.backColor = e.backColor, t.fontColor = e.fontColor, t.cssClass = e.cssClass, t.name = e.name, t.html = s.$a(e.name, e.html), t.id = e.id, t.toolTip = e.toolTip, t.areas = e.areas, t.tags = e.tags, t.height = s.eventHeight, t.level = 0, t.resource = e.xe, t.lines = [], t.isRow = !0, t.getHeight = function () { return Math.max(s.eventHeight, this.lines.length * s.eventHeight); }, t.resetEvents = function () {
|
|
5076
5079
|
var e = t;
|
|
5077
5080
|
e.events = [], e.events.forRange = function (t, n) {
|
|
5078
5081
|
t = new DayPilot.Date(t), n = n ? new DayPilot.Date(n) : s.startDate.addDays(s.days);
|
|
5079
5082
|
for (var a = [], i = 0; i < e.events.length; i++) {
|
|
5080
|
-
var r = e.events[i], o = s.
|
|
5083
|
+
var r = e.events[i], o = s.pf(r.end());
|
|
5081
5084
|
DayPilot.Util.overlaps(r.start(), o, t, n) && a.push(r);
|
|
5082
5085
|
}
|
|
5083
5086
|
return a;
|
|
5084
5087
|
};
|
|
5085
|
-
}, t.
|
|
5088
|
+
}, t.Kg = function () {
|
|
5086
5089
|
var e = [];
|
|
5087
5090
|
return e.add = function (e) { this.push(e); }, e.isFree = function (e, t, n) {
|
|
5088
5091
|
for (var a = e + t - 1, i = this.length, r = 0; r < i; r++) {
|
|
@@ -5100,29 +5103,29 @@ var DayPilot = { Global: {} };
|
|
|
5100
5103
|
if (this.lines[a].isFree(e, n))
|
|
5101
5104
|
return a;
|
|
5102
5105
|
}
|
|
5103
|
-
var i = t.
|
|
5106
|
+
var i = t.Kg();
|
|
5104
5107
|
return this.lines.push(i), this.lines.length - 1;
|
|
5105
5108
|
}, t.putIntoLine = function (e) { var n = t.findFreeLine(e.part.left, e.part.width); return this.lines[n].add(e), n; }, t;
|
|
5106
|
-
}, this.
|
|
5109
|
+
}, this.Jg = function (e) {
|
|
5107
5110
|
if (e)
|
|
5108
5111
|
for (var t = s.rowlist, n = 0; n < e.length; n++)
|
|
5109
5112
|
if (e[n]) {
|
|
5110
5113
|
var a = {};
|
|
5111
5114
|
a.index = n;
|
|
5112
|
-
var i = this.
|
|
5115
|
+
var i = this.Gg(e[n], a), r = s.Hg(i, parent);
|
|
5113
5116
|
r.index = n, t.push(r);
|
|
5114
5117
|
}
|
|
5115
|
-
}, this.
|
|
5116
|
-
var n = { get $data() { return this.
|
|
5118
|
+
}, this.xg = function (e) { var t = {}; return t.row = this.zg(e), DayPilot.Util.copyProps(e, t.row, ["html", "backColor", "fontColor", "cssClass", "toolTip", "areas"]), "function" == typeof this.onBeforeRowHeaderRender && this.onBeforeRowHeaderRender(t), t; }, this.Gg = function (e, t) {
|
|
5119
|
+
var n = { get $data() { return this.xe; } };
|
|
5117
5120
|
for (var a in t)
|
|
5118
5121
|
n[a] = t[a];
|
|
5119
5122
|
for (var i in e)
|
|
5120
5123
|
n[i] = e[i];
|
|
5121
|
-
return n.html = s
|
|
5122
|
-
}, this.
|
|
5124
|
+
return n.html = s.$a(e.name, e.html), n.xe = e, n;
|
|
5125
|
+
}, this.Lg = function () { this.nav.top.dp = this, this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.L("_main")), this.nav.top.setAttribute("role", "region"), this.nav.top.setAttribute("aria-label", "scheduler"), this.nav.top.style.userSelect = "none", this.nav.top.style.webkitUserSelect = "none", this.nav.top.style.WebkitTapHighlightColor = "rgba(0,0,0,0)", this.nav.top.style.WebkitTouchCallout = "none", this.width && (this.nav.top.style.width = this.width), this.nav.top.style.lineHeight = "1.2", this.nav.top.style.position = "relative", this.visible || (this.nav.top.style.display = "none"), this.nav.top.ontouchstart = d.Mg, this.nav.top.ontouchmove = d.Ng, this.nav.top.ontouchend = d.Og; var e = this.rowHeaderWidth, t = r(); t.style.position = "absolute", t.style.left = "0px", t.style.width = e + "px"; var n = r(); n.style.height = "0px", n.style.boxSizing = "content-box", n.style.borderTop = "1px solid transparent", n.className = this.L("_divider_horizontal"), this.nav.dh1 = n, this.nav.left = t, t.appendChild(this.eb()), t.appendChild(n), t.appendChild(this.Pg()); var a = r(); a.style.position = "absolute", a.style.left = e + "px", a.style.width = "1px", a.style.height = this.Be() + this.Xa() + "px", a.className = this.L("_splitter"), this.nav.divider = a; var i = r(); i.style.marginLeft = e + 1 + "px", i.style.position = "relative", this.nav.right = i; var o = r(); o.style.position = "absolute", o.style.top = this.Be() + "px", o.style.width = "100%", o.style.height = "1px", o.style.boxSizing = "border-box", o.style.borderBottom = "1px solid transparent", o.setAttribute("data-dh2", "true"), o.className = this.L("_divider_horizontal"), this.nav.dh2 = o, i.appendChild(s.Qg()), i.appendChild(s.Rg()), i.appendChild(o); var l = r(); l.style.clear = "left"; var c = r(); c.style.height = "1px", c.style.position = "absolute", c.style.left = "0px", c.style.right = "0px", c.style.display = "none", c.className = this.L("_divider_horizontal"), this.nav.dividerTop = c; var u = r(); u.style.height = "1px", u.style.position = "absolute", u.style.left = "0px", u.style.right = "0px", u.style.display = "none", u.className = this.L("_divider_horizontal") + " " + this.L("_divider_horizontal_frozen_bottom"), this.nav.dividerBottom = u, this.nav.top.appendChild(t), this.nav.top.appendChild(a), this.nav.top.appendChild(i), this.nav.top.appendChild(l), this.nav.top.appendChild(c), this.nav.top.appendChild(u); }, this.ia = function () { var e = this.Be(); this.nav.corner && (this.nav.corner.style.height = e + "px"), this.divTimeScroll && (this.divTimeScroll.style.height = e + "px"), this.divNorth && (this.divNorth.style.height = e + "px"), this.nav.dh1 && this.nav.dh2 && (this.nav.dh1.style.top = e + "px", this.nav.dh2.style.top = e + "px"), this.nav.scroll.style.top = e + 1 + "px"; }, this.Sg = function () { var e = this.rowHeaderWidth; this.nav.corner && (this.nav.corner.style.width = e + "px"), this.divResScroll.style.width = e + "px", this.nav.left.style.width = e + "px", this.nav.divider.style.left = e - 1 + "px", this.nav.right.style.marginLeft = e + "px"; }, this.Tg = function () {
|
|
5123
5126
|
var e = this.rowHeaderWidth, t = this.divHeader;
|
|
5124
5127
|
t.style.width = e + "px";
|
|
5125
|
-
for (var n = s.
|
|
5128
|
+
for (var n = s.pg(), a = n.start; a < n.end; a++) {
|
|
5126
5129
|
var i = t.rows[a];
|
|
5127
5130
|
if (i) {
|
|
5128
5131
|
var r = s.rowHeaderWidth;
|
|
@@ -5131,42 +5134,42 @@ var DayPilot = { Global: {} };
|
|
|
5131
5134
|
}
|
|
5132
5135
|
}
|
|
5133
5136
|
s.nav.resScrollSpace && (s.nav.resScrollSpace.style.width = e + "px");
|
|
5134
|
-
}, this
|
|
5137
|
+
}, this.$e = function () { this.Sg(), this.Tg(); }, this.eb = function () { var e = this.rowHeaderWidth, t = r(); s.nav.corner = t, t.style.width = e + "px", t.style.height = this.Be() + "px", t.style.overflow = "hidden", t.style.position = "relative", t.oncontextmenu = function () { return !1; }, t.className = this.L("_corner"); var n = r(); return n.style.position = "absolute", n.style.top = "0px", n.style.left = "0px", n.style.right = "0px", n.style.bottom = "0px", n.className = this.L("_corner_inner"), n.innerHTML = " ", this.divCorner = n, t.appendChild(n), t; }, this.Be = function () { return s.timeHeaders ? s.timeHeaders.length * s.headerHeight : 0; }, this.Ug = null, this.Pg = function () {
|
|
5135
5138
|
var e = r();
|
|
5136
|
-
e.style.width = this.rowHeaderWidth + "px", e.style.height = this.
|
|
5137
|
-
var n = s.R.
|
|
5138
|
-
n && (e.style.overflowY = "auto"), e.ontouchstart = function () { t.
|
|
5139
|
-
if (s.
|
|
5140
|
-
var a = function () { var t = s.
|
|
5141
|
-
DayPilot.browser.ios ? t.
|
|
5139
|
+
e.style.width = this.rowHeaderWidth + "px", e.style.height = this.Xa() + "px", e.style.overflow = "hidden", e.style.position = "relative", e.className = s.L("_rowheader_scroll");
|
|
5140
|
+
var n = s.R.wg();
|
|
5141
|
+
n && (e.style.overflowY = "auto"), e.ontouchstart = function () { t.Vg = !0; }, e.oncontextmenu = function () { return !1; }, e.onscroll = function () {
|
|
5142
|
+
if (s.Ug && clearTimeout(s.Ug), n) {
|
|
5143
|
+
var a = function () { var t = s.Wg() - s.nav.scroll.offsetHeight; e.scrollTop = Math.min(e.scrollTop, t), s.nav.scroll.scrollTop = e.scrollTop; };
|
|
5144
|
+
DayPilot.browser.ios ? t.Vg && (s.Ug = setTimeout(a, 10)) : s.Ug = setTimeout(a, 10);
|
|
5142
5145
|
}
|
|
5143
5146
|
else
|
|
5144
|
-
s.
|
|
5147
|
+
s.Ug = setTimeout(function () { s.nav.scroll.scrollTop = e.scrollTop; }, 500);
|
|
5145
5148
|
}, e.setAttribute("role", "region"), e.setAttribute("aria-label", "scheduler rows");
|
|
5146
5149
|
var a = r();
|
|
5147
|
-
return this.divHeader = a, e.appendChild(a), this.divResScroll = e, this.
|
|
5148
|
-
}, this.
|
|
5149
|
-
var e = function () { s
|
|
5150
|
+
return this.divHeader = a, e.appendChild(a), this.divResScroll = e, this.Ce = e, e;
|
|
5151
|
+
}, this.Xg = null, this.Yg = null, this.Zg = function () {
|
|
5152
|
+
var e = function () { s.$g(), s.df(); }, t = function () {
|
|
5150
5153
|
var t = s.nav.top;
|
|
5151
5154
|
if (t) {
|
|
5152
|
-
if (!s.
|
|
5153
|
-
return s.
|
|
5154
|
-
s.
|
|
5155
|
+
if (!s.Xg)
|
|
5156
|
+
return s.Xg = {}, void (s.Xg.width = t.offsetWidth);
|
|
5157
|
+
s.Xg.width !== t.offsetWidth && (s.Xg.width = t.offsetWidth, e());
|
|
5155
5158
|
}
|
|
5156
5159
|
};
|
|
5157
|
-
if (!s.
|
|
5160
|
+
if (!s.Yg) {
|
|
5158
5161
|
var n = new ResizeObserver(DayPilot.debounce(t, 100));
|
|
5159
|
-
n.observe(s.nav.top), s.
|
|
5162
|
+
n.observe(s.nav.top), s.Yg = n;
|
|
5160
5163
|
}
|
|
5161
|
-
}, this
|
|
5164
|
+
}, this.$g = function () { s.Q || (s.ma(), s._g(), s.xb.drawArea = null); }, this._g = function () { var e = s.xf; s.clearSelection(), s.xf = e, s.yf(e, { "justDraw": !0 }); }, this.Qg = function () { var e = r(); e.style.overflow = "hidden", e.style.display = "block", e.style.position = "absolute", e.style.top = "0px", e.style.width = "100%", e.style.height = this.Be() + "px", e.style.overflow = "hidden", e.className = s.L("_timeheader_scroll"), this.divTimeScroll = e; var t = r(); return t.style.width = this.ze() + 5e3 + "px", this.divNorth = t, e.appendChild(t), e; }, this.Xa = function () { var e = 0, t = s.heightSpec; return "Fixed" === t ? this.height ? this.height : 0 : (e = s.Wg(), "Max" === t && e > s.height ? s.height : e); }, this.Wg = function () { var e; return this._d !== -1 ? (e = this._d, this._d > 0 && "auto" === s.nav.scroll.style.overflowX && (e += DayPilot.sh(s.nav.scroll) + 1)) : e = this.rowlist.length * s.eventHeight, e; }, this.Rg = function () {
|
|
5162
5165
|
var e = r();
|
|
5163
|
-
e.style.overflow = "auto", e.style.overflowX = "auto", e.style.overflowY = "auto", e.style.height = this.
|
|
5164
|
-
var t = this.
|
|
5166
|
+
e.style.overflow = "auto", e.style.overflowX = "auto", e.style.overflowY = "auto", e.style.height = this.Xa() + "px", e.style.top = this.Be() + 1 + "px", e.style.position = "absolute", e.style.width = "100%", e.className = this.L("_scrollable"), e.oncontextmenu = function () { return !1; }, this.nav.scroll = e, this.ge = r();
|
|
5167
|
+
var t = this.ge;
|
|
5165
5168
|
t.style.userSelect = "none", t.style.webkitUserSelect = "none", t.calendar = this, t.style.position = "absolute";
|
|
5166
|
-
var n = this.
|
|
5167
|
-
return n > 0 && (t.style.width = n + "px"), t.onmousedown = this.
|
|
5168
|
-
t.appendChild(this.divSeparators), this.divRange = r(), this.divRange.style.position = "absolute", this.divRange.oncontextmenu = this.
|
|
5169
|
-
}, this.
|
|
5169
|
+
var n = this.ze();
|
|
5170
|
+
return n > 0 && (t.style.width = n + "px"), t.onmousedown = this.ah, t.onmousemove = this.bh, t.onmouseup = this.ch, t.oncontextmenu = this.dh, t.className = this.L("_matrix"), this.divStretch = r(), this.divStretch.style.position = "absolute", this.divStretch.style.height = "1px", t.appendChild(this.divStretch), this.divCells = r(), this.divCells.style.position = "absolute", this.divCells.oncontextmenu = this.dh, t.appendChild(this.divCells), this.divLines = r(), this.divLines.style.position = "absolute", this.divLines.oncontextmenu = this.dh, t.appendChild(this.divLines), this.divSeparators = r(), this.divSeparators.style.position = "absolute", this.divSeparators.oncontextmenu = this.dh,
|
|
5171
|
+
t.appendChild(this.divSeparators), this.divRange = r(), this.divRange.style.position = "absolute", this.divRange.oncontextmenu = this.dh, t.appendChild(this.divRange), this.divEvents = r(), this.divEvents.style.position = "absolute", t.appendChild(this.divEvents), this.divShadow = r(), this.divShadow.style.position = "absolute", t.appendChild(this.divShadow), e.appendChild(t), e;
|
|
5172
|
+
}, this.pb = function () { t.eh || (t.eh = !0, DayPilot.re(document, "mouseup", t.$d), DayPilot.reNonPassive(document, "touchmove", t.fh), DayPilot.re(document, "touchend", t.gh)); }, this.hh = function () { this.nav.scroll.root = this, this.nav.scroll.onscroll = this.df, s.ih = this.nav.scroll.scrollLeft, s.jh = this.nav.scroll.scrollTop, this.divNorth && (s.kh = this.divNorth.clientWidth); }, this.lh = {}, this.lh.step = 300, this.lh.delay = 10, this.lh.mode = "display", this.lh.layers = !1, this.Fg = function (e) {
|
|
5170
5173
|
for (var t = 0, n = 0; n < e.lines.length; n++) {
|
|
5171
5174
|
for (var a = e.lines[n], i = 0; i < a.length; i++) {
|
|
5172
5175
|
var r = a[i];
|
|
@@ -5174,87 +5177,87 @@ var DayPilot = { Global: {} };
|
|
|
5174
5177
|
}
|
|
5175
5178
|
t += s.eventHeight;
|
|
5176
5179
|
}
|
|
5177
|
-
}, this.
|
|
5180
|
+
}, this.Te = null, this.na = function (e) {
|
|
5178
5181
|
if (!s.Q) {
|
|
5179
|
-
var t = this.
|
|
5180
|
-
"display" === this.
|
|
5181
|
-
var n = "Progressive" === this.dynamicEventRendering, a = this.
|
|
5182
|
+
var t = this.lh.step;
|
|
5183
|
+
"display" === this.lh.mode ? this.divEvents.style.display = "none" : "visibility" === this.lh.mode && (this.divEvents.style.visibility = "hidden"), this.divEvents.setAttribute("role", "region"), this.divEvents.setAttribute("aria-label", "scheduler events");
|
|
5184
|
+
var n = "Progressive" === this.dynamicEventRendering, a = this.ke(), i = a.pixels.top, r = a.pixels.bottom;
|
|
5182
5185
|
s.rowlist.filter(function (e) { var t = e.top - s.dynamicEventRenderingMargin, a = t + e.height + 2 * s.dynamicEventRenderingMargin; return !n || !(r <= t || i >= a); }).forEach(function (n) {
|
|
5183
|
-
s.
|
|
5186
|
+
s.Fg(n);
|
|
5184
5187
|
for (var a = 0; a < n.lines.length; a++)
|
|
5185
5188
|
for (var i = n.lines[a], r = 0; r < i.length; r++) {
|
|
5186
|
-
var o = i[r], l = s.
|
|
5189
|
+
var o = i[r], l = s.Ua(o);
|
|
5187
5190
|
if (e && l && (t--, t <= 0))
|
|
5188
|
-
return s.divEvents.style.visibility = "", s.divEvents.style.display = "", void (s.
|
|
5191
|
+
return s.divEvents.style.visibility = "", s.divEvents.style.display = "", void (s.Te = setTimeout(function () { s.na(e); }, s.lh.delay));
|
|
5189
5192
|
}
|
|
5190
|
-
}), this.divEvents.style.display = "", this.
|
|
5193
|
+
}), this.divEvents.style.display = "", this.oe();
|
|
5191
5194
|
}
|
|
5192
|
-
}, this.
|
|
5195
|
+
}, this.mf = function (e) {
|
|
5193
5196
|
var t = s.rowlist[e];
|
|
5194
|
-
this.
|
|
5197
|
+
this.Fg(t);
|
|
5195
5198
|
for (var n = 0; n < t.lines.length; n++)
|
|
5196
5199
|
for (var a = t.lines[n], i = 0; i < a.length; i++) {
|
|
5197
5200
|
var r = a[i];
|
|
5198
|
-
this.
|
|
5201
|
+
this.Ua(r);
|
|
5199
5202
|
}
|
|
5200
5203
|
}, this.Z = function () {
|
|
5201
5204
|
if (this.elements.events)
|
|
5202
5205
|
for (var e = this.elements.events.length, t = 0; t < e; t++) {
|
|
5203
5206
|
var n = this.elements.events[t];
|
|
5204
|
-
this.
|
|
5207
|
+
this.Oa(n);
|
|
5205
5208
|
}
|
|
5206
5209
|
this.elements.events = [];
|
|
5207
|
-
}, this.
|
|
5210
|
+
}, this.lf = function (e) {
|
|
5208
5211
|
if (this.elements.events) {
|
|
5209
5212
|
for (var t = this.elements.events.length, n = [], a = 0; a < t; a++) {
|
|
5210
5213
|
var i = this.elements.events[a];
|
|
5211
|
-
i.event.part.dayIndex === e && (this.
|
|
5214
|
+
i.event.part.dayIndex === e && (this.Oa(i), n.push(a));
|
|
5212
5215
|
}
|
|
5213
5216
|
for (var a = n.length - 1; a >= 0; a--)
|
|
5214
5217
|
this.elements.events.splice(n[a], 1);
|
|
5215
5218
|
}
|
|
5216
|
-
}, this.
|
|
5219
|
+
}, this.Oa = function (e) {
|
|
5217
5220
|
var t = e.domArgs;
|
|
5218
5221
|
if (e.domArgs = null, t && "function" == typeof s.onBeforeEventDomRemove && s.onBeforeEventDomRemove(t), t && "function" == typeof s.onBeforeEventDomAdd) {
|
|
5219
|
-
var n = t && t.
|
|
5222
|
+
var n = t && t.Pa;
|
|
5220
5223
|
if (n) {
|
|
5221
|
-
var a = s.
|
|
5222
|
-
a ? s.
|
|
5224
|
+
var a = s.bg.reactDOM && DayPilot.Util.isReactComponent(t.element), i = s.Ra.Qa && DayPilot.Util.isVueVNode(t.element);
|
|
5225
|
+
a ? s.bg.mh(n) : i && (s.Ra.Sa = !0, s.Ra.Ta(n), s.Ra.Sa = !1);
|
|
5223
5226
|
}
|
|
5224
5227
|
}
|
|
5225
5228
|
e.remove(), e.onclick = null, e.oncontextmenu = null, e.onmouseover = null, e.onmouseout = null, e.onmousemove = null, e.onmousedown = null, e.ondblclick = null, e.event && (e.event.rendered = null, e.event = null);
|
|
5226
|
-
}, this.
|
|
5229
|
+
}, this.nh = function () {
|
|
5227
5230
|
if ("Progressive" === this.dynamicEventRendering) {
|
|
5228
5231
|
if (s.dynamicEventRenderingCacheSweeping) {
|
|
5229
5232
|
var e = s.dynamicEventRenderingCacheSize || 0;
|
|
5230
5233
|
this.divEvents.style.display = "none";
|
|
5231
5234
|
for (var t = [], n = this.elements.events.length, a = n - 1; a >= 0; a--) {
|
|
5232
5235
|
var i = this.elements.events[a];
|
|
5233
|
-
this.
|
|
5236
|
+
this.oh(i.event) ? e > 0 ? (e--, t.unshift(i)) : this.Oa(i) : t.unshift(i);
|
|
5234
5237
|
}
|
|
5235
5238
|
this.elements.events = t, this.divEvents.style.display = "";
|
|
5236
5239
|
}
|
|
5237
5240
|
}
|
|
5238
|
-
}, this.
|
|
5239
|
-
for (var t = this.
|
|
5241
|
+
}, this.ph = function (e) {
|
|
5242
|
+
for (var t = this.ke(), n = this.elements.cells.length, a = n - 1; a >= 0; a--) {
|
|
5240
5243
|
var i = this.elements.cells[a];
|
|
5241
|
-
t.xStart < i.coords.x && i.coords.x <= t.xEnd && t.yStart < i.coords.y && i.coords.y <= t.yEnd || (e > 0 ? e-- : this.
|
|
5244
|
+
t.xStart < i.coords.x && i.coords.x <= t.xEnd && t.yStart < i.coords.y && i.coords.y <= t.yEnd || (e > 0 ? e-- : this.fb(i));
|
|
5242
5245
|
}
|
|
5243
|
-
}, this.
|
|
5246
|
+
}, this.fb = function (e) {
|
|
5244
5247
|
if (e && e.coords) {
|
|
5245
5248
|
var t = e.coords.x, n = e.coords.y;
|
|
5246
5249
|
!function () {
|
|
5247
5250
|
var t = e.domArgs;
|
|
5248
5251
|
if (e.domArgs = null, t && "function" == typeof s.onBeforeCellDomRemove && s.onBeforeCellDomRemove(t), t && "function" == typeof s.onBeforeCellDomAdd) {
|
|
5249
|
-
var n = t && t.
|
|
5252
|
+
var n = t && t.Pa;
|
|
5250
5253
|
if (n) {
|
|
5251
|
-
var a = s.
|
|
5252
|
-
a ? s.
|
|
5254
|
+
var a = s.bg.reactDOM && DayPilot.Util.isReactComponent(t.element), i = s.Ra.Qa && DayPilot.Util.isVueVNode(t.element);
|
|
5255
|
+
a ? s.bg.mh(n) : i && (s.Ra.Sa = !0, s.Ra.Ta(n), s.Ra.Sa = !1);
|
|
5253
5256
|
}
|
|
5254
5257
|
}
|
|
5255
|
-
}(), DayPilot.rfa(s.elements.cells, e), DayPilot.de(e), s.
|
|
5258
|
+
}(), DayPilot.rfa(s.elements.cells, e), DayPilot.de(e), s.xb.cells[t + "_" + n] = null;
|
|
5256
5259
|
}
|
|
5257
|
-
}, this.
|
|
5260
|
+
}, this.qh = function () {
|
|
5258
5261
|
var e = "Progressive" === this.dynamicEventRendering;
|
|
5259
5262
|
if (!this.nav.scroll)
|
|
5260
5263
|
return !1;
|
|
@@ -5264,27 +5267,27 @@ var DayPilot = { Global: {} };
|
|
|
5264
5267
|
for (var s = 0; s < i.lines.length; s++)
|
|
5265
5268
|
for (var l = i.lines[s], d = 0; d < l.length; d++) {
|
|
5266
5269
|
var c = l[d];
|
|
5267
|
-
if (this.
|
|
5270
|
+
if (this.rh(c))
|
|
5268
5271
|
return !0;
|
|
5269
5272
|
}
|
|
5270
5273
|
}
|
|
5271
5274
|
return !1;
|
|
5272
|
-
}, this.
|
|
5275
|
+
}, this.rh = function (e) {
|
|
5273
5276
|
if (e.rendered)
|
|
5274
5277
|
return !1;
|
|
5275
5278
|
var t = "Progressive" === this.dynamicEventRendering, n = this.nav.scroll.scrollLeft, a = n + this.nav.scroll.clientWidth, i = e.part.left, r = e.part.left + e.part.width;
|
|
5276
5279
|
return !t || !(a <= i || n >= r);
|
|
5277
|
-
}, this.
|
|
5280
|
+
}, this.oh = function (e) {
|
|
5278
5281
|
if (!e.rendered)
|
|
5279
5282
|
return !0;
|
|
5280
|
-
var t = this.
|
|
5283
|
+
var t = this.ke(), n = t.pixels.top, a = t.pixels.bottom, i = t.pixels.left - this.dynamicEventRenderingMargin, r = t.pixels.right + this.dynamicEventRenderingMargin, o = e.part.left, l = e.part.right, d = e.part.top, c = e.part.top + s.eventHeight;
|
|
5281
5284
|
return r <= o || i >= l || (a <= d || n >= c);
|
|
5282
|
-
}, this.
|
|
5285
|
+
}, this.Ua = function (e, t) {
|
|
5283
5286
|
t = t || {};
|
|
5284
5287
|
var n = t.forced;
|
|
5285
5288
|
if (e.rendered)
|
|
5286
5289
|
return !1;
|
|
5287
|
-
var a = "Progressive" === this.dynamicEventRendering, i = e.part.dayIndex, o = s.divEvents, l = s.rowlist, c = l[i], u = c.top, h = this.
|
|
5290
|
+
var a = "Progressive" === this.dynamicEventRendering, i = e.part.dayIndex, o = s.divEvents, l = s.rowlist, c = l[i], u = c.top, h = this.ke(), f = h.pixels.left - this.dynamicEventRenderingMargin, v = h.pixels.right + this.dynamicEventRenderingMargin, p = h.pixels.top, m = h.pixels.bottom, g = e.part.left, y = e.part.left + e.part.width, b = e.part.top + u, w = b + s.eventHeight, x = v <= g || f >= y, _ = m <= b || p >= w;
|
|
5288
5291
|
if (!n && a && (x || _))
|
|
5289
5292
|
return !1;
|
|
5290
5293
|
var C = e.part.width, k = s.eventHeight, D = e.cache || e.data, S = D.borderRadius || s.eventBorderRadius;
|
|
@@ -5293,34 +5296,34 @@ var DayPilot = { Global: {} };
|
|
|
5293
5296
|
"number" == typeof M && (M += "px"), C = DayPilot.Util.atLeast(0, C), k = DayPilot.Util.atLeast(0, k);
|
|
5294
5297
|
var T = r();
|
|
5295
5298
|
T.style.position = "absolute", T.style.left = e.part.left + "px", T.style.top = u + e.part.top + "px", T.style.width = C + "px", T.style.height = k + "px", s.eventTextWrappingEnabled || (T.style.whiteSpace = "nowrap"), T.style.overflow = "hidden", T.className = this.L("_event"), D.cssClass && DayPilot.Util.addClass(T, D.cssClass);
|
|
5296
|
-
"number" == typeof e.part.line && DayPilot.Util.addClass(T, this.L("_event_line" + e.part.line)), S && (T.style.borderRadius = S), this.showToolTip && (T.title = e.client.toolTip() || ""), T.onmousemove = this.
|
|
5299
|
+
"number" == typeof e.part.line && DayPilot.Util.addClass(T, this.L("_event_line" + e.part.line)), S && (T.style.borderRadius = S), this.showToolTip && (T.title = e.client.toolTip() || ""), T.onmousemove = this.uh, T.onmousedown = this.vh, T.onmouseup = this.wh, T.ontouchstart = d.xh, T.ontouchmove = d.yh, T.ontouchend = d.zh, e.client.clickEnabled() && (T.onclick = this.Me), "undefined" != typeof D.ariaLabel ? T.setAttribute("aria-label", D.ariaLabel) : T.setAttribute("aria-label", D.text), T.setAttribute("tabindex", "-1");
|
|
5297
5300
|
var A = r();
|
|
5298
5301
|
A.className = s.L("_event_inner"), S && (A.style.borderRadius = S), M && (A.style.padding = M), D.backColor && (A.style.background = D.backColor), D.fontColor && (A.style.color = D.fontColor), "darker" === D.borderColor && D.backColor ? A.style.borderColor = DayPilot.ColorUtil.darker(D.backColor, 2) : A.style.borderColor = D.borderColor, D.backImage && (A.style.backgroundImage = "url(" + D.backImage + ")", D.backRepeat && (A.style.backgroundRepeat = D.backRepeat)), T.appendChild(A);
|
|
5299
5302
|
var E = e.start().getTime() === e.part.start.getTime(), H = e.rawend().getTime() === e.part.end.getTime();
|
|
5300
5303
|
if (E || DayPilot.Util.addClass(T, this.L("_event_continueleft")), H || DayPilot.Util.addClass(T, this.L("_event_continueright")), e.client.barVisible() && C > 0) {
|
|
5301
|
-
var
|
|
5304
|
+
var R = 100 * e.part.barLeft / C, N = Math.ceil(100 * e.part.barWidth / C), I = r();
|
|
5302
5305
|
I.className = this.L("_event_bar"), I.style.position = "absolute", D.barBackColor && (I.style.backgroundColor = D.barBackColor);
|
|
5303
5306
|
var L = r();
|
|
5304
|
-
L.className = this.L("_event_bar_inner"), L.style.left =
|
|
5307
|
+
L.className = this.L("_event_bar_inner"), L.style.left = R + "%", 0 < N && N <= 1 ? L.style.width = "1px" : L.style.width = N + "%", D.barColor && (L.style.backgroundColor = D.barColor), D.barImageUrl && (L.style.backgroundImage = "url(" + D.barImageUrl + ")"), I.appendChild(L), T.appendChild(I);
|
|
5305
5308
|
}
|
|
5306
5309
|
T.row = i, T.event = e, function () {
|
|
5307
5310
|
if ("function" != typeof s.onBeforeEventDomAdd && "function" != typeof s.onBeforeEventDomRemove)
|
|
5308
|
-
return void s.
|
|
5311
|
+
return void s.Ah(A, D.text, D.html);
|
|
5309
5312
|
var t = {};
|
|
5310
5313
|
if (t.control = s, t.e = e, t.element = null, T.domArgs = t, "function" == typeof s.onBeforeEventDomAdd && s.onBeforeEventDomAdd(t), t.element) {
|
|
5311
5314
|
var n = A;
|
|
5312
5315
|
if (n) {
|
|
5313
|
-
t.
|
|
5316
|
+
t.Pa = n;
|
|
5314
5317
|
var a = DayPilot.Util.isReactComponent(t.element), i = DayPilot.Util.isVueVNode(t.element);
|
|
5315
5318
|
if (a) {
|
|
5316
|
-
if (!s.
|
|
5319
|
+
if (!s.bg.reactDOM)
|
|
5317
5320
|
throw new DayPilot.Exception("Can't reach ReactDOM");
|
|
5318
|
-
s.
|
|
5321
|
+
s.bg.Uc(t.element, n);
|
|
5319
5322
|
}
|
|
5320
5323
|
else if (i) {
|
|
5321
|
-
if (!s.
|
|
5324
|
+
if (!s.Ra.Qa)
|
|
5322
5325
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
5323
|
-
s.Sa
|
|
5326
|
+
s.Ra.Sa = !0, s.Ra.Va(t.element, n), s.Ra.Sa = !1;
|
|
5324
5327
|
}
|
|
5325
5328
|
else
|
|
5326
5329
|
n.appendChild(t.element);
|
|
@@ -5336,12 +5339,12 @@ var DayPilot = { Global: {} };
|
|
|
5336
5339
|
P.push({ v: "Hover", w: 17, h: 17, top: e + 2, right: 2, css: s.L("_event_delete"), onClick: function (e) { s.ya(e.source); } });
|
|
5337
5340
|
}
|
|
5338
5341
|
}(), D.areas && (P = P.concat(D.areas)), DayPilot.Areas.attach(T, e, { areas: P }), this.elements.events.push(T), o.appendChild(T), e.rendered = !0, !0;
|
|
5339
|
-
}, this
|
|
5342
|
+
}, this.$a = function (e, t) { return s.R.da() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Ah = function (e, t, n) { DayPilot.Util.isNullOrUndefined(n) ? null !== t && void 0 !== t && (s.R.da() ? e.innerText = t : e.innerHTML = t) : e.innerHTML = n; }, this.nf = function () {
|
|
5340
5343
|
for (var e = 0; e < this.elements.events.length; e++) {
|
|
5341
5344
|
var t = this.elements.events[e], n = t.event, a = n.part.dayIndex, i = s.rowlist[a], r = i.top, o = r + n.part.top, l = i.height, d = s.eventHeight;
|
|
5342
5345
|
n.part.top + d > l && (d = Math.max(0, l - n.part.top)), t.style.top = o + "px", t.style.height = d + "px";
|
|
5343
5346
|
}
|
|
5344
|
-
}, this.
|
|
5347
|
+
}, this.Bh = function (e) {
|
|
5345
5348
|
if (!e)
|
|
5346
5349
|
return null;
|
|
5347
5350
|
for (var t = 0; t < s.elements.events.length; t++) {
|
|
@@ -5350,137 +5353,137 @@ var DayPilot = { Global: {} };
|
|
|
5350
5353
|
return n;
|
|
5351
5354
|
}
|
|
5352
5355
|
return null;
|
|
5353
|
-
}, this.
|
|
5354
|
-
var t = s.events.
|
|
5356
|
+
}, this.Kf = function (e) {
|
|
5357
|
+
var t = s.events.Pf(e.data);
|
|
5355
5358
|
if (!t)
|
|
5356
5359
|
return null;
|
|
5357
5360
|
var n = s.rowlist[t.part.dayIndex];
|
|
5358
|
-
return s.
|
|
5359
|
-
}, this.
|
|
5361
|
+
return s.Fg(n), s.Ua(t, { "forced": !0 }), s.Bh(t);
|
|
5362
|
+
}, this.uh = function (e) {
|
|
5360
5363
|
for (var t = e.currentTarget; t && !t.event;)
|
|
5361
5364
|
t = t.parentNode;
|
|
5362
|
-
s.
|
|
5363
|
-
}, this.
|
|
5364
|
-
d.
|
|
5365
|
-
d.relativeCoords = function (e) { return d.
|
|
5365
|
+
s.Ch(t, e), s.Qe(e);
|
|
5366
|
+
}, this.Oe = {}, this.vh = function (e) { s.Qe(e); var n = DayPilot.Util.mouseButton(e); e.preventDefault(), e.stopPropagation(), n.left && ("w-resize" === this.style.cursor || "e-resize" === this.style.cursor ? (t.Ne = !0, t.fg = this, t.jg = this.event, t.Dh = DayPilot.mc(e), i().style.cursor = this.style.cursor) : ("move" === this.style.cursor || this.event.client.moveEnabled()) && s.Eh(this, e)); }, this.wh = function (e) { DayPilot.Util.mouseButton(e).right && s.xa.call(this, e); }, this.Eh = function (e, t) { var n = s.Oe; s.Qe(t), n.Fh = !0, n.Oe = e, n.mg = e.event, n.Dh = DayPilot.mc(t), n.Gh = DayPilot.mo3(e, t).x, n.eg = s.getDate(s.coords.x, !0); }, "undefined" == typeof DayPilot.Global.touch && (DayPilot.Global.touch = {}), DayPilot.Global.touch.active = !1, DayPilot.Global.touch.start = !1;
|
|
5367
|
+
d.Gf = [];
|
|
5368
|
+
d.relativeCoords = function (e) { return d.Hh(e); }, d.startResizing = function (e, t) { d.Ih(e, t); }, d.startMoving = function (e, t) { d.Eh(e, t); }, d.xh = function (t) {
|
|
5366
5369
|
if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
|
|
5367
|
-
t.stopPropagation(), d.
|
|
5370
|
+
t.stopPropagation(), d.Jh(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
|
|
5368
5371
|
var n = t.currentTarget;
|
|
5369
|
-
s.coords = d.
|
|
5372
|
+
s.coords = d.Hh(t);
|
|
5370
5373
|
var a = s.tapAndHoldTimeout;
|
|
5371
|
-
d.
|
|
5374
|
+
d.Gf.push(setTimeout(function () {
|
|
5372
5375
|
DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, t.preventDefault();
|
|
5373
5376
|
var a = n.event;
|
|
5374
5377
|
switch (s.eventTapAndHoldHandling) {
|
|
5375
5378
|
case "Move": if (a.client.moveEnabled()) {
|
|
5376
5379
|
var i = e(t);
|
|
5377
|
-
d.
|
|
5380
|
+
d.Eh(n, i);
|
|
5378
5381
|
}
|
|
5379
5382
|
}
|
|
5380
5383
|
}, a));
|
|
5381
5384
|
}
|
|
5382
|
-
}, d.
|
|
5385
|
+
}, d.yh = function () { d.Jh(), DayPilot.Global.touch.start = !1; }, d.zh = function (e) {
|
|
5383
5386
|
if (!DayPilot.Util.isMouseEvent(e)) {
|
|
5384
|
-
if (d.
|
|
5387
|
+
if (d.Jh(), DayPilot.Global.touch.start) {
|
|
5385
5388
|
DayPilot.Global.touch.start = !1, e.preventDefault(), e.stopPropagation();
|
|
5386
5389
|
var t = e.currentTarget;
|
|
5387
|
-
setTimeout(function () { s.
|
|
5390
|
+
setTimeout(function () { s.Pe(t, e); });
|
|
5388
5391
|
}
|
|
5389
5392
|
setTimeout(function () { DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1; }, 500);
|
|
5390
5393
|
}
|
|
5391
|
-
}, d.
|
|
5394
|
+
}, d.Mg = function (e) {
|
|
5392
5395
|
if (!(DayPilot.Global.touch.active || DayPilot.Global.touch.start || e.touches.length > 1 || "Disabled" === s.timeRangeSelectedHandling)) {
|
|
5393
|
-
d.
|
|
5396
|
+
d.Jh(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
|
|
5394
5397
|
var t = s.tapAndHoldTimeout;
|
|
5395
|
-
d.
|
|
5396
|
-
s.coords = d.
|
|
5398
|
+
d.Gf.push(setTimeout(function () { DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, e.preventDefault(), s.coords = d.Hh(e), d.Kh = s.Lh(); }, t));
|
|
5399
|
+
s.coords = d.Hh(e);
|
|
5397
5400
|
}
|
|
5398
|
-
}, d.
|
|
5399
|
-
if (d.
|
|
5400
|
-
return e.preventDefault(), void d.
|
|
5401
|
+
}, d.Ng = function (e) {
|
|
5402
|
+
if (d.Jh(), DayPilot.Global.touch.start = !1, t.fg)
|
|
5403
|
+
return e.preventDefault(), void d.Mh();
|
|
5401
5404
|
if (DayPilot.Global.touch.active) {
|
|
5402
|
-
if (e.preventDefault(), s.coords = d.
|
|
5403
|
-
return void d.
|
|
5404
|
-
if (d.
|
|
5405
|
-
var n = d.
|
|
5406
|
-
n.end = { x: Math.floor(s.coords.x / s.cellWidth), "time": s.getDate(s.coords.x, !0) }, s.
|
|
5405
|
+
if (e.preventDefault(), s.coords = d.Hh(e), t.Oe)
|
|
5406
|
+
return void d.Nh();
|
|
5407
|
+
if (d.Kh) {
|
|
5408
|
+
var n = d.Kh;
|
|
5409
|
+
n.end = { x: Math.floor(s.coords.x / s.cellWidth), "time": s.getDate(s.coords.x, !0) }, s.yf(n);
|
|
5407
5410
|
}
|
|
5408
5411
|
}
|
|
5409
|
-
}, d.debug = function () { }, d.
|
|
5410
|
-
d.
|
|
5412
|
+
}, d.debug = function () { }, d.Og = function (e) {
|
|
5413
|
+
d.Jh();
|
|
5411
5414
|
if (DayPilot.Global.touch.active) {
|
|
5412
|
-
if (t.
|
|
5415
|
+
if (t.Oe) {
|
|
5413
5416
|
e.preventDefault();
|
|
5414
|
-
var n = t.
|
|
5415
|
-
if (s !== t.
|
|
5417
|
+
var n = t.mg;
|
|
5418
|
+
if (s !== t.ng.calendar)
|
|
5416
5419
|
return;
|
|
5417
|
-
var a = t.
|
|
5418
|
-
DayPilot.Util.removeClass(t.
|
|
5420
|
+
var a = t.ng.start, r = t.ng.end, o = t.ng.row.id;
|
|
5421
|
+
DayPilot.Util.removeClass(t.Oe, s.L("_event_moving_source")), DayPilot.de(t.ng), t.ng.calendar = null, i().style.cursor = "", t.Oe = null, t.mg = null, t.ng = null, s.M(n, a, r, o);
|
|
5419
5422
|
}
|
|
5420
|
-
if (d.
|
|
5421
|
-
var l = d.
|
|
5422
|
-
d.
|
|
5423
|
+
if (d.Kh) {
|
|
5424
|
+
var l = d.Kh;
|
|
5425
|
+
d.Kh = null;
|
|
5423
5426
|
var c = s.elements.range2;
|
|
5424
|
-
c && c.overlapping ? s.clearSelection() : s.
|
|
5427
|
+
c && c.overlapping ? s.clearSelection() : s.uf(l);
|
|
5425
5428
|
}
|
|
5426
5429
|
}
|
|
5427
5430
|
else if (DayPilot.Global.touch.start) {
|
|
5428
5431
|
if (s.coords.x < s.getScrollX())
|
|
5429
5432
|
return;
|
|
5430
|
-
var l = s.
|
|
5431
|
-
s.
|
|
5433
|
+
var l = s.Lh();
|
|
5434
|
+
s.yf(l);
|
|
5432
5435
|
var c = s.elements.range2;
|
|
5433
|
-
c && c.overlapping ? s.clearSelection() : s.
|
|
5436
|
+
c && c.overlapping ? s.clearSelection() : s.uf(l);
|
|
5434
5437
|
}
|
|
5435
5438
|
setTimeout(function () { DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1; }, 500);
|
|
5436
|
-
}, d.
|
|
5437
|
-
for (var e = 0; e < d.
|
|
5438
|
-
clearTimeout(d.
|
|
5439
|
-
d.
|
|
5440
|
-
}, d.
|
|
5441
|
-
if (!t.
|
|
5442
|
-
var e = t.
|
|
5443
|
-
t.
|
|
5444
|
-
}
|
|
5445
|
-
s.
|
|
5446
|
-
}, d.
|
|
5447
|
-
if (!t.
|
|
5448
|
-
var e = t.
|
|
5449
|
-
t.
|
|
5450
|
-
}
|
|
5451
|
-
t.
|
|
5452
|
-
}, this.
|
|
5439
|
+
}, d.Jh = function () {
|
|
5440
|
+
for (var e = 0; e < d.Gf.length; e++)
|
|
5441
|
+
clearTimeout(d.Gf[e]);
|
|
5442
|
+
d.Gf = [];
|
|
5443
|
+
}, d.Hh = function (e) { function t(e, t, n) { var a = DayPilot.abs(n); return { x: e - a.x, y: t - a.y, toString: function () { return "x: " + this.x + ", y:" + this.y; } }; } var n = s.ge, a = e.touches ? e.touches[0] : e; return t(a.pageX, a.pageY, n); }, d.Eh = function (e, n) { t.Oe = e, t.mg = e.event, t.Dh = n; var a = DayPilot.abs(e); t.Gh = n.x - a.x, t.eg = s.getDate(s.coords.x, !0), t.ng = s.ca(e), s.lg(); }, d.Ih = function (e, n) { t.fg = e, t.jg = e.event, t.fg.dpBorder = n, t.ig || (t.ig = s.ca(e)), s.kg(); }, d.Mh = function () {
|
|
5444
|
+
if (!t.ig) {
|
|
5445
|
+
var e = t.fg;
|
|
5446
|
+
t.ig = s.ca(e);
|
|
5447
|
+
}
|
|
5448
|
+
s.kg();
|
|
5449
|
+
}, d.Nh = function () {
|
|
5450
|
+
if (!t.ng) {
|
|
5451
|
+
var e = t.Oe;
|
|
5452
|
+
t.ng = s.ca(e);
|
|
5453
|
+
}
|
|
5454
|
+
t.ng.calendar.lg();
|
|
5455
|
+
}, this.Ch = function (e, n) {
|
|
5453
5456
|
var a = this.eventResizeMargin, i = e;
|
|
5454
5457
|
if ("undefined" != typeof t) {
|
|
5455
5458
|
var r = DayPilot.mo3(e, n);
|
|
5456
|
-
if (r && (s.eventOffset = r, !t.
|
|
5459
|
+
if (r && (s.eventOffset = r, !t.fg && !t.Oe)) {
|
|
5457
5460
|
var o = i.event.part.start.toString() === i.event.start().toString(), l = i.event.part.end.toString() === i.event.rawend().toString();
|
|
5458
|
-
r.x <= a && i.event.client.resizeEnabled() ? o ? (e.style.cursor = "w-resize", e.dpBorder = "left") : e.style.cursor = "not-allowed" : e.offsetWidth - r.x <= a && i.event.client.resizeEnabled() ? l ? (e.style.cursor = "e-resize", e.dpBorder = "right") : e.style.cursor = "not-allowed" : t.
|
|
5461
|
+
r.x <= a && i.event.client.resizeEnabled() ? o ? (e.style.cursor = "w-resize", e.dpBorder = "left") : e.style.cursor = "not-allowed" : e.offsetWidth - r.x <= a && i.event.client.resizeEnabled() ? l ? (e.style.cursor = "e-resize", e.dpBorder = "right") : e.style.cursor = "not-allowed" : t.fg || t.Oe || (i.event.client.clickEnabled() ? e.style.cursor = "pointer" : e.style.cursor = "default");
|
|
5459
5462
|
}
|
|
5460
5463
|
}
|
|
5461
|
-
}, this.
|
|
5462
|
-
if (e = e || t.
|
|
5464
|
+
}, this.zf = function () { var e = s.Le(); return s.days * (1440 / e); }, this.vf = function (e) {
|
|
5465
|
+
if (e = e || t.Kh || s.xf, !e)
|
|
5463
5466
|
return null;
|
|
5464
5467
|
var n = s.rowlist[e.start.y];
|
|
5465
5468
|
if (!n)
|
|
5466
5469
|
return null;
|
|
5467
5470
|
var a, i, r = e, o = r.end.time > r.start.time, l = n.id, d = o ? r.start.x : r.end.x, c = o ? r.end.x : r.start.x, u = s.snapToGrid;
|
|
5468
|
-
u ? (a = s.
|
|
5471
|
+
u ? (a = s.Ie(d).start, i = s.Ie(c).end) : o ? (a = r.start.time, i = r.end.time) : (a = r.end.time, i = r.start.time);
|
|
5469
5472
|
var h = new DayPilot.Selection(a, i, l, s);
|
|
5470
5473
|
return h.allowed = !e.div || !e.div.overlapping, h;
|
|
5471
|
-
}, this.
|
|
5472
|
-
this.
|
|
5474
|
+
}, this.Ye = function () {
|
|
5475
|
+
this.xb.timeHeader = {}, s.elements.timeHeader.length > 0 && (s.elements.timeHeader = []);
|
|
5473
5476
|
var e = r();
|
|
5474
5477
|
e.style.position = "relative", this.nav.timeHeader = e;
|
|
5475
5478
|
for (var t = 0; t < this.timeHeader.length; t++)
|
|
5476
5479
|
for (var n = this.timeHeader[t], a = 0; a < n.length; a++)
|
|
5477
|
-
this.
|
|
5480
|
+
this.Oh(a, t);
|
|
5478
5481
|
var i = this.divNorth;
|
|
5479
5482
|
1 === i.childNodes.length ? i.replaceChild(e, i.childNodes[0]) : (i.innerHTML = "", i.appendChild(e));
|
|
5480
|
-
var o = this.
|
|
5483
|
+
var o = this.ze();
|
|
5481
5484
|
i.style.width = o + 5e3 + "px", o > 0 && (this.divStretch.style.width = o + "px");
|
|
5482
|
-
}, this.
|
|
5483
|
-
var n = null, a = this.R.
|
|
5485
|
+
}, this.Ge = function (e, t) {
|
|
5486
|
+
var n = null, a = this.R.Fe();
|
|
5484
5487
|
t = t || this.cellGroupBy;
|
|
5485
5488
|
var i = e.start;
|
|
5486
5489
|
switch (t) {
|
|
@@ -5488,7 +5491,7 @@ var DayPilot = { Global: {} };
|
|
|
5488
5491
|
n = i.toString("m");
|
|
5489
5492
|
break;
|
|
5490
5493
|
case "Hour":
|
|
5491
|
-
n = "Clock12Hours" === s.R.
|
|
5494
|
+
n = "Clock12Hours" === s.R.Ph() ? i.toString("h tt", a) : i.toString("H", a);
|
|
5492
5495
|
break;
|
|
5493
5496
|
case "Day":
|
|
5494
5497
|
n = i.toString(a.datePattern);
|
|
@@ -5510,12 +5513,12 @@ var DayPilot = { Global: {} };
|
|
|
5510
5513
|
break;
|
|
5511
5514
|
case "Cell":
|
|
5512
5515
|
var r = (e.end.ticks - e.start.ticks) / 6e4;
|
|
5513
|
-
n = this.
|
|
5516
|
+
n = this.Qh(i, r);
|
|
5514
5517
|
break;
|
|
5515
5518
|
default: throw new DayPilot.Exception("Invalid groupBy value: " + t);
|
|
5516
5519
|
}
|
|
5517
5520
|
return n;
|
|
5518
|
-
}, this.
|
|
5521
|
+
}, this.Qh = function (e, t) { var n = this.R.Fe(); return t = t || this.cellDuration, t < 1 ? e.toString("ss") : t < 60 ? e.toString("mm") : t < 1440 ? "Clock12Hours" === s.R.Ph() ? e.toString("h tt", n) : e.toString("H", n) : t < 10080 ? e.toString("d") : 10080 === t ? 1 === l.ea() ? e.weekNumberISO() : e.weekNumber() : e.toString("MMMM yyyy", n); }, this.Ee = function (e, t, n) {
|
|
5519
5522
|
var a, i = s.startDate.addDays(s.days);
|
|
5520
5523
|
t = t || this.cellGroupBy;
|
|
5521
5524
|
var r = 60;
|
|
@@ -5553,48 +5556,48 @@ var DayPilot = { Global: {} };
|
|
|
5553
5556
|
a = i;
|
|
5554
5557
|
break;
|
|
5555
5558
|
case "Cell":
|
|
5556
|
-
var d = this.
|
|
5559
|
+
var d = this.Ke(e);
|
|
5557
5560
|
d.current && (a = d.current.end);
|
|
5558
5561
|
break;
|
|
5559
5562
|
default: throw n ? new DayPilot.Exception("Invalid scale value: " + t) : new DayPilot.Exception("Invalid groupBy value: " + t);
|
|
5560
5563
|
}
|
|
5561
5564
|
return a.getTime() > i.getTime() && (a = i), a;
|
|
5562
|
-
}, this.
|
|
5565
|
+
}, this.Oh = function (e, t) { var n = this.nav.timeHeader, a = this.timeHeader[t][e], i = t < this.timeHeader.length - 1, o = a.left, l = a.width, d = t * s.headerHeight, c = s.headerHeight, u = r(); u.style.position = "absolute", u.style.top = d + "px", u.style.left = o + "px", u.style.width = l + "px", u.style.height = c + "px", a.toolTip && (u.title = a.toolTip), u.setAttribute("aria-hidden", "true"), a.cssClass && DayPilot.Util.addClass(u, a.cssClass), u.style.userSelect = "none", u.style.webkitUserSelect = "none", u.oncontextmenu = function () { return !1; }, u.cell = {}, u.cell.start = a.start, u.cell.end = a.end, u.cell.level = t, u.cell.th = a, u.onclick = this.Ag, u.oncontextmenu = this.Bg, DayPilot.rePassive(u, DayPilot.touch.start, function (e) { e.stopPropagation(); }), u.style.overflow = "hidden", s.timeHeaderTextWrappingEnabled || (u.style.whiteSpace = "nowrap"); var h = r(); h.innerHTML = s.$a(a.text, a.html), a.backColor && (h.style.background = a.backColor), a.fontColor && (h.style.color = a.fontColor); var f = this.L("_timeheadercol"), v = this.L("_timeheadercol_inner"); i && (f = this.L("_timeheadergroup"), v = this.L("_timeheadergroup_inner")), DayPilot.Util.addClass(u, f), DayPilot.Util.addClass(h, v), DayPilot.Util.addClass(u, s.L("_timeheader_cell")), DayPilot.Util.addClass(h, s.L("_timeheader_cell_inner")), u.appendChild(h), DayPilot.Areas.attach(u, a, { areas: a.areas }), this.xb.timeHeader[e + "_" + t] = u, this.elements.timeHeader.push(u), n.appendChild(u); }, this._f = function () { s.rowlist.forEach(function (e) { var t = e.getHeight() + s.rowMarginTop + s.rowMarginBottom; e.height !== t && (s.kf = !0), e.height = t; }), s.kf && (s.xb.drawArea = null); }, this.Ze = function () {
|
|
5563
5566
|
s.rowlist.forEach(function (e) {
|
|
5564
5567
|
var t = s.divHeader;
|
|
5565
5568
|
if (t) {
|
|
5566
5569
|
var n = e.index;
|
|
5567
5570
|
if (t.rows[n]) {
|
|
5568
5571
|
var a = t.rows[n];
|
|
5569
|
-
s.
|
|
5572
|
+
s.rg && (a.style.top = e.top + "px");
|
|
5570
5573
|
var i = e.height;
|
|
5571
5574
|
a && a.firstChild && parseInt(a.firstChild.style.height, 10) !== i && (a.firstChild.style.height = i + "px");
|
|
5572
5575
|
}
|
|
5573
5576
|
}
|
|
5574
|
-
}), s.
|
|
5575
|
-
}, this.
|
|
5577
|
+
}), s.rg && s.nav.resScrollSpace && (s.nav.resScrollSpace.style.top = s._d + "px");
|
|
5578
|
+
}, this.ah = function (e) {
|
|
5576
5579
|
if (DayPilot.Global.touch.start || DayPilot.Global.touch.active)
|
|
5577
5580
|
return !1;
|
|
5578
|
-
if (s.
|
|
5581
|
+
if (s.Qe(e), "Disabled" === s.timeRangeSelectedHandling)
|
|
5579
5582
|
return !1;
|
|
5580
5583
|
var n = DayPilot.Util.mouseButton(e);
|
|
5581
|
-
if (s.
|
|
5584
|
+
if (s.Rh())
|
|
5582
5585
|
return !1;
|
|
5583
5586
|
if (n.middle || n.right)
|
|
5584
5587
|
return !1;
|
|
5585
|
-
if (s.
|
|
5588
|
+
if (s.Sh(s.coords))
|
|
5586
5589
|
return !1;
|
|
5587
5590
|
var a = n.left ? "left" : n.right ? "right" : n.middle ? "middle" : "unknown";
|
|
5588
|
-
return s.
|
|
5589
|
-
}, this.
|
|
5590
|
-
if (s.
|
|
5591
|
+
return s.Th = a, t.Kh = s.Lh(), t.Kh && (t.Uh = s), !1;
|
|
5592
|
+
}, this.Lh = function () { var e = {}, t = s.He(s.coords.x).x, n = s.getDate(s.coords.x, !0); return e.start = { y: s.Ff(s.coords.y).i, x: t, "time": n }, e.end = { x: t, "time": n }, e.calendar = s, s.yf(e), e; }, this.ch = function (e) {
|
|
5593
|
+
if (s.Oe = {}, s.xf) {
|
|
5591
5594
|
if (DayPilot.Util.mouseButton(e).left) {
|
|
5592
|
-
var n = s.
|
|
5593
|
-
if (s.
|
|
5595
|
+
var n = s.xf;
|
|
5596
|
+
if (s.Sh(s.coords)) {
|
|
5594
5597
|
var a = function (e) {
|
|
5595
5598
|
return function () {
|
|
5596
|
-
t.
|
|
5597
|
-
var n = s.
|
|
5599
|
+
t.Vh = null;
|
|
5600
|
+
var n = s.vf(e);
|
|
5598
5601
|
if (n) {
|
|
5599
5602
|
var a = {};
|
|
5600
5603
|
a.start = n.start, a.end = n.end, a.resource = n.resource, a.preventDefault = function () { a.preventDefault.value = !0; }, "function" == typeof s.onTimeRangeClick && s.onTimeRangeClick(a), a.preventDefault.value || "function" == typeof s.onTimeRangeClicked && s.onTimeRangeClicked(a);
|
|
@@ -5605,32 +5608,32 @@ var DayPilot = { Global: {} };
|
|
|
5605
5608
|
}
|
|
5606
5609
|
}
|
|
5607
5610
|
}
|
|
5608
|
-
}, this.
|
|
5611
|
+
}, this.Rh = function () { return !!(t.fg || t.Oe || t.Kh) || !!s.Oe.Fh; }, this.dragInProgress = function () { return s.Rh(); }, this.Qe = function (e) { var t = DayPilot.mo3(s.ge, e); t = t || {}, t.stamp = t.x + "_" + t.y, s.coords && s.coords.stamp === t.stamp || (s.coords = t); }, this.bh = function (e) {
|
|
5609
5612
|
if (!DayPilot.Global.touch.active) {
|
|
5610
5613
|
var n = DayPilot.mc(e);
|
|
5611
|
-
if (s.
|
|
5612
|
-
DayPilot.distance(s.
|
|
5614
|
+
if (s.Qe(e), s.Oe.Fh) {
|
|
5615
|
+
DayPilot.distance(s.Oe.Dh, n) > 2 && (DayPilot.Util.copyProps(s.Oe, t), i().style.cursor = "move", s.Oe = {});
|
|
5613
5616
|
}
|
|
5614
|
-
t.
|
|
5617
|
+
t.fg && t.jg.calendar === s ? (t.fg.event || (t.fg.event = t.jg), s.Wh()) : t.mg ? s.Xh() : t.Kh && t.Kh.calendar === s && (t.Kh.moved = !0, s.Yh());
|
|
5615
5618
|
}
|
|
5616
|
-
}, this.
|
|
5617
|
-
if (!t.
|
|
5618
|
-
DayPilot.Util.addClass(t.
|
|
5619
|
-
var e = t.
|
|
5620
|
-
t.
|
|
5619
|
+
}, this.Yh = function () { var e = t.Kh, n = s.He(s.coords.x).x, a = s.getDate(s.coords.x, !0); e.end = { x: n, "time": a }, s.yf(e); }, this.Wh = function () { t.ig || (t.ig = s.ca(t.fg)), s.kg(); }, this.Xh = function () {
|
|
5620
|
+
if (!t.ng) {
|
|
5621
|
+
DayPilot.Util.addClass(t.Oe, s.L("_event_moving_source"));
|
|
5622
|
+
var e = t.mg;
|
|
5623
|
+
t.ng = s.ca(e);
|
|
5621
5624
|
}
|
|
5622
|
-
s.
|
|
5623
|
-
}, this.
|
|
5624
|
-
var t = s.
|
|
5625
|
+
s.lg();
|
|
5626
|
+
}, this.dh = function (e) { return e.cancelBubble = !0, !1; }, this.Sh = function (e) {
|
|
5627
|
+
var t = s.xf;
|
|
5625
5628
|
if (!t || !t.start || !t.end)
|
|
5626
5629
|
return !1;
|
|
5627
|
-
var n = this.
|
|
5630
|
+
var n = this.If(t.start.y), a = t.start.x < t.end.x, i = (a ? t.start.x : t.end.x) * this.cellWidth, r = (a ? t.end.x : t.start.x) * this.cellWidth + this.cellWidth, o = n.top, l = n.bottom;
|
|
5628
5631
|
return e.x >= i && e.x <= r && e.y >= o && e.y <= l;
|
|
5629
|
-
}, this.
|
|
5632
|
+
}, this.yf = function (e) {
|
|
5630
5633
|
function n(e) {
|
|
5631
5634
|
var t, n, l, d, c = e.end.time > e.start.time, u = e.start.y, h = e.start.time && e.end.time;
|
|
5632
5635
|
if (i || !h) {
|
|
5633
|
-
var f = c ? e.start.x : e.end.x, v = c ? e.end.x : e.start.x, p = s.
|
|
5636
|
+
var f = c ? e.start.x : e.end.x, v = c ? e.end.x : e.start.x, p = s.Ie(f), m = s.Ie(v);
|
|
5634
5637
|
t = p.left, n = m.left + m.width;
|
|
5635
5638
|
}
|
|
5636
5639
|
else
|
|
@@ -5643,113 +5646,113 @@ var DayPilot = { Global: {} };
|
|
|
5643
5646
|
}
|
|
5644
5647
|
return y.className = s.L("_shadow"), y.firstChild.innerHTML = "", y.style.left = t + "px", y.style.top = o[u].top + "px", y.style.width = g + "px", y.style.height = o[u].height - 1 + "px", y.calendar = s, s.elements.range2 = y, y;
|
|
5645
5648
|
}
|
|
5646
|
-
if (e = e || t.
|
|
5649
|
+
if (e = e || t.Kh) {
|
|
5647
5650
|
var a = s.eventBorderRadius;
|
|
5648
5651
|
"number" == typeof a && (a += "px");
|
|
5649
5652
|
var i = s.snapToGrid, o = s.rowlist;
|
|
5650
5653
|
n(e);
|
|
5651
5654
|
}
|
|
5652
|
-
}, this
|
|
5655
|
+
}, this.Zh = function (e) { return { "start": { "x": e.start.x, "y": e.start.y, "time": e.start.time }, "end": { "x": e.end.x, "time": e.end.time }, "calendar": e.calendar, "args": e.args }; }, this.getCoords = function () {
|
|
5653
5656
|
if (!s.coords)
|
|
5654
5657
|
return null;
|
|
5655
5658
|
var e = {};
|
|
5656
5659
|
e.x = s.coords.x, e.y = s.coords.y;
|
|
5657
|
-
var t = s.
|
|
5658
|
-
return e.row = s.
|
|
5659
|
-
}, this.
|
|
5660
|
+
var t = s.Ff(e.y, e.grid).element;
|
|
5661
|
+
return e.row = s.zg(t), e.time = s.getDate(e.x, !0), e;
|
|
5662
|
+
}, this.Gf = {}, this.Gf.na = null, this.Gf.drawCells = null, this.Gf.drawRows = null, this.Gf.click = null, this.Gf.resClick = [], this.Gf.updateFloats = null, this.df = function () {
|
|
5660
5663
|
if (!s.Q) {
|
|
5661
|
-
s.
|
|
5664
|
+
s.bf();
|
|
5662
5665
|
var e = s.nav.scroll;
|
|
5663
|
-
if (s.
|
|
5664
|
-
s.
|
|
5666
|
+
if (s.ih = e.scrollLeft, s.jh = e.scrollTop, s.kh = e.clientWidth, s.divTimeScroll && (s.divTimeScroll.scrollLeft = s.ih), DayPilot.browser.ios && t.Vg ? n() : s.divResScroll.scrollTop = s.jh, s.progressiveRowRendering && (s.Gf.drawRows && (clearTimeout(s.Gf.drawRows), s.Gf.drawRows = null), s.scrollDelayRows > 0 ? s.Gf.drawRows = setTimeout(function () { s.ug(); }, s.scrollDelayRows) : s.ug()), s.Gf.drawCells && (clearTimeout(s.Gf.drawCells), s.Gf.drawCells = null), s.scrollDelayCells > 0)
|
|
5667
|
+
s.Gf.drawCells = setTimeout(s.$h(), s.scrollDelayCells);
|
|
5665
5668
|
else {
|
|
5666
|
-
s
|
|
5669
|
+
s.$h()();
|
|
5667
5670
|
}
|
|
5668
|
-
s.
|
|
5671
|
+
s.Gf.na && (clearTimeout(s.Gf.na), s.Gf.na = null), s.scrollDelayEvents > 0 ? s.Gf.na = setTimeout(s._h(), s.scrollDelayEvents) : s.na(), s.Gf.updateFloats && (clearTimeout(s.Gf.updateFloats), s.Gf.updateFloats = null), s.scrollDelayFloats > 0 ? s.Gf.updateFloats = setTimeout(function () { s.ne(); }, s.scrollDelayFloats) : s.ne(), s.onScrollCalled = !0;
|
|
5669
5672
|
}
|
|
5670
|
-
}, this
|
|
5673
|
+
}, this.$h = function () { return function () { s && s.cf(); }; }, this._h = function () { return function () { s && (s.qh() ? setTimeout(function () { s.nh(), setTimeout(function () { s.na(!0); }, 50); }, 50) : s.oe()); }; }, this.bf = function () { s.xb.drawArea = null; }, this.show = function () { s.visible = !0, s.ae = !0, s.nav.top.style.display = "", s.u(), s.$g(), s.df(); }, this.hide = function () { s.visible = !1, s.ae = !1, s.nav.top.style.display = "none"; }, this.Vf = function (e) {
|
|
5671
5674
|
if (!s.events.list)
|
|
5672
5675
|
return null;
|
|
5673
5676
|
for (var t = 0; t < this.events.list.length; t++) {
|
|
5674
5677
|
var n = this.events.list[t];
|
|
5675
|
-
if (s.
|
|
5678
|
+
if (s.Of(n, e)) {
|
|
5676
5679
|
var a = {};
|
|
5677
5680
|
return a.ex = n, a.index = t, a;
|
|
5678
5681
|
}
|
|
5679
5682
|
}
|
|
5680
5683
|
return null;
|
|
5681
|
-
}, this.
|
|
5682
|
-
var e = this.
|
|
5684
|
+
}, this.ai = function () {
|
|
5685
|
+
var e = this.ke(), t = e.xStart, n = e.xEnd - e.xStart, a = e.yStart, i = e.yEnd - e.yStart;
|
|
5683
5686
|
this.cellProperties || (this.cellProperties = {});
|
|
5684
5687
|
for (var r = 0; r <= n; r++) {
|
|
5685
5688
|
for (var o = t + r, s = 0; s < i; s++) {
|
|
5686
5689
|
var l = a + s;
|
|
5687
|
-
this.
|
|
5690
|
+
this.gd(o, l);
|
|
5688
5691
|
}
|
|
5689
|
-
this.
|
|
5692
|
+
this.bi(o);
|
|
5690
5693
|
}
|
|
5691
|
-
for (var d = this.
|
|
5692
|
-
this.
|
|
5693
|
-
}, this.
|
|
5694
|
+
for (var d = this.pg(), l = d.start; l < d.end; l++)
|
|
5695
|
+
this.ci(l);
|
|
5696
|
+
}, this.cf = function () {
|
|
5694
5697
|
if (!s.Q) {
|
|
5695
5698
|
var e = s.rowlist;
|
|
5696
5699
|
if (e && e.length > 0) {
|
|
5697
5700
|
if (this.cellSweeping) {
|
|
5698
5701
|
var t = this.cellSweepingCacheSize;
|
|
5699
|
-
this.
|
|
5702
|
+
this.ph(t);
|
|
5700
5703
|
}
|
|
5701
|
-
this.
|
|
5704
|
+
this.ai();
|
|
5702
5705
|
}
|
|
5703
|
-
this.
|
|
5706
|
+
this.kf = !1;
|
|
5704
5707
|
}
|
|
5705
|
-
}, this.
|
|
5706
|
-
if (s.
|
|
5707
|
-
return s.
|
|
5708
|
+
}, this.ke = function () {
|
|
5709
|
+
if (s.xb.drawArea)
|
|
5710
|
+
return s.xb.drawArea;
|
|
5708
5711
|
if (!this.nav.scroll)
|
|
5709
5712
|
return null;
|
|
5710
|
-
var e = s.
|
|
5711
|
-
o = s.
|
|
5712
|
-
var d = this.
|
|
5713
|
+
var e = s.jh, t = {}, n = null != this.dynamicEventRenderingMarginX ? this.dynamicEventRenderingMarginX : this.dynamicEventRenderingMargin, a = null != this.dynamicEventRenderingMarginY ? this.dynamicEventRenderingMarginY : this.dynamicEventRenderingMargin, i = s.ih - n, r = i + s.kh + 2 * n, o = 0, l = 0;
|
|
5714
|
+
o = s.He(i).x, l = s.He(r, !0).x;
|
|
5715
|
+
var d = this.zf();
|
|
5713
5716
|
l = Math.min(l, d - 1), o = DayPilot.Util.atLeast(o, 0);
|
|
5714
|
-
var c = e - a, u = e + this.nav.scroll.offsetHeight + 2 * a, h = this.
|
|
5717
|
+
var c = e - a, u = e + this.nav.scroll.offsetHeight + 2 * a, h = this.Ff(c).i, f = this.Ff(u).i;
|
|
5715
5718
|
f < this.rowlist.length && f++, t.xStart = o, t.xEnd = l, t.yStart = h, t.yEnd = f;
|
|
5716
5719
|
var v = s.nav.scroll;
|
|
5717
|
-
return 0 === v.clientWidth && (v = s.divTimeScroll), t.pixels = {}, t.pixels.left = v.scrollLeft, t.pixels.right = v.scrollLeft + v.clientWidth, t.pixels.top = v.scrollTop, t.pixels.bottom = v.scrollTop + v.clientHeight, t.pixels.width = v.scrollWidth, t.sw = DayPilot.sw(s.nav.scroll), s.
|
|
5718
|
-
}, this.
|
|
5720
|
+
return 0 === v.clientWidth && (v = s.divTimeScroll), t.pixels = {}, t.pixels.left = v.scrollLeft, t.pixels.right = v.scrollLeft + v.clientWidth, t.pixels.top = v.scrollTop, t.pixels.bottom = v.scrollTop + v.clientHeight, t.pixels.width = v.scrollWidth, t.sw = DayPilot.sw(s.nav.scroll), s.xb.drawArea = t, t;
|
|
5721
|
+
}, this.ze = function () { return s.zf() * s.cellWidth; }, this.ci = function (e) {
|
|
5719
5722
|
var t = s.rowlist, n = s.divLines, a = "y_" + e;
|
|
5720
|
-
if (!this.
|
|
5721
|
-
var i = t[e], o = i.height, l = i.top + o - 1, d = this.
|
|
5722
|
-
c.style.left = "0px", c.style.top = l + "px", c.style.width = d + "px", c.style.height = "1px", c.style.fontSize = "1px", c.style.lineHeight = "1px", c.style.overflow = "hidden", c.style.position = "absolute", c.className = this.L("_matrix_horizontal_line"), n.appendChild(c), this.
|
|
5723
|
+
if (!this.xb.linesHorizontal[a]) {
|
|
5724
|
+
var i = t[e], o = i.height, l = i.top + o - 1, d = this.ze(), c = r();
|
|
5725
|
+
c.style.left = "0px", c.style.top = l + "px", c.style.width = d + "px", c.style.height = "1px", c.style.fontSize = "1px", c.style.lineHeight = "1px", c.style.overflow = "hidden", c.style.position = "absolute", c.className = this.L("_matrix_horizontal_line"), n.appendChild(c), this.xb.linesHorizontal[a] = c;
|
|
5723
5726
|
}
|
|
5724
|
-
}, this.
|
|
5725
|
-
var t = s.
|
|
5727
|
+
}, this.bi = function (e) {
|
|
5728
|
+
var t = s.Ie(e);
|
|
5726
5729
|
if (t) {
|
|
5727
|
-
var n = s.divLines, a = s.
|
|
5728
|
-
if (!this.
|
|
5730
|
+
var n = s.divLines, a = s._d, i = "x_" + e;
|
|
5731
|
+
if (!this.xb.linesVertical[i]) {
|
|
5729
5732
|
var o = t.left + t.width - 1, l = r();
|
|
5730
|
-
l.style.left = o + "px", l.style.top = "0px", l.style.width = "1px", l.style.height = a + "px", l.style.fontSize = "1px", l.style.lineHeight = "1px", l.style.overflow = "hidden", l.style.position = "absolute", l.className = this.L("_matrix_vertical_line"), n.appendChild(l), this.elements.linesVertical.push(l), this.
|
|
5733
|
+
l.style.left = o + "px", l.style.top = "0px", l.style.width = "1px", l.style.height = a + "px", l.style.fontSize = "1px", l.style.lineHeight = "1px", l.style.overflow = "hidden", l.style.position = "absolute", l.className = this.L("_matrix_vertical_line"), n.appendChild(l), this.elements.linesVertical.push(l), this.xb.linesVertical[i] = l;
|
|
5731
5734
|
}
|
|
5732
5735
|
}
|
|
5733
|
-
}, this.
|
|
5736
|
+
}, this.We = function () { s._d = s.di(s.rowlist); }, this.di = function (e) {
|
|
5734
5737
|
for (var t = 0, n = 0; n < e.length; n++) {
|
|
5735
5738
|
var a = e[n];
|
|
5736
5739
|
a.top = t, t += a.height;
|
|
5737
5740
|
}
|
|
5738
5741
|
return t;
|
|
5739
|
-
}, this.
|
|
5742
|
+
}, this._e = function () { s.elements.cells = [], s.xb.cells = [], s.divCells.innerHTML = "", s.ei(); }, this.ei = function () { s.divLines.innerHTML = "", s.xb.linesVertical = {}, s.xb.linesHorizontal = {}, s.elements.linesVertical = []; }, this.of = function (e) {
|
|
5740
5743
|
var t = [];
|
|
5741
|
-
for (var n in s.
|
|
5742
|
-
t.push(s.
|
|
5743
|
-
t.filter(function (t) { return t && t.coords && t.coords.y === e; }).forEach(function (e) { s.
|
|
5744
|
-
}, this.
|
|
5745
|
-
if (this.
|
|
5746
|
-
var n = s.
|
|
5744
|
+
for (var n in s.xb.cells)
|
|
5745
|
+
t.push(s.xb.cells[n]);
|
|
5746
|
+
t.filter(function (t) { return t && t.coords && t.coords.y === e; }).forEach(function (e) { s.fb(e); });
|
|
5747
|
+
}, this.gd = function (e, t) {
|
|
5748
|
+
if (this.La) {
|
|
5749
|
+
var n = s.Ie(e);
|
|
5747
5750
|
if (n) {
|
|
5748
5751
|
var a = s.rowlist, i = s.divCells, o = e + "_" + t;
|
|
5749
|
-
if (!this.
|
|
5750
|
-
var l = this.
|
|
5752
|
+
if (!this.xb.cells[o]) {
|
|
5753
|
+
var l = this.fi(e, t), d = s.gi(e, t), c = r();
|
|
5751
5754
|
if (c.style.left = n.left + "px", c.style.top = a[t].top + "px", c.style.width = n.width + "px", c.style.height = a[t].height + "px", c.style.position = "absolute", l && l.backColor && (c.style.backgroundColor = l.backColor), c.className = this.L("_cell"), c.coords = {}, c.coords.x = e, c.coords.y = t, l) {
|
|
5752
|
-
if (l.cssClass && DayPilot.Util.addClass(c, l.cssClass), c.innerHTML = s
|
|
5755
|
+
if (l.cssClass && DayPilot.Util.addClass(c, l.cssClass), c.innerHTML = s.$a(l.text, l.html), l.backImage && (c.style.backgroundImage = 'url("' + l.backImage + '")'), l.backRepeat && (c.style.backgroundRepeat = l.backRepeat), l.business && s.cellsMarkBusiness && DayPilot.Util.addClass(c, s.L("_cell_business")), l.disabled && DayPilot.Util.addClass(c, s.L("_cell_disabled")), l.backColor && (c.style.backgroundColor = l.backColor), l.fontColor && (c.style.color = l.fontColor), l.horizontalAlignment || l.verticalAlignment) {
|
|
5753
5756
|
switch (c.style.display = "flex", l.horizontalAlignment) {
|
|
5754
5757
|
case "right":
|
|
5755
5758
|
c.style.justifyContent = "flex-end";
|
|
@@ -5769,7 +5772,7 @@ var DayPilot = { Global: {} };
|
|
|
5769
5772
|
case "bottom": c.style.alignItems = "flex-end";
|
|
5770
5773
|
}
|
|
5771
5774
|
}
|
|
5772
|
-
DayPilot.Areas.attach(c, d.cell, { "areas": l.areas
|
|
5775
|
+
DayPilot.Areas.attach(c, d.cell, { "areas": l.areas });
|
|
5773
5776
|
}
|
|
5774
5777
|
var u = { start: n.start, end: n.end, resource: a[t].id, div: c, properties: l, x: e, y: t };
|
|
5775
5778
|
!function () {
|
|
@@ -5778,61 +5781,61 @@ var DayPilot = { Global: {} };
|
|
|
5778
5781
|
if (e.control = s, e.cell = u, e.element = null, c.domArgs = e, "function" == typeof s.onBeforeCellDomAdd && s.onBeforeCellDomAdd(e), e.element) {
|
|
5779
5782
|
var t = c;
|
|
5780
5783
|
if (t) {
|
|
5781
|
-
e.
|
|
5784
|
+
e.Pa = t;
|
|
5782
5785
|
var n = DayPilot.Util.isReactComponent(e.element), a = DayPilot.Util.isVueVNode(e.element);
|
|
5783
5786
|
if (n) {
|
|
5784
|
-
if (!s.
|
|
5787
|
+
if (!s.bg.reactDOM)
|
|
5785
5788
|
throw new DayPilot.Exception("Can't reach ReactDOM");
|
|
5786
|
-
s.
|
|
5789
|
+
s.bg.Uc(e.element, t);
|
|
5787
5790
|
}
|
|
5788
5791
|
else if (a) {
|
|
5789
|
-
if (!s.
|
|
5792
|
+
if (!s.Ra.Qa)
|
|
5790
5793
|
throw new DayPilot.Exception("Can't reach Vue");
|
|
5791
|
-
s.Sa
|
|
5794
|
+
s.Ra.Sa = !0, s.Ra.Va(e.element, t), s.Ra.Sa = !1;
|
|
5792
5795
|
}
|
|
5793
5796
|
else
|
|
5794
5797
|
t.appendChild(e.element);
|
|
5795
5798
|
}
|
|
5796
5799
|
}
|
|
5797
5800
|
}
|
|
5798
|
-
}(), i.appendChild(c), this.elements.cells.push(c), this.
|
|
5801
|
+
}(), i.appendChild(c), this.elements.cells.push(c), this.xb.cells[o] = c;
|
|
5799
5802
|
}
|
|
5800
5803
|
}
|
|
5801
5804
|
}
|
|
5802
|
-
}, this.
|
|
5803
|
-
var n = s.
|
|
5805
|
+
}, this.gi = function (e, t) {
|
|
5806
|
+
var n = s.Ie(e);
|
|
5804
5807
|
if (!n)
|
|
5805
5808
|
return null;
|
|
5806
5809
|
var a = s.rowlist[t], i = a.id, r = n.start, o = n.end, l = {};
|
|
5807
|
-
if (l.cell = { x: e, y: t, start: r, end: o, resource: i, row: s.
|
|
5810
|
+
if (l.cell = { x: e, y: t, start: r, end: o, resource: i, row: s.zg(a), properties: s.fi(e, t) }, l.control = s, "function" == typeof this.onBeforeCellRender) {
|
|
5808
5811
|
var d = e + "_" + t;
|
|
5809
|
-
if (s.beforeCellRenderCaching && s.
|
|
5812
|
+
if (s.beforeCellRenderCaching && s.af[d])
|
|
5810
5813
|
return l;
|
|
5811
|
-
s.
|
|
5814
|
+
s.af[d] = !0, this.onBeforeCellRender(l);
|
|
5812
5815
|
}
|
|
5813
5816
|
return l;
|
|
5814
|
-
}, this.clearSelection = function () { this.
|
|
5817
|
+
}, this.clearSelection = function () { this.hi(); }, this.ii = function (e, t, n) {
|
|
5815
5818
|
e = new DayPilot.Date(e), t = new DayPilot.Date(t);
|
|
5816
|
-
var a = s.
|
|
5819
|
+
var a = s.ie(n), i = s.Ke(e);
|
|
5817
5820
|
if (!i.current)
|
|
5818
5821
|
throw new DayPilot.Exception("Time range selection 'start' out of timeline");
|
|
5819
|
-
var r = s.
|
|
5822
|
+
var r = s.Ke(new DayPilot.Date(t).addMilliseconds(-1));
|
|
5820
5823
|
if (!r.current)
|
|
5821
5824
|
throw new DayPilot.Exception("Time range selection 'end' out of timeline");
|
|
5822
5825
|
var o = {};
|
|
5823
5826
|
return o.start = { y: a.index, x: i.i, "time": e }, o.end = { x: r.i, "time": t }, o.calendar = this, o;
|
|
5824
|
-
}, this.selectTimeRange = function (e, t, n, a) { var i = s.
|
|
5827
|
+
}, this.selectTimeRange = function (e, t, n, a) { var i = s.ii(e, t, n); s.yf(i), a || setTimeout(function () { s.uf(i); }, 0); }, this.sf = function () { var e = t.ng && t.ng.source; e && DayPilot.Util.removeClass(e, s.L("_event_moving_source")), DayPilot.de(t.ng), t.ng = null, DayPilot.Global.movingLink && (DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = null); }, this.hi = function () { s.divShadow && (s.divShadow.innerHTML = ""), s.elements.range = [], s.elements.range2 = null, s.xf = null, s.ji = null; }, l.Kd = function () { delete s.xb.headerHeight; }, l.da = function () { return "Disabled" !== s.xssProtection; }, l.Fe = function () { return DayPilot.Locale.find(s.locale); }, l.Ph = function () { return "Auto" !== s.timeFormat ? s.timeFormat : l.Fe().timeFormat; }, l.ea = function () {
|
|
5825
5828
|
if ("Auto" === s.weekStarts) {
|
|
5826
|
-
var e = l.
|
|
5829
|
+
var e = l.Fe();
|
|
5827
5830
|
return e ? e.weekStarts : 0;
|
|
5828
5831
|
}
|
|
5829
5832
|
return s.weekStarts || 0;
|
|
5830
|
-
}, l.
|
|
5833
|
+
}, l.wg = function () { var e = navigator.userAgent.toLowerCase(); return e.indexOf("mobile") !== -1 || e.indexOf("android") != -1; }, l.dg = function (e) { return "Always" === s.useEventBoxes || "Never" !== s.useEventBoxes && e < 60 * s.Le() * 1e3; }, this.fi = function (e, t) {
|
|
5831
5834
|
var n = e + "_" + t, a = s.rowlist;
|
|
5832
5835
|
if (this.cellProperties || (this.cellProperties = {}), this.cellProperties[n])
|
|
5833
5836
|
return this.cellProperties[n];
|
|
5834
5837
|
if (!this.cellProperties[n]) {
|
|
5835
|
-
var i = a[t], r = i.id, o = s.
|
|
5838
|
+
var i = a[t], r = i.id, o = s.Ie(e), l = o.start, d = o.end, c = {};
|
|
5836
5839
|
c.start = l, c.end = d, c.resource = r;
|
|
5837
5840
|
var u = {};
|
|
5838
5841
|
u.business = s.isBusiness(c), this.cellProperties[n] = u;
|
|
@@ -5858,7 +5861,7 @@ var DayPilot = { Global: {} };
|
|
|
5858
5861
|
return !1;
|
|
5859
5862
|
}
|
|
5860
5863
|
return !0;
|
|
5861
|
-
}, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.
|
|
5864
|
+
}, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.ki = function (e) { this.heightSpec = "Fixed", this.height = e - (this.Be() + 2), this.ma(); }, this.setHeight = this.ki, this.ie = function (e) { return s.Dg(e)[0]; }, this.wb = function () {
|
|
5862
5865
|
if (this.id && this.id.tagName)
|
|
5863
5866
|
this.nav.top = this.id;
|
|
5864
5867
|
else {
|
|
@@ -5868,18 +5871,18 @@ var DayPilot = { Global: {} };
|
|
|
5868
5871
|
throw new DayPilot.Exception("DayPilot.Scheduler: The placeholder element not found: '" + a + "'.");
|
|
5869
5872
|
}
|
|
5870
5873
|
}, this.init = function () {
|
|
5871
|
-
if (this.
|
|
5874
|
+
if (this.La)
|
|
5872
5875
|
throw new DayPilot.Exception("This instance is already initialized. Use update() to change properties.");
|
|
5873
|
-
if (this.
|
|
5876
|
+
if (this.wb(), this.nav.top.dp) {
|
|
5874
5877
|
if (this.nav.top.dp === s)
|
|
5875
5878
|
return s;
|
|
5876
5879
|
throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.");
|
|
5877
5880
|
}
|
|
5878
|
-
return this.
|
|
5879
|
-
}, this.
|
|
5881
|
+
return this.li(), this.Zg(), this;
|
|
5882
|
+
}, this.li = function () { this.Lg(), this.pb(), this.ba(), this.hh(), this.qb(); var angular = s.ye.enabled; s.scrollToDate ? s.scrollTo(s.scrollToDate) : s.scrollX || s.scrollY ? s.setScroll(s.scrollX, s.scrollY) : angular || s.df(), s.scrollToResourceId && (s.scrollToResource(s.scrollToResourceId), s.scrollToResourceId = null); var e = function () { s.scrollY && s.setScroll(s.scrollX, s.scrollY); }; setTimeout(e, 200), this.bf(), this.vb(), this.La = !0; var t = s.fe; t ? s.scrollTo(t) : s.df(); }, this.ub = null, this.sb = function (e) {
|
|
5880
5883
|
if (e) {
|
|
5881
|
-
var t = { "resources": { "preInit": function () { var e = this.data; e && (s.resources = e); } }, "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); }, "postInit": function () { } }, "scrollTo": { "preInit": function () { }, "postInit": function () { this.data && s.
|
|
5882
|
-
s.
|
|
5884
|
+
var t = { "resources": { "preInit": function () { var e = this.data; e && (s.resources = e); } }, "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); }, "postInit": function () { } }, "scrollTo": { "preInit": function () { }, "postInit": function () { this.data && s.ee(this.data); } }, "scrollX": { "postInit": function () { this.data && s.he(this.data); } }, "scrollY": { "postInit": function () { this.data && s.Ae(this.data); } } };
|
|
5885
|
+
s.ub = t, s.ye.scrollToRequested && (t.scrollTo.data = s.ye.scrollToRequested, s.ye.scrollToRequested = null), s.ye.scrollXRequested && (t.scrollX.data = s.ye.scrollXRequested, s.ye.scrollXRequested = null), s.ye.scrollYRequested && (t.scrollY.data = s.ye.scrollYRequested, s.ye.scrollYRequested = null);
|
|
5883
5886
|
for (var n in e)
|
|
5884
5887
|
t[n] || (s[n] = e[n]);
|
|
5885
5888
|
for (var a in e)
|
|
@@ -5888,95 +5891,95 @@ var DayPilot = { Global: {} };
|
|
|
5888
5891
|
i.data = e[a], i.preInit && i.preInit();
|
|
5889
5892
|
}
|
|
5890
5893
|
}
|
|
5891
|
-
}, this.
|
|
5892
|
-
var e = s.
|
|
5894
|
+
}, this.vb = function () {
|
|
5895
|
+
var e = s.ub;
|
|
5893
5896
|
for (var t in e) {
|
|
5894
5897
|
var n = e[t];
|
|
5895
5898
|
n.postInit && n.postInit();
|
|
5896
5899
|
}
|
|
5897
|
-
s.
|
|
5898
|
-
}, this.
|
|
5899
|
-
var n = s.
|
|
5900
|
+
s.ub = {};
|
|
5901
|
+
}, this.bg = {}, this.bg.reactDOM = null, this.bg.react = null, this.bg.Uc = function (e, t) {
|
|
5902
|
+
var n = s.bg.reactDOM;
|
|
5900
5903
|
if ("function" == typeof n.createRoot) {
|
|
5901
|
-
var a = t.
|
|
5902
|
-
a || (a = n.createRoot(t), t.
|
|
5904
|
+
var a = t.mi;
|
|
5905
|
+
a || (a = n.createRoot(t), t.mi = a), a.render(e);
|
|
5903
5906
|
}
|
|
5904
5907
|
else
|
|
5905
5908
|
n.render(e, t);
|
|
5906
|
-
}, this.
|
|
5907
|
-
var t = s.
|
|
5909
|
+
}, this.bg.mh = function (e) {
|
|
5910
|
+
var t = s.bg.reactDOM;
|
|
5908
5911
|
if ("function" == typeof t.createRoot) {
|
|
5909
|
-
var n = e.
|
|
5910
|
-
setTimeout(function () { n.unmount(), e.
|
|
5912
|
+
var n = e.mi;
|
|
5913
|
+
setTimeout(function () { n.unmount(), e.mi = null; }, 0);
|
|
5911
5914
|
}
|
|
5912
5915
|
else
|
|
5913
5916
|
t.unmountComponentAtNode(e);
|
|
5914
|
-
}, this.
|
|
5915
|
-
var a = s.
|
|
5917
|
+
}, this.Ra = {}, this.Ra.Qa = null, this.Ra.Lb = function (e, t, n) {
|
|
5918
|
+
var a = s.Ra.Qa;
|
|
5916
5919
|
if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
5917
5920
|
var i = a.createVNode(e, n);
|
|
5918
5921
|
a.render(i, t);
|
|
5919
5922
|
}
|
|
5920
|
-
}, this.
|
|
5921
|
-
var n = s.
|
|
5923
|
+
}, this.Ra.Va = function (e, t) {
|
|
5924
|
+
var n = s.Ra.Qa;
|
|
5922
5925
|
if ("function" == typeof n.render) {
|
|
5923
5926
|
var a = e;
|
|
5924
5927
|
DayPilot.isArray(e) && (a = n.h("div", null, e)), n.render(a, t);
|
|
5925
5928
|
}
|
|
5926
|
-
}, this.
|
|
5929
|
+
}, this.Ra.Ta = function (e) { var t = s.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.adjustEndIn = s.pf, this.internal.adjustEndNormalize = s.qf, this.internal.xssTextHtml = s.$a, this.internal.touch = s.be, this.internal.skipUpdate = s.ye.skipUpdate, this.internal.skipped = s.ye.skipped, this.internal.loadOptions = s.sb, this.internal.postInit = s.vb, this.internal.enableAngular2 = function () { s.ye.enabled = !0; }, this.internal.eventsFromAttr = function () { s.ye.Tf = !0; }, this.internal.resourcesFromAttr = function () { s.ye.ag = !0; }, this.internal.evImmediateRefresh = function () { s.events.tf(); }, this.internal.enableReact = function (e, t) { s.bg.react = e, s.bg.reactDOM = t; }, this.internal.reactRefs = function () { return DayPilot.Util.copyProps(s.bg, {}, ["react", "reactDOM"]); }, this.internal.enableVue = function (e) { s.Ra.Qa = e; }, this.internal.vueRef = function () { return s.Ra.Qa; }, this.internal.vueRendering = function () { return s.Ra.Sa; }, this.sb(o);
|
|
5927
5930
|
}, a = "${v}" === (new DayPilot.Scheduler).v, DayPilot.Row = function (e, t) {
|
|
5928
5931
|
if (!e)
|
|
5929
5932
|
throw new DayPilot.Exception("Now row object supplied when creating DayPilot.Row");
|
|
5930
5933
|
if (!t)
|
|
5931
5934
|
throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row");
|
|
5932
|
-
this.
|
|
5933
|
-
var n = this.
|
|
5935
|
+
this.ni = {};
|
|
5936
|
+
var n = this.ni;
|
|
5934
5937
|
n.id = e.id, n.name = e.name, n.data = e.resource, n.tags = e.tags;
|
|
5935
5938
|
var a = this;
|
|
5936
|
-
a.isRow = !0, a.menuType = "resource", a.name = e.name, a.id = e.id, a.tags = e.tags, a.index = e.index, a.calendar = t, a.data = e.resource, a.
|
|
5937
|
-
for (var e = [], t = 0; t < a.
|
|
5938
|
-
e.push(a.
|
|
5939
|
+
a.isRow = !0, a.menuType = "resource", a.name = e.name, a.id = e.id, a.tags = e.tags, a.index = e.index, a.calendar = t, a.data = e.resource, a.oi = e, a.$ = {}, a.$.row = e, a.toJSON = function () { var e = {}; return e.start = this.start, e.name = this.name, e.id = this.id, e.index = this.index, e; }, a.events = {}, a.events.all = function () {
|
|
5940
|
+
for (var e = [], t = 0; t < a.oi.events.length; t++)
|
|
5941
|
+
e.push(a.oi.events[t]);
|
|
5939
5942
|
return e;
|
|
5940
|
-
}, a.events.isEmpty = function () { return 0 === a.
|
|
5941
|
-
}, t.
|
|
5942
|
-
if (t.
|
|
5943
|
-
var n = t.
|
|
5944
|
-
n.coords = n.
|
|
5943
|
+
}, a.events.isEmpty = function () { return 0 === a.oi.events.length; }, a.events.forRange = function (e, t) { return a.oi.events.forRange(e, t); }, a.events.totalDuration = function () { var e = 0; return a.events.all().forEach(function (t) { e += t.part.end.getTime() - t.part.start.getTime(); }), new DayPilot.Duration(e); }, a.remove = function () { t.rows.remove(a); }, a.addClass = function (e) { var n = t.divHeader, i = n.rows[a.index]; DayPilot.Util.addClass(i, e), a.$.row.cssClass = DayPilot.Util.addClassToString(a.$.row.cssClass, e), a.data.cssClass = e; }, a.removeClass = function (e) { var n = t.divHeader, i = n.rows[a.index]; DayPilot.Util.removeClass(i, e), a.$.row.cssClass = DayPilot.Util.removeClassFromString(a.$.row.cssClass, e), a.data.cssClass = DayPilot.Util.removeClassFromString(a.data.cssClass, e); };
|
|
5944
|
+
}, t.Oe = null, t.mg = null, t.Dh = null, t.fg = null, t.jg = null, t.Ne = !1, t.eh = !1, t.Vh = null, t.pi = null, t.pc = function () { DayPilot.ue(document, "mouseup", t.$d), DayPilot.ue(document, "touchmove", t.fh), DayPilot.ue(document, "touchend", t.gh), t.eh = !1; }, t.fh = function (e) {
|
|
5945
|
+
if (t.fg) {
|
|
5946
|
+
var n = t.fg.event.calendar;
|
|
5947
|
+
n.coords = n.be.Hh(e), n.be.Mh(), e.preventDefault();
|
|
5945
5948
|
}
|
|
5946
|
-
if (t.
|
|
5949
|
+
if (t.Oe) {
|
|
5947
5950
|
e.preventDefault();
|
|
5948
|
-
var n = t.
|
|
5949
|
-
n.coords = n.
|
|
5951
|
+
var n = t.mg.calendar;
|
|
5952
|
+
n.coords = n.be.Hh(e), n.be.Nh();
|
|
5950
5953
|
}
|
|
5951
|
-
}, t.
|
|
5952
|
-
if (t.
|
|
5953
|
-
var a = function () { var e = t.
|
|
5954
|
-
if (setTimeout(function () { t.
|
|
5954
|
+
}, t.gh = function (e) { t.Vg = !1, t.$d(e); }, t.$d = function (e) {
|
|
5955
|
+
if (t.fg) {
|
|
5956
|
+
var a = function () { var e = t.jg, n = e.calendar; i().style.cursor = "", t.fg = null, t.jg = null, DayPilot.de(t.ig), t.ig = null, n && (n.qi = null); };
|
|
5957
|
+
if (setTimeout(function () { t.Ne = !1; }), !t.ig)
|
|
5955
5958
|
return void a();
|
|
5956
|
-
var r = t.
|
|
5959
|
+
var r = t.jg, o = r.calendar, s = t.ig.start, l = t.ig.end, d = "left" === t.fg.dpBorder ? "start" : "end";
|
|
5957
5960
|
a(), o.K(r, s, l, d);
|
|
5958
5961
|
}
|
|
5959
|
-
else if (t.
|
|
5960
|
-
var a = function () { DayPilot.Global.movingAreaData = null; var e = t.
|
|
5961
|
-
if (!t.
|
|
5962
|
+
else if (t.mg) {
|
|
5963
|
+
var a = function () { DayPilot.Global.movingAreaData = null; var e = t.ng && t.ng.calendar; t.ng && (DayPilot.de(t.ng), t.ng.calendar = null), i().style.cursor = "", t.Oe = null, t.mg = null, e && (e.rf = null); };
|
|
5964
|
+
if (!t.ng)
|
|
5962
5965
|
return void a();
|
|
5963
|
-
var r = t.
|
|
5966
|
+
var r = t.mg, o = t.ng.calendar;
|
|
5964
5967
|
if (!o)
|
|
5965
5968
|
return void a();
|
|
5966
|
-
if (t.
|
|
5969
|
+
if (t.ng.source = t.Oe, !t.ng.row)
|
|
5967
5970
|
return void a();
|
|
5968
|
-
var s = t.
|
|
5969
|
-
t.
|
|
5971
|
+
var s = t.ng.start, l = t.ng.end, c = t.ng.row.id;
|
|
5972
|
+
t.ng.calendar = null, i().style.cursor = "", t.Oe = null, t.mg = null, o.M(r, s, l, c, e), DayPilot.Global.movingAreaData = null;
|
|
5970
5973
|
}
|
|
5971
|
-
else if (t.
|
|
5972
|
-
var u = DayPilot.Util.mouseButton(e), h = t.
|
|
5973
|
-
if (f.
|
|
5974
|
-
return clearTimeout(t.
|
|
5975
|
-
f.
|
|
5976
|
-
var v = function (e) { return function () { t.
|
|
5977
|
-
return a(), u.left ? (v(p)(), e.cancelBubble = !0, !1) : void (t.
|
|
5974
|
+
else if (t.Kh) {
|
|
5975
|
+
var u = DayPilot.Util.mouseButton(e), h = t.Kh, f = h.calendar, a = function () { };
|
|
5976
|
+
if (f.ji = null, t.Vh)
|
|
5977
|
+
return clearTimeout(t.Vh), t.Vh = null, void a();
|
|
5978
|
+
f.xf = h, t.Kh = null;
|
|
5979
|
+
var v = function (e) { return function () { t.Vh = null, f.uf(e), "Hold" !== f.timeRangeSelectedHandling && "HoldForever" !== f.timeRangeSelectedHandling ? n() : f.xf = e; }; }, p = f.Zh(h);
|
|
5980
|
+
return a(), u.left ? (v(p)(), e.cancelBubble = !0, !1) : void (t.Vh = null);
|
|
5978
5981
|
}
|
|
5979
|
-
t.
|
|
5982
|
+
t.Gh = null, t.eg = null;
|
|
5980
5983
|
};
|
|
5981
5984
|
}
|
|
5982
5985
|
}(DayPilot);
|