@daypilot/daypilot-lite-angular 3.22.2 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/core/daypilot-core.mjs +401 -389
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +477 -447
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +400 -388
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/lib/core/daypilot-core.d.ts +5 -2
- package/package.json +1 -1
|
@@ -130,7 +130,7 @@ DayPilot Lite
|
|
|
130
130
|
Copyright (c) 2005 - 2024 Annpoint s.r.o.
|
|
131
131
|
https://www.daypilot.org/
|
|
132
132
|
Licensed under Apache Software License 2.0
|
|
133
|
-
Version: 2024.
|
|
133
|
+
Version: 2024.3.539-lite
|
|
134
134
|
*/
|
|
135
135
|
var DayPilot = {};
|
|
136
136
|
if ("undefined" == typeof DayPilot)
|
|
@@ -988,14 +988,20 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
988
988
|
if (this instanceof t.Calendar && !this.M && (a = !0, this.M = !0), !a)
|
|
989
989
|
throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
|
|
990
990
|
var n = this;
|
|
991
|
-
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.
|
|
991
|
+
this.uniqueID = null, this.isCalendar = !0, this.v = "2024.3.539-lite", this.id = e, this.clientName = e, this.cache = {}, this.cache.pixels = {}, this.elements = {}, this.elements.events = [], this.elements.selection = [], this.nav = {}, this.afterRender = function () { }, this.fasterDispose = !0, this.angularAutoApply = !1, this.api = 2, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.cellHeight = 30, this.columnMarginRight = 5, this.columnsLoadMethod = "GET", this.contextMenu = null, this.days = 1, this.durationBarVisible = !0, this.eventsLoadMethod = "GET", this.headerDateFormat = null, this.headerHeight = 30, this.headerTextWrappingEnabled = !1, this.height = 300, this.heightSpec = "BusinessHours", this.hideUntilInit = !0, this.hourWidth = 60, this.initScrollPos = "Auto", this.loadingLabelHtml = null, this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.locale = "en-us", this.showToolTip = !0, this.startDate = (new DayPilot.Date).getDatePart(), this.cssClassPrefix = "calendar_default", this.theme = null, this.timeFormat = "Auto", this.viewType = "Days", this.visible = !0, this.xssProtection = "Enabled", this.headerClickHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.eventMoveHandling = "Update", this.eventDeleteHandling = "Disabled", this.timeRangeSelectedHandling = "Enabled", this.onBeforeCellRender = null, this.onBeforeEventRender = null, this.onEventClick = null, this.onEventClicked = null, this.onEventDelete = null, this.onEventDeleted = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onHeaderClick = null, this.onHeaderClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.N = !1, this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.O(); }, this.O = function () { DayPilot.de(n.elements.selection), n.elements.selection = [], n.nav.activeSelection = null; }, this.cleanSelection = this.clearSelection, this.P = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var o = "JSON" + DayPilot.JSON.stringify(a); __doPostBack(n.uniqueID, o); }, this.R = function (e, t, i) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.callbackTimeout = window.setTimeout(function () { n.loadingStart(); }, 100); var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var o = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, o, this.ajaxError) : "function" == typeof WebForm_DoCallback && WebForm_DoCallback(this.uniqueID, o, this.T, this.clientName, this.onCallbackError, !0); }, this.onCallbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.dispose = function () { var e = n; e.N || (e.N = !0, clearInterval(e.U), e.V(), e.nav.scroll.root = null, DayPilot.pu(e.nav.loading), e.W(), e.X(), e.nav.select = null, e.nav.cornerRight = null, e.nav.scrollable = null, e.nav.zoom = null, e.nav.loading = null, e.nav.header = null, e.nav.hourTable = null, e.nav.scrolltop = null, e.nav.scroll.onscroll = null, e.nav.scroll = null, e.nav.main = null, e.nav.message = null, e.nav.messageClose = null, e.nav.top = null, t.unregister(e)); }, this.disposed = function () { return this.N; }, this.Y = function () { this.nav.top.dispose = this.dispose; }, this.S = function (e) { n.T(e.responseText); }, this.Q = function () { var e = {}; return e.control = "dpc", e.id = this.id, e.v = this.v, e.days = n.days, e.startDate = n.startDate, e.heightSpec = n.heightSpec, e.businessBeginsHour = n.businessBeginsHour, e.businessEndsHour = n.businessEndsHour, e.hashes = n.hashes, e.timeFormat = n.timeFormat, e.viewType = n.viewType, e.locale = n.locale, e; }, this.Z = function (e, t) {
|
|
992
992
|
for (var i = e.parentNode; i && "TD" !== i.tagName;)
|
|
993
993
|
i = i.parentNode;
|
|
994
994
|
var a = document.createElement("div");
|
|
995
995
|
a.setAttribute("unselectable", "on"), a.style.position = "absolute", a.style.width = e.offsetWidth + "px", a.style.height = e.offsetHeight + "px", a.style.left = e.offsetLeft + "px", a.style.top = e.offsetTop + "px", a.style.boxSizing = "border-box", a.style.zIndex = 101, a.className = n.J("_shadow");
|
|
996
996
|
var o = document.createElement("div");
|
|
997
997
|
return o.className = n.J("_shadow_inner"), a.appendChild(o), i.firstChild.appendChild(a), a;
|
|
998
|
-
}, this._ = {}, this._.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this._.timeFormat = function () { return "Auto" !== n.timeFormat ? n.timeFormat : this.locale().timeFormat; }, this._.aa = function () { return "Disabled" !== n.xssProtection; }
|
|
998
|
+
}, this._ = {}, this._.locale = function () { var e = DayPilot.Locale.find(n.locale); return e ? e : DayPilot.Locale.US; }, this._.timeFormat = function () { return "Auto" !== n.timeFormat ? n.timeFormat : this.locale().timeFormat; }, this._.aa = function () { return "Disabled" !== n.xssProtection; }, this._.ba = function () {
|
|
999
|
+
if ("Auto" === n.weekStarts) {
|
|
1000
|
+
var e = o.locale();
|
|
1001
|
+
return e ? e.weekStarts : 0;
|
|
1002
|
+
}
|
|
1003
|
+
return n.weekStarts || 0;
|
|
1004
|
+
};
|
|
999
1005
|
var o = this._;
|
|
1000
1006
|
this.T = function (e, t) {
|
|
1001
1007
|
if (e && 0 === e.indexOf("$$$")) {
|
|
@@ -1008,15 +1014,15 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1008
1014
|
return void (document.location.href = e.CallBackRedirect);
|
|
1009
1015
|
if ("None" === e.UpdateType)
|
|
1010
1016
|
return n.loadingStop(), void n.s();
|
|
1011
|
-
if (n.V(), "Full" === e.UpdateType && (n.columns = e.Columns, n.days = e.Days, n.startDate = new DayPilot.Date(e.StartDate), n.heightSpec = e.HeightSpec ? e.HeightSpec : n.heightSpec, n.businessBeginsHour = e.BusinessBeginsHour ? e.BusinessBeginsHour : n.businessBeginsHour, n.businessEndsHour = e.BusinessEndsHour ? e.BusinessEndsHour : n.businessEndsHour, n.headerDateFormat = e.HeaderDateFormat ? e.HeaderDateFormat : n.headerDateFormat, n.viewType = e.ViewType, n.backColor = e.BackColor ? e.BackColor : n.backColor, n.eventHeaderVisible = e.EventHeaderVisible ? e.EventHeaderVisible : n.eventHeaderVisible, n.timeFormat = e.TimeFormat ? e.TimeFormat : n.timeFormat, n.locale = e.Locale ? e.Locale : n.locale, n.
|
|
1017
|
+
if (n.V(), "Full" === e.UpdateType && (n.columns = e.Columns, n.days = e.Days, n.startDate = new DayPilot.Date(e.StartDate), n.heightSpec = e.HeightSpec ? e.HeightSpec : n.heightSpec, n.businessBeginsHour = e.BusinessBeginsHour ? e.BusinessBeginsHour : n.businessBeginsHour, n.businessEndsHour = e.BusinessEndsHour ? e.BusinessEndsHour : n.businessEndsHour, n.headerDateFormat = e.HeaderDateFormat ? e.HeaderDateFormat : n.headerDateFormat, n.viewType = e.ViewType, n.backColor = e.BackColor ? e.BackColor : n.backColor, n.eventHeaderVisible = e.EventHeaderVisible ? e.EventHeaderVisible : n.eventHeaderVisible, n.timeFormat = e.TimeFormat ? e.TimeFormat : n.timeFormat, n.locale = e.Locale ? e.Locale : n.locale, n.ca()), e.Hashes)
|
|
1012
1018
|
for (var i in e.Hashes)
|
|
1013
1019
|
n.hashes[i] = e.Hashes[i];
|
|
1014
|
-
n.events.list = e.Events, n.
|
|
1015
|
-
}, this.
|
|
1020
|
+
n.events.list = e.Events, n.da(), n.ea(), "Full" === e.UpdateType && (n.fa(), n.ga(), n.ha(), n.ia()), n.s(), n.ja(), n.clearSelection(), n.afterRender(e.CallBackData, !0), n.loadingStop();
|
|
1021
|
+
}, this.ka = function () { return this.la() / 36e5; }, this.ma = function () { return this.businessBeginsHour > this.businessEndsHour ? 24 - this.businessBeginsHour + this.businessEndsHour : this.businessEndsHour - this.businessBeginsHour; }, this.na = function () { return this.la() / 18e5; }, this.la = function () { var e = 0; return e = "BusinessHoursNoScroll" === this.heightSpec ? this.ma() : 24, 60 * e * 60 * 1e3; }, this.oa = function () { return "BusinessHoursNoScroll" === this.heightSpec ? this.businessBeginsHour : 0; }, this.pa = function () { return 2 === n.api; }, this.eventClickCallBack = function (e, t) { this.R("EventClick", t, e); }, this.eventClickPostBack = function (e, t) { this.P("EventClick", t, e); }, this.qa = function (e) {
|
|
1016
1022
|
var t = this, i = t.event;
|
|
1017
|
-
if (n.
|
|
1023
|
+
if (n.pa()) {
|
|
1018
1024
|
var a = {};
|
|
1019
|
-
if (a.e = i, a.originalEvent = e, a.meta = e.metaKey, a.ctrl = e.ctrlKey, a.control = n, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventClick && (n.
|
|
1025
|
+
if (a.e = i, a.originalEvent = e, a.meta = e.metaKey, a.ctrl = e.ctrlKey, a.control = n, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventClick && (n.ra.apply(function () { n.onEventClick(a); }), a.preventDefault.value))
|
|
1020
1026
|
return;
|
|
1021
1027
|
switch (n.eventClickHandling) {
|
|
1022
1028
|
case "CallBack":
|
|
@@ -1029,7 +1035,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1029
1035
|
var o = i.client.contextMenu();
|
|
1030
1036
|
o ? o.show(i) : n.contextMenu && n.contextMenu.show(i);
|
|
1031
1037
|
}
|
|
1032
|
-
"function" == typeof n.onEventClicked && n.
|
|
1038
|
+
"function" == typeof n.onEventClicked && n.ra.apply(function () { n.onEventClicked(a); });
|
|
1033
1039
|
}
|
|
1034
1040
|
else
|
|
1035
1041
|
switch (n.eventClickHandling) {
|
|
@@ -1041,7 +1047,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1041
1047
|
break;
|
|
1042
1048
|
case "JavaScript": n.onEventClick(i);
|
|
1043
1049
|
}
|
|
1044
|
-
}, this.
|
|
1050
|
+
}, this.sa = function (e) {
|
|
1045
1051
|
var t = this.event;
|
|
1046
1052
|
if (e.stopPropagation && e.stopPropagation(), !t.client.rightClickEnabled())
|
|
1047
1053
|
return !1;
|
|
@@ -1054,10 +1060,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1054
1060
|
a ? a.show(t) : n.contextMenu && n.contextMenu.show(this.event);
|
|
1055
1061
|
}
|
|
1056
1062
|
return "function" == typeof n.onEventRightClicked && n.onEventRightClicked(i), e.preventDefault && e.preventDefault(), !1;
|
|
1057
|
-
}, this.eventDeleteCallBack = function (e, t) { this.R("EventDelete", t, e); }, this.eventDeletePostBack = function (e, t) { this.P("EventDelete", t, e); }, this.
|
|
1058
|
-
if (n.
|
|
1063
|
+
}, this.eventDeleteCallBack = function (e, t) { this.R("EventDelete", t, e); }, this.eventDeletePostBack = function (e, t) { this.P("EventDelete", t, e); }, this.ta = function (e) {
|
|
1064
|
+
if (n.pa()) {
|
|
1059
1065
|
var t = {};
|
|
1060
|
-
if (t.e = e, t.control = n, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventDelete && (n.
|
|
1066
|
+
if (t.e = e, t.control = n, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventDelete && (n.ra.apply(function () { n.onEventDelete(t); }), t.preventDefault.value))
|
|
1061
1067
|
return;
|
|
1062
1068
|
switch (n.eventDeleteHandling) {
|
|
1063
1069
|
case "CallBack":
|
|
@@ -1068,7 +1074,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1068
1074
|
break;
|
|
1069
1075
|
case "Update": n.events.remove(e);
|
|
1070
1076
|
}
|
|
1071
|
-
"function" == typeof n.onEventDeleted && n.
|
|
1077
|
+
"function" == typeof n.onEventDeleted && n.ra.apply(function () { n.onEventDeleted(t); });
|
|
1072
1078
|
}
|
|
1073
1079
|
else
|
|
1074
1080
|
switch (n.eventDeleteHandling) {
|
|
@@ -1097,16 +1103,16 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1097
1103
|
}, this.I = function (e, t, i, a) {
|
|
1098
1104
|
var o = 1, r = new Date, s = new Date, l = e.start(), d = e.end();
|
|
1099
1105
|
if ("top" === a) {
|
|
1100
|
-
var c = l.getDatePart(), u = Math.floor((i - o) / n.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * n.
|
|
1106
|
+
var c = l.getDatePart(), u = Math.floor((i - o) / n.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * n.oa() * 60 * 1e3;
|
|
1101
1107
|
r = c.addTime(f + m), s = e.end();
|
|
1102
1108
|
}
|
|
1103
1109
|
else if ("bottom" === a) {
|
|
1104
|
-
var c = d.getDatePart(), u = Math.floor((i + t - o) / n.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * n.
|
|
1110
|
+
var c = d.getDatePart(), u = Math.floor((i + t - o) / n.cellHeight), h = 30 * u, f = 60 * h * 1e3, m = 60 * n.oa() * 60 * 1e3;
|
|
1105
1111
|
r = l, s = c.addTime(f + m);
|
|
1106
1112
|
}
|
|
1107
|
-
if (n.
|
|
1113
|
+
if (n.pa()) {
|
|
1108
1114
|
var p = {};
|
|
1109
|
-
if (p.e = e, p.control = n, p.newStart = r, p.newEnd = s, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventResize && (n.
|
|
1115
|
+
if (p.e = e, p.control = n, p.newStart = r, p.newEnd = s, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventResize && (n.ra.apply(function () { n.onEventResize(p); }), p.preventDefault.value))
|
|
1110
1116
|
return;
|
|
1111
1117
|
switch (n.eventResizeHandling) {
|
|
1112
1118
|
case "PostBack":
|
|
@@ -1117,7 +1123,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1117
1123
|
break;
|
|
1118
1124
|
case "Update": e.start(r), e.end(s), n.events.update(e);
|
|
1119
1125
|
}
|
|
1120
|
-
"function" == typeof n.onEventResized && n.
|
|
1126
|
+
"function" == typeof n.onEventResized && n.ra.apply(function () { n.onEventResized(p); });
|
|
1121
1127
|
}
|
|
1122
1128
|
else
|
|
1123
1129
|
switch (n.eventResizeHandling) {
|
|
@@ -1146,12 +1152,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1146
1152
|
}, this.K = function (e, t, i, a) {
|
|
1147
1153
|
var o = 1, r = Math.floor((i - o) / n.cellHeight), s = 30 * r * 60 * 1e3, l = e.start(), d = e.end(), c = new Date;
|
|
1148
1154
|
l instanceof DayPilot.Date && (l = l.toDate()), c.setTime(Date.UTC(l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()));
|
|
1149
|
-
var u = l.getTime() - (c.getTime() + 3600 * l.getUTCHours() * 1e3 + 30 * Math.floor(l.getUTCMinutes() / 30) * 60 * 1e3), h = d.getTime() - l.getTime(), f = this.
|
|
1155
|
+
var u = l.getTime() - (c.getTime() + 3600 * l.getUTCHours() * 1e3 + 30 * Math.floor(l.getUTCMinutes() / 30) * 60 * 1e3), h = d.getTime() - l.getTime(), f = this.ua[t], m = f.id, p = f.start.getTime(), v = new Date;
|
|
1150
1156
|
v.setTime(p + s + u);
|
|
1151
1157
|
var y = new DayPilot.Date(v), g = y.addTime(h);
|
|
1152
|
-
if (n.
|
|
1158
|
+
if (n.pa()) {
|
|
1153
1159
|
var b = {};
|
|
1154
|
-
if (b.e = e, b.newStart = y, b.newEnd = g, b.newResource = m, b.ctrl = a.ctrlKey, b.shift = a.shiftKey, b.control = n, b.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventMove && (n.
|
|
1160
|
+
if (b.e = e, b.newStart = y, b.newEnd = g, b.newResource = m, b.ctrl = a.ctrlKey, b.shift = a.shiftKey, b.control = n, b.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onEventMove && (n.ra.apply(function () { n.onEventMove(b); }), b.preventDefault.value))
|
|
1155
1161
|
return;
|
|
1156
1162
|
switch (n.eventMoveHandling) {
|
|
1157
1163
|
case "PostBack":
|
|
@@ -1162,7 +1168,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1162
1168
|
break;
|
|
1163
1169
|
case "Update": e.start(y), e.end(g), e.resource(m), n.events.update(e);
|
|
1164
1170
|
}
|
|
1165
|
-
"function" == typeof n.onEventMoved && n.
|
|
1171
|
+
"function" == typeof n.onEventMoved && n.ra.apply(function () { n.onEventMoved(b); });
|
|
1166
1172
|
}
|
|
1167
1173
|
else
|
|
1168
1174
|
switch (n.eventMoveHandling) {
|
|
@@ -1175,9 +1181,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1175
1181
|
case "JavaScript": n.onEventMove(e, y, g, f.id, !1);
|
|
1176
1182
|
}
|
|
1177
1183
|
}, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, this.P("TimeRangeSelected", a, n); }, this.timeRangeSelectedCallBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, this.R("TimeRangeSelected", a, n); }, this.L = function (e, t, i) {
|
|
1178
|
-
if (e = new DayPilot.Date(e), t = new DayPilot.Date(t), this.
|
|
1184
|
+
if (e = new DayPilot.Date(e), t = new DayPilot.Date(t), this.pa()) {
|
|
1179
1185
|
var a = {};
|
|
1180
|
-
if (a.start = e, a.end = t, a.resource = i, a.control = n, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onTimeRangeSelect && (n.
|
|
1186
|
+
if (a.start = e, a.end = t, a.resource = i, a.control = n, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onTimeRangeSelect && (n.ra.apply(function () { n.onTimeRangeSelect(a); }), a.preventDefault.value))
|
|
1181
1187
|
return;
|
|
1182
1188
|
switch (n.timeRangeSelectedHandling) {
|
|
1183
1189
|
case "PostBack":
|
|
@@ -1185,7 +1191,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1185
1191
|
break;
|
|
1186
1192
|
case "CallBack": n.timeRangeSelectedCallBack(e, t);
|
|
1187
1193
|
}
|
|
1188
|
-
"function" == typeof n.onTimeRangeSelected && n.
|
|
1194
|
+
"function" == typeof n.onTimeRangeSelected && n.ra.apply(function () { n.onTimeRangeSelected(a); });
|
|
1189
1195
|
}
|
|
1190
1196
|
else
|
|
1191
1197
|
switch (n.timeRangeSelectedHandling) {
|
|
@@ -1197,13 +1203,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1197
1203
|
break;
|
|
1198
1204
|
case "JavaScript": n.onTimeRangeSelected(e, t);
|
|
1199
1205
|
}
|
|
1200
|
-
}, this.
|
|
1206
|
+
}, this.va = function (e) {
|
|
1201
1207
|
if (!t.selecting && "Disabled" !== n.timeRangeSelectedHandling) {
|
|
1202
1208
|
var i = e.which;
|
|
1203
1209
|
if (1 === i || 0 === i)
|
|
1204
|
-
return t.firstMousePos = DayPilot.mc(e), t.selecting = {}, t.selecting.calendar = n, t.selectedCells && (n.clearSelection(), t.selectedCells = []), t.column = t.getColumn(this), t.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, n.
|
|
1210
|
+
return t.firstMousePos = DayPilot.mc(e), t.selecting = {}, t.selecting.calendar = n, t.selectedCells && (n.clearSelection(), t.selectedCells = []), t.column = t.getColumn(this), t.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, n.wa(), !1;
|
|
1205
1211
|
}
|
|
1206
|
-
}, this.
|
|
1212
|
+
}, this.wa = function () {
|
|
1207
1213
|
this.getSelection();
|
|
1208
1214
|
!function () {
|
|
1209
1215
|
var e = t.topSelectedCell, i = t.bottomSelectedCell, a = function () {
|
|
@@ -1213,7 +1219,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1213
1219
|
if (t[i] === e)
|
|
1214
1220
|
return i;
|
|
1215
1221
|
return -1;
|
|
1216
|
-
}(), o = n.
|
|
1222
|
+
}(), o = n.ua[a];
|
|
1217
1223
|
if (o) {
|
|
1218
1224
|
var r = o.start, s = n.getPixels(e.start, r).boxTop, l = n.getPixels(i.end, r).boxBottom, d = l - s, c = function () {
|
|
1219
1225
|
if (n.nav.activeSelection)
|
|
@@ -1226,12 +1232,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1226
1232
|
c.className = n.J("_shadow"), c.firstChild.innerHTML = "", c.style.top = s + "px", c.style.height = d + "px";
|
|
1227
1233
|
}
|
|
1228
1234
|
}();
|
|
1229
|
-
}, this.
|
|
1235
|
+
}, this.xa = function (e) {
|
|
1230
1236
|
if ("undefined" != typeof t && t.selecting) {
|
|
1231
1237
|
var i = DayPilot.mc(e);
|
|
1232
|
-
t.getColumn(this) === t.column && (n.clearSelection(), i.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(this), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(this), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), n.
|
|
1238
|
+
t.getColumn(this) === t.column && (n.clearSelection(), i.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(this), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(this), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), n.wa());
|
|
1233
1239
|
}
|
|
1234
|
-
}, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end, a = t.topSelectedCell.resource; return new DayPilot.Selection(e, i, a, n); }, this.
|
|
1240
|
+
}, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end, a = t.topSelectedCell.resource; return new DayPilot.Selection(e, i, a, n); }, this.ya = function (e) {
|
|
1235
1241
|
if (e < 0)
|
|
1236
1242
|
return null;
|
|
1237
1243
|
for (var t = 0, i = n.nav.events.rows[0].cells, a = 0; a < i.length; a++) {
|
|
@@ -1239,11 +1245,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1239
1245
|
return a;
|
|
1240
1246
|
}
|
|
1241
1247
|
return null;
|
|
1242
|
-
}, this.
|
|
1248
|
+
}, this.za = {}, this.za.getCellCoords = function () {
|
|
1243
1249
|
var e = {};
|
|
1244
1250
|
if (e.x = 0, e.y = 0, !n.coords)
|
|
1245
1251
|
return null;
|
|
1246
|
-
e.x = n.
|
|
1252
|
+
e.x = n.ya(n.coords.x);
|
|
1247
1253
|
var t = 0, i = Math.floor((n.coords.y - t) / n.cellHeight);
|
|
1248
1254
|
return e.y = i, e.x < 0 ? null : e;
|
|
1249
1255
|
}, this.columns = {}, this.columns.list = [], this.columns.load = function (e, t, i) {
|
|
@@ -1262,18 +1268,18 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1262
1268
|
var s = {};
|
|
1263
1269
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1264
1270
|
return;
|
|
1265
|
-
n.columns.list = i, n.
|
|
1271
|
+
n.columns.list = i, n.Aa && n.update();
|
|
1266
1272
|
}
|
|
1267
1273
|
};
|
|
1268
1274
|
n.columnsLoadMethod && "POST" === n.columnsLoadMethod.toUpperCase() ? DayPilot.ajax({ "method": "POST", "url": e, "success": o, "error": a }) : DayPilot.ajax({ "method": "GET", "url": e, "success": o, "error": a });
|
|
1269
|
-
}, this.
|
|
1275
|
+
}, this.ca = function () {
|
|
1270
1276
|
var e;
|
|
1271
|
-
e = "Resources" !== n.viewType ? this.
|
|
1277
|
+
e = "Resources" !== n.viewType ? this.Ba() : n.columns.list, this.ua = [];
|
|
1272
1278
|
for (var t = 0; t < e.length; t++) {
|
|
1273
|
-
var i = this.
|
|
1274
|
-
this.
|
|
1279
|
+
var i = this.Ca(e[t]);
|
|
1280
|
+
this.ua.push(i);
|
|
1275
1281
|
}
|
|
1276
|
-
}, this.
|
|
1282
|
+
}, this.Ca = function (e) {
|
|
1277
1283
|
var t = {};
|
|
1278
1284
|
return t.name = e.name, t.html = e.html, t.id = e.id, t.toolTip = e.toolTip, t.data = e, e.start ? t.start = new DayPilot.Date(e.start) : t.start = new DayPilot.Date(n.startDate), t.putIntoBlock = function (e) {
|
|
1279
1285
|
for (var t = 0; t < this.blocks.length; t++) {
|
|
@@ -1314,40 +1320,42 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1314
1320
|
return !0;
|
|
1315
1321
|
}, i.push(e), this.lines.push(i), this.lines.length - 1;
|
|
1316
1322
|
}, t;
|
|
1317
|
-
}, this.
|
|
1323
|
+
}, this.Ba = function () {
|
|
1318
1324
|
var e = [], t = this.startDate.getDatePart(), i = this.days;
|
|
1319
1325
|
switch (this.viewType) {
|
|
1320
1326
|
case "Day":
|
|
1321
1327
|
i = 1;
|
|
1322
1328
|
break;
|
|
1323
1329
|
case "Week":
|
|
1324
|
-
i = 7
|
|
1330
|
+
i = 7;
|
|
1331
|
+
var a = o.ba();
|
|
1332
|
+
t = t.firstDayOfWeek(a);
|
|
1325
1333
|
break;
|
|
1326
1334
|
case "WorkWeek": i = 5, t = t.firstDayOfWeek(1);
|
|
1327
1335
|
}
|
|
1328
1336
|
"BusinessHoursNoScroll" === this.heightSpec && (t = t.addHours(this.businessBeginsHour));
|
|
1329
|
-
for (var
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1337
|
+
for (var r = 0; r < i; r++) {
|
|
1338
|
+
var s = n.headerDateFormat ? n.headerDateFormat : o.locale().datePattern, l = {};
|
|
1339
|
+
l.start = t.addDays(r), l.name = l.start.toString(s, o.locale()), e.push(l);
|
|
1332
1340
|
}
|
|
1333
1341
|
return e;
|
|
1334
1342
|
}, this.visibleStart = function () {
|
|
1335
1343
|
if ("Resources" === n.viewType) {
|
|
1336
|
-
if (0 === n.
|
|
1344
|
+
if (0 === n.ua.length)
|
|
1337
1345
|
return DayPilot.Date.today();
|
|
1338
|
-
var e = n.
|
|
1346
|
+
var e = n.ua.map(function (e) { return e.start.getTime(); }), t = Math.min.apply(null, e);
|
|
1339
1347
|
return new DayPilot.Date(t);
|
|
1340
1348
|
}
|
|
1341
|
-
return this.
|
|
1349
|
+
return this.ua[0].start;
|
|
1342
1350
|
}, this.visibleEnd = function () {
|
|
1343
1351
|
if ("Resources" === n.viewType) {
|
|
1344
|
-
if (0 === n.
|
|
1352
|
+
if (0 === n.ua.length)
|
|
1345
1353
|
return DayPilot.Date.today().addDays(1);
|
|
1346
|
-
var e = n.
|
|
1354
|
+
var e = n.ua.map(function (e) { return e.start.getTime(); }), t = Math.max.apply(null, e);
|
|
1347
1355
|
return new DayPilot.Date(t).addDays(1);
|
|
1348
1356
|
}
|
|
1349
|
-
var t = this.
|
|
1350
|
-
return this.
|
|
1357
|
+
var t = this.ua.length - 1;
|
|
1358
|
+
return this.ua[t].start.addDays(1);
|
|
1351
1359
|
}, this.J = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.V = function () {
|
|
1352
1360
|
if (this.elements.events)
|
|
1353
1361
|
for (var e = 0; e < this.elements.events.length; e++) {
|
|
@@ -1359,9 +1367,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1359
1367
|
t.helper = null, t.data = null, t.event = null, DayPilot.de(t);
|
|
1360
1368
|
}
|
|
1361
1369
|
this.elements.events = [];
|
|
1362
|
-
}, this.
|
|
1370
|
+
}, this.Da = function (e) {
|
|
1363
1371
|
var i = e.cache || e.data, a = this.nav.events, o = document.createElement("div");
|
|
1364
|
-
o.style.position = "absolute", o.style.left = e.part.left + "%", o.style.top = e.part.top + "px", o.style.width = e.part.width + "%", o.style.height = Math.max(e.part.height, 2) + "px", o.style.overflow = "hidden", o.data = e, o.event = e, o.unselectable = "on", o.style.MozUserSelect = "none", o.style.KhtmlUserSelect = "none", o.className = this.J("_event"), i.cssClass && DayPilot.Util.addClass(o, i.cssClass), n.showToolTip && e.client.toolTip() && (o.title = e.client.toolTip()), o.isFirst = e.part.start.getTime() === e.start().getTime(), o.isLast = e.part.end.getTime() === e.end().getTime(), o.onclick = this.
|
|
1372
|
+
o.style.position = "absolute", o.style.left = e.part.left + "%", o.style.top = e.part.top + "px", o.style.width = e.part.width + "%", o.style.height = Math.max(e.part.height, 2) + "px", o.style.overflow = "hidden", o.data = e, o.event = e, o.unselectable = "on", o.style.MozUserSelect = "none", o.style.KhtmlUserSelect = "none", o.className = this.J("_event"), i.cssClass && DayPilot.Util.addClass(o, i.cssClass), n.showToolTip && e.client.toolTip() && (o.title = e.client.toolTip()), o.isFirst = e.part.start.getTime() === e.start().getTime(), o.isLast = e.part.end.getTime() === e.end().getTime(), o.onclick = this.qa, DayPilot.re(o, "contextmenu", this.sa), o.onmouseout = function (e) { o.deleteIcon && (o.deleteIcon.style.display = "none"); }, o.onmousemove = function (i) {
|
|
1365
1373
|
var a = 5;
|
|
1366
1374
|
if ("undefined" != typeof t) {
|
|
1367
1375
|
var r = DayPilot.mo3(o, i);
|
|
@@ -1377,7 +1385,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1377
1385
|
if (1 === a && e.client.moveEnabled()) {
|
|
1378
1386
|
t.moving = this, DayPilot.Global.moving = this, t.moving.event = this.event;
|
|
1379
1387
|
var o = t.moving.helper = {};
|
|
1380
|
-
o.oldColumn = n.
|
|
1388
|
+
o.oldColumn = n.ua[this.data.part.dayIndex].id, t.originalMouse = DayPilot.mc(i), t.originalTop = this.offsetTop;
|
|
1381
1389
|
var r = DayPilot.mo3(this, i);
|
|
1382
1390
|
r ? t.moveOffsetY = r.y : t.moveOffsetY = 0, n.nav.top.style.cursor = "move";
|
|
1383
1391
|
}
|
|
@@ -1395,27 +1403,27 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1395
1403
|
}
|
|
1396
1404
|
if (e.client.deleteEnabled()) {
|
|
1397
1405
|
var h = document.createElement("div");
|
|
1398
|
-
h.style.position = "absolute", h.style.right = "2px", h.style.top = "2px", h.style.width = "17px", h.style.height = "17px", h.className = n.J("_event_delete"), h.onmousedown = function (e) { e.stopPropagation(); }, h.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && n.
|
|
1406
|
+
h.style.position = "absolute", h.style.right = "2px", h.style.top = "2px", h.style.width = "17px", h.style.height = "17px", h.className = n.J("_event_delete"), h.onmousedown = function (e) { e.stopPropagation(); }, h.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && n.ta(t); }, h.style.display = "none", o.deleteIcon = h, o.appendChild(h);
|
|
1399
1407
|
}
|
|
1400
1408
|
var f = i.areas ? DayPilot.Areas.copy(i.areas) : [];
|
|
1401
1409
|
if (DayPilot.Areas.attach(o, e, { "areas": f }), a.rows[0].cells[e.part.dayIndex]) {
|
|
1402
|
-
a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(o), n.
|
|
1410
|
+
a.rows[0].cells[e.part.dayIndex].firstChild.appendChild(o), n.Ea(o);
|
|
1403
1411
|
}
|
|
1404
1412
|
if ("function" == typeof n.onAfterEventRender) {
|
|
1405
1413
|
var m = {};
|
|
1406
1414
|
m.e = o.event, m.div = o, n.onAfterEventRender(m);
|
|
1407
1415
|
}
|
|
1408
1416
|
n.elements.events.push(o);
|
|
1409
|
-
}, this.
|
|
1417
|
+
}, this.Ea = function (e) {
|
|
1410
1418
|
for (var t = e && e.childNodes ? e.childNodes.length : 0, i = 0; i < t; i++)
|
|
1411
1419
|
try {
|
|
1412
1420
|
var a = e.childNodes[i];
|
|
1413
|
-
1 === a.nodeType && (a.unselectable = "on", this.
|
|
1421
|
+
1 === a.nodeType && (a.unselectable = "on", this.Ea(a));
|
|
1414
1422
|
}
|
|
1415
1423
|
catch (e) { }
|
|
1416
|
-
}, this.
|
|
1417
|
-
for (var e = 0; e < this.
|
|
1418
|
-
var t = this.
|
|
1424
|
+
}, this.ja = function () {
|
|
1425
|
+
for (var e = 0; e < this.ua.length; e++) {
|
|
1426
|
+
var t = this.ua[e];
|
|
1419
1427
|
if (t.blocks)
|
|
1420
1428
|
for (var i = 0; i < t.blocks.length; i++)
|
|
1421
1429
|
for (var a = t.blocks[i], n = 0; n < a.lines.length; n++)
|
|
@@ -1423,13 +1431,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1423
1431
|
var s = o[r];
|
|
1424
1432
|
s.part.width = 100 / a.lines.length, s.part.left = s.part.width * n;
|
|
1425
1433
|
var l = n === a.lines.length - 1;
|
|
1426
|
-
l || (s.part.width = 1.5 * s.part.width), this.
|
|
1434
|
+
l || (s.part.width = 1.5 * s.part.width), this.Da(s);
|
|
1427
1435
|
}
|
|
1428
1436
|
}
|
|
1429
|
-
}, this.
|
|
1437
|
+
}, this.Fa = function () { this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.J("_main")), this.nav.top.style.MozUserSelect = "none", this.nav.top.style.KhtmlUserSelect = "none", this.nav.top.style.position = "relative", this.nav.top.style.width = this.width ? this.width : "100%", this.hideUntilInit && (this.nav.top.style.visibility = "hidden"), this.visible || (this.nav.top.style.display = "none"), this.nav.scroll = document.createElement("div"), this.nav.scroll.style.height = this.Ga() + "px", "BusinessHours" === this.heightSpec ? this.nav.scroll.style.overflow = "auto" : this.nav.scroll.style.overflow = "hidden", this.nav.scroll.style.position = "relative"; var e = this.Ha(); this.nav.top.appendChild(e), this.nav.scroll.style.zoom = 1; var t = this.Ia(); this.nav.scrollable = t.firstChild, this.nav.scroll.appendChild(t), this.nav.top.appendChild(this.nav.scroll), this.nav.scrollLayer = document.createElement("div"), this.nav.scrollLayer.style.position = "absolute", this.nav.scrollLayer.style.top = "0px", this.nav.scrollLayer.style.left = "0px", this.nav.top.appendChild(this.nav.scrollLayer), this.nav.loading = document.createElement("div"), this.nav.loading.style.position = "absolute", this.nav.loading.style.top = "0px", this.nav.loading.style.left = this.hourWidth + 5 + "px", this.nav.loading.innerHTML = n.Ja(n.loadingLabelText, n.loadingLabelHtml), this.nav.loading.style.display = "none", this.nav.top.appendChild(this.nav.loading); }, this.ha = function () { this.fasterDispose || DayPilot.pu(this.nav.hourTable), this.nav.scrollable.rows[0].cells[0].innerHTML = "", this.nav.hourTable = this.Ka(), this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable); }, this.Ia = function () { var e = document.createElement("div"); e.style.zoom = 1, e.style.position = "relative"; var t = document.createElement("table"); t.cellSpacing = "0", t.cellPadding = "0", t.border = "0", t.style.border = "0px none", t.style.width = "100%", t.style.position = "absolute"; var i, a = t.insertRow(-1); i = a.insertCell(-1), i.valign = "top", i.style.padding = "0px", i.style.border = "0px none", this.nav.hourTable = this.Ka(), i.appendChild(this.nav.hourTable), i = a.insertCell(-1), i.valign = "top", i.width = "100%", i.style.padding = "0px", i.style.border = "0px none"; var n = document.createElement("div"); return n.style.position = "relative", i.appendChild(n), n.appendChild(this.La()), n.appendChild(this.Ma()), e.appendChild(t), this.nav.zoom = e, e; }, this.La = 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.Ma = function () {
|
|
1430
1438
|
var e = document.createElement("table");
|
|
1431
1439
|
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;
|
|
1432
|
-
for (var t = this.
|
|
1440
|
+
for (var t = this.ua, i = t.length, a = e.insertRow(-1), o = 0; o < i; o++) {
|
|
1433
1441
|
var r = a.insertCell(-1);
|
|
1434
1442
|
r.style.padding = "0px", r.style.border = "0px none", r.style.height = "0px", r.style.overflow = "visible", n.rtl || (r.style.textAlign = "left");
|
|
1435
1443
|
var s = document.createElement("div");
|
|
@@ -1438,38 +1446,38 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1438
1446
|
r.selection = l, r.appendChild(s), r.appendChild(l);
|
|
1439
1447
|
}
|
|
1440
1448
|
return e;
|
|
1441
|
-
}, this.
|
|
1449
|
+
}, this.Ka = function () {
|
|
1442
1450
|
var e = document.createElement("table");
|
|
1443
1451
|
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; };
|
|
1444
|
-
for (var t = n.
|
|
1445
|
-
this.
|
|
1452
|
+
for (var t = n.ka(), i = 0; i < t; i++)
|
|
1453
|
+
this.Na(e, i);
|
|
1446
1454
|
return e;
|
|
1447
|
-
}, this.
|
|
1455
|
+
}, this.Na = function (e, t) { var i = 2 * this.cellHeight, a = e.insertRow(-1); a.style.height = i + "px"; var r = a.insertCell(-1); r.valign = "bottom", r.unselectable = "on", r.style.cursor = "default", r.style.padding = "0px", r.style.border = "0px none"; var s = document.createElement("div"); s.style.position = "relative", s.className = this.J("_rowheader"), s.style.width = this.hourWidth + "px", s.style.height = i + "px", s.style.overflow = "hidden", s.unselectable = "on"; var l = document.createElement("div"); l.className = this.J("_rowheader_inner"), l.unselectable = "on"; var d = document.createElement("div"); d.unselectable = "on"; var c = this.startDate.addHours(t).addHours(n.oa()), u = c.getHours(), h = u < 12, f = o.timeFormat(); "Clock12Hours" === f && (u %= 12, 0 === u && (u = 12)), d.innerHTML = u; var m = document.createElement("span"); m.unselectable = "on", m.className = this.J("_rowheader_minutes"); var p; p = "Clock12Hours" === f ? h ? "AM" : "PM" : "00", m.innerHTML = p, d.appendChild(m), l.appendChild(d), s.appendChild(l), r.appendChild(s); }, this.Ga = function () {
|
|
1448
1456
|
switch (this.heightSpec) {
|
|
1449
1457
|
case "Full": return 48 * this.cellHeight;
|
|
1450
1458
|
case "BusinessHours":
|
|
1451
|
-
var e = this.
|
|
1459
|
+
var e = this.ma();
|
|
1452
1460
|
return e * this.cellHeight * 2;
|
|
1453
1461
|
case "BusinessHoursNoScroll":
|
|
1454
|
-
var e = this.
|
|
1462
|
+
var e = this.ma();
|
|
1455
1463
|
return e * this.cellHeight * 2;
|
|
1456
1464
|
default: throw "DayPilot.Calendar: Unexpected 'heightSpec' value.";
|
|
1457
1465
|
}
|
|
1458
|
-
}, this.
|
|
1466
|
+
}, this.Oa = function () {
|
|
1459
1467
|
var e = n.nav.corner ? n.nav.corner.parentNode : null;
|
|
1460
1468
|
if (e) {
|
|
1461
1469
|
e.innerHTML = "";
|
|
1462
|
-
var t = this.
|
|
1470
|
+
var t = this.Pa();
|
|
1463
1471
|
e.appendChild(t), n.nav.corner = t;
|
|
1464
1472
|
}
|
|
1465
|
-
}, this.
|
|
1473
|
+
}, this.Ha = function () {
|
|
1466
1474
|
var e = document.createElement("div");
|
|
1467
1475
|
e.style.overflow = "auto";
|
|
1468
1476
|
var t = document.createElement("table");
|
|
1469
1477
|
t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = "100%", t.style.borderCollapse = "separate", t.style.border = "0px none";
|
|
1470
1478
|
var i = t.insertRow(-1), a = i.insertCell(-1);
|
|
1471
1479
|
a.style.padding = "0px", a.style.border = "0px none";
|
|
1472
|
-
var n = this.
|
|
1480
|
+
var n = this.Pa();
|
|
1473
1481
|
a.appendChild(n), this.nav.corner = n, a = i.insertCell(-1), a.style.width = "100%", a.valign = "top", a.style.position = "relative", a.style.padding = "0px", a.style.border = "0px none", this.nav.header = document.createElement("table"), this.nav.header.cellPadding = "0", this.nav.header.cellSpacing = "0", this.nav.header.border = "0", this.nav.header.width = "100%", this.nav.header.style.tableLayout = "fixed", this.nav.header.oncontextmenu = function () { return !1; };
|
|
1474
1482
|
var o = "hidden" !== this.nav.scroll.style.overflow;
|
|
1475
1483
|
if (a.appendChild(this.nav.header), o) {
|
|
@@ -1480,7 +1488,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1480
1488
|
s.className = this.J("_cornerright_inner"), r.appendChild(s), a.appendChild(r), this.nav.cornerRight = r;
|
|
1481
1489
|
}
|
|
1482
1490
|
return e.appendChild(t), e;
|
|
1483
|
-
}, this.
|
|
1491
|
+
}, this.Pa = function () { var e = document.createElement("div"); e.style.position = "relative", e.className = this.J("_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.J("_corner_inner"), e.appendChild(t), e; }, this.W = function () {
|
|
1484
1492
|
var e = this.nav.main;
|
|
1485
1493
|
e.root = null, e.onmouseup = null;
|
|
1486
1494
|
for (var t = 0; t < e.rows.length; t++)
|
|
@@ -1489,8 +1497,8 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1489
1497
|
n.root = null, n.onmousedown = null, n.onmousemove = null, n.onmouseout = null, n.onmouseup = null;
|
|
1490
1498
|
}
|
|
1491
1499
|
this.fasterDispose || DayPilot.pu(e);
|
|
1492
|
-
}, this.
|
|
1493
|
-
var e = this.nav.main, i = 18e5, a = this.
|
|
1500
|
+
}, this.ga = function () {
|
|
1501
|
+
var e = this.nav.main, i = 18e5, a = this.na(), o = n.ua;
|
|
1494
1502
|
for (e && this.W(); e && e.rows && e.rows.length > 0;)
|
|
1495
1503
|
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0);
|
|
1496
1504
|
this.tableCreated = !0;
|
|
@@ -1508,11 +1516,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1508
1516
|
var l = e.insertRow(-1);
|
|
1509
1517
|
l.style.MozUserSelect = "none", l.style.KhtmlUserSelect = "none";
|
|
1510
1518
|
for (var d = 0; d < r; d++) {
|
|
1511
|
-
var m = this.
|
|
1512
|
-
c.start = m.start.addTime(f * i), c.end = c.start.addTime(i), c.resource = m.id, c.onmousedown = this.
|
|
1519
|
+
var m = this.ua[d], c = l.insertCell(-1);
|
|
1520
|
+
c.start = m.start.addTime(f * i), c.end = c.start.addTime(i), c.resource = m.id, c.onmousedown = this.va, c.onmouseup = function () { return !1; }, c.onclick = function () { return !1; }, c.root = this, c.style.padding = "0px", c.style.border = "0px none", c.style.verticalAlign = "top", c.style.height = n.cellHeight + "px", c.style.overflow = "hidden", c.unselectable = "on";
|
|
1513
1521
|
var u = document.createElement("div");
|
|
1514
1522
|
u.unselectable = "on", u.style.height = n.cellHeight + "px", u.style.position = "relative", u.className = this.J("_cell");
|
|
1515
|
-
var p = this.
|
|
1523
|
+
var p = this.Qa(c.start, c.end), v = { "business": p, "text": null, "html": null, "cssClass": null, "backColor": null, "backImage": null, "backRepeat": null };
|
|
1516
1524
|
!function () {
|
|
1517
1525
|
if ("function" == typeof n.onBeforeCellRender) {
|
|
1518
1526
|
var e = {};
|
|
@@ -1564,11 +1572,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1564
1572
|
y < 0 && (y = 0), y < m.rows[0].cells.length && y >= 0 && t.movingShadow.column !== y && (t.movingShadow.column = y, t.moveShadow(m.rows[0].cells[y]));
|
|
1565
1573
|
}
|
|
1566
1574
|
else if (t.selecting) {
|
|
1567
|
-
var a = DayPilot.mc(e), g = n.
|
|
1568
|
-
a.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(D), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(D), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), n.
|
|
1575
|
+
var a = DayPilot.mc(e), g = n.za.getCellCoords(), b = t.column, D = n.nav.main.rows[g.y].cells[b];
|
|
1576
|
+
a.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(D), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(D), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), n.wa();
|
|
1569
1577
|
}
|
|
1570
1578
|
}, n.nav.scrollable.style.display = "";
|
|
1571
|
-
}, this.
|
|
1579
|
+
}, this.Qa = function (e, t) { return this.businessBeginsHour < this.businessEndsHour ? !(e.getHours() < this.businessBeginsHour || e.getHours() >= this.businessEndsHour || 6 === e.getDayOfWeek() || 0 === e.getDayOfWeek()) : e.getHours() >= this.businessBeginsHour || e.getHours() < this.businessEndsHour; }, this.X = function () {
|
|
1572
1580
|
var e = this.nav.header;
|
|
1573
1581
|
if (e && e.rows)
|
|
1574
1582
|
for (var t = 0; t < e.rows.length; t++)
|
|
@@ -1577,14 +1585,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1577
1585
|
n.onclick = null, n.onmousemove = null, n.onmouseout = null;
|
|
1578
1586
|
}
|
|
1579
1587
|
this.fasterDispose || DayPilot.pu(e);
|
|
1580
|
-
}, this.
|
|
1588
|
+
}, this.Ra = function (e) {
|
|
1581
1589
|
function t(t) {
|
|
1582
1590
|
var o = a[t], r = e ? i.insertCell(-1) : i.cells[t];
|
|
1583
|
-
r.data = o, r.style.overflow = "hidden", r.style.padding = "0px", r.style.border = "0px none", r.style.height = n.headerHeight + "px", r.onclick = n.
|
|
1591
|
+
r.data = o, r.style.overflow = "hidden", r.style.padding = "0px", r.style.border = "0px none", r.style.height = n.headerHeight + "px", r.onclick = n.Sa;
|
|
1584
1592
|
var s, l = e ? document.createElement("div") : r.firstChild;
|
|
1585
1593
|
e ? (l.unselectable = "on", l.style.MozUserSelect = "none", l.style.cursor = "default", l.style.position = "relative", l.className = n.J("_colheader"), l.style.height = n.headerHeight + "px", n.headerTextWrappingEnabled || (l.style.whiteSpace = "nowrap"), s = document.createElement("div"), s.className = n.J("_colheader_inner"), s.unselectable = "on", l.appendChild(s), r.appendChild(l)) : s = l.firstChild;
|
|
1586
1594
|
var d = {};
|
|
1587
|
-
d.header = {}, d.header.cssClass = null, d.header.verticalAlignment = "center", d.column = n.
|
|
1595
|
+
d.header = {}, d.header.cssClass = null, d.header.verticalAlignment = "center", d.column = n.Ta(o, n), "function" == typeof n.onBeforeHeaderRender && (DayPilot.Util.copyProps(o, d.header, ["id", "start", "name", "html", "backColor", "toolTip", "areas"]), n.onBeforeHeaderRender(d), DayPilot.Util.copyProps(d.header, o, ["html", "backColor", "toolTip", "areas", "cssClass", "verticalAlignment"])), o.toolTip && (s.title = o.toolTip), o.cssClass && DayPilot.Util.addClass(l, o.cssClass), o.backColor && (s.style.background = o.backColor), o.areas && DayPilot.Areas.attach(l, o);
|
|
1588
1596
|
var c = o.verticalAlignment;
|
|
1589
1597
|
if (c)
|
|
1590
1598
|
switch (s.style.display = "flex", c) {
|
|
@@ -1596,27 +1604,27 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1596
1604
|
break;
|
|
1597
1605
|
case "bottom": s.style.alignItems = "flex-end";
|
|
1598
1606
|
}
|
|
1599
|
-
l.firstChild.innerHTML = n.
|
|
1607
|
+
l.firstChild.innerHTML = n.Ja(o.name, o.html);
|
|
1600
1608
|
}
|
|
1601
|
-
for (var i = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], a = this.
|
|
1609
|
+
for (var i = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], a = this.ua, o = a.length, r = 0; r < o; r++)
|
|
1602
1610
|
t(r);
|
|
1603
|
-
}, this.
|
|
1611
|
+
}, this.Sa = function (e) {
|
|
1604
1612
|
if ("Disabled" !== n.headerClickHandling) {
|
|
1605
|
-
var t = this.data, i = n.
|
|
1613
|
+
var t = this.data, i = n.Ta(t), a = {};
|
|
1606
1614
|
a.header = {}, a.header.id = t.id, a.header.name = t.name, a.header.start = t.start, a.column = i, a.originalEvent = e, a.shift = e.shiftKey, a.ctrl = e.ctrlKey, a.meta = e.metaKey, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof n.onHeaderClick && (n.onHeaderClick(a), a.preventDefault.value) || "function" == typeof n.onHeaderClicked && n.onHeaderClicked(a);
|
|
1607
1615
|
}
|
|
1608
|
-
}, this.
|
|
1609
|
-
var e = this.nav.header, t = !0, i = this.
|
|
1616
|
+
}, this.Ta = function (e) { return new DayPilot.CalendarColumn(e, n); }, this.Ua = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.fa = function () {
|
|
1617
|
+
var e = this.nav.header, t = !0, i = this.ua;
|
|
1610
1618
|
for (i.length; this.headerCreated && e && e.rows && e.rows.length > 0;)
|
|
1611
1619
|
this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0);
|
|
1612
1620
|
this.headerCreated = !0;
|
|
1613
|
-
this.
|
|
1614
|
-
}, this.loadingStart = function () { this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = ""); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.R("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.
|
|
1621
|
+
this.Ra(t);
|
|
1622
|
+
}, this.loadingStart = function () { this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = ""); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.R("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.Va = function () {
|
|
1615
1623
|
var e = this.nav.scroll;
|
|
1616
|
-
e.onscroll || (e.onscroll = function () { n.
|
|
1617
|
-
var t = "undefined" != typeof this.
|
|
1624
|
+
e.onscroll || (e.onscroll = function () { n.Wa(); });
|
|
1625
|
+
var t = "undefined" != typeof this.Xa.scrollpos ? this.Xa.scrollpos : this.initScrollPos;
|
|
1618
1626
|
t && ("Auto" === t && (t = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), e.root = this, 0 === e.scrollTop && (e.scrollTop = t));
|
|
1619
|
-
}, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.
|
|
1627
|
+
}, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.Ya = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && (t.style.width = e + "px"); }, this.Za = function () { t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mouseup", t.gMouseUp), DayPilot.re(window, "unload", t.gUnload)); }, this.events = {}, this.events.add = function (e) {
|
|
1620
1628
|
var t = null;
|
|
1621
1629
|
if (e instanceof DayPilot.Event)
|
|
1622
1630
|
t = e.data;
|
|
@@ -1625,7 +1633,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1625
1633
|
throw "DayPilot.Calendar.events.add() expects an object or DayPilot.Event instance.";
|
|
1626
1634
|
t = e;
|
|
1627
1635
|
}
|
|
1628
|
-
n.events.list || (n.events.list = []), n.events.list.push(t), n
|
|
1636
|
+
n.events.list || (n.events.list = []), n.events.list.push(t), n.$a({ "eventsOnly": !0 }), n.ra.notify();
|
|
1629
1637
|
}, this.events.find = function (e) {
|
|
1630
1638
|
if (!n.events.list)
|
|
1631
1639
|
return null;
|
|
@@ -1653,7 +1661,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1653
1661
|
n.events.list.splice(i, 1, e);
|
|
1654
1662
|
}
|
|
1655
1663
|
}
|
|
1656
|
-
n
|
|
1664
|
+
n.$a({ "eventsOnly": !0 }), n.ra.notify();
|
|
1657
1665
|
}, this.events.remove = function (e) {
|
|
1658
1666
|
var t;
|
|
1659
1667
|
if (e instanceof DayPilot.Event)
|
|
@@ -1667,7 +1675,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1667
1675
|
i && (t = i.data);
|
|
1668
1676
|
}
|
|
1669
1677
|
var a = DayPilot.indexOf(n.events.list, t);
|
|
1670
|
-
n.events.list.splice(a, 1), n
|
|
1678
|
+
n.events.list.splice(a, 1), n.$a({ "eventsOnly": !0 }), n.ra.notify();
|
|
1671
1679
|
}, this.events.load = function (e, t, i) {
|
|
1672
1680
|
var a = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, o = function (e) {
|
|
1673
1681
|
var i, o = e.request;
|
|
@@ -1682,7 +1690,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1682
1690
|
var s = {};
|
|
1683
1691
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
1684
1692
|
return;
|
|
1685
|
-
n.events.list = i, n.
|
|
1693
|
+
n.events.list = i, n.Aa && n.$a({ "eventsOnly": !0 });
|
|
1686
1694
|
}
|
|
1687
1695
|
};
|
|
1688
1696
|
if (n.eventsLoadMethod && "POST" === n.eventsLoadMethod.toUpperCase())
|
|
@@ -1691,7 +1699,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1691
1699
|
var r = e, s = "start=" + n.visibleStart().toString() + "&end=" + n.visibleEnd().toString();
|
|
1692
1700
|
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": o, "error": a });
|
|
1693
1701
|
}
|
|
1694
|
-
}, this
|
|
1702
|
+
}, this._a = function () {
|
|
1695
1703
|
if (n.nav.top.className !== n.J("_main")) {
|
|
1696
1704
|
n.nav.top.className = n.J("_main");
|
|
1697
1705
|
var e = n.nav.corner;
|
|
@@ -1702,16 +1710,16 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1702
1710
|
}, this.update = function (e) {
|
|
1703
1711
|
if (n.N)
|
|
1704
1712
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Calendar instance that has been disposed.");
|
|
1705
|
-
n.
|
|
1706
|
-
}, this
|
|
1707
|
-
if (this.
|
|
1713
|
+
n.ab(e), n.$a();
|
|
1714
|
+
}, this.$a = function (e) {
|
|
1715
|
+
if (this.Aa) {
|
|
1708
1716
|
var e = e || {}, t = !e.eventsOnly;
|
|
1709
|
-
n.
|
|
1717
|
+
n.bb(), n.V(), n.nav.top.style.cursor = "auto", t && (n.ca(), n.fa(), n.ga(), n.ha(), n.ia(), n.Oa(), n.Ya(), n._a(), n.cb()), n.da(), n.ea(), n.ja(), n.clearSelection(), this.visible ? this.show() : this.hide();
|
|
1710
1718
|
}
|
|
1711
|
-
}, this.
|
|
1719
|
+
}, this.db = null, this.ab = function (e) {
|
|
1712
1720
|
if (e) {
|
|
1713
1721
|
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? n.events.list = e.list : n.events.list = e; } }, "columns": { "preInit": function () { n.columns.list = this.data; } } };
|
|
1714
|
-
this.
|
|
1722
|
+
this.db = t;
|
|
1715
1723
|
for (var i in e)
|
|
1716
1724
|
if (t[i]) {
|
|
1717
1725
|
var a = t[i];
|
|
@@ -1720,13 +1728,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1720
1728
|
else
|
|
1721
1729
|
n[i] = e[i];
|
|
1722
1730
|
}
|
|
1723
|
-
}, this.
|
|
1724
|
-
var e = this.
|
|
1731
|
+
}, this.eb = function () {
|
|
1732
|
+
var e = this.db;
|
|
1725
1733
|
for (var t in e) {
|
|
1726
1734
|
var i = e[t];
|
|
1727
1735
|
i.postInit && i.postInit();
|
|
1728
1736
|
}
|
|
1729
|
-
}, this.
|
|
1737
|
+
}, this.fb = function () {
|
|
1730
1738
|
if (this.id && this.id.tagName)
|
|
1731
1739
|
this.nav.top = this.id;
|
|
1732
1740
|
else {
|
|
@@ -1735,8 +1743,8 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1735
1743
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
1736
1744
|
throw "DayPilot.Calendar: The placeholder element not found: '" + e + "'.";
|
|
1737
1745
|
}
|
|
1738
|
-
}, this.
|
|
1739
|
-
var t = this.
|
|
1746
|
+
}, this.gb = {}, this.gb.events = [], this.hb = function (e) {
|
|
1747
|
+
var t = this.gb.events, i = this.events.list[e], a = {};
|
|
1740
1748
|
for (var o in i)
|
|
1741
1749
|
a[o] = i[o];
|
|
1742
1750
|
if ("function" == typeof this.onBeforeEventRender) {
|
|
@@ -1744,9 +1752,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1744
1752
|
r.control = n, r.data = a, this.onBeforeEventRender(r);
|
|
1745
1753
|
}
|
|
1746
1754
|
t[e] = a;
|
|
1747
|
-
}, this.
|
|
1755
|
+
}, this.da = function () {
|
|
1748
1756
|
var e = this.events.list;
|
|
1749
|
-
if (n.
|
|
1757
|
+
if (n.gb.events = [], e) {
|
|
1750
1758
|
if (!DayPilot.isArray(e))
|
|
1751
1759
|
throw new DayPilot.Exception("DayPilot.Calendar.events.list expects an array object. You supplied: " + typeof e);
|
|
1752
1760
|
var t = e.length, i = 864e5;
|
|
@@ -1767,11 +1775,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1767
1775
|
}
|
|
1768
1776
|
if ("function" == typeof this.onBeforeEventRender)
|
|
1769
1777
|
for (var o = 0; o < t; o++)
|
|
1770
|
-
this.
|
|
1771
|
-
for (var o = 0; o < this.
|
|
1778
|
+
this.hb(o);
|
|
1779
|
+
for (var o = 0; o < this.ua.length; o++) {
|
|
1772
1780
|
var l = {};
|
|
1773
1781
|
l.minEnd = 1e6, l.maxStart = -1, this.scrollLabels.push(l);
|
|
1774
|
-
var d = this.
|
|
1782
|
+
var d = this.ua[o];
|
|
1775
1783
|
d.events = [], d.lines = [], d.blocks = [];
|
|
1776
1784
|
for (var c = new DayPilot.Date(d.start), u = c.getTime(), h = c.addTime(i), f = h.getTime(), m = 0; m < t; m++)
|
|
1777
1785
|
if (!a[m]) {
|
|
@@ -1784,32 +1792,32 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1784
1792
|
var x = this.getPixels(D.part.start, d.start), w = this.getPixels(D.part.end, d.start), C = x.top, P = w.top;
|
|
1785
1793
|
if (C === P && (x.cut || w.cut))
|
|
1786
1794
|
continue;
|
|
1787
|
-
var
|
|
1788
|
-
D.part.top = Math.floor(C / this.cellHeight) * this.cellHeight + 1, D.part.height = Math.max(Math.ceil(
|
|
1795
|
+
var k = w.boxBottom;
|
|
1796
|
+
D.part.top = Math.floor(C / this.cellHeight) * this.cellHeight + 1, D.part.height = Math.max(Math.ceil(k / this.cellHeight) * this.cellHeight - D.part.top, this.cellHeight - 1) + 1, D.part.barTop = Math.max(C - D.part.top - 1, 0), D.part.barHeight = Math.max(P - C - 2, 1);
|
|
1789
1797
|
var p = D.part.top, v = D.part.top + D.part.height;
|
|
1790
|
-
p > l.maxStart && (l.maxStart = p), v < l.minEnd && (l.minEnd = v), p < this.minStart && (this.minStart = p), v > this.maxEnd && (this.maxEnd = v), d.events.push(D), "function" == typeof this.onBeforeEventRender && (D.cache = this.
|
|
1798
|
+
p > l.maxStart && (l.maxStart = p), v < l.minEnd && (l.minEnd = v), p < this.minStart && (this.minStart = p), v > this.maxEnd && (this.maxEnd = v), d.events.push(D), "function" == typeof this.onBeforeEventRender && (D.cache = this.gb.events[m]), D.part.start.getTime() === y && D.part.end.getTime() === g && (a[m] = !0);
|
|
1791
1799
|
}
|
|
1792
1800
|
}
|
|
1793
1801
|
}
|
|
1794
1802
|
}
|
|
1795
|
-
for (var o = 0; o < this.
|
|
1796
|
-
var d = this.
|
|
1797
|
-
d.events.sort(this.
|
|
1803
|
+
for (var o = 0; o < this.ua.length; o++) {
|
|
1804
|
+
var d = this.ua[o];
|
|
1805
|
+
d.events.sort(this.ib);
|
|
1798
1806
|
for (var m = 0; m < d.events.length; m++) {
|
|
1799
1807
|
var r = d.events[m];
|
|
1800
1808
|
d.putIntoBlock(r);
|
|
1801
1809
|
}
|
|
1802
1810
|
for (var m = 0; m < d.blocks.length; m++) {
|
|
1803
|
-
var
|
|
1804
|
-
|
|
1805
|
-
for (var S = 0; S <
|
|
1806
|
-
var r =
|
|
1807
|
-
|
|
1811
|
+
var _ = d.blocks[m];
|
|
1812
|
+
_.events.sort(this.ib);
|
|
1813
|
+
for (var S = 0; S < _.events.length; S++) {
|
|
1814
|
+
var r = _.events[S];
|
|
1815
|
+
_.putIntoLine(r);
|
|
1808
1816
|
}
|
|
1809
1817
|
}
|
|
1810
1818
|
}
|
|
1811
1819
|
}
|
|
1812
|
-
}, this.
|
|
1820
|
+
}, this.ib = function (e, t) {
|
|
1813
1821
|
if (!(e && t && e.start && t.start))
|
|
1814
1822
|
return 0;
|
|
1815
1823
|
var i = e.start().getTime() - t.start().getTime();
|
|
@@ -1823,30 +1831,30 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1823
1831
|
var o = 18e5, r = a - i, s = r % o, l = r - s, d = l + o;
|
|
1824
1832
|
0 === s && (d = l);
|
|
1825
1833
|
var c = {};
|
|
1826
|
-
return c.cut = !1, c.top = this.
|
|
1827
|
-
}, this.
|
|
1834
|
+
return c.cut = !1, c.top = this.jb(r), c.boxTop = this.jb(l), c.boxBottom = this.jb(d), this.cache.pixels[a + "_" + i] = c, c;
|
|
1835
|
+
}, this.jb = function (e) { return Math.floor(this.cellHeight * e / 18e5); }, this.bb = function () { this.startDate = new DayPilot.Date(this.startDate).getDatePart(); }, this.ea = function () { this.nav.corner && (this.nav.corner.style.height = this.headerHeight + "px"); }, this.ia = function () { var e = this.Ga(); this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px"); }, this.ra = {}, this.ra.scope = null, this.ra.notify = function () { n.ra.scope && n.ra.scope["$apply"](); }, this.ra.apply = function (e) { e(); }, this.Wa = function () {
|
|
1828
1836
|
if (n.nav.scroll) {
|
|
1829
1837
|
var e = n.nav.scroll.scrollTop, t = e / (2 * n.cellHeight);
|
|
1830
|
-
n.
|
|
1838
|
+
n.Xa.scrollHour = t;
|
|
1831
1839
|
}
|
|
1832
|
-
}, this.
|
|
1833
|
-
for (var e = this.
|
|
1840
|
+
}, this.cb = function () { var e = 0; "number" == typeof n.Xa.scrollHour ? e = 2 * n.cellHeight * n.Xa.scrollHour : "Auto" === n.initScrollPos && (e = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), n.nav.scroll.scrollTop = e; }, this.kb = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof n.events.list || !n.events.list); }, this.s = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { n.visible = !0, n.nav.top.style.display = "", this.Ya(); }, this.hide = function () { n.visible = !1, n.nav.top.style.display = "none"; }, this.lb = function () { this.bb(), this.ca(), this.Fa(), this.fa(), this.ga(), this.Ya(), this.Va(), this.Za(), t.register(this), this.mb(), this.R("Init"); }, this.Xa = {}, this.nb = function () { this.Xa.themes = [], this.Xa.themes.push(this.theme || this.cssClassPrefix); }, this.ob = function () {
|
|
1841
|
+
for (var e = this.Xa.themes, t = 0; t < e.length; t++) {
|
|
1834
1842
|
var i = e[t];
|
|
1835
1843
|
DayPilot.Util.removeClass(this.nav.top, i + "_main");
|
|
1836
1844
|
}
|
|
1837
|
-
this.
|
|
1838
|
-
}, this.
|
|
1845
|
+
this.Xa.themes = [];
|
|
1846
|
+
}, this.pb = function () {
|
|
1839
1847
|
if (this.afterRender(null, !1), "function" == typeof this.onAfterRender) {
|
|
1840
1848
|
var e = {};
|
|
1841
1849
|
e.isCallBack = !1, this.onAfterRender(e);
|
|
1842
1850
|
}
|
|
1843
|
-
}, this.
|
|
1844
|
-
if ("function" == typeof this.onInit && !this.
|
|
1845
|
-
this.
|
|
1851
|
+
}, this.qb = function () {
|
|
1852
|
+
if ("function" == typeof this.onInit && !this.rb) {
|
|
1853
|
+
this.rb = !0;
|
|
1846
1854
|
var e = {};
|
|
1847
1855
|
this.onInit(e);
|
|
1848
1856
|
}
|
|
1849
|
-
}, this.
|
|
1857
|
+
}, this.sb = function () { var e = n.nav.top; return !!e && (e.offsetWidth > 0 && e.offsetHeight > 0); }, this.mb = function () { var e = n.sb; e() || (n.U = setInterval(function () { e() && (n.Va(), n.Ya(), clearInterval(n.U)); }, 100)); }, this.Ja = function (e, t) { return n._.aa() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.internal = {}, this.internal.loadOptions = n.ab, this.internal.xssTextHtml = n.Ja, this.init = function () { this.fb(); var e = this.kb(); return this.nb(), e ? void this.lb() : (this.bb(), this.ca(), this.da(), this.Fa(), this.fa(), this.ga(), this.s(), this.Ya(), this.Va(), this.Za(), t.register(this), this.events && (this.ea(), this.ja()), this.pb(), this.qb(), this.mb(), this.Aa = !0, this); }, this.Init = this.init, this.ab(i);
|
|
1850
1858
|
}, DayPilot.CalendarColumn = function (e, t) { var i = this; i.id = e.id, i.name = e.name, i.data = e.data, i.start = new DayPilot.Date(e.start), i.calendar = t, i.toJSON = function () { var e = {}; return e.id = this.id, this.start && (e.start = this.start.toString()), e.name = this.name, e; }; }, DayPilot.Calendar = t.Calendar, "undefined" != typeof jQuery && !function (e) {
|
|
1851
1859
|
e.fn.daypilotCalendar = function (e) {
|
|
1852
1860
|
var t = null, i = this.each(function () {
|
|
@@ -1865,7 +1873,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1865
1873
|
e && e.directive("daypilotCalendar", ["$parse", function (e) {
|
|
1866
1874
|
return { "restrict": "E", "template": "<div></div>", "replace": !0, "link": function (t, i, a) {
|
|
1867
1875
|
var n = new DayPilot.Calendar(i[0]);
|
|
1868
|
-
n.
|
|
1876
|
+
n.ra.scope = t, n.init();
|
|
1869
1877
|
var o = a["id"];
|
|
1870
1878
|
o && (t[o] = n);
|
|
1871
1879
|
var r = a["publishAs"];
|
|
@@ -1878,7 +1886,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1878
1886
|
l.call(t, d, function (e) {
|
|
1879
1887
|
for (var t in e)
|
|
1880
1888
|
n[t] = e[t];
|
|
1881
|
-
n.update(), n.
|
|
1889
|
+
n.update(), n.qb();
|
|
1882
1890
|
}, !0), l.call(t, c, function (e) { n.events.list = e, n.update(); }, !0);
|
|
1883
1891
|
} };
|
|
1884
1892
|
}]);
|
|
@@ -1888,13 +1896,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
1888
1896
|
var DayPilot = {};
|
|
1889
1897
|
if (function () {
|
|
1890
1898
|
"undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (e) {
|
|
1891
|
-
this.v = "2024.
|
|
1899
|
+
this.v = "2024.3.539-lite";
|
|
1892
1900
|
var t = "navigator_" + (new Date).getTime(), i = this;
|
|
1893
1901
|
this.onShow = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.prepare = function () {
|
|
1894
1902
|
if (this.locale = "en-us", this.target = null, this.targetAlignment = "left", this.resetTarget = !0, this.pattern = this._.locale().datePattern, this.theme = "navigator_default", this.patterns = [], this.zIndex = null, e)
|
|
1895
1903
|
for (var t in e)
|
|
1896
1904
|
this[t] = e[t];
|
|
1897
|
-
}, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.
|
|
1905
|
+
}, this.init = function () { this.date = new DayPilot.Date(this.date); var e = this.tb(); this.resetTarget && !e ? this.ub(this.date) : this.resetTarget || (i.date = e); var t = this.B(); return t && t.addEventListener("input", function () { i.date = i.tb(), i.date && i.navigator.select(i.date, { dontNotify: !0 }); }), document.addEventListener("mousedown", function () { i.close(); }), this; }, this.close = function () { this.sb && (this.sb = !1, this.navigator && this.navigator.dispose(), this.div.innerHTML = "", this.div && this.div.parentNode === document.body && document.body.removeChild(this.div)); }, this.setDate = function (e) { this.date = new DayPilot.Date(e), this.ub(this.date); }, this.tb = function () {
|
|
1898
1906
|
var e = this.B();
|
|
1899
1907
|
if (!e)
|
|
1900
1908
|
return this.date;
|
|
@@ -1907,26 +1915,26 @@ if (function () {
|
|
|
1907
1915
|
a = DayPilot.Date.parse(t, i.patterns[n]);
|
|
1908
1916
|
}
|
|
1909
1917
|
return a;
|
|
1910
|
-
}, this.
|
|
1918
|
+
}, this.ub = function (e) {
|
|
1911
1919
|
var t = this.B();
|
|
1912
1920
|
if (t) {
|
|
1913
1921
|
var a = e.toString(i.pattern, i.locale);
|
|
1914
1922
|
"INPUT" === t.tagName ? t.value = a : t.innerHTML = a;
|
|
1915
1923
|
}
|
|
1916
|
-
}, this._ = {}, this._.locale = function () { return DayPilot.Locale.find(i.locale); }, this.B = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return i.
|
|
1917
|
-
if (!this.
|
|
1924
|
+
}, this._ = {}, this._.locale = function () { return DayPilot.Locale.find(i.locale); }, this.B = function () { var e = this.target; return e && e.nodeType && 1 === e.nodeType ? e : document.getElementById(e); }, Object.defineProperty(this, "visible", { get: function () { return i.sb; } }), this.show = function () {
|
|
1925
|
+
if (!this.sb) {
|
|
1918
1926
|
var e = this.B(), a = this.navigator, a = new DayPilot.Navigator(t);
|
|
1919
|
-
a.api = 2, a.cssOnly = !0, a.theme = i.theme, a.weekStarts = "Auto", a.locale = i.locale, a.onTimeRangeSelected = function (e) { i.date = e.start; var t = e.start.addTime(a.
|
|
1927
|
+
a.api = 2, a.cssOnly = !0, a.theme = i.theme, a.weekStarts = "Auto", a.locale = i.locale, a.onTimeRangeSelected = function (e) { i.date = e.start; var t = e.start.addTime(a.vb), n = t.toString(i.pattern, i.locale), e = {}; e.start = t, e.date = t, e.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(e), e.preventDefault.value) || (i.ub(n), i.close(), "function" == typeof i.onTimeRangeSelected && i.onTimeRangeSelected(e)); }, this.navigator = a;
|
|
1920
1928
|
var n = DayPilot.abs(e), o = e.offsetHeight, r = i.targetAlignment, s = document.createElement("div");
|
|
1921
1929
|
s.style.position = "absolute", "left" === r && (s.style.left = n.x + "px"), s.style.top = n.y + o + "px", i.zIndex && (s.style.zIndex = i.zIndex);
|
|
1922
1930
|
var l = document.createElement("div");
|
|
1923
1931
|
l.id = t, s.appendChild(l), s.addEventListener("mousedown", function (e) { var e = e || window.event; e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }), document.body.appendChild(s), this.div = s;
|
|
1924
|
-
var d = i.
|
|
1925
|
-
if (a.startDate = d, a.
|
|
1932
|
+
var d = i.tb() || (new DayPilot.Date).getDatePart();
|
|
1933
|
+
if (a.startDate = d, a.vb = d.getTimePart(), a.selectionDay = d.getDatePart(), a.init(), "right" === r) {
|
|
1926
1934
|
var c = n.x + e.offsetWidth - a.nav.top.offsetWidth;
|
|
1927
1935
|
s.style.left = c + "px";
|
|
1928
1936
|
}
|
|
1929
|
-
this.
|
|
1937
|
+
this.sb = !0, this.onShow && this.onShow();
|
|
1930
1938
|
}
|
|
1931
1939
|
}, this.prepare(), this.init();
|
|
1932
1940
|
});
|
|
@@ -1938,10 +1946,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1938
1946
|
var e = function () { }, t = {};
|
|
1939
1947
|
t.mouse = null, t.menu = null, t.handlersRegistered = !1, t.hideTimeout = null, t.waitingSubmenu = null, DayPilot.Menu = function (i) {
|
|
1940
1948
|
var a = this, n = null;
|
|
1941
|
-
this.v = "2024.
|
|
1949
|
+
this.v = "2024.3.539-lite", this.zIndex = 120, this.cssClassPrefix = "menu_default", this.cssOnly = !0, this.menuTitle = null, this.showMenuTitle = !1, this.hideOnMouseOut = !1, this.hideAfter = 200, this.theme = null, this.onShow = null, this.wb = function () { }, i && DayPilot.isArray(i) && (this.items = i), this.toJSON = function () { return null; }, this.show = function (i, o) {
|
|
1942
1950
|
o = o || {};
|
|
1943
1951
|
var r = null;
|
|
1944
|
-
if (i ? "string" == typeof i.id || "number" == typeof i.id ? r = i.id : "function" == typeof i.id ? r = i.id() : "function" == typeof i.value && (r = i.value()) : r = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), o.submenu || t.menuClean(), this.
|
|
1952
|
+
if (i ? "string" == typeof i.id || "number" == typeof i.id ? r = i.id : "function" == typeof i.id ? r = i.id() : "function" == typeof i.value && (r = i.value()) : r = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), o.submenu || t.menuClean(), this.wb.submenu = null, null !== t.mouse) {
|
|
1945
1953
|
a.cssOnly || (a.cssOnly = !0);
|
|
1946
1954
|
var s = null;
|
|
1947
1955
|
if (i && i.isRow && i.$.row.task ? (s = new DayPilot.Task(i.$.row.task, i.calendar), s.menuType = "resource") : s = i && i.isEvent && i.data.task ? new DayPilot.Task(i, i.calendar) : i, "function" == typeof a.onShow) {
|
|
@@ -1950,15 +1958,15 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1950
1958
|
return;
|
|
1951
1959
|
}
|
|
1952
1960
|
var d = document.createElement("div");
|
|
1953
|
-
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.
|
|
1961
|
+
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.xb("main"), d.onclick = function (e) { e.cancelBubble = !0, this.parentNode.removeChild(this); }, this.hideOnMouseOut && (d.onmousemove = function (e) { clearTimeout(t.hideTimeout); }, d.onmouseleave = function (e) { a.delayedHide({ "hideParent": !0 }); }), !this.items || 0 === this.items.length)
|
|
1954
1962
|
throw "No menu items defined.";
|
|
1955
1963
|
if (this.showMenuTitle) {
|
|
1956
1964
|
var c = document.createElement("div");
|
|
1957
|
-
c.innerHTML = this.menuTitle, c.className = this.
|
|
1965
|
+
c.innerHTML = this.menuTitle, c.className = this.xb("title"), d.appendChild(c);
|
|
1958
1966
|
}
|
|
1959
1967
|
for (var u = 0; u < this.items.length; u++) {
|
|
1960
1968
|
var h = this.items[u], f = document.createElement("div");
|
|
1961
|
-
if (DayPilot.Util.addClass(f, this.
|
|
1969
|
+
if (DayPilot.Util.addClass(f, this.xb("item")), h.items && (DayPilot.Util.addClass(f, this.xb("item_haschildren")), DayPilot.Util.addClass(d, this.xb("withchildren"))), "undefined" != typeof h && !h.hidden) {
|
|
1962
1970
|
if ("-" === h.text) {
|
|
1963
1971
|
var m = document.createElement("div");
|
|
1964
1972
|
m.addEventListener("click", function (e) { e.stopPropagation(); }), f.appendChild(m);
|
|
@@ -1966,7 +1974,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1966
1974
|
else {
|
|
1967
1975
|
var p = document.createElement("a");
|
|
1968
1976
|
if (p.style.position = "relative", p.style.display = "block", h.cssClass && DayPilot.Util.addClass(p, h.cssClass), h.disabled)
|
|
1969
|
-
DayPilot.Util.addClass(p, a.
|
|
1977
|
+
DayPilot.Util.addClass(p, a.xb("item_disabled"));
|
|
1970
1978
|
else {
|
|
1971
1979
|
if (h.onclick || h.onClick) {
|
|
1972
1980
|
p.item = h, p.onclick = function (e, t) {
|
|
@@ -1994,7 +2002,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
1994
2002
|
DayPilot.reNonPassive(p, "touchstart", function (e) { e.stopPropagation(), e.preventDefault(), p.source.calendar.internal.touch.active = !0; }), DayPilot.reNonPassive(p, "touchend", v(h, p));
|
|
1995
2003
|
}
|
|
1996
2004
|
if (h.items && !h.disabled) {
|
|
1997
|
-
var y = function (e, t) { return function (i) { i.preventDefault(), i.stopPropagation(), a.
|
|
2005
|
+
var y = function (e, t) { return function (i) { i.preventDefault(), i.stopPropagation(), a.yb(e, t); }; };
|
|
1998
2006
|
p.ontouchend = y(h, p);
|
|
1999
2007
|
}
|
|
2000
2008
|
if (h.onclick)
|
|
@@ -2030,13 +2038,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2030
2038
|
}
|
|
2031
2039
|
h.items && p.addEventListener("click", function (e) { e.stopPropagation(); }), p.source = s, p.menuSource = i;
|
|
2032
2040
|
var g = document.createElement("span");
|
|
2033
|
-
if (g.className = a.
|
|
2041
|
+
if (g.className = a.xb("item_text"), g.innerHTML = DayPilot.Util.escapeTextHtml(h.text, h.html), p.appendChild(g), h.image) {
|
|
2034
2042
|
var b = document.createElement("img");
|
|
2035
2043
|
b.src = h.image, b.style.position = "absolute", b.style.top = "0px", b.style.left = "0px", p.appendChild(b);
|
|
2036
2044
|
}
|
|
2037
2045
|
if (h.icon) {
|
|
2038
2046
|
var D = document.createElement("span");
|
|
2039
|
-
D.className = a.
|
|
2047
|
+
D.className = a.xb("item_icon");
|
|
2040
2048
|
var x = document.createElement("i");
|
|
2041
2049
|
x.className = h.icon, D.appendChild(x), p.appendChild(D);
|
|
2042
2050
|
}
|
|
@@ -2045,10 +2053,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2045
2053
|
C.setAttribute("width", "100%"), C.setAttribute("height", "100%");
|
|
2046
2054
|
var P = document.createElementNS(w, "use");
|
|
2047
2055
|
P.setAttribute("href", h.symbol), C.appendChild(P);
|
|
2048
|
-
var
|
|
2049
|
-
|
|
2056
|
+
var k = document.createElement("span");
|
|
2057
|
+
k.className = a.xb("item_symbol"), k.style.position = "absolute", k.style.top = "0px", k.style.left = "0px", k.appendChild(C), p.appendChild(k);
|
|
2050
2058
|
}
|
|
2051
|
-
var
|
|
2059
|
+
var _ = function (e, i) {
|
|
2052
2060
|
return function () {
|
|
2053
2061
|
var n = (i.source, e), o = t.waitingSubmenu;
|
|
2054
2062
|
if (o) {
|
|
@@ -2056,16 +2064,16 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2056
2064
|
return;
|
|
2057
2065
|
clearTimeout(o.timeout), t.waitingSubmenu = null;
|
|
2058
2066
|
}
|
|
2059
|
-
e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = n, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.
|
|
2067
|
+
e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = n, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, a.yb(n, i); }, 300));
|
|
2060
2068
|
};
|
|
2061
2069
|
};
|
|
2062
|
-
p.onmouseover =
|
|
2070
|
+
p.onmouseover = _(h, p), f.appendChild(p);
|
|
2063
2071
|
}
|
|
2064
2072
|
d.appendChild(f);
|
|
2065
2073
|
}
|
|
2066
2074
|
}
|
|
2067
2075
|
var S = function (e) { window.setTimeout(function () { t.menuClean(), DayPilot.MenuBar.deactivate(); }, 100); };
|
|
2068
|
-
d.onclick = S, d.ontouchend = S, d.onmousedown = function (e) { e = e || window.event, e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.
|
|
2076
|
+
d.onclick = S, d.ontouchend = S, d.onmousedown = function (e) { e = e || window.event, e.cancelBubble = !0, e.stopPropagation && e.stopPropagation(); }, d.oncontextmenu = function () { return !1; }, document.body.appendChild(d), a.wb.visible = !0, a.wb.source = i, d.style.display = "";
|
|
2069
2077
|
var M = d.offsetHeight, T = d.offsetWidth;
|
|
2070
2078
|
d.style.display = "none";
|
|
2071
2079
|
var A = document.documentElement.clientHeight, H = window.innerWidth, E = "number" == typeof o.windowMargin ? o.windowMargin : 5;
|
|
@@ -2093,23 +2101,23 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2093
2101
|
else
|
|
2094
2102
|
d.style.left = e + "px";
|
|
2095
2103
|
}(), o.parentLink) {
|
|
2096
|
-
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")),
|
|
2097
|
-
O + T > H && (O = Math.max(0,
|
|
2104
|
+
var N = o.parentLink, I = parseInt(new DayPilot.StyleReader(d).get("border-top-width")), R = DayPilot.abs(o.parentLink.parentNode), O = R.x + N.offsetWidth, z = R.y - I;
|
|
2105
|
+
O + T > H && (O = Math.max(0, R.x - T));
|
|
2098
2106
|
var U = document.body.scrollTop + document.documentElement.scrollTop;
|
|
2099
|
-
|
|
2107
|
+
z + M - U > A && (z = Math.max(0, A - M + U)), d.style.left = O + "px", d.style.top = z + "px";
|
|
2100
2108
|
}
|
|
2101
|
-
d.style.display = "", this.addShadow(d), this.
|
|
2109
|
+
d.style.display = "", this.addShadow(d), this.wb.div = d, o.submenu || (DayPilot.Menu.active = this);
|
|
2102
2110
|
}
|
|
2103
|
-
}, this.
|
|
2111
|
+
}, this.yb = function (e, t) {
|
|
2104
2112
|
var i = e, n = t.source;
|
|
2105
|
-
if ((!a.
|
|
2113
|
+
if ((!a.wb.submenu || a.wb.submenu.item !== e) && (a.wb.submenu && a.wb.submenu.item !== e && (DayPilot.Util.removeClass(a.wb.submenu.link.parentNode, a.xb("item_haschildren_active")), a.wb.submenu.menu.hide(), a.wb.submenu = null), e.items)) {
|
|
2106
2114
|
var o = a.cloneOptions();
|
|
2107
|
-
o.items = e.items, a.
|
|
2115
|
+
o.items = e.items, a.wb.submenu = {}, a.wb.submenu.menu = new DayPilot.Menu(o), a.wb.submenu.menu.zb = a, a.wb.submenu.menu.show(n, { "submenu": !0, "parentLink": t, "parentItem": i }), a.wb.submenu.item = e, a.wb.submenu.link = t, DayPilot.Util.addClass(t.parentNode, a.xb("item_haschildren_active"));
|
|
2108
2116
|
}
|
|
2109
|
-
}, this.
|
|
2110
|
-
e = e || {}, this.
|
|
2117
|
+
}, this.xb = function (e) { var t = this.theme || this.cssClassPrefix, i = this.cssOnly ? "_" : ""; return t ? t + i + e : ""; }, this.cloneOptions = function () { return DayPilot.Util.copyProps(o, {}, ["cssClassPrefix", "theme", "hideAfter", "hideOnMouseOut", "zIndex"]); }, this.hide = function (e) {
|
|
2118
|
+
e = e || {}, this.wb.submenu && this.wb.submenu.menu.hide();
|
|
2111
2119
|
var i = t.waitingSubmenu;
|
|
2112
|
-
if (i && (t.waitingSubmenu = null, clearTimeout(i.timeout)), this.removeShadow(), this.
|
|
2120
|
+
if (i && (t.waitingSubmenu = null, clearTimeout(i.timeout)), this.removeShadow(), this.wb.div && this.wb.div.parentNode === document.body && document.body.removeChild(this.wb.div), n && (DayPilot.de(n), n = null), a.wb.visible = !1, a.wb.source = null, a.zb && e.hideParent && a.zb.hide(e), DayPilot.Menu.active === a && (DayPilot.Menu.active = null), "function" == typeof this.onHide) {
|
|
2113
2121
|
var o = {};
|
|
2114
2122
|
this.onHide(o);
|
|
2115
2123
|
}
|
|
@@ -2120,31 +2128,31 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2120
2128
|
this[r] = o[r];
|
|
2121
2129
|
}, DayPilot.MenuBar = function (e, t) {
|
|
2122
2130
|
var i = this;
|
|
2123
|
-
t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.k = null, this.
|
|
2131
|
+
t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = DayPilot.list(), this.k = null, this.Aa = !1;
|
|
2124
2132
|
for (var a in t)
|
|
2125
2133
|
this[a] = t[a];
|
|
2126
|
-
this.
|
|
2134
|
+
this.Ab = function (e) { return this.theme + "_" + e; }, this.s = function () {
|
|
2127
2135
|
this.nav.top = document.getElementById(e);
|
|
2128
2136
|
var t = this.nav.top;
|
|
2129
|
-
t.className = this.
|
|
2137
|
+
t.className = this.Ab("main"), DayPilot.list(i.items).forEach(function (e) {
|
|
2130
2138
|
var a = document.createElement("span");
|
|
2131
|
-
a.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), a.className = i.
|
|
2139
|
+
a.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), a.className = i.Ab("item"), e.cssClass && a.classList.add(e.cssClass), a.data = e, a.onclick = function (t) {
|
|
2132
2140
|
if (i.active && i.active.item === e)
|
|
2133
|
-
i.
|
|
2141
|
+
i.Bb();
|
|
2134
2142
|
else if (e.children)
|
|
2135
|
-
return void i.
|
|
2143
|
+
return void i.Cb(a);
|
|
2136
2144
|
if ("function" == typeof e.onClick) {
|
|
2137
2145
|
var n = {};
|
|
2138
2146
|
n.item = e, n.originalEvent = t, e.onClick(n);
|
|
2139
2147
|
}
|
|
2140
|
-
}, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { i.active && i.active.item !== e && i.
|
|
2148
|
+
}, a.onmousedown = function (e) { e.stopPropagation(); }, a.onmouseover = function () { i.active && i.active.item !== e && i.Cb(a); }, t.appendChild(a), i.elements.items.push(a);
|
|
2141
2149
|
});
|
|
2142
|
-
}, this.
|
|
2143
|
-
if (!i.
|
|
2144
|
-
i.
|
|
2150
|
+
}, this.Bb = function () { var e = i.Ab("item_active"); i.elements.items.forEach(function (t) { DayPilot.Util.removeClass(t, e); }), i.active && i.active.menu && i.active.menu.hide(), i.active = null; }, this.Db = function (e) { return !!i.active && i.active.item === e.data; }, this.Cb = function (e) {
|
|
2151
|
+
if (!i.Db(e)) {
|
|
2152
|
+
i.Bb();
|
|
2145
2153
|
var t = e.data, a = i.active = {};
|
|
2146
2154
|
a.item = t, a.div = e;
|
|
2147
|
-
var n = i.
|
|
2155
|
+
var n = i.Ab("item_active");
|
|
2148
2156
|
DayPilot.Util.addClass(e, n);
|
|
2149
2157
|
var o = DayPilot.abs(e);
|
|
2150
2158
|
if (t.children) {
|
|
@@ -2154,8 +2162,8 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2154
2162
|
}
|
|
2155
2163
|
DayPilot.MenuBar.active = i;
|
|
2156
2164
|
}
|
|
2157
|
-
}, this.init = function () { return this.s(), this.
|
|
2158
|
-
}, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.
|
|
2165
|
+
}, this.init = function () { return this.s(), this.Aa = !0, this; }, this.dispose = function () { this.Aa && (this.nav.top.innerHTML = "", this.elements.items = []); };
|
|
2166
|
+
}, DayPilot.MenuBar.deactivate = function () { DayPilot.MenuBar.active && (DayPilot.MenuBar.active.Bb(), DayPilot.MenuBar.active = null); }, t.menuClean = function () { "undefined" != typeof DayPilot.Menu.active && DayPilot.Menu.active && (DayPilot.Menu.active.hide(), DayPilot.Menu.active = null); }, t.mouseDown = function (e) { "undefined" != typeof t && (t.menuClean(), DayPilot.MenuBar.deactivate()); }, t.mouseMove = function (e) { "undefined" != typeof t && (t.mouse = t.mousePosition(e)); }, t.touchMove = function (e) { "undefined" != typeof t && (t.mouse = t.touchPosition(e)); }, t.touchStart = function (e) { "undefined" != typeof t && (t.mouse = t.touchPosition(e)); }, t.touchEnd = function (e) { }, t.touchPosition = function (e) {
|
|
2159
2167
|
if (!e || !e.touches)
|
|
2160
2168
|
return null;
|
|
2161
2169
|
var t = e.touches[0], i = {};
|
|
@@ -2164,7 +2172,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2164
2172
|
if (e = e || {}, e.calendar) {
|
|
2165
2173
|
var i = DayPilot.Menu.active;
|
|
2166
2174
|
if (i) {
|
|
2167
|
-
var a = i.
|
|
2175
|
+
var a = i.wb.source;
|
|
2168
2176
|
a && a.calendar === e.calendar && t.menuClean();
|
|
2169
2177
|
}
|
|
2170
2178
|
}
|
|
@@ -2242,32 +2250,32 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2242
2250
|
"undefined" != typeof navigator && navigator.userAgent.indexOf("Edge") !== -1 && n.add(".modal_default_form_item_date input::-ms-clear", "display: none;"), n.add(".modal_default_form_item_scrollable_scroll", "width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"), n.add(".modal_default_form_item_scrollable_scroll_content", "padding: 5px;"), n.add(".modal_default_form_item_searchable", "position: relative;"), n.add(".modal_default_form_item_searchable_icon", ""), n.add(".modal_default_form_item_searchable_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_searchable_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_searchable_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_searchable_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_time", "position: relative;"), n.add(".modal_default_form_item_time_icon", ""), n.add(".modal_default_form_item_time_icon:after", "content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url(" + a + ");"), n.add(".modal_default_form_item_time_list", "box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"), n.add(".modal_default_form_item_time_list_item", "background: white; padding: 2px; cursor: default;"), n.add(".modal_default_form_item_time_list_item_highlight", "background: #ccc;"), n.add(".modal_default_form_item_datetime_parent", "display: flex;"), n.add(".modal_default_form_item_datetime .modal_default_form_item_time_main", "margin-left: 5px;"), n.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ", ""), n.add(".modal_default_form_item_tabular_main", "margin-top: 10px;"), n.add(".modal_default_form_item_tabular_table", "display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"), n.add(".modal_default_form_item_tabular_tbody", "display: table-row-group;"), n.add(".modal_default_form_item_tabular_row", "display: table-row;"), n.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header", ""), n.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction", "padding: 0px; width: 23px;"), n.add(".modal_default_form_item_tabular_cell", "display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"), n.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell", "padding-left: 0px; padding-bottom: 0px;"), n.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]", "width:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_table select", "width:100%; height:100%; box-sizing: border-box;"), n.add(".modal_default_form_item_tabular_plus", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_plus:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_delete", "display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"), n.add(".modal_default_form_item_tabular_delete:after", "content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus", "display: none;"), n.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete", "visibility: hidden;"), n.add(".modal_default_form_item_tabular_empty", "height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"), n.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell", "padding: 0px;"), n.add(".modal_min_main", "border: 1px solid #ccc; max-width: 90%;"), n.add(".modal_min_background", "opacity: 0.5; background-color: #000;"), n.add(".modal_min_ok", "padding: 3px 10px;"), n.add(".modal_min_cancel", "padding: 3px 10px;"), n.add(".navigator_modal_main", "border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"), n.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after", "box-sizing: content-box;"), n.add(".navigator_modal_month", "font-size: 11px;"), n.add(".navigator_modal_day", "color: black;"), n.add(".navigator_modal_weekend", "background-color: #f0f0f0;"), n.add(".navigator_modal_dayheader", "color: black;"), n.add(".navigator_modal_line", "border-bottom: 1px solid #c0c0c0;"), n.add(".navigator_modal_dayother", "color: gray;"), n.add(".navigator_modal_todaybox", "border: 1px solid red;"), n.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright", "border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"), n.add(".navigator_modal_busy", "font-weight: bold;"), n.add(".navigator_modal_cell", "text-align: center;"), n.add(".navigator_modal_select .navigator_modal_cell_box", "background-color: #FFE794; opacity: 0.5;"), n.add(".navigator_modal_title", "text-align: center;"), n.add(".navigator_modal_titleleft, .navigator_modal_titleright", "text-align: center;"), n.add(".navigator_modal_dayheader", "text-align: center;"), n.add(".navigator_modal_weeknumber", "text-align: center;"), n.add(".navigator_modal_cell_text", "cursor: pointer;"), n.commit(), DayPilot.Modal = function (e) {
|
|
2243
2251
|
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;
|
|
2244
2252
|
var t = this;
|
|
2245
|
-
this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.
|
|
2253
|
+
this.id = "_" + (new Date).getTime() + "n" + 10 * Math.random(), this.Eb = !1, this.Fb = null, this.Gb = null, this.showHtml = function (e) {
|
|
2246
2254
|
if (DayPilot.ModalStatic.displayed(this))
|
|
2247
2255
|
throw "This modal dialog is already displayed.";
|
|
2248
|
-
if (this.div || this.
|
|
2256
|
+
if (this.div || this.Hb(), this.$a(), this.useIframe) {
|
|
2249
2257
|
var t = function (e, t) { return function () { e.setInnerHTML(e.id + "iframe", t); }; };
|
|
2250
2258
|
window.setTimeout(t(this, e), 0);
|
|
2251
2259
|
}
|
|
2252
2260
|
else
|
|
2253
2261
|
e.nodeType ? this.div.appendChild(e) : this.div.innerHTML = e;
|
|
2254
|
-
this
|
|
2262
|
+
this.$a(), this.Ib(), this.Jb();
|
|
2255
2263
|
}, this.showUrl = function (e) {
|
|
2256
2264
|
if (DayPilot.ModalStatic.displayed(this))
|
|
2257
2265
|
throw "This modal dialog is already displayed.";
|
|
2258
2266
|
if (this.useIframe) {
|
|
2259
|
-
this.div || this.
|
|
2267
|
+
this.div || this.Hb();
|
|
2260
2268
|
var i = this.loadingHtml;
|
|
2261
|
-
i && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", i)), this.re(this.iframe, "load", this.
|
|
2269
|
+
i && (this.iframe.src = "about:blank", this.setInnerHTML(this.id + "iframe", i)), this.re(this.iframe, "load", this.Kb), this.iframe.src = e, this.$a(), this.Ib(), this.Jb();
|
|
2262
2270
|
}
|
|
2263
2271
|
else
|
|
2264
|
-
t.
|
|
2265
|
-
}, this.
|
|
2272
|
+
t.Lb({ "url": e, "success": function (e) { var i = e.request.responseText; t.showHtml(i); }, "error": function (e) { t.showHtml("Error loading the modal dialog"); } });
|
|
2273
|
+
}, this.Jb = function () {
|
|
2266
2274
|
if ("function" == typeof t.onShow) {
|
|
2267
2275
|
var e = {};
|
|
2268
|
-
e.root = t.
|
|
2276
|
+
e.root = t.Mb(), e.modal = t, t.onShow(e);
|
|
2269
2277
|
}
|
|
2270
|
-
}, this.
|
|
2278
|
+
}, this.Mb = function () { return t.iframe ? t.iframe.contentWindow.document : t.div; }, this.Lb = function (e) {
|
|
2271
2279
|
var t = new XMLHttpRequest;
|
|
2272
2280
|
if (t) {
|
|
2273
2281
|
var i = e.method || "GET", a = e.success || function () { }, n = e.error || function () { }, o = e.data, r = e.url;
|
|
@@ -2285,30 +2293,30 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2285
2293
|
window.console && console.log("HTTP error " + t.status);
|
|
2286
2294
|
}, 4 !== t.readyState && ("object" == typeof o && (o = JSON.stringify(o)), t.send(o));
|
|
2287
2295
|
}
|
|
2288
|
-
}, this
|
|
2289
|
-
var e = function () { return t.
|
|
2296
|
+
}, this.$a = function () { delete this.result; var e = window, i = document, a = e.pageYOffset ? e.pageYOffset : i.documentElement && i.documentElement.scrollTop ? i.documentElement.scrollTop : i.body.scrollTop; this.theme && (this.hideDiv.className = this.theme + "_background"), this.zIndex && (this.hideDiv.style.zIndex = this.zIndex), this.hideDiv.style.display = "", window.setTimeout(function () { t.hideDiv && (t.hideDiv.onclick = function () { t.hide({ "backgroundClick": !0 }); }); }, 500), this.theme ? this.div.className = this.theme + "_main" : this.div.className = "", this.className && (this.div.className += " " + this.className), this.left ? this.div.style.left = this.left + "px" : this.div.style.marginLeft = "-" + Math.floor(this.width / 2) + "px", this.div.style.position = "absolute", this.div.style.boxSizing = "content-box", this.div.style.top = a + this.top + "px", this.div.style.width = this.width + "px", this.zIndex && (this.div.style.zIndex = this.zIndex), this.height && (this.useIframe || !this.autoStretch ? this.div.style.height = this.height + "px" : this.div.style.height = ""), this.useIframe && this.height && (this.iframe.style.height = this.height + "px"), this.div.style.display = "", this.Ob(), DayPilot.ModalStatic.remove(this), DayPilot.ModalStatic.list.push(this); }, this.Kb = function () { t.iframe.contentWindow.modal = t, t.autoStretch && t.stretch(); }, this.stretch = function () {
|
|
2297
|
+
var e = function () { return t.Nb().y; }, i = function () { return t.Nb().x; };
|
|
2290
2298
|
if (this.useIframe) {
|
|
2291
|
-
for (var a = i() - 40, n = this.width; n < a && this.
|
|
2299
|
+
for (var a = i() - 40, n = this.width; n < a && this.Pb(); n += 10)
|
|
2292
2300
|
this.div.style.width = n + "px", this.div.style.marginLeft = "-" + Math.floor(n / 2) + "px";
|
|
2293
|
-
for (var o = this.maxHeight || e() - 2 * this.top, r = this.height; r < o && this.
|
|
2301
|
+
for (var o = this.maxHeight || e() - 2 * this.top, r = this.height; r < o && this.Qb(); r += 10)
|
|
2294
2302
|
this.iframe.style.height = r + "px", this.div.style.height = r + "px";
|
|
2295
|
-
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.
|
|
2303
|
+
this.autoStretchFirstLoadOnly && this.ue(this.iframe, "load", this.Kb);
|
|
2296
2304
|
}
|
|
2297
2305
|
else
|
|
2298
2306
|
this.div.style.height = "";
|
|
2299
|
-
}, this.
|
|
2307
|
+
}, this.Pb = function () {
|
|
2300
2308
|
for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollWidth, a = e.body.children, n = 0; n < a.length; n++) {
|
|
2301
2309
|
var o = a[n].offsetLeft + a[n].offsetWidth;
|
|
2302
2310
|
i = Math.max(i, o);
|
|
2303
2311
|
}
|
|
2304
2312
|
return i > t.clientWidth;
|
|
2305
|
-
}, this.
|
|
2313
|
+
}, this.Qb = function () {
|
|
2306
2314
|
for (var e = this.iframe.contentWindow.document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement, i = t.scrollHeight, a = e.body.children, n = 0; n < a.length; n++) {
|
|
2307
2315
|
var o = a[n].offsetTop + a[n].offsetHeight;
|
|
2308
2316
|
i = Math.max(i, o);
|
|
2309
2317
|
}
|
|
2310
2318
|
return i > t.clientHeight;
|
|
2311
|
-
}, this.
|
|
2319
|
+
}, this.Nb = function () {
|
|
2312
2320
|
var e = document;
|
|
2313
2321
|
if ("CSS1Compat" === e.compatMode && e.documentElement && e.documentElement.clientWidth) {
|
|
2314
2322
|
var t = e.documentElement.clientWidth, i = e.documentElement.clientHeight;
|
|
@@ -2316,32 +2324,32 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2316
2324
|
}
|
|
2317
2325
|
var t = e.body.clientWidth, i = e.body.clientHeight;
|
|
2318
2326
|
return { x: t, y: i };
|
|
2319
|
-
}, this.
|
|
2320
|
-
if (t.
|
|
2321
|
-
var e = e || window.event, i = t.mc(e), a = i.x - t.
|
|
2322
|
-
t.div.style.marginLeft = "0px", t.div.style.top = t.
|
|
2327
|
+
}, this.Ib = function () { this.Eb || (this.re(window, "resize", this.Rb), this.re(window, "scroll", this.Sb), this.dragDrop && (this.re(document, "mousemove", this.Tb), this.re(document, "mouseup", this.Ub)), this.Eb = !0); }, this.Vb = function () { this.ue(window, "resize", this.Rb), this.ue(window, "scroll", this.Sb), this.dragDrop && (this.ue(document, "mousemove", this.Tb), this.ue(document, "mouseup", this.Ub)), this.Eb = !1; }, this.Wb = function (e) { e.target === t.div && (e.preventDefault(), t.div.style.cursor = "move", t.Xb(), t.Gb = t.mc(e || window.event), t.Fb = { x: t.div.offsetLeft, y: t.div.offsetTop }); }, this.Tb = function (e) {
|
|
2328
|
+
if (t.Gb) {
|
|
2329
|
+
var e = e || window.event, i = t.mc(e), a = i.x - t.Gb.x, n = i.y - t.Gb.y;
|
|
2330
|
+
t.div.style.marginLeft = "0px", t.div.style.top = t.Fb.y + n + "px", t.div.style.left = t.Fb.x + a + "px";
|
|
2323
2331
|
}
|
|
2324
|
-
}, this.
|
|
2332
|
+
}, this.Ub = function (e) { t.Gb && (t.Yb(), t.div.style.cursor = null, t.Gb = null); }, this.Xb = function () {
|
|
2325
2333
|
if (this.useIframe) {
|
|
2326
2334
|
var e = document.createElement("div");
|
|
2327
2335
|
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;
|
|
2328
2336
|
}
|
|
2329
|
-
}, this.
|
|
2337
|
+
}, this.Yb = function () { this.useIframe && (this.div.removeChild(this.mask), this.mask = null); }, this.Rb = function () { t.Zb(), t.Ob(); }, this.Sb = function () { t.Zb(); }, this.Ob = function () {
|
|
2330
2338
|
if (!t.left && t.div) {
|
|
2331
2339
|
var e = t.div.offsetWidth;
|
|
2332
2340
|
t.div.style.marginLeft = "-" + Math.floor(e / 2) + "px";
|
|
2333
2341
|
}
|
|
2334
|
-
}, this.
|
|
2342
|
+
}, this.Zb = function () {
|
|
2335
2343
|
if (t.hideDiv && t.div && "none" !== t.hideDiv.style.display && "none" !== t.div.style.display) {
|
|
2336
|
-
var e = t.
|
|
2344
|
+
var e = t.$b.scrollY();
|
|
2337
2345
|
t.scrollWithPage || (t.div.style.top = e + t.top + "px");
|
|
2338
2346
|
}
|
|
2339
|
-
}, this
|
|
2347
|
+
}, this.$b = {}, this.$b.container = function () { return t.container || document.body; }, this.$b.scrollY = function () { var e = t.$b.container(); return e === document.body ? window.pageYOffset ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop : e.scrollTop; }, this.re = function (e, t, i) { e.addEventListener ? e.addEventListener(t, i, !1) : e.attachEvent && e.attachEvent("on" + t, i); }, this.ue = function (e, t, i) { e.removeEventListener ? e.removeEventListener(t, i, !1) : e.detachEvent && e.detachEvent("on" + t, i); }, this.mc = function (e) { return e.pageX || e.pageY ? { x: e.pageX, y: e.pageY } : { x: e.clientX + document.documentElement.scrollLeft, y: e.clientY + document.documentElement.scrollTop }; }, this.abs = function (e) {
|
|
2340
2348
|
for (var t = { x: e.offsetLeft, y: e.offsetTop }; e.offsetParent;)
|
|
2341
2349
|
e = e.offsetParent, t.x += e.offsetLeft, t.y += e.offsetTop;
|
|
2342
2350
|
return t;
|
|
2343
|
-
}, this.
|
|
2344
|
-
for (var e = t.
|
|
2351
|
+
}, this.Hb = function () { var e = t.$b.container(), i = e === document.body, a = i ? "fixed" : "absolute", n = document.createElement("div"); n.id = this.id + "hide", n.style.position = a, n.style.left = "0px", n.style.top = "0px", n.style.right = "0px", n.style.bottom = "0px", n.oncontextmenu = function () { return !1; }, n.onmousedown = function () { return !1; }, e.appendChild(n); var o = document.createElement("div"); o.id = this.id + "popup", o.style.position = a, o.style.left = "50%", o.style.top = "0px", o.style.backgroundColor = "white", o.style.width = "50px", o.style.height = "50px", this.dragDrop && (o.onmousedown = this.Wb), o.addEventListener("keydown", function (e) { e.stopPropagation(); }); var r = null; this.useIframe && (r = document.createElement("iframe"), r.id = this.id + "iframe", r.name = this.id + "iframe", r.frameBorder = "0", r.style.width = "100%", r.style.height = "50px", o.appendChild(r)), e.appendChild(o), this.div = o, this.iframe = r, this.hideDiv = n; }, this.setInnerHTML = function (e, i) { var a = window.frames[e], n = a.contentWindow || a.document || a.contentDocument; n.document && (n = n.document), null == n.body && n.write("<body></body>"), i.nodeType ? n.body.appendChild(i) : n.body.innerHTML = i, t.autoStretch && (t.autoStretchFirstLoadOnly && t._b || (t.stretch(), t._b = !0)); }, this.close = function (e) { this.result = e, this.hide(); }, this.closeSerialized = function () {
|
|
2352
|
+
for (var e = t.Mb(), i = e.querySelectorAll("input, textarea, select"), a = {}, n = 0; n < i.length; n++) {
|
|
2345
2353
|
var o = i[n], r = o.name;
|
|
2346
2354
|
if (r) {
|
|
2347
2355
|
var s = o.value;
|
|
@@ -2349,11 +2357,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2349
2357
|
}
|
|
2350
2358
|
}
|
|
2351
2359
|
t.close(a);
|
|
2352
|
-
}, this.hide = function (e) { e = e || {}; var i = {}; i.backgroundClick = !!e.backgroundClick, i.result = this.result, i.canceled = "undefined" == typeof this.result, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(i), i.preventDefault.value) || (this.div && (this.div.style.display = "none", this.hideDiv.style.display = "none", this.useIframe || (this.div.innerHTML = null)), window.focus(), DayPilot.ModalStatic.remove(this), "function" == typeof this.onClosed ? this.onClosed(i) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.
|
|
2360
|
+
}, this.hide = function (e) { e = e || {}; var i = {}; i.backgroundClick = !!e.backgroundClick, i.result = this.result, i.canceled = "undefined" == typeof this.result, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof this.onClose && (this.onClose(i), i.preventDefault.value) || (this.div && (this.div.style.display = "none", this.hideDiv.style.display = "none", this.useIframe || (this.div.innerHTML = null)), window.focus(), DayPilot.ModalStatic.remove(this), "function" == typeof this.onClosed ? this.onClosed(i) : this.closed && this.closed(), delete this.result, this.disposeOnClose && (t.Vb(), t.bc(t.div), t.bc(t.hideDiv), t.div = null, t.hideDiv = null, t.iframe = null)); }, this.bc = function (e) { e && e.parentNode && e.parentNode.removeChild(e); }, this.cc = function () {
|
|
2353
2361
|
if (e)
|
|
2354
2362
|
for (var t in e)
|
|
2355
2363
|
this[t] = e[t];
|
|
2356
|
-
}, this.
|
|
2364
|
+
}, this.cc();
|
|
2357
2365
|
}, DayPilot.Modal.alert = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var i = t.okText || "OK"; t.cancelText || "Cancel"; return DayPilot.getPromise(function (a, n) { t.onClosed = function (e) { a(e); }; var o = new DayPilot.Modal(t), r = document.createElement("div"); r.className = o.theme + "_inner"; var s = document.createElement("div"); s.className = o.theme + "_content", s.innerHTML = e; var l = document.createElement("div"); l.className = o.theme + "_buttons"; var d = document.createElement("button"); d.innerText = i, d.className = o.theme + "_ok", d.onclick = function (e) { DayPilot.ModalStatic.close("OK"); }, l.appendChild(d), r.appendChild(s), r.appendChild(l), o.showHtml(r), o.autoFocus && d.focus(); }); }, DayPilot.Modal.confirm = function (e, t) { t = t || {}, t.height = t.height || 40, t.useIframe = !1; var i = t.okText || "OK", a = t.cancelText || "Cancel"; return DayPilot.getPromise(function (n, o) { t.onClosed = function (e) { n(e); }; var r = new DayPilot.Modal(t), s = document.createElement("div"); s.className = r.theme + "_inner"; var l = document.createElement("div"); l.className = r.theme + "_content", l.innerHTML = e; var d = document.createElement("div"); d.className = r.theme + "_buttons"; var c = document.createElement("button"); c.innerText = i, c.className = r.theme + "_ok", c.onclick = function (e) { DayPilot.ModalStatic.close("OK"); }; var u = document.createTextNode(" "), h = document.createElement("button"); h.innerText = a, h.className = r.theme + "_cancel", h.onclick = function (e) { DayPilot.ModalStatic.close(); }, d.appendChild(c), d.appendChild(u), d.appendChild(h), s.appendChild(l), s.appendChild(d), r.showHtml(s), r.autoFocus && c.focus(); }); }, DayPilot.Modal.prompt = function (e, t, i) {
|
|
2358
2366
|
"object" == typeof t && (i = t, t = ""), i = i || {}, i.height = i.height || 40, i.useIframe = !1;
|
|
2359
2367
|
var a = i.okText || "OK", n = i.cancelText || "Cancel", o = t || "";
|
|
@@ -2465,11 +2473,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2465
2473
|
t.stretch();
|
|
2466
2474
|
}, DayPilot.Modal.closeSerialized = function () { var e = DayPilot.Modal.opener() || DayPilot.ModalStatic.last(); e && e.closeSerialized(); }, DayPilot.Modal.opener = function () { return "undefined" != typeof DayPilot && "undefined" != typeof DayPilot.ModalStatic && DayPilot.ModalStatic.list.length > 0 ? DayPilot.ModalStatic.list[DayPilot.ModalStatic.list.length - 1] : parent && parent.DayPilot && parent.DayPilot.ModalStatic && parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length - 1]; }, DayPilot.Modal.Experimental = {}, DayPilot.Modal.Experimental.Form = r, "undefined" == typeof DayPilot.getPromise && (DayPilot.getPromise = function (e) { return "undefined" != typeof Promise ? new Promise(e) : (DayPilot.Promise = function (e) { var t = this; this.then = function (t, i) { return t = t || function () { }, i = i || function () { }, e(t, i), DayPilot.getPromise(e); }, this["catch"] = function (i) { return t.then(null, i), DayPilot.getPromise(e); }; }, new DayPilot.Promise(e)); });
|
|
2467
2475
|
var r = function (e) {
|
|
2468
|
-
this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.
|
|
2476
|
+
this.form = [], this.data = {}, this.theme = "form_default", this.zIndex = 99999, this.locale = "en-us", this.plugins = {}, this.onKey = null, this.dc = [], this.ec = null, this.canceling = !1, this.fc = [], this.f = [], this.gc = null, e = e || {};
|
|
2469
2477
|
for (var t in e)
|
|
2470
2478
|
this[t] = e[t];
|
|
2471
2479
|
};
|
|
2472
|
-
r.prototype.create = function () { return this.load(), this.render(), this.
|
|
2480
|
+
r.prototype.create = function () { return this.load(), this.render(), this.gc; }, r.prototype.render = function () { var e = this; this.gc = document.createElement("div"), this.dc.forEach(function (t) { e.createView(t); }), this.applyState(); }, r.prototype.createView = function (e) {
|
|
2473
2481
|
var t = this.theme, i = this, a = document.createElement("div");
|
|
2474
2482
|
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) {
|
|
2475
2483
|
var n = document.createElement("div");
|
|
@@ -2477,13 +2485,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2477
2485
|
}
|
|
2478
2486
|
var o = this.createInteractive(e);
|
|
2479
2487
|
o.onInput = function (e) {
|
|
2480
|
-
if (e = e || {}, i.
|
|
2488
|
+
if (e = e || {}, i.hc(o, { "debounce": !e.immediate }), "function" == typeof i.onChange) {
|
|
2481
2489
|
var t = {};
|
|
2482
2490
|
t.result = i.serialize(), i.onChange(t);
|
|
2483
2491
|
}
|
|
2484
|
-
}, o.onBlur = function () { i.canceling || i.
|
|
2485
|
-
}, r.prototype.validate = function () { var e = this, t = !0; return this.f.forEach(function (i) { var a = e.
|
|
2486
|
-
function i() { e.
|
|
2492
|
+
}, o.onBlur = function () { i.canceling || i.hc(o); }, o.apply(e), o.gc = a, o.row = e, o.element && a.appendChild(o.element), this.f.push(o), this.gc.appendChild(a);
|
|
2493
|
+
}, r.prototype.validate = function () { var e = this, t = !0; return this.f.forEach(function (i) { var a = e.hc(i); t = t && a; }), t; }, r.prototype.hc = function (e, t) {
|
|
2494
|
+
function i() { e.ic && (e.ic.remove(), e.ic = null), e.gc.classList.add(u); var t = document.createElement("div"); t.classList.add(h), t.innerText = c.message, e.ic = t, e.gc.appendChild(t); }
|
|
2487
2495
|
t = t || {};
|
|
2488
2496
|
var a = t.debounce, n = t.silent, o = e.row, r = !0, s = "function" == typeof o.data.onValidate ? o.data.onValidate : null, l = "function" == typeof o.data.validate ? o.data.validate : null, d = s || l;
|
|
2489
2497
|
if (d) {
|
|
@@ -2491,11 +2499,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2491
2499
|
c.valid = !0, c.value = e.save()[o.field], c.message = "Error", c.values = this.serialize(), c.result = this.serialize(), d(c);
|
|
2492
2500
|
var u = this.theme + "_form_item_invalid", h = this.theme + "_form_item_invalid_message";
|
|
2493
2501
|
if (c.valid)
|
|
2494
|
-
clearTimeout(this.
|
|
2502
|
+
clearTimeout(this.fc[o.field]), e.ic && (e.ic.remove(), e.ic = null), e.gc.classList.remove(u);
|
|
2495
2503
|
else if (!n)
|
|
2496
2504
|
if (a) {
|
|
2497
2505
|
var f = 1e3;
|
|
2498
|
-
clearTimeout(this.
|
|
2506
|
+
clearTimeout(this.fc[o.field]), this.fc[o.field] = setTimeout(function () { i(); }, f);
|
|
2499
2507
|
}
|
|
2500
2508
|
else
|
|
2501
2509
|
i();
|
|
@@ -2515,34 +2523,34 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2515
2523
|
}
|
|
2516
2524
|
for (var n in i)
|
|
2517
2525
|
this.setValue(n, i[n]);
|
|
2518
|
-
}, r.prototype.setValue = function (e, t) { this.
|
|
2526
|
+
}, r.prototype.setValue = function (e, t) { this.dc.forEach(function (i) { i.applyValue(e, t); }); }, r.prototype.updateDependentState = function () { var e = this, t = [!0]; (this.ec ? this.ec : this.dc).forEach(function (i) { var a = e.updateState(i, { enabled: t[i.level] && !i.data.disabled }); a.isValue && (t[a.level + 1] = a.enabled && a.checked); }); }, r.prototype.processFormItem = function (e, t) {
|
|
2519
2527
|
var i = this, a = this.getFieldType(e), n = [];
|
|
2520
2528
|
if ("radio" === a) {
|
|
2521
2529
|
if (e.name) {
|
|
2522
2530
|
var o = new s;
|
|
2523
|
-
o.field = e.id, o.data = e, o.level = t, o.type = "label", o.interactive = !1, o.text = e.name, i.
|
|
2531
|
+
o.field = e.id, o.data = e, o.level = t, o.type = "label", o.interactive = !1, o.text = e.name, i.dc.push(o), n.push(o);
|
|
2524
2532
|
}
|
|
2525
|
-
e.options.forEach(function (o) { var r = new s; r.field = e.id, r.data = o, r.level = t, r.type = a, r.isValue = !0, r.text = o.name, r.resolved = o.id, i.
|
|
2533
|
+
e.options.forEach(function (o) { var r = new s; r.field = e.id, r.data = o, r.level = t, r.type = a, r.isValue = !0, r.text = o.name, r.resolved = o.id, i.dc.push(r), n.push(r), o.children && o.children.forEach(function (e) { var a = i.processFormItem(e, t + 1); n = n.concat(a); }); });
|
|
2526
2534
|
}
|
|
2527
2535
|
else if ("title" === a) {
|
|
2528
2536
|
var o = new s;
|
|
2529
|
-
o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = e.name, i.
|
|
2537
|
+
o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = e.name, i.dc.push(o), n.push(o);
|
|
2530
2538
|
}
|
|
2531
2539
|
else if ("image" === a) {
|
|
2532
2540
|
var o = new s;
|
|
2533
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.
|
|
2541
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.dc.push(o), n.push(o);
|
|
2534
2542
|
}
|
|
2535
2543
|
else if ("html" === a) {
|
|
2536
2544
|
var o = new s;
|
|
2537
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.
|
|
2545
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.dc.push(o), n.push(o);
|
|
2538
2546
|
}
|
|
2539
2547
|
else if ("scrollable" === a) {
|
|
2540
2548
|
var o = new s;
|
|
2541
|
-
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.
|
|
2549
|
+
o.isValue = !0, o.field = e.id, o.data = e, o.level = t, o.type = a, o.interactive = !1, o.text = null, i.dc.push(o), n.push(o);
|
|
2542
2550
|
}
|
|
2543
2551
|
else {
|
|
2544
2552
|
var o = new s;
|
|
2545
|
-
o.field = e.id, o.data = e, o.level = t, o.type = a, o.text = e.name, o.children = [], i.
|
|
2553
|
+
o.field = e.id, o.data = e, o.level = t, o.type = a, o.text = e.name, o.children = [], i.dc.push(o), n.push(o);
|
|
2546
2554
|
}
|
|
2547
2555
|
return "checkbox" === a && (o.isValue = !0, o.resolved = !0, e.children && e.children.forEach(function (e) { var a = i.processFormItem(e, t + 1); n = n.concat(a); })), n;
|
|
2548
2556
|
}, r.prototype.doOnKey = function (e) {
|
|
@@ -2607,21 +2615,21 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2607
2615
|
}
|
|
2608
2616
|
i || (e.preventDefault(), e.stopPropagation());
|
|
2609
2617
|
}, a.onfocus = function () { n.show(); }, a.onclick = function () { n.show(); }, a.oninput = function (e) { i.onInput(); }, a.onblur = function (e) { i.onBlur(); }, i.element = a, i.picker = n, i.canFocus = function () { return !i.element.disabled; }, i.focus = function () { i.element.focus(); }, i.save = function () { var t = n.date ? n.date.toString() : null, i = {}; return i[e.field] = t, i; }, i;
|
|
2610
|
-
}, "time": function () { return t.
|
|
2618
|
+
}, "time": function () { return t.jc(e); }, "datetime": function () { return t.kc(e); }, "select": function () { var t = new l; t.apply = function (e) { t.row = e; var i = t.element; i.value = e.value, i.disabled = !e.enabled; }; var i = document.createElement("select"); return i.name = e.field, e.data.options && e.data.options.forEach && e.data.options.forEach(function (e) { var t = document.createElement("option"); t.innerText = e.name || e.id, t.value = e.id, t.lc = e.id, i.appendChild(t); }), i.onchange = function (e) { t.onInput({ "immediate": !0 }); }, i.onblur = function (e) { t.onBlur(); }, t.element = i, t.canFocus = function () { return !t.element.disabled; }, t.focus = function () { t.element.focus(); }, t.save = function () { var t = null, a = i.options[i.selectedIndex]; a && "undefined" != typeof a.lc && (t = a.lc); var n = {}; return n[e.field] = t, n; }, t; }, "searchable": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); }; var a = new d({ data: e.data.options || [], name: e.field, theme: t.theme + "_form_item_searchable", listZIndex: t.zIndex + 1, onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), n = a.create(); return i.element = n, i.searchable = a, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = a.selected && a.selected.id, i = {}; return i[e.field] = t, i; }, i; }, "radio": function () {
|
|
2611
2619
|
var i = new l;
|
|
2612
2620
|
i.apply = function (e) { i.row = e; var t = i.radio; t.checked = e.checked, t.disabled = !e.enabled; };
|
|
2613
2621
|
var a = document.createElement("label"), n = document.createElement("input");
|
|
2614
|
-
n.type = "radio", n.name = e.field, n.
|
|
2622
|
+
n.type = "radio", n.name = e.field, n.lc = e.resolved, n.onchange = function (e) { var a = i.row; t.findRowsByField(a.field).forEach(function (e) { t.updateState(e, { checked: !1 }); }), t.updateState(a, { checked: !0 }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n);
|
|
2615
2623
|
var o = document.createTextNode(e.text);
|
|
2616
2624
|
return a.append(o), i.element = a, i.radio = n, i.canFocus = function () { return !1; }, i.focus = function () { i.radio.focus(); }, i.save = function () {
|
|
2617
2625
|
if (!n.checked)
|
|
2618
2626
|
return {};
|
|
2619
|
-
var t = n.
|
|
2627
|
+
var t = n.lc, i = {};
|
|
2620
2628
|
return i[e.field] = t, i;
|
|
2621
2629
|
}, i;
|
|
2622
|
-
}, "checkbox": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "checkbox", n.name = e.field, n.
|
|
2630
|
+
}, "checkbox": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.checkbox; t.checked = e.checked, t.disabled = !e.enabled; }; var a = document.createElement("label"), n = document.createElement("input"); n.type = "checkbox", n.name = e.field, n.lc = e.resolved, n.onchange = function (e) { var a = i.row; t.updateState(a, { checked: this.checked }), t.applyState(), i.onInput({ "immediate": !0 }); }, n.onblur = function (e) { i.onBlur(); }, a.appendChild(n); var o = document.createTextNode(e.text); return a.append(o), i.element = a, i.checkbox = n, i.canFocus = function () { return !1; }, i.focus = function () { i.checkbox.focus(); }, i.save = function () { var t = n.checked, i = {}; return i[e.field] = t, i; }, i; }, "table": function () { var i = new l; i.apply = function (e) { i.row = e; var t = i.table; t.disabled = !e.enabled, t.load(e.value || []); }; var a = new c({ name: e.field, form: t, theme: t.theme + "_form_item_tabular", item: e.data, onInput: function (e) { i.onInput(); } }), n = a.create(); return i.element = n, i.table = a, i.canFocus = function () { return !1; }, i.focus = function () { i.table.focus(); }, i.save = function () { var t = a.save(), i = {}; return i[e.field] = t, i; }, i; } };
|
|
2623
2631
|
return t.plugins && t.plugins[e.type] ? t.plugins[e.type](e) : i[e.type]();
|
|
2624
|
-
}, r.prototype.
|
|
2632
|
+
}, r.prototype.jc = function (e) {
|
|
2625
2633
|
var t = this, i = new l;
|
|
2626
2634
|
i.apply = function (e) { i.row = e; var t = i.searchable; t.disabled = !e.enabled, t.select(e.value); };
|
|
2627
2635
|
var a = [], n = e.data.timeInterval || 15;
|
|
@@ -2632,7 +2640,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2632
2640
|
}
|
|
2633
2641
|
var m = new d({ data: a, name: e.field, theme: t.theme + "_form_item_time", listZIndex: t.zIndex + 1, strategy: "startsWith", onSelect: function (e) { e.ui && i.onInput({ "immediate": !0 }); } }), p = m.create();
|
|
2634
2642
|
return i.element = p, i.searchable = m, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.searchable.focus(); }, i.save = function () { var t = m.selected && m.selected.id, i = {}; return i[e.field] = t, i; }, i;
|
|
2635
|
-
}, r.prototype.
|
|
2643
|
+
}, r.prototype.kc = function (e) {
|
|
2636
2644
|
var t = this, i = new l;
|
|
2637
2645
|
i.apply = function (e) {
|
|
2638
2646
|
i.row = e;
|
|
@@ -2682,9 +2690,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2682
2690
|
return i.searchable = f, f.create();
|
|
2683
2691
|
}(), o = document.createElement("div");
|
|
2684
2692
|
return o.className = t.theme + "_form_item_datetime_parent", o.appendChild(a), o.appendChild(n), i.element = o, i.canFocus = function () { return !i.searchable.disabled; }, i.focus = function () { i.dateInput.focus(); }, i.save = function () { var t = i.searchable.selected && i.searchable.selected.id, a = i.picker.date ? i.picker.date.toString() : null, n = new DayPilot.Date(a).getDatePart(), o = DayPilot.Date.parse(n.toString("yyyy-dd-MM ") + t, "yyyy-dd-MM HH:mm"), r = {}; return r[e.field] = o, r; }, i;
|
|
2685
|
-
}, r.prototype.findRowsByField = function (e) { return this.
|
|
2686
|
-
var i = this.
|
|
2687
|
-
return this.
|
|
2693
|
+
}, r.prototype.findRowsByField = function (e) { return this.dc.filter(function (t) { return t.field === e; }); }, r.prototype.findViewById = function (e, t) { return this.f.find(function (i) { return i.row.field === e && ("radio" !== i.row.type || i.row.resolved === t); }); }, r.prototype.firstFocusable = function () { return this.f.find(function (e) { return e.canFocus && e.canFocus(); }); }, r.prototype.updateState = function (e, t) {
|
|
2694
|
+
var i = this.ec ? this.ec : this.dc, a = i.indexOf(e);
|
|
2695
|
+
return this.ec = i.map(function (i) {
|
|
2688
2696
|
if (i !== e)
|
|
2689
2697
|
return i;
|
|
2690
2698
|
if (e.propsEqual(t))
|
|
@@ -2693,11 +2701,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2693
2701
|
for (var n in t)
|
|
2694
2702
|
a[n] = t[n];
|
|
2695
2703
|
return a;
|
|
2696
|
-
}), this.
|
|
2697
|
-
}, r.prototype.updateInteractive = function (e) { var t = this.
|
|
2704
|
+
}), this.ec[a];
|
|
2705
|
+
}, r.prototype.updateInteractive = function (e) { var t = this.ec.indexOf(e); this.f[t].apply(e); }, r.prototype.applyState = function () {
|
|
2698
2706
|
var e = this;
|
|
2699
|
-
if (this.updateDependentState(), this.
|
|
2700
|
-
this.
|
|
2707
|
+
if (this.updateDependentState(), this.ec) {
|
|
2708
|
+
this.ec.filter(function (t, i) { return e.dc[i] !== t; }).forEach(function (t) { e.updateInteractive(t); }), this.dc = this.ec, this.ec = null;
|
|
2701
2709
|
}
|
|
2702
2710
|
}, r.prototype.getFieldType = function (e) { return ["text", "date", "select", "searchable", "radio", "checkbox", "table", "title", "image", "html", "textarea", "scrollable", "time", "datetime"].indexOf(e.type) !== -1 ? e.type : e.type && this.plugins && this.plugins[e.type] ? e.type : e.image ? "image" : e.html || e.text ? "html" : e.id ? e.options ? "searchable" : e.dateFormat ? "date" : e.columns ? "table" : "text" : "title"; }, r.prototype.serialize = function () {
|
|
2703
2711
|
var e = {};
|
|
@@ -2720,18 +2728,18 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2720
2728
|
return !0;
|
|
2721
2729
|
}, s.prototype.guid = function () { var e = function () { return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); }; return "" + e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e(); }, s.prototype.applyValue = function (e, t) { this.field === e && (this.value = t, this.isValue && t === this.resolved && (this.checked = !0)); };
|
|
2722
2730
|
var l = function () { this.element = null, this.canFocus = function () { return !1; }, this.apply = function (e) { }, this.focus = function () { }, this.save = function () { return {}; }; }, d = function (e) {
|
|
2723
|
-
this.data = [], this.name = null, this.theme = "searchable_default", this.
|
|
2724
|
-
var t = this, i = { "selected": { post: function (e) { "object" == typeof e && e.id ? t.
|
|
2725
|
-
Object.defineProperty(this, "selected", { get: function () { return this.
|
|
2731
|
+
this.data = [], this.name = null, this.theme = "searchable_default", this.nc = !1, this.listZIndex = 1e5, this.onSelect = null, this.oc = null, this.pc = null, this.qc = !1, this.rc = null, this.sc = null, this.o = [], this.tc = null, e = e || {};
|
|
2732
|
+
var t = this, i = { "selected": { post: function (e) { "object" == typeof e && e.id ? t.oc = e : "string" != typeof e && "number" != typeof e || t.select(e); } } };
|
|
2733
|
+
Object.defineProperty(this, "selected", { get: function () { return this.oc; } }), Object.defineProperty(this, "disabled", { get: function () { return this.nc; }, set: function (e) { this.nc = e, this.rc && (this.rc.disabled = e, e && this.uc()); } });
|
|
2726
2734
|
for (var a in e)
|
|
2727
2735
|
i[a] || (this[a] = e[a]);
|
|
2728
2736
|
for (var a in e)
|
|
2729
2737
|
i[a] && i[a].post(e[a]);
|
|
2730
2738
|
};
|
|
2731
|
-
d.prototype.select = function (e) { return this.
|
|
2739
|
+
d.prototype.select = function (e) { return this.oc = this.data.find(function (t) { return t.id === e; }), this.vc(!1), this; }, d.prototype.create = function () {
|
|
2732
2740
|
function e(e) {
|
|
2733
2741
|
var i = l.strategy;
|
|
2734
|
-
"includes" !== l.strategy && "startsWith" !== l.strategy && (i = "includes"), e = e || i || "includes", h.style.display = "", h.style.top = m.offsetHeight + "px", h.style.left = "0px", h.style.width = m.offsetWidth + "px", h.innerHTML = "", h.addEventListener("mousedown", function (e) { e.preventDefault(); }), l.
|
|
2742
|
+
"includes" !== l.strategy && "startsWith" !== l.strategy && (i = "includes"), e = e || i || "includes", h.style.display = "", h.style.top = m.offsetHeight + "px", h.style.left = "0px", h.style.width = m.offsetWidth + "px", h.innerHTML = "", h.addEventListener("mousedown", function (e) { e.preventDefault(); }), l.pc = null, l.o = [];
|
|
2735
2743
|
var n = null;
|
|
2736
2744
|
l.data.forEach(function (i) {
|
|
2737
2745
|
var o = i.name || i.id;
|
|
@@ -2742,27 +2750,27 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2742
2750
|
else if ("startsWith" === e && 0 !== o.toLowerCase().indexOf(m.value.toLowerCase()))
|
|
2743
2751
|
return;
|
|
2744
2752
|
var r = document.createElement("div");
|
|
2745
|
-
r.className = l.theme + "_list_item", r.innerText = o, r.item = i, i === l.
|
|
2746
|
-
}), l.
|
|
2753
|
+
r.className = l.theme + "_list_item", r.innerText = o, r.item = i, i === l.oc && (l.pc = r), n || (n = r), r.addEventListener("mousedown", function (e) { a(r), e.preventDefault(); }), r.addEventListener("mousemove", function (e) { l.pc !== r && (l.pc = r, t({ dontScroll: !0 })); }), h.appendChild(r), l.o.push(r);
|
|
2754
|
+
}), l.pc || (l.pc = n), t();
|
|
2747
2755
|
}
|
|
2748
|
-
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.
|
|
2756
|
+
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.pc && (l.pc.className += " " + l.theme + "_list_item_highlight", t && !i(l.pc, h) && l.pc.scrollIntoView()); }
|
|
2749
2757
|
function i(e, t) { var i = e.getBoundingClientRect(), a = t.getBoundingClientRect(); return i.top >= a.top && i.bottom <= a.bottom; }
|
|
2750
|
-
function a(e) { var t = e.item; l.
|
|
2751
|
-
function n() { l.
|
|
2758
|
+
function a(e) { var t = e.item; l.oc = t, l.vc(!0), o(), r(); }
|
|
2759
|
+
function n() { l.uc(); }
|
|
2752
2760
|
function o() { l.p(); }
|
|
2753
|
-
function r() { l.
|
|
2754
|
-
function s() { l.
|
|
2761
|
+
function r() { l.qc = !0, m.setAttribute("readonly", "readonly"), m.focus(); }
|
|
2762
|
+
function s() { l.qc = !1, m.removeAttribute("readonly"), m.select(), e("all"); }
|
|
2755
2763
|
var l = this, d = this, c = document.createElement("div");
|
|
2756
2764
|
c.className = this.theme + "_main", c.style.position = "relative";
|
|
2757
2765
|
var u = document.createElement("div");
|
|
2758
|
-
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.
|
|
2766
|
+
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.qc ? (l.focus(), s()) : (n(), r()); });
|
|
2759
2767
|
var h = document.createElement("div");
|
|
2760
2768
|
h.className = this.theme + "_list", h.style.display = "none", h.style.position = "absolute", h.style.zIndex = this.listZIndex;
|
|
2761
2769
|
var f = document.createElement("input");
|
|
2762
|
-
f.type = "hidden", f.name = this.name, f.searchable = d, this.
|
|
2770
|
+
f.type = "hidden", f.name = this.name, f.searchable = d, this.tc = f;
|
|
2763
2771
|
var m = document.createElement("input");
|
|
2764
|
-
return m.type = "text", m.className = this.theme + "_input", m.disabled = this.
|
|
2765
|
-
if (l.
|
|
2772
|
+
return m.type = "text", m.className = this.theme + "_input", m.disabled = this.nc, m.addEventListener("click", function (e) { s(); }), m.addEventListener("focus", function (t) { e("all"); }), m.addEventListener("input", function (t) { e(); }), m.addEventListener("blur", function (e) { m.removeAttribute("readonly"), n(); }), m.addEventListener("keydown", function (e) {
|
|
2773
|
+
if (l.qc) {
|
|
2766
2774
|
if ("Enter" === e.key)
|
|
2767
2775
|
return;
|
|
2768
2776
|
if ("Esc" === e.key || "Escape" === e.key)
|
|
@@ -2770,24 +2778,24 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2770
2778
|
s();
|
|
2771
2779
|
}
|
|
2772
2780
|
if ("ArrowDown" === e.key) {
|
|
2773
|
-
var i = d.o.indexOf(d.
|
|
2774
|
-
i + 1 < d.o.length && (d.
|
|
2781
|
+
var i = d.o.indexOf(d.pc);
|
|
2782
|
+
i + 1 < d.o.length && (d.pc = d.o[i + 1]), t();
|
|
2775
2783
|
}
|
|
2776
2784
|
else if ("ArrowUp" === e.key) {
|
|
2777
|
-
var i = d.o.indexOf(d.
|
|
2778
|
-
i - 1 >= 0 && (d.
|
|
2785
|
+
var i = d.o.indexOf(d.pc);
|
|
2786
|
+
i - 1 >= 0 && (d.pc = d.o[i - 1]), t();
|
|
2779
2787
|
}
|
|
2780
2788
|
else
|
|
2781
|
-
"Enter" === e.key ? l.
|
|
2782
|
-
}), this.
|
|
2783
|
-
}, d.prototype.
|
|
2784
|
-
if (this.
|
|
2789
|
+
"Enter" === e.key ? l.pc ? (e.stopPropagation(), a(l.pc)) : (e.stopPropagation(), n(), r()) : "Esc" !== e.key && "Escape" !== e.key || (e.stopPropagation(), n(), r());
|
|
2790
|
+
}), this.rc = m, this.sc = h, this.oc || (this.oc = this.data[0], this.oc && (m.value = this.oc.name)), c.appendChild(m), c.appendChild(u), c.appendChild(f), c.appendChild(h), c;
|
|
2791
|
+
}, d.prototype.uc = function () { this.p(), this.oc ? this.rc.value = this.oc.name : (this.rc.value = "", this.vc(!0)); }, d.prototype.focus = function () { this.qc = !0, this.rc.setAttribute("readonly", "readonly"), this.rc.focus(), this.uc(); }, d.prototype.p = function () { this.sc.style.display = "none"; }, d.prototype.vc = function (e) {
|
|
2792
|
+
if (this.tc.value = this.selected ? this.selected.id : null, this.oc ? this.rc.value = this.oc.name : this.rc.value = "", "function" == typeof this.onSelect) {
|
|
2785
2793
|
var t = { control: this, ui: e };
|
|
2786
2794
|
this.onSelect(t);
|
|
2787
2795
|
}
|
|
2788
2796
|
};
|
|
2789
2797
|
var c = function (e) {
|
|
2790
|
-
this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.
|
|
2798
|
+
this.form = null, this.item = null, this.data = null, this.name = null, this.theme = "edit_table_default", this.onInput = null, this.nav = {}, this.wc = null, this.dc = [], e = e || {};
|
|
2791
2799
|
for (var t in e)
|
|
2792
2800
|
this[t] = e[t];
|
|
2793
2801
|
};
|
|
@@ -2798,11 +2806,11 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2798
2806
|
i.type = "hidden", i.name = e.name, i.table = this, t.appendChild(i);
|
|
2799
2807
|
var a = document.createElement("div");
|
|
2800
2808
|
a.className = this.theme + "_table";
|
|
2801
|
-
var n = this.
|
|
2809
|
+
var n = this.xc();
|
|
2802
2810
|
a.appendChild(n);
|
|
2803
|
-
var o = e.
|
|
2811
|
+
var o = e.yc({});
|
|
2804
2812
|
o.spacer = !0;
|
|
2805
|
-
var r = this.
|
|
2813
|
+
var r = this.zc(o);
|
|
2806
2814
|
r.classList.add(e.theme + "_spacer"), a.appendChild(r);
|
|
2807
2815
|
var s = document.createElement("div");
|
|
2808
2816
|
s.className = e.theme + "_tbody", a.appendChild(s), t.appendChild(a);
|
|
@@ -2816,18 +2824,18 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2816
2824
|
var n = {};
|
|
2817
2825
|
n.result = e.form.serialize(), n.value = {}, i(n), a = n.value;
|
|
2818
2826
|
}
|
|
2819
|
-
var o = e.
|
|
2820
|
-
e.
|
|
2827
|
+
var o = e.yc(a);
|
|
2828
|
+
e.dc.push(o), e.Ac(), e.Bc();
|
|
2821
2829
|
}
|
|
2822
2830
|
}), this.nav.plus = c, d.appendChild(c), t.appendChild(d), t;
|
|
2823
|
-
}, c.prototype.
|
|
2831
|
+
}, c.prototype.xc = function () { var e = this, t = document.createElement("div"); return t.classList.add(this.theme + "_row"), t.classList.add(this.theme + "_header"), this.item.columns.forEach(function (i) { var a = document.createElement("div"); a.classList.add(e.theme + "_cell"), a.innerText = i.name, t.appendChild(a); }), t; }, c.prototype.Cc = function () { var e = this.item.max || 0; return !!(e && this.dc.length >= e); }, c.prototype.save = function () { var e = this, t = []; return e.dc.forEach(function (e) { var i = {}; e.cells.forEach(function (e) { i[e.id] = e.value; }), t.push(i); }), t; }, c.prototype.load = function (e) {
|
|
2824
2832
|
if ("[object Array]" !== Object.prototype.toString.call(e))
|
|
2825
2833
|
throw new Error("Array expected");
|
|
2826
|
-
this.data = e, this.
|
|
2827
|
-
}, c.prototype.
|
|
2834
|
+
this.data = e, this.Dc(), this.Ac();
|
|
2835
|
+
}, c.prototype.Ec = function () { this.disabled ? this.nav.main.classList.add(this.theme + "_disabled") : this.nav.main.classList.remove(this.theme + "_disabled"), this.Cc() ? this.nav.plus.classList.add(this.theme + "_plus_max") : this.nav.plus.classList.remove(this.theme + "_plus_max"); }, c.prototype.Dc = function () { var e = this; this.dc = [], this.data.forEach(function (t) { var i = e.yc(t); e.dc.push(i); }); }, c.prototype.Fc = function (e) { var t = this, i = t.dc.indexOf(e); t.dc.splice(i, 1); }, c.prototype.yc = function (e) {
|
|
2828
2836
|
var t = this, i = {};
|
|
2829
2837
|
return i.data = e, i.cells = [], t.item.columns.forEach(function (a) {
|
|
2830
|
-
var n = a.id, o = e[n], r = t.
|
|
2838
|
+
var n = a.id, o = e[n], r = t.Gc(a);
|
|
2831
2839
|
if ("undefined" == typeof o)
|
|
2832
2840
|
if ("text" === r)
|
|
2833
2841
|
o = "";
|
|
@@ -2840,19 +2848,19 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2840
2848
|
var l = {};
|
|
2841
2849
|
l.id = n, l.value = o, l.type = r, l.data = a, i.cells.push(l);
|
|
2842
2850
|
}), i;
|
|
2843
|
-
}, c.prototype.
|
|
2851
|
+
}, c.prototype.Gc = function (e) { var t = e.type; return t || (t = e.options ? "select" : "text"), t; }, c.prototype.Ac = function () {
|
|
2844
2852
|
var e = this;
|
|
2845
|
-
if (this.nav.body.innerHTML = "", this.nav.after.innerHTML = "", this.
|
|
2846
|
-
var t = e.
|
|
2853
|
+
if (this.nav.body.innerHTML = "", this.nav.after.innerHTML = "", this.dc.forEach(function (t) { var i = e.zc(t); e.nav.body.appendChild(i); }), 0 === this.dc.length) {
|
|
2854
|
+
var t = e.Hc();
|
|
2847
2855
|
e.nav.after.appendChild(t);
|
|
2848
2856
|
}
|
|
2849
|
-
this.
|
|
2850
|
-
}, c.prototype.
|
|
2857
|
+
this.Ec();
|
|
2858
|
+
}, c.prototype.Hc = function () { var e = document.createElement("div"); return e.className = this.theme + "_empty", e; }, c.prototype.zc = function (e) {
|
|
2851
2859
|
var t = this, i = document.createElement("div");
|
|
2852
2860
|
i.className = t.theme + "_row", e.cells.forEach(function (a) {
|
|
2853
2861
|
var n = document.createElement("div");
|
|
2854
2862
|
n.className = t.theme + "_cell";
|
|
2855
|
-
var o = t.
|
|
2863
|
+
var o = t.Ic(a);
|
|
2856
2864
|
if (e.spacer) {
|
|
2857
2865
|
var r = document.createElement("div");
|
|
2858
2866
|
r.style.height = "0px", r.style.overflow = "hidden", r.appendChild(o), n.appendChild(r);
|
|
@@ -2864,22 +2872,22 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function (D
|
|
|
2864
2872
|
var a = document.createElement("div");
|
|
2865
2873
|
a.classList.add(t.theme + "_cell"), a.classList.add(t.theme + "_rowaction");
|
|
2866
2874
|
var n = document.createElement("span");
|
|
2867
|
-
return n.className = this.theme + "_delete", n.addEventListener("click", function (i) { t.disabled || (t.
|
|
2868
|
-
}, c.prototype.
|
|
2875
|
+
return n.className = this.theme + "_delete", n.addEventListener("click", function (i) { t.disabled || (t.Fc(e), t.Ac(), t.Bc()); }), e.spacer || a.appendChild(n), i.appendChild(a), i;
|
|
2876
|
+
}, c.prototype.Bc = function () {
|
|
2869
2877
|
var e = this;
|
|
2870
2878
|
if ("function" == typeof e.onInput) {
|
|
2871
2879
|
var t = {};
|
|
2872
2880
|
e.onInput(t);
|
|
2873
2881
|
}
|
|
2874
|
-
}, c.prototype.
|
|
2882
|
+
}, c.prototype.Ic = function (e) {
|
|
2875
2883
|
var t = this, i = e.type;
|
|
2876
2884
|
if ("text" === i || "number" === i) {
|
|
2877
2885
|
var a = document.createElement("input");
|
|
2878
|
-
return a.type = i, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function (a) { "number" === i ? e.value = Number(this.value) : e.value = this.value, t.
|
|
2886
|
+
return a.type = i, t.disabled && (a.disabled = !0), e.value && (a.value = e.value), a.addEventListener("keyup", function (a) { "number" === i ? e.value = Number(this.value) : e.value = this.value, t.Bc(); }), a;
|
|
2879
2887
|
}
|
|
2880
2888
|
if ("select" === i) {
|
|
2881
2889
|
var n = document.createElement("select");
|
|
2882
|
-
return t.disabled && (n.disabled = !0), e.data.options.forEach(function (t) { var i = document.createElement("option"); i.innerText = t.name, i.value = t.id, i.
|
|
2890
|
+
return t.disabled && (n.disabled = !0), e.data.options.forEach(function (t) { var i = document.createElement("option"); i.innerText = t.name, i.value = t.id, i.lc = t.id, n.appendChild(i), e.value === t.id && i.setAttribute("selected", !0); }), n.addEventListener("change", function (i) { var a = n.options[n.selectedIndex]; a && "undefined" != typeof a.lc && (e.value = a.lc), t.Bc(); }), n;
|
|
2883
2891
|
}
|
|
2884
2892
|
throw new Error("Unsupported item type: " + i);
|
|
2885
2893
|
}, c.prototype.focus = function () { };
|
|
@@ -2890,9 +2898,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2890
2898
|
if ("undefined" == typeof DayPilot.Month || !DayPilot.Month.events) {
|
|
2891
2899
|
var e = {};
|
|
2892
2900
|
e.Month = function (t, i) {
|
|
2893
|
-
this.v = "2024.
|
|
2901
|
+
this.v = "2024.3.539-lite", this.nav = {};
|
|
2894
2902
|
var a = this;
|
|
2895
|
-
this.id = t, this.isMonth = !0, this.api = 2, this.backendUrl = null, this.cellHeaderHeight = 24, this.cellHeight = 100, this.contextMenu = null, this.cssClassPrefix = "month_default", this.eventBarVisible = !0, this.eventHeight = 25, this.eventsLoadMethod = "GET", this.headerHeight = 30, this.hideUntilInit = !0, this.lineSpace = 1, this.locale = "en-us", this.showToolTip = !0, this.startDate = new DayPilot.Date, this.theme = null, this.visible = !0, this.weekStarts =
|
|
2903
|
+
this.id = t, this.isMonth = !0, this.api = 2, this.backendUrl = null, this.cellHeaderHeight = 24, this.cellHeight = 100, this.cellMarginBottom = 0, this.contextMenu = null, this.cssClassPrefix = "month_default", this.eventBarVisible = !0, this.eventHeight = 25, this.eventsLoadMethod = "GET", this.headerHeight = 30, this.hideUntilInit = !0, this.lineSpace = 1, this.locale = "en-us", this.showToolTip = !0, this.startDate = new DayPilot.Date, this.theme = null, this.visible = !0, this.weekStarts = "Auto", this.width = "100%", this.xssProtection = "Enabled", this.afterRender = function () { }, this.cellHeaderClickHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.headerClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onCellHeaderClick = null, this.onCellHeaderClicked = null, this.onEventClick = null, this.onEventClicked = null, this.onEventDelete = null, this.onEventDeleted = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onEventRightClick = null, this.onEventRightClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeEventRender = null, this.onBeforeCellRender = null, this.cellEvents = [], this.elements = {}, this.elements.events = [], this.cache = {}, this.N = !1, this.T = function (e, t) { var e = JSON.parse(e); return e.CallBackRedirect ? void (document.location.href = e.CallBackRedirect) : "None" === e.UpdateType ? void a.fireAfterRenderDetached(e.CallBackData, !0) : (a.events.list = e.Events, "Full" === e.UpdateType && (a.startDate = e.StartDate, a.timeFormat = e.TimeFormat ? e.TimeFormat : a.timeFormat, "undefined" != typeof e.WeekStarts && (a.weekStarts = e.WeekStarts), a.hashes = e.Hashes), a.V(), a.Jc(), a.da(), "Full" === e.UpdateType && (a.Kc(), a.Lc()), a.ia(), a.show(), a.ja(), void a.fireAfterRenderDetached(e.CallBackData, !0)); }, this.fireAfterRenderDetached = function (e, t) { var i = function (e, t) { return function () { a.afterRender && a.afterRender(e, t); }; }; window.setTimeout(i(e, t), 0); }, this.lineHeight = function () { return this.eventHeight + this.lineSpace; }, this.events = {}, this.events.add = function (e) {
|
|
2896
2904
|
var t = null;
|
|
2897
2905
|
if (e instanceof DayPilot.Event)
|
|
2898
2906
|
t = e.data;
|
|
@@ -2901,7 +2909,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2901
2909
|
throw "DayPilot.Month.events.add() expects an object or DayPilot.Event instance.";
|
|
2902
2910
|
t = e;
|
|
2903
2911
|
}
|
|
2904
|
-
a.events.list || (a.events.list = []), a.events.list.push(t), a.update(), a.
|
|
2912
|
+
a.events.list || (a.events.list = []), a.events.list.push(t), a.update(), a.ra.notify();
|
|
2905
2913
|
}, this.events.find = function (e) {
|
|
2906
2914
|
if (!a.events.list)
|
|
2907
2915
|
return null;
|
|
@@ -2929,8 +2937,22 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2929
2937
|
a.events.list.splice(i, 1, e);
|
|
2930
2938
|
}
|
|
2931
2939
|
}
|
|
2932
|
-
a.update(), a.
|
|
2933
|
-
}, this.events.remove = function (e) {
|
|
2940
|
+
a.update(), a.ra.notify();
|
|
2941
|
+
}, this.events.remove = function (e) {
|
|
2942
|
+
var t;
|
|
2943
|
+
if (e instanceof DayPilot.Event)
|
|
2944
|
+
t = e.data;
|
|
2945
|
+
else if ("object" == typeof e) {
|
|
2946
|
+
var i = a.events.find(e.id);
|
|
2947
|
+
i && (t = i.data);
|
|
2948
|
+
}
|
|
2949
|
+
else if ("string" == typeof e || "number" == typeof e) {
|
|
2950
|
+
var i = a.events.find(e);
|
|
2951
|
+
i && (t = i.data);
|
|
2952
|
+
}
|
|
2953
|
+
var n = DayPilot.indexOf(a.events.list, t);
|
|
2954
|
+
a.events.list.splice(n, 1), a.update(), a.ra.notify();
|
|
2955
|
+
}, this.events.load = function (e, t, i) {
|
|
2934
2956
|
var n = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, o = function (e) {
|
|
2935
2957
|
var i, o = e.request;
|
|
2936
2958
|
try {
|
|
@@ -2944,7 +2966,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2944
2966
|
var s = {};
|
|
2945
2967
|
if (s.preventDefault = function () { this.preventDefault.value = !0; }, s.data = i, "function" == typeof t && t(s), s.preventDefault.value)
|
|
2946
2968
|
return;
|
|
2947
|
-
a.events.list = i, a.
|
|
2969
|
+
a.events.list = i, a.Aa && a.update();
|
|
2948
2970
|
}
|
|
2949
2971
|
};
|
|
2950
2972
|
if (a.eventsLoadMethod && "POST" === a.eventsLoadMethod.toUpperCase())
|
|
@@ -2954,17 +2976,17 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2954
2976
|
r += r.indexOf("?") > -1 ? "&" + s : "?" + s, DayPilot.Http.ajax({ "method": "GET", "url": r, "success": o, "error": n });
|
|
2955
2977
|
}
|
|
2956
2978
|
}, this.update = function (e) {
|
|
2957
|
-
if (a.
|
|
2979
|
+
if (a.ab(e), this.Aa) {
|
|
2958
2980
|
if (a.N)
|
|
2959
2981
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Month instance that has been disposed.");
|
|
2960
2982
|
if (this.cells) {
|
|
2961
|
-
a.V(), a.
|
|
2983
|
+
a.V(), a.Jc(), a.da(), a.Kc(), a.Lc(), a.ia(), a.s(), a.ja(), this.visible ? this.show() : this.hide();
|
|
2962
2984
|
}
|
|
2963
2985
|
}
|
|
2964
|
-
}, this.
|
|
2986
|
+
}, this.db = null, this.ab = function (e) {
|
|
2965
2987
|
if (e) {
|
|
2966
2988
|
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? a.events.list = e.list : a.events.list = e; } } };
|
|
2967
|
-
this.
|
|
2989
|
+
this.db = t;
|
|
2968
2990
|
for (var i in e)
|
|
2969
2991
|
if (t[i]) {
|
|
2970
2992
|
var n = t[i];
|
|
@@ -2973,14 +2995,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2973
2995
|
else
|
|
2974
2996
|
a[i] = e[i];
|
|
2975
2997
|
}
|
|
2976
|
-
}, this.
|
|
2977
|
-
var e = this.
|
|
2998
|
+
}, this.eb = function () {
|
|
2999
|
+
var e = this.db;
|
|
2978
3000
|
for (var t in e) {
|
|
2979
3001
|
var i = e[t];
|
|
2980
3002
|
i.postInit && i.postInit();
|
|
2981
3003
|
}
|
|
2982
|
-
}, this.
|
|
2983
|
-
var t = this.
|
|
3004
|
+
}, this.gb = {}, this.gb.events = [], this.hb = function (e) {
|
|
3005
|
+
var t = this.gb.events, i = this.events.list[e], n = {};
|
|
2984
3006
|
for (var o in i)
|
|
2985
3007
|
n[o] = i[o];
|
|
2986
3008
|
if ("function" == typeof this.onBeforeEventRender) {
|
|
@@ -2988,14 +3010,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
2988
3010
|
r.control = a, r.data = n, this.onBeforeEventRender(r);
|
|
2989
3011
|
}
|
|
2990
3012
|
t[e] = n;
|
|
2991
|
-
}, this.
|
|
3013
|
+
}, this.da = function () {
|
|
2992
3014
|
var e = this.events.list;
|
|
2993
3015
|
if (e) {
|
|
2994
3016
|
if (!DayPilot.isArray(e))
|
|
2995
3017
|
throw new DayPilot.Exception("DayPilot.Month.events.list expects an array object. You supplied: " + typeof e);
|
|
2996
3018
|
if ("function" == typeof this.onBeforeEventRender)
|
|
2997
3019
|
for (var t = 0; t < e.length; t++)
|
|
2998
|
-
this.
|
|
3020
|
+
this.hb(t);
|
|
2999
3021
|
for (var i = 0; i < e.length; i++) {
|
|
3000
3022
|
var a = e[i];
|
|
3001
3023
|
if ("object" != typeof a)
|
|
@@ -3008,12 +3030,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3008
3030
|
if (!(n.getTime() > o.getTime()))
|
|
3009
3031
|
for (var t = 0; t < this.rows.length; t++) {
|
|
3010
3032
|
var r = this.rows[t], s = new DayPilot.Event(a, this);
|
|
3011
|
-
r.belongsHere(s) && (r.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.
|
|
3033
|
+
r.belongsHere(s) && (r.events.push(s), "function" == typeof this.onBeforeEventRender && (s.cache = this.gb.events[i]));
|
|
3012
3034
|
}
|
|
3013
3035
|
}
|
|
3014
3036
|
for (var l = 0; l < this.rows.length; l++) {
|
|
3015
3037
|
var r = this.rows[l];
|
|
3016
|
-
r.events.sort(this.
|
|
3038
|
+
r.events.sort(this.ib);
|
|
3017
3039
|
for (var d = 0; d < this.rows[l].events.length; d++) {
|
|
3018
3040
|
var c = r.events[d], u = r.getStartColumn(c), h = r.getWidth(c);
|
|
3019
3041
|
r.putIntoLine(c, u, h, l);
|
|
@@ -3026,13 +3048,13 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3026
3048
|
t.event = null, t.click = null, t.parentNode.removeChild(t);
|
|
3027
3049
|
}
|
|
3028
3050
|
this.elements.events = [];
|
|
3029
|
-
}, this.
|
|
3051
|
+
}, this.ja = function () { this.Mc(); }, this.Mc = function () {
|
|
3030
3052
|
this.elements.events = [];
|
|
3031
3053
|
for (var e = 0; e < this.rows.length; e++)
|
|
3032
3054
|
for (var t = this.rows[e], i = 0; i < t.lines.length; i++)
|
|
3033
3055
|
for (var a = t.lines[i], n = 0; n < a.length; n++)
|
|
3034
|
-
this.
|
|
3035
|
-
}, this.
|
|
3056
|
+
this.Da(a[n]);
|
|
3057
|
+
}, this.ib = function (e, t) {
|
|
3036
3058
|
if (!(e && t && e.start && t.start))
|
|
3037
3059
|
return 0;
|
|
3038
3060
|
var i = e.start().getTime() - t.start().getTime();
|
|
@@ -3068,9 +3090,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3068
3090
|
for (var i = this.headerHeight, a = 0; a < e; a++)
|
|
3069
3091
|
i += this.rows[a].getHeight();
|
|
3070
3092
|
return i += this.cellHeaderHeight, i += t * this.lineHeight();
|
|
3071
|
-
}, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.
|
|
3093
|
+
}, this.getDateFromCell = function (e, t) { return this.firstDate.addDays(7 * t + e); }, this.Da = function (t) {
|
|
3072
3094
|
var i = t.cache || t.data, n = t.part.row, o = t.part.line, r = t.part.colStart, s = t.part.colWidth, l = this.getCellWidth() * r, d = this.getCellWidth() * s, c = this.getEventTop(n, o), u = document.createElement("div");
|
|
3073
|
-
u.setAttribute("unselectable", "on"), u.style.height = this.eventHeight + "px", u.className = this.J("_event"), i.cssClass && DayPilot.Util.addClass(u, i.cssClass), t.part.startsHere || DayPilot.Util.addClass(u, this.J("_event_continueleft")), t.part.endsHere || DayPilot.Util.addClass(u, this.J("_event_continueright")), u.event = t, u.style.width = d + "%", u.style.position = "absolute", u.style.left = l + "%", u.style.top = c + "px", this.showToolTip && t.client.toolTip() && (u.title = t.client.toolTip()), u.onclick = a.
|
|
3095
|
+
u.setAttribute("unselectable", "on"), u.style.height = this.eventHeight + "px", u.className = this.J("_event"), i.cssClass && DayPilot.Util.addClass(u, i.cssClass), t.part.startsHere || DayPilot.Util.addClass(u, this.J("_event_continueleft")), t.part.endsHere || DayPilot.Util.addClass(u, this.J("_event_continueright")), u.event = t, u.style.width = d + "%", u.style.position = "absolute", u.style.left = l + "%", u.style.top = c + "px", this.showToolTip && t.client.toolTip() && (u.title = t.client.toolTip()), u.onclick = a.qa, u.oncontextmenu = a.Nc, u.onmousedown = function (i) {
|
|
3074
3096
|
i = i || window.event;
|
|
3075
3097
|
var l = i.which || i.button;
|
|
3076
3098
|
if (i.cancelBubble = !0, i.stopPropagation && i.stopPropagation(), 1 === l)
|
|
@@ -3107,7 +3129,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3107
3129
|
}
|
|
3108
3130
|
if (t.client.deleteEnabled()) {
|
|
3109
3131
|
var p = Math.floor(a.eventHeight / 2 - 9), v = document.createElement("div");
|
|
3110
|
-
v.style.position = "absolute", v.style.right = "2px", v.style.top = p + "px", v.style.width = "18px", v.style.height = "18px", v.className = a.J("_event_delete"), v.onmousedown = function (e) { e.stopPropagation(); }, v.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && a.
|
|
3132
|
+
v.style.position = "absolute", v.style.right = "2px", v.style.top = p + "px", v.style.width = "18px", v.style.height = "18px", v.className = a.J("_event_delete"), v.onmousedown = function (e) { e.stopPropagation(); }, v.onclick = function (e) { e.stopPropagation(); var t = this.parentNode.event; t && a.ta(t); }, v.style.display = "none", u.deleteIcon = v, u.appendChild(v);
|
|
3111
3133
|
}
|
|
3112
3134
|
var y = i.areas ? DayPilot.Areas.copy(i.areas) : [];
|
|
3113
3135
|
if (DayPilot.Areas.attach(u, t, { "areas": y }), "function" == typeof a.onAfterEventRender) {
|
|
@@ -3115,7 +3137,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3115
3137
|
g.e = u.event, g.div = u, a.onAfterEventRender(g);
|
|
3116
3138
|
}
|
|
3117
3139
|
this.elements.events.push(u), this.nav.events.appendChild(u);
|
|
3118
|
-
}, this.lastVisibleDayOfMonth = function () { return this.startDate.lastDayOfMonth(); }, this.
|
|
3140
|
+
}, this.lastVisibleDayOfMonth = function () { return this.startDate.lastDayOfMonth(); }, this.Jc = function () {
|
|
3119
3141
|
"string" == typeof this.startDate && (this.startDate = new DayPilot.Date(this.startDate)), this.startDate = this.startDate.firstDayOfMonth(), this.firstDate = this.startDate.firstDayOfWeek(this.getWeekStart());
|
|
3120
3142
|
var e, t = (this.startDate, this.lastVisibleDayOfMonth()), i = DayPilot.DateUtil.daysDiff(this.firstDate, t) + 1;
|
|
3121
3143
|
e = Math.ceil(i / 7), this.days = 7 * e, this.rows = [];
|
|
@@ -3136,14 +3158,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3136
3158
|
}, o.getStart = function () {
|
|
3137
3159
|
for (var e = 0, t = 0; t < a.rows.length && t < this.index; t++)
|
|
3138
3160
|
e += a.rows[t].getHeight();
|
|
3139
|
-
}, o.getHeight = function () { return Math.max(this.lines.length * a.lineHeight() + a.cellHeaderHeight, this.calendar.cellHeight); }, this.rows.push(o);
|
|
3161
|
+
}, o.getHeight = function () { return Math.max(this.lines.length * a.lineHeight() + a.cellHeaderHeight + a.cellMarginBottom, this.calendar.cellHeight); }, this.rows.push(o);
|
|
3140
3162
|
}
|
|
3141
3163
|
this.endDate = this.firstDate.addDays(7 * e);
|
|
3142
3164
|
}, this.visibleStart = function () { return a.firstDate; }, this.visibleEnd = function () { return a.endDate; }, this.getHeight = function () {
|
|
3143
3165
|
for (var e = this.headerHeight, t = 0; t < this.rows.length; t++)
|
|
3144
3166
|
e += this.rows[t].getHeight();
|
|
3145
3167
|
return e;
|
|
3146
|
-
}, 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.J = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.
|
|
3168
|
+
}, 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.J = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.Fa = function () {
|
|
3147
3169
|
var t = this.nav.top;
|
|
3148
3170
|
t.setAttribute("unselectable", "on"), t.style.MozUserSelect = "none", t.style.KhtmlUserSelect = "none", t.style.WebkitUserSelect = "none", t.style.position = "relative", this.width && (t.style.width = this.width), t.style.height = this.getHeight() + "px", t.onselectstart = function (e) { return !1; }, this.hideUntilInit && (t.style.visibility = "hidden"), this.visible || (t.style.display = "none"), t.className = this.J("_main");
|
|
3149
3171
|
var i = document.createElement("div");
|
|
@@ -3195,7 +3217,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3195
3217
|
e.timeRangeSelecting.from = { x: v.x, y: v.y }, e.timeRangeSelecting.width = o, e.timeRangeSelecting.moved = !0, a.drawShadow(v.x, v.y, 0, o, 0, null);
|
|
3196
3218
|
}
|
|
3197
3219
|
};
|
|
3198
|
-
}, this.
|
|
3220
|
+
}, this.ia = function () {
|
|
3199
3221
|
this.nav.top.style.height = this.getHeight() + "px";
|
|
3200
3222
|
for (var e = 0; e < this.cells.length; e++)
|
|
3201
3223
|
for (var t = 0; t < this.cells[e].length; t++)
|
|
@@ -3215,7 +3237,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3215
3237
|
for (var t = DayPilot.DateUtil.daysDiff(this.firstDate, e), i = { x: 0, y: 0 }; t >= 7;)
|
|
3216
3238
|
i.y++, t -= 7;
|
|
3217
3239
|
return i.x = t, i;
|
|
3218
|
-
}, this.
|
|
3240
|
+
}, this.Lc = function () {
|
|
3219
3241
|
var e = document.createElement("div");
|
|
3220
3242
|
e.oncontextmenu = function () { return !1; }, this.nav.cells.appendChild(e), this.cells = [];
|
|
3221
3243
|
for (var t = 0; t < this.getColCount(); t++) {
|
|
@@ -3225,16 +3247,17 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3225
3247
|
var a = t + this.getWeekStart();
|
|
3226
3248
|
a > 6 && (a -= 7), i.className = this.J("_header");
|
|
3227
3249
|
var o = document.createElement("div");
|
|
3228
|
-
o.setAttribute("unselectable", "on"), o.innerHTML = n.locale().dayNames[a], i.appendChild(o), o.style.position = "absolute", o.style.top = "0px", o.style.bottom = "0px",
|
|
3250
|
+
o.setAttribute("unselectable", "on"), o.innerHTML = n.locale().dayNames[a], i.appendChild(o), o.style.position = "absolute", o.style.top = "0px", o.style.bottom = "0px",
|
|
3251
|
+
o.style.left = "0px", o.style.right = "0px", o.className = this.J("_header_inner"), o.innerHTML = n.locale().dayNames[a], e.appendChild(i);
|
|
3229
3252
|
for (var r = 0; r < this.rows.length; r++)
|
|
3230
|
-
this.
|
|
3253
|
+
this.Oc(t, r, e);
|
|
3231
3254
|
}
|
|
3232
|
-
}, this.
|
|
3255
|
+
}, this.Kc = function () {
|
|
3233
3256
|
for (var e = 0; e < this.cells.length; e++)
|
|
3234
3257
|
for (var t = 0; t < this.cells[e].length; t++)
|
|
3235
3258
|
this.cells[e][t].onclick = null;
|
|
3236
3259
|
this.nav.cells.innerHTML = "";
|
|
3237
|
-
}, this.
|
|
3260
|
+
}, this.pa = function () { return 2 === a.api; }, this.Oc = function (t, i, o) {
|
|
3238
3261
|
var r = this.rows[i], s = this.firstDate.addDays(7 * i + t), l = s.getDay(), d = null;
|
|
3239
3262
|
d = 1 === l ? n.locale().monthNames[s.getMonth()] + " " + l : "" + l;
|
|
3240
3263
|
var c = !a.isWeekend(s), u = {};
|
|
@@ -3262,16 +3285,22 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3262
3285
|
v.style.height = r.getHeight() - this.cellHeaderHeight + "px", v.style.overflow = "hidden", v.innerHTML = h.html, m.appendChild(v);
|
|
3263
3286
|
}
|
|
3264
3287
|
this.cells[t][i] = f, o.appendChild(f);
|
|
3265
|
-
}, this.getWeekStart = function () {
|
|
3288
|
+
}, this.getWeekStart = function () {
|
|
3289
|
+
if ("Auto" === a.weekStarts) {
|
|
3290
|
+
var e = n.locale();
|
|
3291
|
+
return e ? e.weekStarts : 0;
|
|
3292
|
+
}
|
|
3293
|
+
return a.weekStarts || 0;
|
|
3294
|
+
}, this.getColCount = function () { return 7; }, this.getCellWidth = function () { return 14.285; }, this.getRowTop = function (e) {
|
|
3266
3295
|
for (var t = this.headerHeight, i = 0; i < e; i++)
|
|
3267
3296
|
t += this.rows[i].getHeight();
|
|
3268
3297
|
return t;
|
|
3269
|
-
}, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl && DayPilot.request(this.backendUrl, this.S, n, this.ajaxError); }, this.S = function (e) { a.T(e.responseText); }, this.Q = function () { var e = {}; return e.control = "dpm", e.id = this.id, e.v = this.v, e.visibleStart = new DayPilot.Date(this.firstDate), e.visibleEnd = e.visibleStart.addDays(this.days), e.startDate = a.startDate, e.timeFormat = this.timeFormat, e.weekStarts = this.weekStarts, e; }, this.eventClickCallBack = function (e, t) { this.R("EventClick", t, e); }, this.
|
|
3298
|
+
}, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + DayPilot.JSON.stringify(a); this.backendUrl && DayPilot.request(this.backendUrl, this.S, n, this.ajaxError); }, this.S = function (e) { a.T(e.responseText); }, this.Q = function () { var e = {}; return e.control = "dpm", e.id = this.id, e.v = this.v, e.visibleStart = new DayPilot.Date(this.firstDate), e.visibleEnd = e.visibleStart.addDays(this.days), e.startDate = a.startDate, e.timeFormat = this.timeFormat, e.weekStarts = this.weekStarts, e; }, this.eventClickCallBack = function (e, t) { this.R("EventClick", t, e); }, this.qa = function (t) { e.movingEvent = null, e.resizingEvent = null; var i = this, t = t || window.event; t.ctrlKey; t.cancelBubble = !0, t.stopPropagation && t.stopPropagation(), a.eventClickSingle(i, t); }, this.eventClickSingle = function (e, t) {
|
|
3270
3299
|
var i = e.event;
|
|
3271
3300
|
if (i && i.client.clickEnabled())
|
|
3272
|
-
if (a.
|
|
3301
|
+
if (a.pa()) {
|
|
3273
3302
|
var n = {};
|
|
3274
|
-
if (n.e = i, n.control = a, n.div = e, n.originalEvent = t, n.meta = t.metaKey, n.ctrl = t.ctrlKey, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventClick && (a.
|
|
3303
|
+
if (n.e = i, n.control = a, n.div = e, n.originalEvent = t, n.meta = t.metaKey, n.ctrl = t.ctrlKey, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventClick && (a.ra.apply(function () { a.onEventClick(n); }), n.preventDefault.value))
|
|
3275
3304
|
return;
|
|
3276
3305
|
switch (a.eventClickHandling) {
|
|
3277
3306
|
case "CallBack":
|
|
@@ -3281,7 +3310,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3281
3310
|
var o = i.client.contextMenu();
|
|
3282
3311
|
o ? o.show(i) : a.contextMenu && a.contextMenu.show(i);
|
|
3283
3312
|
}
|
|
3284
|
-
"function" == typeof a.onEventClicked && a.
|
|
3313
|
+
"function" == typeof a.onEventClicked && a.ra.apply(function () { a.onEventClicked(n); });
|
|
3285
3314
|
}
|
|
3286
3315
|
else
|
|
3287
3316
|
switch (a.eventClickHandling) {
|
|
@@ -3290,7 +3319,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3290
3319
|
break;
|
|
3291
3320
|
case "JavaScript": a.onEventClick(i);
|
|
3292
3321
|
}
|
|
3293
|
-
}, this.
|
|
3322
|
+
}, this.Nc = function () { var e = this; return a.sa(e.event), !1; }, this.sa = function (e) {
|
|
3294
3323
|
if (this.event = e, !e.client.rightClickEnabled())
|
|
3295
3324
|
return !1;
|
|
3296
3325
|
var t = {};
|
|
@@ -3302,10 +3331,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3302
3331
|
}
|
|
3303
3332
|
return "function" == typeof a.onEventRightClicked && a.onEventRightClicked(t), !1;
|
|
3304
3333
|
}
|
|
3305
|
-
}, this.
|
|
3306
|
-
if (a.
|
|
3334
|
+
}, this.ta = function (e) {
|
|
3335
|
+
if (a.pa()) {
|
|
3307
3336
|
var t = {};
|
|
3308
|
-
if (t.e = e, t.control = a, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventDelete && (a.
|
|
3337
|
+
if (t.e = e, t.control = a, t.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventDelete && (a.ra.apply(function () { a.onEventDelete(t); }), t.preventDefault.value))
|
|
3309
3338
|
return;
|
|
3310
3339
|
switch (a.eventDeleteHandling) {
|
|
3311
3340
|
case "CallBack":
|
|
@@ -3316,7 +3345,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3316
3345
|
break;
|
|
3317
3346
|
case "Update": a.events.remove(e);
|
|
3318
3347
|
}
|
|
3319
|
-
"function" == typeof a.onEventDeleted && a.
|
|
3348
|
+
"function" == typeof a.onEventDeleted && a.ra.apply(function () { a.onEventDeleted(t); });
|
|
3320
3349
|
}
|
|
3321
3350
|
else
|
|
3322
3351
|
switch (a.eventDeleteHandling) {
|
|
@@ -3341,9 +3370,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3341
3370
|
var d = DayPilot.DateUtil.diff(e.end(), l), c = this.getDateFromCell(t, i);
|
|
3342
3371
|
c = c.addDays(-n);
|
|
3343
3372
|
var u = DayPilot.DateUtil.daysSpan(e.start(), e.end()) + 1, h = c.addDays(u), f = c.addTime(s), m = h.addTime(d);
|
|
3344
|
-
if (a.
|
|
3373
|
+
if (a.pa()) {
|
|
3345
3374
|
var p = {};
|
|
3346
|
-
if (p.e = e, p.control = a, p.newStart = f, p.newEnd = m, p.ctrl = o.ctrlKey, p.shift = o.shiftKey, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventMove && (a.
|
|
3375
|
+
if (p.e = e, p.control = a, p.newStart = f, p.newEnd = m, p.ctrl = o.ctrlKey, p.shift = o.shiftKey, p.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventMove && (a.ra.apply(function () { a.onEventMove(p); }), p.preventDefault.value))
|
|
3347
3376
|
return;
|
|
3348
3377
|
switch (a.eventMoveHandling) {
|
|
3349
3378
|
case "CallBack":
|
|
@@ -3351,7 +3380,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3351
3380
|
break;
|
|
3352
3381
|
case "Update": e.start(f), e.end(m), a.events.update(e);
|
|
3353
3382
|
}
|
|
3354
|
-
"function" == typeof a.onEventMoved && a.
|
|
3383
|
+
"function" == typeof a.onEventMoved && a.ra.apply(function () { a.onEventMoved(p); });
|
|
3355
3384
|
}
|
|
3356
3385
|
else
|
|
3357
3386
|
switch (a.eventMoveHandling) {
|
|
@@ -3371,9 +3400,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3371
3400
|
var n = e.start().getTimePart(), o = e.end().getDatePart();
|
|
3372
3401
|
o.getTime() !== e.end().getTime() && (o = o.addDays(1));
|
|
3373
3402
|
var r = DayPilot.DateUtil.diff(e.end(), o), s = this.getDateFromCell(t.x, t.y), l = s.addDays(i), d = s.addTime(n), c = l.addTime(r);
|
|
3374
|
-
if (a.
|
|
3403
|
+
if (a.pa()) {
|
|
3375
3404
|
var u = {};
|
|
3376
|
-
if (u.e = e, u.control = a, u.newStart = d, u.newEnd = c, u.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventResize && (a.
|
|
3405
|
+
if (u.e = e, u.control = a, u.newStart = d, u.newEnd = c, u.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onEventResize && (a.ra.apply(function () { a.onEventResize(u); }), u.preventDefault.value))
|
|
3377
3406
|
return;
|
|
3378
3407
|
switch (a.eventResizeHandling) {
|
|
3379
3408
|
case "CallBack":
|
|
@@ -3381,7 +3410,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3381
3410
|
break;
|
|
3382
3411
|
case "Update": e.start(d), e.end(c), a.events.update(e);
|
|
3383
3412
|
}
|
|
3384
|
-
"function" == typeof a.onEventResized && a.
|
|
3413
|
+
"function" == typeof a.onEventResized && a.ra.apply(function () { a.onEventResized(u); });
|
|
3385
3414
|
}
|
|
3386
3415
|
else
|
|
3387
3416
|
switch (a.eventResizeHandling) {
|
|
@@ -3391,14 +3420,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3391
3420
|
case "JavaScript": a.onEventResize(e, d, c);
|
|
3392
3421
|
}
|
|
3393
3422
|
}, this.timeRangeSelectedCallBack = function (e, t, i) { var a = {}; a.start = e, a.end = t, this.R("TimeRangeSelected", i, a); }, this.L = function (e, t) {
|
|
3394
|
-
if (this.
|
|
3423
|
+
if (this.pa()) {
|
|
3395
3424
|
var i = {};
|
|
3396
|
-
if (i.control = a, i.start = e, i.end = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onTimeRangeSelect && (a.
|
|
3425
|
+
if (i.control = a, i.start = e, i.end = t, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof a.onTimeRangeSelect && (a.ra.apply(function () { a.onTimeRangeSelect(i); }), i.preventDefault.value))
|
|
3397
3426
|
return;
|
|
3398
3427
|
switch (a.timeRangeSelectedHandling) {
|
|
3399
3428
|
case "CallBack": a.timeRangeSelectedCallBack(e, t);
|
|
3400
3429
|
}
|
|
3401
|
-
"function" == typeof a.onTimeRangeSelected && a.
|
|
3430
|
+
"function" == typeof a.onTimeRangeSelected && a.ra.apply(function () { a.onTimeRangeSelected(i); });
|
|
3402
3431
|
}
|
|
3403
3432
|
else
|
|
3404
3433
|
switch (a.timeRangeSelectedHandling) {
|
|
@@ -3407,9 +3436,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3407
3436
|
break;
|
|
3408
3437
|
case "JavaScript": a.onTimeRangeSelected(e, t);
|
|
3409
3438
|
}
|
|
3410
|
-
}, this.
|
|
3439
|
+
}, this.ra = {}, this.ra.scope = null, this.ra.notify = function () { a.ra.scope && a.ra.scope["$apply"](); }, this.ra.apply = function (e) { e(); }, this.clearSelection = function () { a.clearShadow(); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.R("Command", t, i); }, this.isWeekend = function (e) { return e = new DayPilot.Date(e), 0 === e.dayOfWeek() || 6 === e.dayOfWeek(); }, this._ = {}, this._.locale = function () { var e = DayPilot.Locale.find(a.locale); return e ? e : DayPilot.Locale.US; }, this._.aa = function () { return "Disabled" !== a.xssProtection; };
|
|
3411
3440
|
var n = this._;
|
|
3412
|
-
this.debug = function (e, t) { this.debuggingEnabled && (a.debugMessages || (a.debugMessages = []), a.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.dispose = function () { var e = a; e.N || (e.N = !0, e.V(), 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.N; }, this.
|
|
3441
|
+
this.debug = function (e, t) { this.debuggingEnabled && (a.debugMessages || (a.debugMessages = []), a.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.dispose = function () { var e = a; e.N || (e.N = !0, e.V(), 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.N; }, this.Za = function () { e.globalHandlers || (e.globalHandlers = !0, DayPilot.re(document, "mouseup", e.gMouseUp)); }, this.loadFromServer = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof a.events.list || !a.events.list); }, this.s = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { a.visible = !0, a.nav.top.style.display = ""; }, this.hide = function () { a.visible = !1, a.nav.top.style.display = "none"; }, this.fb = function () {
|
|
3413
3442
|
if (this.id && this.id.tagName)
|
|
3414
3443
|
this.nav.top = this.id;
|
|
3415
3444
|
else {
|
|
@@ -3418,7 +3447,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3418
3447
|
if (this.nav.top = document.getElementById(this.id), !this.nav.top)
|
|
3419
3448
|
throw "DayPilot.Month: The placeholder element not found: '" + id + "'.";
|
|
3420
3449
|
}
|
|
3421
|
-
}, this.
|
|
3450
|
+
}, this.lb = function () { this.Jc(), this.Fa(), this.Lc(), this.Za(), this.R("Init"); }, this.Ja = function (e, t) { return a._.aa() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.internal = {}, this.internal.loadOptions = this.ab, this.internal.xssTextHtml = a.Ja, this.init = function () { return this.fb(), this.loadFromServer() ? void this.lb() : (this.Jc(), this.da(), this.Fa(), this.Lc(), this.s(), this.ja(), this.Za(), this.fireAfterRenderDetached(null, !1), this.Aa = !0, this); }, this.Init = this.init, Object.defineProperty(this, "durationBarVisible", { get: function () { return a.eventBarVisible; } }), this.ab(i);
|
|
3422
3451
|
}, e.gMouseUp = function (t) {
|
|
3423
3452
|
if (e.movingEvent) {
|
|
3424
3453
|
var i = e.movingEvent;
|
|
@@ -3473,7 +3502,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3473
3502
|
e && e.directive("daypilotMonth", ["$parse", function (e) {
|
|
3474
3503
|
return { "restrict": "E", "template": "<div></div>", "replace": !0, "link": function (t, i, a) {
|
|
3475
3504
|
var n = new DayPilot.Month(i[0]);
|
|
3476
|
-
n.
|
|
3505
|
+
n.ra.scope = t, n.init();
|
|
3477
3506
|
var o = a["id"];
|
|
3478
3507
|
o && (t[o] = n);
|
|
3479
3508
|
var r = a["publishAs"];
|
|
@@ -3497,14 +3526,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3497
3526
|
"undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function () {
|
|
3498
3527
|
if ("undefined" == typeof DayPilot.Navigator || !DayPilot.Navigator.nav) {
|
|
3499
3528
|
DayPilot.Navigator = function (e, t) {
|
|
3500
|
-
this.v = "2024.
|
|
3529
|
+
this.v = "2024.3.539-lite";
|
|
3501
3530
|
var i = this;
|
|
3502
|
-
this.id = e, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "Day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.rtl = !1, this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.
|
|
3531
|
+
this.id = e, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "Day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.rtl = !1, this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.gb = {}, this.Pc = function () { this.root.dp = this, this.root.className = this.J("_main"), "Horizontal" === this.orientation ? (this.root.style.width = this.showMonths * (7 * o.cellWidth() + this.Qc()) + "px", this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : this.root.style.width = 7 * o.cellWidth() + this.Qc() + "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.startDate = DayPilot.Date.fromYearMonthDay(this.year, this.month), this.calendars = [], this.selected = [], this.months = []; }, this.pa = function () { return 2 === i.api; }, this.Kc = function () { this.root.innerHTML = ""; }, this.J = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.Rc = function (e, t) { var i = this.J("_" + t); DayPilot.Util.addClass(e, i); }, this.Sc = function (e, t) { var i = this.J("_" + t); DayPilot.Util.removeClass(e, i); }, this.Lc = function (e, t) {
|
|
3503
3532
|
var a = {};
|
|
3504
3533
|
a.cells = [], a.days = [], a.weeks = [];
|
|
3505
3534
|
var n = this.startDate.addMonths(e), r = t.before, s = t.after, l = n.firstDayOfMonth(), d = l.firstDayOfWeek(o.weekStarts()), c = l.addMonths(1), u = DayPilot.DateUtil.daysDiff(d, c), h = "Auto" === this.rowsPerMonth ? Math.ceil(u / 7) : 6;
|
|
3506
3535
|
a.rowCount = h;
|
|
3507
|
-
var f = (new DayPilot.Date).getDatePart(), m = 7 * o.cellWidth() + this.
|
|
3536
|
+
var f = (new DayPilot.Date).getDatePart(), m = 7 * o.cellWidth() + this.Qc();
|
|
3508
3537
|
a.width = m;
|
|
3509
3538
|
var p = this.cellHeight * h + this.titleHeight + this.dayHeaderHeight;
|
|
3510
3539
|
a.height = p;
|
|
@@ -3518,75 +3547,75 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3518
3547
|
}
|
|
3519
3548
|
v.className = this.J("_month"), v.style.cursor = "default", v.style.MozUserSelect = "none", v.style.KhtmlUserSelect = "none", v.style.WebkitUserSelect = "none", v.month = a, this.root.appendChild(v);
|
|
3520
3549
|
var g = this.titleHeight + this.dayHeaderHeight, b = document.createElement("div");
|
|
3521
|
-
b.style.position = "absolute", b.style.left = "0px", b.style.right = "0px", b.style.top = "0px", b.style.width = o.cellWidth() + "px", b.style.height = this.titleHeight + "px", b.style.lineHeight = this.titleHeight + "px", b.setAttribute("unselectable", "on"), b.className = this.J("_titleleft"), t.left && (b.style.cursor = "pointer", b.innerHTML = "<span><</span>", b.onclick = this.
|
|
3550
|
+
b.style.position = "absolute", b.style.left = "0px", b.style.right = "0px", b.style.top = "0px", b.style.width = o.cellWidth() + "px", b.style.height = this.titleHeight + "px", b.style.lineHeight = this.titleHeight + "px", b.setAttribute("unselectable", "on"), b.className = this.J("_titleleft"), t.left && (b.style.cursor = "pointer", b.innerHTML = "<span><</span>", b.onclick = this.Tc), v.appendChild(b), this.tl = b;
|
|
3522
3551
|
var D = document.createElement("div");
|
|
3523
|
-
D.style.position = "absolute", D.style.left = o.cellWidth() + "px", D.style.top = "0px", D.style.width = 5 * o.cellWidth() + this.
|
|
3552
|
+
D.style.position = "absolute", D.style.left = o.cellWidth() + "px", D.style.top = "0px", D.style.width = 5 * o.cellWidth() + this.Qc() + "px", D.style.height = this.titleHeight + "px", D.style.lineHeight = this.titleHeight + "px", D.setAttribute("unselectable", "on"), D.className = this.J("_title"), D.innerHTML = o.locale().monthNames[n.getMonth()] + " " + n.getYear(), v.appendChild(D), this.ti = D;
|
|
3524
3553
|
var x = document.createElement("div");
|
|
3525
|
-
x.style.position = "absolute", x.style.left = 6 * o.cellWidth() + this.
|
|
3526
|
-
var w = this.
|
|
3554
|
+
x.style.position = "absolute", x.style.left = 6 * o.cellWidth() + this.Qc() + "px", x.style.right = 6 * o.cellWidth() + this.Qc() + "px", x.style.top = "0px", x.style.width = o.cellWidth() + "px", x.style.height = this.titleHeight + "px", x.style.lineHeight = this.titleHeight + "px", x.setAttribute("unselectable", "on"), x.className = this.J("_titleright"), t.right && (x.style.cursor = "pointer", x.innerHTML = "<span>></span>", x.onclick = this.Uc), v.appendChild(x), this.tr = x;
|
|
3555
|
+
var w = this.Qc();
|
|
3527
3556
|
if (this.showWeekNumbers)
|
|
3528
3557
|
for (var C = 0; C < h; C++) {
|
|
3529
|
-
var P = d.addDays(7 * C),
|
|
3558
|
+
var P = d.addDays(7 * C), k = null;
|
|
3530
3559
|
switch (this.weekNumberAlgorithm) {
|
|
3531
3560
|
case "Auto":
|
|
3532
|
-
|
|
3561
|
+
k = 1 === o.weekStarts() ? P.weekNumberISO() : P.weekNumber();
|
|
3533
3562
|
break;
|
|
3534
3563
|
case "US":
|
|
3535
|
-
|
|
3564
|
+
k = P.weekNumber();
|
|
3536
3565
|
break;
|
|
3537
3566
|
case "ISO8601":
|
|
3538
|
-
|
|
3567
|
+
k = P.weekNumberISO();
|
|
3539
3568
|
break;
|
|
3540
3569
|
default: throw "Unknown weekNumberAlgorithm value.";
|
|
3541
3570
|
}
|
|
3542
|
-
var
|
|
3543
|
-
|
|
3571
|
+
var _ = document.createElement("div");
|
|
3572
|
+
_.style.position = "absolute", _.style.left = "0px", _.style.right = "0px", _.style.top = C * this.cellHeight + g + "px", _.style.width = o.cellWidth() + "px", _.style.height = this.cellHeight + "px", _.style.lineHeight = this.cellHeight + "px", _.setAttribute("unselectable", "on"), _.className = this.J("_weeknumber"), _.innerHTML = "<span>" + k + "</span>", v.appendChild(_), a.weeks.push(_);
|
|
3544
3573
|
}
|
|
3545
3574
|
for (var S = 0; S < 7; S++) {
|
|
3546
3575
|
a.cells[S] = [];
|
|
3547
|
-
var
|
|
3548
|
-
|
|
3576
|
+
var _ = document.createElement("div");
|
|
3577
|
+
_.style.position = "absolute", _.style.left = S * o.cellWidth() + w + "px", _.style.right = S * o.cellWidth() + w + "px", _.style.top = this.titleHeight + "px", _.style.width = o.cellWidth() + "px", _.style.height = this.dayHeaderHeight + "px", _.style.lineHeight = this.dayHeaderHeight + "px", _.setAttribute("unselectable", "on"), _.className = this.J("_dayheader"), _.innerHTML = "<span>" + this.Vc(S) + "</span>", v.appendChild(_), a.days.push(_);
|
|
3549
3578
|
for (var C = 0; C < h; C++) {
|
|
3550
|
-
var P = d.addDays(7 * C + S), M = this.
|
|
3551
|
-
if ("month" === this.
|
|
3579
|
+
var P = d.addDays(7 * C + S), M = this.Wc(P) && "none" !== this.Xc(), T = P.firstDayOfMonth() === n, A = P < n, H = P >= n.addMonths(1);
|
|
3580
|
+
if ("month" === this.Xc())
|
|
3552
3581
|
M = M && T;
|
|
3553
|
-
else if ("day" === this.
|
|
3582
|
+
else if ("day" === this.Xc())
|
|
3554
3583
|
M = M && (T || r && A || s && H);
|
|
3555
|
-
else if ("week" === this.
|
|
3584
|
+
else if ("week" === this.Xc()) {
|
|
3556
3585
|
var E = P.firstDayOfMonth() === n;
|
|
3557
3586
|
M = M && (E || r && A || s && H);
|
|
3558
3587
|
}
|
|
3559
3588
|
var N = document.createElement("div");
|
|
3560
3589
|
a.cells[S][C] = N;
|
|
3561
|
-
var I = i.
|
|
3562
|
-
N.day = P, N.x = S, N.y = C, N.left =
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3590
|
+
var I = i.Yc(S, C), R = I.x, O = I.y;
|
|
3591
|
+
N.day = P, N.x = S, N.y = C, N.left = R, N.top = O, N.isCurrentMonth = T, N.isNextMonth = H, N.isPrevMonth = A, N.showBefore = r, N.showAfter = s, N.className = this.J(T ? "_day" : "_dayother"), i.Rc(N, "cell"), P.getTime() === f.getTime() && T && this.Rc(N, "today"), 0 !== P.dayOfWeek() && 6 !== P.dayOfWeek() || this.Rc(N, "weekend"), N.style.position = "absolute", N.style.left = R + "px", N.style.right = R + "px", N.style.top = O + "px", N.style.width = o.cellWidth() + "px", N.style.height = this.cellHeight + "px", N.style.lineHeight = this.cellHeight + "px";
|
|
3592
|
+
var z = document.createElement("div");
|
|
3593
|
+
z.style.position = "absolute", z.className = P.getTime() === f.getTime() && T ? this.J("_todaybox") : this.J("_daybox"), i.Rc(z, "cell_box"), z.style.left = "0px", z.style.top = "0px", z.style.right = "0px", z.style.bottom = "0px", N.appendChild(z);
|
|
3565
3594
|
var U = null;
|
|
3566
3595
|
if (this.cells && this.cells[P.toStringSortable()] && (U = this.cells[P.toStringSortable()]), "function" == typeof i.onBeforeCellRender) {
|
|
3567
|
-
var
|
|
3568
|
-
|
|
3596
|
+
var B = {};
|
|
3597
|
+
B.cell = U || {}, B.cell.day = P, B.cell.isCurrentMonth = T, B.cell.isToday = P.getTime() === f.getTime() && T, B.cell.isWeekend = 0 === P.dayOfWeek() || 6 === P.dayOfWeek(), U ? (B.cell.html = U.html || P.getDay(), B.cell.cssClass = U.css) : (B.cell.html = P.getDay(), B.cell.cssClass = null), i.onBeforeCellRender(B), U = B.cell;
|
|
3569
3598
|
}
|
|
3570
3599
|
if (U && DayPilot.Util.addClass(N, U.cssClass || U.css), T || r && A || s && H) {
|
|
3571
|
-
var
|
|
3572
|
-
|
|
3600
|
+
var L = document.createElement("div");
|
|
3601
|
+
L.innerHTML = P.getDay(), L.style.position = "absolute", L.style.left = "0px", L.style.top = "0px", L.style.right = "0px", L.style.bottom = "0px", i.Rc(L, "cell_text"), N.isClickable = !0, U && U.html && (L.innerHTML = U.html), N.appendChild(L);
|
|
3573
3602
|
}
|
|
3574
|
-
N.setAttribute("unselectable", "on"), N.onclick = this.
|
|
3603
|
+
N.setAttribute("unselectable", "on"), N.onclick = this.Zc, v.appendChild(N), M && (i.$c(v, S, C), this.selected.push(N));
|
|
3575
3604
|
}
|
|
3576
3605
|
}
|
|
3577
3606
|
var j = document.createElement("div");
|
|
3578
|
-
j.style.position = "absolute", j.style.left = "0px", j.style.top = g - 2 + "px", j.style.width = 7 * o.cellWidth() + this.
|
|
3579
|
-
}, this.
|
|
3607
|
+
j.style.position = "absolute", j.style.left = "0px", j.style.top = g - 2 + "px", j.style.width = 7 * o.cellWidth() + this.Qc() + "px", j.style.height = "1px", j.style.fontSize = "1px", j.style.lineHeight = "1px", j.className = this.J("_line"), v.appendChild(j), this.months.push(a);
|
|
3608
|
+
}, this.Yc = function (e, t) { var i = this.titleHeight + this.dayHeaderHeight, a = this.Qc(); return { "x": e * o.cellWidth() + a, "y": t * this.cellHeight + i }; }, this.$c = function (e, t, a) { var n = e.month.cells[t][a]; i.Rc(n, "select"); }, this._c = function (e, t, a) { var n = e.month.cells[t][a]; i.Sc(n, "select"); }, this.Qc = function () { return this.showWeekNumbers ? o.cellWidth() : 0; }, this.ad = function () {
|
|
3580
3609
|
if (this.items)
|
|
3581
3610
|
for (var e = 0; e < this.showMonths; e++)
|
|
3582
3611
|
for (var t = 0; t < 7; t++)
|
|
3583
3612
|
for (var i = 0; i < 6; i++) {
|
|
3584
3613
|
var a = this.months[e].cells[t][i];
|
|
3585
|
-
a && (1 === this.items[a.day.toStringSortable()] ? (this.
|
|
3614
|
+
a && (1 === this.items[a.day.toStringSortable()] ? (this.Rc(a, "busy"), this.Sc(a, "free")) : (this.Sc(a, "busy"), this.Rc(a, "free")));
|
|
3586
3615
|
}
|
|
3587
|
-
}, this.
|
|
3616
|
+
}, this.bd = function () { var e = {}; e.startDate = i.startDate, e.selectionStart = i.selectionStart, e.selectionEnd = i.selectionEnd.addDays(1), i.state.value = JSON.stringify(e); }, this.Xc = function () { return (this.selectMode || "").toLowerCase(); }, this.cd = function () {
|
|
3588
3617
|
var e = this.selectionDay || this.selectionStart;
|
|
3589
|
-
switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.
|
|
3618
|
+
switch (e || (e = DayPilot.Date.today()), e = new DayPilot.Date(e), this.Xc()) {
|
|
3590
3619
|
case "day":
|
|
3591
3620
|
this.selectionStart = e, this.selectionDay = e, this.selectionEnd = e;
|
|
3592
3621
|
break;
|
|
@@ -3601,10 +3630,10 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3601
3630
|
break;
|
|
3602
3631
|
default: throw "Unknown selectMode value.";
|
|
3603
3632
|
}
|
|
3604
|
-
}, this.
|
|
3633
|
+
}, this.dd = null, this.select = function (e, t, a) {
|
|
3605
3634
|
var n = t && (t instanceof DayPilot.Date || "string" == typeof t), o = t && "object" == typeof t || "boolean" == typeof t, r = e, s = n ? t : null, l = o ? t : a;
|
|
3606
|
-
if (!this.
|
|
3607
|
-
return void (this.
|
|
3635
|
+
if (!this.Aa)
|
|
3636
|
+
return void (this.dd = { "date1": r, "date2": s, "options": l });
|
|
3608
3637
|
var d = !0, c = !0;
|
|
3609
3638
|
l && "object" == typeof l ? (l.dontFocus && (d = !1), l.dontNotify && (c = !1)) : "boolean" == typeof l && (d = !l);
|
|
3610
3639
|
var u = this.selectionStart, h = this.selectionEnd;
|
|
@@ -3612,21 +3641,21 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3612
3641
|
var f = !1;
|
|
3613
3642
|
if (d) {
|
|
3614
3643
|
var m = this.startDate;
|
|
3615
|
-
(this.selectionStart < this.
|
|
3644
|
+
(this.selectionStart < this.ed() || this.selectionStart >= this.fd()) && (m = this.selectionStart.firstDayOfMonth()), m.toStringSortable() !== this.startDate.toStringSortable() && (f = !0), this.startDate = m;
|
|
3616
3645
|
}
|
|
3617
|
-
s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.
|
|
3646
|
+
s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.cd(), this.Kc(), this.Pc(), this.gd(), this.ad(), this.bd(), !c || u.equals(this.selectionStart) && h.equals(this.selectionEnd) || this.L(), f && this.hd();
|
|
3618
3647
|
}, this.update = function (e) {
|
|
3619
|
-
if (i.
|
|
3648
|
+
if (i.ab(e), this.Aa) {
|
|
3620
3649
|
if (i.N)
|
|
3621
3650
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");
|
|
3622
|
-
i.
|
|
3651
|
+
i.jd();
|
|
3623
3652
|
var t = { "day": i.selectionDay, "start": i.selectionStart, "end": i.selectionEnd };
|
|
3624
|
-
i
|
|
3653
|
+
i.$a(), t.start === i.selectionStart && t.end == i.selectionEnd && t.day === i.selectionDay || i.L();
|
|
3625
3654
|
}
|
|
3626
|
-
}, this
|
|
3655
|
+
}, this.$a = function () { this.Kc(), this.Pc(), this.cd(), this.gd(), this.da(), this.ad(), this.bd(), this.visible ? this.show() : this.hide(); }, this.jd = function () { i.gb = {}; }, this.db = null, this.ab = function (e) {
|
|
3627
3656
|
if (e) {
|
|
3628
3657
|
var t = { "events": { "preInit": function () { var e = this.data || []; DayPilot.isArray(e.list) ? i.events.list = e.list : i.events.list = e; } } };
|
|
3629
|
-
this.
|
|
3658
|
+
this.db = t;
|
|
3630
3659
|
for (var a in e)
|
|
3631
3660
|
if (t[a]) {
|
|
3632
3661
|
var n = t[a];
|
|
@@ -3635,20 +3664,20 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3635
3664
|
else
|
|
3636
3665
|
i[a] = e[a];
|
|
3637
3666
|
}
|
|
3638
|
-
}, this.
|
|
3639
|
-
var e = this.
|
|
3667
|
+
}, this.eb = function () {
|
|
3668
|
+
var e = this.db;
|
|
3640
3669
|
for (var t in e) {
|
|
3641
3670
|
var i = e[t];
|
|
3642
3671
|
i.postInit && i.postInit();
|
|
3643
3672
|
}
|
|
3644
|
-
}, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, n, this.
|
|
3673
|
+
}, this.R = function (e, t, i) { var a = {}; a.action = e, a.parameters = i, a.data = t, a.header = this.Q(); var n = "JSON" + JSON.stringify(a); this.backendUrl ? DayPilot.request(this.backendUrl, this.S, n, this.kd) : WebForm_DoCallback(this.uniqueID, n, this.T, null, this.callbackError, !0); }, this.kd = function (e) {
|
|
3645
3674
|
if ("function" == typeof i.onAjaxError) {
|
|
3646
3675
|
var t = {};
|
|
3647
3676
|
t.request = e, i.onAjaxError(t);
|
|
3648
3677
|
}
|
|
3649
3678
|
else
|
|
3650
3679
|
"function" == typeof i.ajaxError && i.ajaxError(e);
|
|
3651
|
-
}, this.S = function (e) { i.T(e.responseText); }, this.P = function (e, t, a) { var n = {}; n.action = e, n.parameters = a, n.data = t, n.header = this.Q(); var o = "JSON" + JSON.stringify(n); __doPostBack(i.uniqueID, o); }, this.Q = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.
|
|
3680
|
+
}, this.S = function (e) { i.T(e.responseText); }, this.P = function (e, t, a) { var n = {}; n.action = e, n.parameters = a, n.data = t, n.header = this.Q(); var o = "JSON" + JSON.stringify(n); __doPostBack(i.uniqueID, o); }, this.Q = function () { var e = {}; return e.v = this.v, e.startDate = this.startDate, e.selectionStart = this.selectionStart, e.showMonths = this.showMonths, e; }, this.ld = function (e, t) { "refresh" === e && this.hd(); }, this.Vc = function (e) { var t = e + o.weekStarts(); return t > 6 && (t -= 7), o.locale().dayNamesShort[t]; }, this.Wc = function (e) { return null !== this.selectionStart && null !== this.selectionEnd && (this.selectionStart.getTime() <= e.getTime() && e.getTime() <= this.selectionEnd.getTime()); }, this.md = function (e) {
|
|
3652
3681
|
for (var t = 0; t < i.months.length; t++) {
|
|
3653
3682
|
var a = i.months[t];
|
|
3654
3683
|
if (!a)
|
|
@@ -3660,8 +3689,8 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3660
3689
|
return t;
|
|
3661
3690
|
}
|
|
3662
3691
|
return null;
|
|
3663
|
-
}, this.
|
|
3664
|
-
var t = DayPilot.mo3(i.nav.top, e), a = i.
|
|
3692
|
+
}, this.nd = function (e) {
|
|
3693
|
+
var t = DayPilot.mo3(i.nav.top, e), a = i.md(t);
|
|
3665
3694
|
if (null === a)
|
|
3666
3695
|
return null;
|
|
3667
3696
|
var n = i.months[a], o = this.titleHeight + this.dayHeaderHeight;
|
|
@@ -3674,14 +3703,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3674
3703
|
return { "month": a, "x": r, "y": s, "coords": t };
|
|
3675
3704
|
}
|
|
3676
3705
|
return null;
|
|
3677
|
-
}, this.
|
|
3706
|
+
}, this.od = function (e) {
|
|
3678
3707
|
if (i.freeHandSelectionEnabled) {
|
|
3679
|
-
var t = i.
|
|
3708
|
+
var t = i.nd(e);
|
|
3680
3709
|
t && !t.header && (a.start = t), i.months[t.month].cells[t.x][t.y], e.preventDefault();
|
|
3681
3710
|
}
|
|
3682
|
-
}, this.
|
|
3711
|
+
}, this.pd = function (e) {
|
|
3683
3712
|
if (a.start) {
|
|
3684
|
-
var t = i.
|
|
3713
|
+
var t = i.nd(e);
|
|
3685
3714
|
if (a.end)
|
|
3686
3715
|
a.end = t;
|
|
3687
3716
|
else if (t) {
|
|
@@ -3690,9 +3719,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3690
3719
|
}
|
|
3691
3720
|
a.end && (a.clear(), a.draw());
|
|
3692
3721
|
}
|
|
3693
|
-
}, this.
|
|
3694
|
-
var a = this.
|
|
3695
|
-
a.start = null, a.drawCell = function (e) { var t = i.months[e.month], n = i.
|
|
3722
|
+
}, this.qd = {};
|
|
3723
|
+
var a = this.qd;
|
|
3724
|
+
a.start = null, a.drawCell = function (e) { var t = i.months[e.month], n = i.Yc(e.x, e.y), o = t.top + n.y, r = t.left + n.x, s = document.createElement("div"); s.style.position = "absolute", s.style.left = r + "px", s.style.top = o + "px", s.style.height = i.cellHeight + "px", s.style.width = i.cellWidth + "px", s.style.backgroundColor = "#ccc", s.style.opacity = .5, s.style.cursor = "default", i.nav.preselection.appendChild(s), a.cells.push(s); }, a.clear = function () {
|
|
3696
3725
|
if (a.cells) {
|
|
3697
3726
|
for (var e = 0; e < a.cells.length; e++)
|
|
3698
3727
|
i.nav.preselection.removeChild(a.cells[e]);
|
|
@@ -3761,54 +3790,54 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3761
3790
|
return e;
|
|
3762
3791
|
}, this.cell = function () { return i.months[this.month].cells[this.x][this.y]; }, this.date = function () { return this.cell().day; }, this.before = function (e) { return this.date() < new n(e).date(); };
|
|
3763
3792
|
};
|
|
3764
|
-
this.
|
|
3793
|
+
this.Zc = function (e) {
|
|
3765
3794
|
var t = this.parentNode, a = this.parentNode.month, n = this.x, o = this.y, r = a.cells[n][o].day;
|
|
3766
3795
|
if (a.cells[n][o].isClickable) {
|
|
3767
3796
|
i.clearSelection(), i.selectionDay = r;
|
|
3768
3797
|
var r = i.selectionDay;
|
|
3769
|
-
switch (i.
|
|
3798
|
+
switch (i.Xc()) {
|
|
3770
3799
|
case "none":
|
|
3771
3800
|
i.selectionStart = r, i.selectionEnd = r;
|
|
3772
3801
|
break;
|
|
3773
3802
|
case "day":
|
|
3774
3803
|
if (i.autoFocusOnClick) {
|
|
3775
3804
|
var s = r;
|
|
3776
|
-
if (r < i.
|
|
3805
|
+
if (r < i.ed() || r >= i.fd())
|
|
3777
3806
|
return void i.select(r);
|
|
3778
3807
|
}
|
|
3779
3808
|
var l = a.cells[n][o];
|
|
3780
|
-
i
|
|
3809
|
+
i.$c(t, n, o), i.selected.push(l), i.selectionStart = l.day, i.selectionEnd = l.day;
|
|
3781
3810
|
break;
|
|
3782
3811
|
case "week":
|
|
3783
3812
|
if (i.autoFocusOnClick) {
|
|
3784
3813
|
var s = a.cells[0][o].day, d = a.cells[6][o].day;
|
|
3785
|
-
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s < i.
|
|
3814
|
+
if (s.firstDayOfMonth() === d.firstDayOfMonth() && (s < i.ed() || d >= i.fd()))
|
|
3786
3815
|
return void i.select(r);
|
|
3787
3816
|
}
|
|
3788
3817
|
for (var c = 0; c < 7; c++)
|
|
3789
|
-
i
|
|
3818
|
+
i.$c(t, c, o), i.selected.push(a.cells[c][o]);
|
|
3790
3819
|
i.selectionStart = a.cells[0][o].day, i.selectionEnd = a.cells[6][o].day;
|
|
3791
3820
|
break;
|
|
3792
3821
|
case "month":
|
|
3793
3822
|
if (i.autoFocusOnClick) {
|
|
3794
3823
|
var s = r;
|
|
3795
|
-
if (r < i.
|
|
3824
|
+
if (r < i.ed() || r >= i.fd())
|
|
3796
3825
|
return void i.select(r);
|
|
3797
3826
|
}
|
|
3798
3827
|
for (var s = null, d = null, o = 0; o < 6; o++)
|
|
3799
3828
|
for (var n = 0; n < 7; n++) {
|
|
3800
3829
|
var l = a.cells[n][o];
|
|
3801
|
-
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (i
|
|
3830
|
+
l && l.day.getYear() === r.getYear() && l.day.getMonth() === r.getMonth() && (i.$c(t, n, o), i.selected.push(l), null === s && (s = l.day), d = l.day);
|
|
3802
3831
|
}
|
|
3803
3832
|
i.selectionStart = s, i.selectionEnd = d;
|
|
3804
3833
|
break;
|
|
3805
3834
|
default: throw "unknown selectMode";
|
|
3806
3835
|
}
|
|
3807
|
-
i.
|
|
3836
|
+
i.bd(), i.L();
|
|
3808
3837
|
}
|
|
3809
3838
|
}, this.L = function (e) {
|
|
3810
3839
|
var t = i.selectionStart, a = i.selectionEnd.addDays(1), n = DayPilot.DateUtil.daysDiff(t, a), o = i.selectionDay;
|
|
3811
|
-
if (e = e || {}, i.
|
|
3840
|
+
if (e = e || {}, i.pa()) {
|
|
3812
3841
|
var r = {};
|
|
3813
3842
|
if (r.start = t, r.end = a, r.day = o, r.days = n, r.mode = e.mode || i.selectMode, r.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onTimeRangeSelect && (i.onTimeRangeSelect(r), r.preventDefault.value))
|
|
3814
3843
|
return;
|
|
@@ -3838,9 +3867,9 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3838
3867
|
case "None": break;
|
|
3839
3868
|
case "PostBack": i.timeRangeSelectedPostBack(t, a, o);
|
|
3840
3869
|
}
|
|
3841
|
-
}, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.P("TimeRangeSelected", i, n); }, this.
|
|
3870
|
+
}, this.timeRangeSelectedPostBack = function (e, t, i, a) { var n = {}; n.start = e, n.end = t, n.day = a, this.P("TimeRangeSelected", i, n); }, this.Uc = function (e) { i.rd(i.skipMonths); }, this.Tc = function (e) { i.rd(-i.skipMonths); }, this.rd = function (e) { this.startDate = this.startDate.addMonths(e), this.Kc(), this.Pc(), this.gd(), this.bd(), this.hd(), this.ad(); }, this.ed = function () { return i.startDate.firstDayOfMonth(); }, this.fd = function () { return i.startDate.firstDayOfMonth().addMonths(this.showMonths); }, this.visibleStart = function () { return i.startDate.firstDayOfMonth().firstDayOfWeek(o.weekStarts()); }, this.visibleEnd = function () { return i.startDate.firstDayOfMonth().addMonths(this.showMonths - 1).firstDayOfWeek(o.weekStarts()).addDays(42); }, this.hd = function () {
|
|
3842
3871
|
var e = this.visibleStart(), t = this.visibleEnd();
|
|
3843
|
-
if (i.
|
|
3872
|
+
if (i.pa()) {
|
|
3844
3873
|
var a = {};
|
|
3845
3874
|
if (a.start = e, a.end = t, a.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof i.onVisibleRangeChange && (i.onVisibleRangeChange(a), a.preventDefault.value))
|
|
3846
3875
|
return;
|
|
@@ -3868,13 +3897,14 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3868
3897
|
break;
|
|
3869
3898
|
case "Disabled":
|
|
3870
3899
|
}
|
|
3871
|
-
}, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.R("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.P("Visible", e, t); }, this.T = function (e, t) { var e = JSON.parse(e); i.items = e.Items, i.cells = e.Cells, i.cells ? i.update() : i.
|
|
3900
|
+
}, this.visibleRangeChangedCallBack = function (e) { var t = {}; this.R("Visible", e, t); }, this.visibleRangeChangedPostBack = function (e) { var t = {}; this.P("Visible", e, t); }, this.T = function (e, t) { var e = JSON.parse(e); i.items = e.Items, i.cells = e.Cells, i.cells ? i.update() : i.ad(); }, this.gd = function () {
|
|
3872
3901
|
for (var e = 0; e < this.showMonths; e++) {
|
|
3873
|
-
var t = this.
|
|
3874
|
-
this.
|
|
3902
|
+
var t = this.sd(e);
|
|
3903
|
+
this.Lc(e, t);
|
|
3875
3904
|
}
|
|
3876
|
-
this.root.style.height = this.
|
|
3877
|
-
|
|
3905
|
+
this.root.style.height = this.td() + "px", this.nav.preselection = document.createElement("div"),
|
|
3906
|
+
this.nav.preselection.style.position = "absolute", this.nav.preselection.style.left = "0px", this.nav.preselection.style.top = "0px", this.root.appendChild(this.nav.preselection);
|
|
3907
|
+
}, this.td = function () {
|
|
3878
3908
|
if ("Horizontal" === this.orientation) {
|
|
3879
3909
|
for (var e = 0, t = 0; t < this.months.length; t++) {
|
|
3880
3910
|
var i = this.months[t];
|
|
@@ -3887,12 +3917,12 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3887
3917
|
a += i.height;
|
|
3888
3918
|
}
|
|
3889
3919
|
return a;
|
|
3890
|
-
}, this.
|
|
3920
|
+
}, this.sd = function (e) {
|
|
3891
3921
|
if (this.internal.showLinks)
|
|
3892
3922
|
return this.internal.showLinks;
|
|
3893
3923
|
var t = {};
|
|
3894
3924
|
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;
|
|
3895
|
-
}, this.
|
|
3925
|
+
}, this.ra = {}, this.ra.scope = null, this.ra.notify = function () { i.ra.scope && i.ra.scope["$apply"](); }, this.internal = {}, this.internal.loadOptions = i.ab, this.internal.initialized = function () { return i.Aa; }, this._ = {};
|
|
3896
3926
|
var o = this._;
|
|
3897
3927
|
o.locale = function () { return DayPilot.Locale.find(i.locale); }, o.weekStarts = function () {
|
|
3898
3928
|
if ("Auto" === i.weekStarts) {
|
|
@@ -3901,33 +3931,33 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3901
3931
|
}
|
|
3902
3932
|
return i.weekStarts;
|
|
3903
3933
|
}, o.cellWidth = function () {
|
|
3904
|
-
if (i.
|
|
3905
|
-
return i.
|
|
3906
|
-
var e = i.
|
|
3907
|
-
return e || (e = i.cellWidth), i.
|
|
3934
|
+
if (i.gb.cellWidth)
|
|
3935
|
+
return i.gb.cellWidth;
|
|
3936
|
+
var e = i.ud("_cell_dimensions").width;
|
|
3937
|
+
return e || (e = i.cellWidth), i.gb.cellWidth = e, e;
|
|
3908
3938
|
}, this.clearSelection = function () {
|
|
3909
3939
|
for (var e = 0; e < this.selected.length; e++) {
|
|
3910
3940
|
var t = this.selected[e];
|
|
3911
|
-
i
|
|
3941
|
+
i._c(t.parentNode, t.x, t.y);
|
|
3912
3942
|
}
|
|
3913
3943
|
this.selected = [];
|
|
3914
|
-
}, this.
|
|
3944
|
+
}, this.vd = function () { return !!this.backendUrl && ("undefined" == typeof i.items || !i.items); }, this.events = {}, this.da = function () {
|
|
3915
3945
|
if (DayPilot.isArray(this.events.list)) {
|
|
3916
3946
|
this.items = {};
|
|
3917
3947
|
for (var e = 0; e < this.events.list.length; e++) {
|
|
3918
3948
|
var t = this.events.list[e];
|
|
3919
3949
|
if (!t.hidden) {
|
|
3920
|
-
var i = this.
|
|
3950
|
+
var i = this.wd(t);
|
|
3921
3951
|
for (var a in i)
|
|
3922
3952
|
this.items[a] = 1;
|
|
3923
3953
|
}
|
|
3924
3954
|
}
|
|
3925
3955
|
}
|
|
3926
|
-
}, this.
|
|
3956
|
+
}, this.ud = function (e) { var t = document.createElement("div"); t.style.position = "absolute", t.style.top = "-2000px", t.style.left = "-2000px", t.className = this.J(e); var a = i.root || document.body; a.appendChild(t); var n = t.offsetHeight, o = t.offsetWidth; a.removeChild(t); var r = {}; return r.height = n, r.width = o, r; }, this.wd = function (e) {
|
|
3927
3957
|
for (var t = new DayPilot.Date(e.start), i = new DayPilot.Date(e.end), a = {}, n = t.getDatePart(); n.getTime() <= i.getTime();)
|
|
3928
3958
|
a[n.toStringSortable()] = 1, n = n.addDays(1);
|
|
3929
3959
|
return a;
|
|
3930
|
-
}, this.show = function () { i.visible = !0, i.root.style.display = ""; }, this.hide = function () { i.visible = !1, i.root.style.display = "none"; }, this.
|
|
3960
|
+
}, this.show = function () { i.visible = !0, i.root.style.display = ""; }, this.hide = function () { i.visible = !1, i.root.style.display = "none"; }, this.fb = function () {
|
|
3931
3961
|
if (this.id && this.id.tagName)
|
|
3932
3962
|
this.nav.top = this.id;
|
|
3933
3963
|
else {
|
|
@@ -3938,26 +3968,26 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3938
3968
|
}
|
|
3939
3969
|
this.root = this.nav.top;
|
|
3940
3970
|
}, this.init = function () {
|
|
3941
|
-
if (this.
|
|
3942
|
-
this.
|
|
3943
|
-
if (this.
|
|
3944
|
-
var e = this.
|
|
3945
|
-
this.select(e.date1, e.date2, e.options), this.
|
|
3971
|
+
if (this.fb(), !this.root.dp) {
|
|
3972
|
+
this.cd(), this.Pc(), this.gd(), this.da(), this.ad(), this.Y(), this.xd(), this.Za();
|
|
3973
|
+
if (this.vd() && this.hd(), this.Aa = !0, this.eb(), this.dd) {
|
|
3974
|
+
var e = this.dd;
|
|
3975
|
+
this.select(e.date1, e.date2, e.options), this.dd = null;
|
|
3946
3976
|
}
|
|
3947
3977
|
return this;
|
|
3948
3978
|
}
|
|
3949
|
-
}, this.
|
|
3979
|
+
}, this.xd = function () { i.nav.top.onmousedown = this.od, i.nav.top.onmousemove = this.pd; }, this.Za = function () { DayPilot.re(document, "mouseup", i.yd); }, this.yd = function (e) {
|
|
3950
3980
|
if (a.start && a.end) {
|
|
3951
3981
|
var t = DayPilot.mo3(i.nav.top, e);
|
|
3952
3982
|
if (t.x === a.start.coords.x && t.y === a.start.coords.y)
|
|
3953
3983
|
return a.start = null, void a.clear();
|
|
3954
3984
|
a.clear();
|
|
3955
3985
|
var o = a.ordered();
|
|
3956
|
-
o.start = new n(o.start).nextVisible(), o.end = new n(o.end).previousVisible(), i.selectionDay = new n(o.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new n(o.end).date(), a.start = null, a.end = null, i.
|
|
3986
|
+
o.start = new n(o.start).nextVisible(), o.end = new n(o.end).previousVisible(), i.selectionDay = new n(o.start).date(), i.selectionStart = i.selectionDay, i.selectionEnd = new n(o.end).date(), a.start = null, a.end = null, i.Kc(), i.Pc(), i.gd(), i.ad(), i.bd();
|
|
3957
3987
|
i.L({ "mode": "FreeHand" });
|
|
3958
3988
|
}
|
|
3959
3989
|
a.start = null, a.end = null;
|
|
3960
|
-
}, this.dispose = function () { var e = i; e.root && (e.root.removeAttribute("style"), e.root.removeAttribute("class"), e.root.dp = null, e.root.innerHTML = null, e.root = null, e.N = !0); }, this.Y = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.
|
|
3990
|
+
}, this.dispose = function () { var e = i; e.root && (e.root.removeAttribute("style"), e.root.removeAttribute("class"), e.root.dp = null, e.root.innerHTML = null, e.root = null, e.N = !0); }, this.Y = function () { this.root.dispose = this.dispose; }, this.Init = this.init, this.ab(t);
|
|
3961
3991
|
}, "undefined" != typeof jQuery && !function (e) {
|
|
3962
3992
|
e.fn.daypilotNavigator = function (e) {
|
|
3963
3993
|
var t = null, i = this.each(function () {
|
|
@@ -3977,7 +4007,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3977
4007
|
return { "restrict": "E", "template": "<div id='{{id}}'></div>", "compile": function (t, i) {
|
|
3978
4008
|
return t.replaceWith(this["template"].replace("{{id}}", i["id"])), function (t, i, a) {
|
|
3979
4009
|
var n = new DayPilot.Navigator(i[0]);
|
|
3980
|
-
n.
|
|
4010
|
+
n.ra.scope = t, n.init();
|
|
3981
4011
|
var o = a["id"];
|
|
3982
4012
|
o && (t[o] = n);
|
|
3983
4013
|
var r = a["publishAs"];
|
|
@@ -3994,7 +4024,7 @@ if ("undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function ()
|
|
|
3994
4024
|
for (var i in e)
|
|
3995
4025
|
n[i] = e[i];
|
|
3996
4026
|
n.update();
|
|
3997
|
-
}, !0), d.call(t, u, function (e) { n.events.list = e, n.
|
|
4027
|
+
}, !0), d.call(t, u, function (e) { n.events.list = e, n.da(), n.ad(); }, !0);
|
|
3998
4028
|
};
|
|
3999
4029
|
} };
|
|
4000
4030
|
}]);
|