@daypilot/daypilot-lite-angular 3.4.0 → 3.5.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.
@@ -103,7 +103,7 @@ DayPilot Lite
103
103
  Copyright (c) 2005 - 2022 Annpoint s.r.o.
104
104
  http://www.daypilot.org/
105
105
  Licensed under Apache Software License 2.0
106
- Version: 2022.2.374-lite
106
+ Version: 2022.2.384-lite
107
107
  */
108
108
  if ("undefined" == typeof DayPilot)
109
109
  var DayPilot = {};
@@ -301,7 +301,7 @@ if ("undefined" == typeof DayPilot)
301
301
  throw new DayPilot.Exception("Invalid color, only full hex color string accepted, eg. '#ffaaff'."); return e = e.replace("#", ""), { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16) }; }, DayPilot.ColorUtil.rgbToHex = function (e) { return "#" + t(e.r) + t(e.g) + t(e.b); }, DayPilot.ColorUtil.adjustLuminance = function (e, t) { return { r: e.r + t, g: e.g + t, b: e.b + t }; }, DayPilot.ColorUtil.darker = function (e, t) { var a = DayPilot.ColorUtil.hexToRgb(e); t = t || 1; var r = 17, o = t * r, n = DayPilot.ColorUtil.adjustLuminance(a, -o); return DayPilot.ColorUtil.rgbToHex(n); }, DayPilot.Event = function (e, t, a) {
302
302
  var r = this;
303
303
  this.calendar = t, this.data = e ? e : {}, this.part = a ? a : {}, "undefined" == typeof this.data.id && (this.data.id = this.data.value);
304
- var o = {}, n = ["id", "text", "start", "end"];
304
+ var o = {}, n = ["id", "text", "start", "end", "resource"];
305
305
  this.isEvent = !0, this.temp = function () { if (o.dirty)
306
306
  return o; for (var e = 0; e < n.length; e++)
307
307
  o[n[e]] = r.data[n[e]]; return o.dirty = !0, o; }, this.copy = function () { for (var e = {}, t = 0; t < n.length; t++)
@@ -311,7 +311,7 @@ if ("undefined" == typeof DayPilot)
311
311
  o.dirty = !1;
312
312
  } }, this.dirty = function () { return o.dirty; }, this.id = function (e) { return "undefined" == typeof e ? r.data.id : void (this.temp().id = e); }, this.value = function (e) { return "undefined" == typeof e ? r.id() : void r.id(e); }, this.text = function (e) { return "undefined" == typeof e ? r.data.text : (this.temp().text = e, void this.client.innerHTML(e)); }, this.start = function (e) {
313
313
  return "undefined" == typeof e ? new DayPilot.Date(r.data.start) : void (this.temp().start = new DayPilot.Date(e));
314
- }, this.end = function (e) { return "undefined" == typeof e ? new DayPilot.Date(r.data.end) : void (this.temp().end = new DayPilot.Date(e)); }, this.partStart = function () { return new DayPilot.Date(this.part.start); }, this.partEnd = function () { return new DayPilot.Date(this.part.end); }, this.tag = function (e) { var t = r.data.tag; if (!t)
314
+ }, this.end = function (e) { return "undefined" == typeof e ? new DayPilot.Date(r.data.end) : void (this.temp().end = new DayPilot.Date(e)); }, this.resource = function (e) { return "undefined" == typeof e ? r.data.resource : void (this.temp().resource = e); }, this.partStart = function () { return new DayPilot.Date(this.part.start); }, this.partEnd = function () { return new DayPilot.Date(this.part.end); }, this.tag = function (e) { var t = r.data.tag; if (!t)
315
315
  return null; if ("undefined" == typeof e)
316
316
  return r.data.tag; for (var a = r.calendar.tagFields, o = -1, n = 0; n < a.length; n++)
317
317
  e === a[n] && (o = n); if (o === -1)
@@ -381,15 +381,13 @@ if ("undefined" == typeof DayPilot)
381
381
  var a = t.movingShadow.offsetTop;
382
382
  t.deleteShadow(t.movingShadow);
383
383
  var n = t.moving.event, o = t.movingShadow.column;
384
- t.moving = null, t.movingShadow = null, n.calendar.nav.top.style.cursor = "auto";
385
- var r = i || window.event;
386
- n.calendar.b(n, o, a, r);
384
+ t.moving = null, t.movingShadow = null, n.calendar.nav.top.style.cursor = "auto", n.calendar.b(n, o, a, i);
387
385
  }
388
386
  else if (t.selecting && null !== t.topSelectedCell) {
389
- var h = t.selecting.calendar;
387
+ var r = t.selecting.calendar;
390
388
  t.selecting = !1;
391
- var c = h.getSelection();
392
- h.c(c.start, c.end), "Hold" !== h.timeRangeSelectedHandling && "HoldForever" !== h.timeRangeSelectedHandling && e();
389
+ var h = r.getSelection();
390
+ r.c(h.start, h.end, h.resource), "Hold" !== r.timeRangeSelectedHandling && "HoldForever" !== r.timeRangeSelectedHandling && e();
393
391
  }
394
392
  else
395
393
  t.selecting = !1; }, t.deleteShadow = function (e) { e && e.parentNode && e.parentNode.removeChild(e); }, t.moveShadow = function (e) { var i = t.movingShadow, n = i.parentNode; n.style.display = "none", i.parentNode.removeChild(i), e.firstChild.appendChild(i), i.style.left = "0px", n.style.display = "", i.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"; }, t.Calendar = function (e, i) {
@@ -397,7 +395,7 @@ if ("undefined" == typeof DayPilot)
397
395
  if (this instanceof t.Calendar && !this.d && (n = !0, this.d = !0), !n)
398
396
  throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";
399
397
  var s = this;
400
- this.uniqueID = null, this.v = "2022.2.374-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.days = 1, this.durationBarVisible = !0, this.eventHeaderHeight = 14, this.eventHeaderVisible = !0, this.eventsLoadMethod = "GET", this.headerHeight = 30, this.height = 300, this.heightSpec = "BusinessHours", this.hideUntilInit = !0, this.hourWidth = 60, this.initScrollPos = "Auto", this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.loadingLabelBackColor = "ff0000", this.loadingLabelFontColor = "#ffffff", this.loadingLabelFontFamily = "Tahoma, Arial, Helvetica, sans-serif", this.loadingLabelFontSize = "10pt", 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.timeRangeSelectedHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventResizeHandling = "Update", this.eventMoveHandling = "Update", this.eventDeleteHandling = "Disabled", 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.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.f(); }, this.f = function () { DayPilot.de(s.elements.selection), s.elements.selection = [], s.nav.activeSelection = null; }, this.g = navigator && navigator.userAgent && navigator.userAgent.indexOf("MSIE") !== -1, this.h = navigator && navigator.userAgent && navigator.userAgent.indexOf("Firefox") !== -1, this.i = function () { if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
398
+ this.uniqueID = null, this.v = "2022.2.384-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.days = 1, this.durationBarVisible = !0, this.eventHeaderHeight = 14, this.eventHeaderVisible = !0, this.eventsLoadMethod = "GET", this.headerHeight = 30, this.height = 300, this.heightSpec = "BusinessHours", this.hideUntilInit = !0, this.hourWidth = 60, this.initScrollPos = "Auto", this.loadingLabelText = "Loading...", this.loadingLabelVisible = !0, this.loadingLabelBackColor = "ff0000", this.loadingLabelFontColor = "#ffffff", this.loadingLabelFontFamily = "Tahoma, Arial, Helvetica, sans-serif", this.loadingLabelFontSize = "10pt", 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.timeRangeSelectedHandling = "Enabled", this.eventClickHandling = "Enabled", this.eventResizeHandling = "Update", this.eventMoveHandling = "Update", this.eventDeleteHandling = "Disabled", 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.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.clearSelection = function () { t.topSelectedCell = null, t.bottomSelectedCell = null, this.f(); }, this.f = function () { DayPilot.de(s.elements.selection), s.elements.selection = [], s.nav.activeSelection = null; }, this.g = navigator && navigator.userAgent && navigator.userAgent.indexOf("MSIE") !== -1, this.h = navigator && navigator.userAgent && navigator.userAgent.indexOf("Firefox") !== -1, this.i = function () { if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
401
399
  return new Number(RegExp.$1) >= 10.5;
402
400
  } return !1; }(), this.j = function () { if (/AppleWebKit[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
403
401
  return new Number(RegExp.$1) >= 522;
@@ -496,33 +494,33 @@ if ("undefined" == typeof DayPilot)
496
494
  throw "newStart is null"; if (!i)
497
495
  throw "newEnd is null"; var a = {}; a.e = e, a.newStart = t, a.newEnd = i, this.k("EventMove", s, a); }, this.eventMoveCallBack = function (e, t, i, n, s) { if (!t)
498
496
  throw "newStart is null"; if (!i)
499
- throw "newEnd is null"; var a = {}; a.e = e, a.newStart = t, a.newEnd = i, this.m("EventMove", s, a); }, this.b = function (e, t, i, n) { var a = 1, l = Math.floor((i - a) / s.cellHeight), o = 30 * l * 60 * 1e3, r = e.start(), h = e.end(), c = new Date; r instanceof DayPilot.Date && (r = r.toDate()), c.setTime(Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate())); var d = r.getTime() - (c.getTime() + 3600 * r.getUTCHours() * 1e3 + 30 * Math.floor(r.getUTCMinutes() / 30) * 60 * 1e3), u = h.getTime() - r.getTime(), v = this.columns[t], p = v.start.getTime(), f = new Date; f.setTime(p + o + d); var g = new DayPilot.Date(f), m = g.addTime(u); if (s.O()) {
500
- var y = {};
501
- if (y.e = e, y.newStart = g, y.newEnd = m, y.ctrl = n.ctrlKey, y.shift = n.shiftKey, y.control = s, y.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onEventMove && (s.Q.apply(function () { s.onEventMove(y); }), y.preventDefault.value))
497
+ throw "newEnd is null"; var a = {}; a.e = e, a.newStart = t, a.newEnd = i, this.m("EventMove", s, a); }, this.b = function (e, t, i, n) { var a = 1, l = Math.floor((i - a) / s.cellHeight), o = 30 * l * 60 * 1e3, r = e.start(), h = e.end(), c = new Date; r instanceof DayPilot.Date && (r = r.toDate()), c.setTime(Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate())); var d = r.getTime() - (c.getTime() + 3600 * r.getUTCHours() * 1e3 + 30 * Math.floor(r.getUTCMinutes() / 30) * 60 * 1e3), u = h.getTime() - r.getTime(), v = this.S[t], p = v.id, f = v.start.getTime(), g = new Date; g.setTime(f + o + d); var m = new DayPilot.Date(g), y = m.addTime(u); if (s.O()) {
498
+ var b = {};
499
+ if (b.e = e, b.newStart = m, b.newEnd = y, b.newResource = p, b.ctrl = n.ctrlKey, b.shift = n.shiftKey, b.control = s, b.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onEventMove && (s.Q.apply(function () { s.onEventMove(b); }), b.preventDefault.value))
502
500
  return;
503
501
  switch (s.eventMoveHandling) {
504
502
  case "PostBack":
505
- s.eventMovePostBack(e, g, m, v.Value);
503
+ s.eventMovePostBack(e, m, y, v.id);
506
504
  break;
507
505
  case "CallBack":
508
- s.eventMoveCallBack(e, g, m, v.Value);
506
+ s.eventMoveCallBack(e, m, y, v.id);
509
507
  break;
510
- case "Update": e.start(g), e.end(m), s.events.update(e);
508
+ case "Update": e.start(m), e.end(y), e.resource(p), s.events.update(e);
511
509
  }
512
- "function" == typeof s.onEventMoved && s.Q.apply(function () { s.onEventMoved(y); });
510
+ "function" == typeof s.onEventMoved && s.Q.apply(function () { s.onEventMoved(b); });
513
511
  }
514
512
  else
515
513
  switch (s.eventMoveHandling) {
516
514
  case "PostBack":
517
- s.eventMovePostBack(e, g, m, v.Value);
515
+ s.eventMovePostBack(e, m, y, v.id);
518
516
  break;
519
517
  case "CallBack":
520
- s.eventMoveCallBack(e, g, m, v.Value);
518
+ s.eventMoveCallBack(e, m, y, v.id);
521
519
  break;
522
- case "JavaScript": s.onEventMove(e, g, m, v.Value, !1);
523
- } }, this.timeRangeSelectedPostBack = function (e, t, i, n) { var s = {}; s.start = e, s.end = t, this.k("TimeRangeSelected", n, s); }, this.timeRangeSelectedCallBack = function (e, t, i, n) { var s = {}; s.start = e, s.end = t, this.m("TimeRangeSelected", n, s); }, this.c = function (e, t) { if (e = new DayPilot.Date(e), t = new DayPilot.Date(t), this.O()) {
524
- var i = {};
525
- if (i.start = e, i.end = t, i.control = s, i.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onTimeRangeSelect && (s.Q.apply(function () { s.onTimeRangeSelect(i); }), i.preventDefault.value))
520
+ case "JavaScript": s.onEventMove(e, m, y, v.id, !1);
521
+ } }, this.timeRangeSelectedPostBack = function (e, t, i, n) { var s = {}; s.start = e, s.end = t, this.k("TimeRangeSelected", n, s); }, this.timeRangeSelectedCallBack = function (e, t, i, n) { var s = {}; s.start = e, s.end = t, this.m("TimeRangeSelected", n, s); }, this.c = function (e, t, i) { if (e = new DayPilot.Date(e), t = new DayPilot.Date(t), this.O()) {
522
+ var n = {};
523
+ if (n.start = e, n.end = t, n.resource = i, n.control = s, n.preventDefault = function () { this.preventDefault.value = !0; }, "function" == typeof s.onTimeRangeSelect && (s.Q.apply(function () { s.onTimeRangeSelect(n); }), n.preventDefault.value))
526
524
  return;
527
525
  switch (s.timeRangeSelectedHandling) {
528
526
  case "PostBack":
@@ -530,7 +528,7 @@ if ("undefined" == typeof DayPilot)
530
528
  break;
531
529
  case "CallBack": s.timeRangeSelectedCallBack(e, t);
532
530
  }
533
- "function" == typeof s.onTimeRangeSelected && s.Q.apply(function () { s.onTimeRangeSelected(i); });
531
+ "function" == typeof s.onTimeRangeSelected && s.Q.apply(function () { s.onTimeRangeSelected(n); });
534
532
  }
535
533
  else
536
534
  switch (s.timeRangeSelectedHandling) {
@@ -541,27 +539,41 @@ if ("undefined" == typeof DayPilot)
541
539
  s.timeRangeSelectedCallBack(e, t);
542
540
  break;
543
541
  case "JavaScript": s.onTimeRangeSelected(e, t);
544
- } }, this.S = function (e) { if (!t.selecting && "Disabled" !== s.timeRangeSelectedHandling) {
545
- var i = window.event ? window.event.button : e.which;
542
+ } }, this.T = function (e) { if (!t.selecting && "Disabled" !== s.timeRangeSelectedHandling) {
543
+ var i = e.which;
546
544
  if (1 === i || 0 === i)
547
- return t.firstMousePos = DayPilot.mc(e || window.event), t.selecting = {}, t.selecting.calendar = s, t.selectedCells && (s.clearSelection(), t.selectedCells = []), t.column = t.getColumn(this), t.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, s.T(), !1;
548
- } }, this.T = function () { this.getSelection(); !function () { return; }(), function () { var e = t.topSelectedCell, i = t.bottomSelectedCell, n = function () { if (e.data)
545
+ return t.firstMousePos = DayPilot.mc(e), t.selecting = {}, t.selecting.calendar = s, t.selectedCells && (s.clearSelection(), t.selectedCells = []), t.column = t.getColumn(this), t.selectedCells.push(this), t.firstSelected = this, t.topSelectedCell = this, t.bottomSelectedCell = this, s.U(), !1;
546
+ } }, this.U = function () { this.getSelection(); !function () { var e = t.topSelectedCell, i = t.bottomSelectedCell, n = function () { if (e.data)
549
547
  return e.data.x; for (var t = e.parentNode.cells, i = 0; i < t.length; i++)
550
548
  if (t[i] === e)
551
- return i; return -1; }(), a = s.columns[n]; if (a) {
549
+ return i; return -1; }(), a = s.S[n]; if (a) {
552
550
  var l = a.start, o = s.getPixels(e.start, l).boxTop, r = s.getPixels(i.end, l).boxBottom, h = r - o, c = function () { if (s.nav.activeSelection)
553
551
  return s.nav.activeSelection; var e = document.createElement("div"); e.setAttribute("unselectable", "on"), e.style.position = "absolute", e.style.left = "0px", e.style.width = "100%"; var t = document.createElement("div"); return t.setAttribute("unselectable", "on"), t.className = s.u("_shadow_inner"), e.appendChild(t), s.nav.events.rows[0].cells[n].selection.appendChild(e), s.elements.selection.push(e), s.nav.activeSelection = e, e; }();
554
552
  c.className = s.u("_shadow"), c.firstChild.innerHTML = "", c.style.top = o + "px", c.style.height = h + "px";
555
- } }(); }, this.U = function (e) { if ("undefined" != typeof t && t.selecting) {
556
- var i = DayPilot.mc(e || window.event);
557
- t.getColumn(this) === t.column && (s.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]), s.T());
558
- } }, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end; return new DayPilot.Selection(e, i, null, s); }, this.V = function (e) { }, this.W = function (e) { if (e < 0)
553
+ } }(); }, this.V = function (e) { if ("undefined" != typeof t && t.selecting) {
554
+ var i = DayPilot.mc(e);
555
+ t.getColumn(this) === t.column && (s.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]), s.U());
556
+ } }, this.getSelection = function () { var e = t.topSelectedCell.start, i = t.bottomSelectedCell.end, n = t.topSelectedCell.resource; return new DayPilot.Selection(e, i, n, s); }, this.W = function (e) { if (e < 0)
559
557
  return null; for (var t = 0, i = s.nav.events.rows[0].cells, n = 0; n < i.length; n++) {
560
558
  if (t += i[n].offsetWidth, e < t)
561
559
  return n;
562
560
  } return null; }, this.X = {}, this.X.getCellCoords = function () { var e = {}; if (e.x = 0, e.y = 0, !s.coords)
563
- return null; e.x = s.W(s.coords.x); var t = 0, i = Math.floor((s.coords.y - t) / s.cellHeight); return e.y = i, e.x < 0 ? null : e; }, this.B = function () { "Resources" !== s.viewType && (this.columns = this.Y()); for (var e = 0; e < this.columns.length; e++)
564
- this.Z(this.columns[e]); }, this.Z = function (e) { e.start = new DayPilot.Date(e.start), e.putIntoBlock = function (e) { for (var t = 0; t < this.blocks.length; t++) {
561
+ return null; e.x = s.W(s.coords.x); var t = 0, i = Math.floor((s.coords.y - t) / s.cellHeight); return e.y = i, e.x < 0 ? null : e; }, this.columns = {}, this.columns.list = [], this.columns.load = function (e, t, i) { if (!e)
562
+ throw new DayPilot.Exception("columns.load(): 'url' parameter required"); var n = function (e) { var t = {}; t.exception = e.exception, t.request = e.request, "function" == typeof i && i(t); }, a = function (e) { var i, a = e.request; try {
563
+ i = JSON.parse(a.responseText);
564
+ }
565
+ catch (e) {
566
+ var l = {};
567
+ return l.exception = e, void n(l);
568
+ } if (DayPilot.isArray(i)) {
569
+ var o = {};
570
+ if (o.preventDefault = function () { this.preventDefault.value = !0; }, o.data = i, "function" == typeof t && t(o), o.preventDefault.value)
571
+ return;
572
+ s.columns.list = i, s.Y && s.update();
573
+ } }; s.columnsLoadMethod && "POST" === s.columnsLoadMethod.toUpperCase() ? DayPilot.ajax({ "method": "POST", "url": e, "success": a, "error": n }) : DayPilot.ajax({ "method": "GET", "url": e, "success": a, "error": n }); }, this.B = function () { var e; e = "Resources" !== s.viewType ? this.Z() : s.columns.list, this.S = []; for (var t = 0; t < e.length; t++) {
574
+ var i = this.$(e[t]);
575
+ this.S.push(i);
576
+ } }, this.$ = function (e) { var t = {}; return t.name = e.name, t.html = e.html, t.id = e.id, t.toolTip = e.toolTip, e.start ? t.start = new DayPilot.Date(e.start) : t.start = new DayPilot.Date(s.startDate), t.putIntoBlock = function (e) { for (var t = 0; t < this.blocks.length; t++) {
565
577
  var i = this.blocks[t];
566
578
  if (i.overlapsWith(e.part.top, e.part.height))
567
579
  return i.events.push(e), i.min = Math.min(i.min, e.part.top), i.max = Math.max(i.max, e.part.top + e.part.height), t;
@@ -573,7 +585,7 @@ if ("undefined" == typeof DayPilot)
573
585
  var a = this[s];
574
586
  if (!(i < a.part.top || e > a.part.top + a.part.height - 1))
575
587
  return !1;
576
- } return !0; }, i.push(e), this.lines.push(i), this.lines.length - 1; }, i.events.push(e), i.min = e.part.top, i.max = e.part.top + e.part.height, this.blocks.push(i), this.blocks.length - 1; }, e.putIntoLine = function (e) { for (var t = 0; t < this.lines.length; t++) {
588
+ } return !0; }, i.push(e), this.lines.push(i), this.lines.length - 1; }, i.events.push(e), i.min = e.part.top, i.max = e.part.top + e.part.height, this.blocks.push(i), this.blocks.length - 1; }, t.putIntoLine = function (e) { for (var t = 0; t < this.lines.length; t++) {
577
589
  var i = this.lines[t];
578
590
  if (i.isFree(e.part.top, e.part.height))
579
591
  return i.push(e), t;
@@ -581,7 +593,7 @@ if ("undefined" == typeof DayPilot)
581
593
  var a = this[s];
582
594
  if (!(i < a.part.top || e > a.part.top + a.part.height - 1))
583
595
  return !1;
584
- } return !0; }, i.push(e), this.lines.push(i), this.lines.length - 1; }; }, this.Y = function () { var e = [], t = this.startDate.getDatePart(), i = this.days; switch (this.viewType) {
596
+ } return !0; }, i.push(e), this.lines.push(i), this.lines.length - 1; }, t; }, this.Z = function () { var e = [], t = this.startDate.getDatePart(), i = this.days; switch (this.viewType) {
585
597
  case "Day":
586
598
  i = 1;
587
599
  break;
@@ -592,7 +604,17 @@ if ("undefined" == typeof DayPilot)
592
604
  } "BusinessHoursNoScroll" === this.heightSpec && (t = t.addHours(this.businessBeginsHour)); for (var n = 0; n < i; n++) {
593
605
  var l = s.headerDateFormat ? s.headerDateFormat : a.locale().datePattern, o = {};
594
606
  o.start = t.addDays(n), o.name = o.start.toString(l, a.locale()), e.push(o);
595
- } return e; }, this.visibleStart = function () { return this.columns[0].start; }, this.visibleEnd = function () { var e = this.columns.length - 1; return this.columns[e].start.addDays(1); }, this.u = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.p = function () { if (this.elements.events)
607
+ } return e; }, this.visibleStart = function () { if ("Resources" === s.viewType) {
608
+ if (0 === s.S.length)
609
+ return DayPilot.Date.today();
610
+ var e = s.S.map(function (e) { return e.start.getTime(); }), t = Math.min.apply(null, e);
611
+ return new DayPilot.Date(t);
612
+ } return this.S[0].start; }, this.visibleEnd = function () { if ("Resources" === s.viewType) {
613
+ if (0 === s.S.length)
614
+ return DayPilot.Date.today().addDays(1);
615
+ var e = s.S.map(function (e) { return e.start.getTime(); }), t = Math.max.apply(null, e);
616
+ return new DayPilot.Date(t).addDays(1);
617
+ } var t = this.S.length - 1; return this.S[t].start.addDays(1); }, this.u = function (e) { var t = this.theme || this.cssClassPrefix; return t ? t + e : ""; }, this.p = function () { if (this.elements.events)
596
618
  for (var e = 0; e < this.elements.events.length; e++) {
597
619
  var t = this.elements.events[e], i = t.event;
598
620
  if (i && (i.calendar = null), t.onclick = null, t.onclickSave = null, t.onmouseover = null, t.onmouseout = null, t.onmousemove = null, t.onmousedown = null, t.firstChild && t.firstChild.firstChild && t.firstChild.firstChild.tagName && "IMG" === t.firstChild.firstChild.tagName.toUpperCase()) {
@@ -600,18 +622,18 @@ if ("undefined" == typeof DayPilot)
600
622
  n.onmousedown = null, n.onmousemove = null, n.onclick = null;
601
623
  }
602
624
  t.helper = null, t.data = null, t.event = null, DayPilot.de(t);
603
- } this.elements.events = []; }, this.$ = function (e) { var i = e.cache || e.data, n = this.nav.events, a = document.createElement("div"); a.style.position = "absolute", a.style.left = e.part.left + "%", a.style.top = e.part.top + "px", a.style.width = e.part.width + "%", a.style.height = Math.max(e.part.height, 2) + "px", a.style.overflow = "hidden", a.data = e, a.event = e, a.unselectable = "on", a.style.MozUserSelect = "none", a.style.KhtmlUserSelect = "none", a.className = this.u("_event"), i.cssClass && DayPilot.Util.addClass(a, i.cssClass), a.isFirst = e.part.start.getTime() === e.start().getTime(), a.isLast = e.part.end.getTime() === e.end().getTime(), a.onclick = this.P, a.onmouseout = function (e) { a.deleteIcon && (a.deleteIcon.style.display = "none"); }, a.onmousemove = function (e) { var i = s.eventHeaderVisible ? s.eventHeaderHeight : 10; if ("undefined" != typeof t) {
625
+ } this.elements.events = []; }, this._ = function (e) { var i = e.cache || e.data, n = this.nav.events, a = document.createElement("div"); a.style.position = "absolute", a.style.left = e.part.left + "%", a.style.top = e.part.top + "px", a.style.width = e.part.width + "%", a.style.height = Math.max(e.part.height, 2) + "px", a.style.overflow = "hidden", a.data = e, a.event = e, a.unselectable = "on", a.style.MozUserSelect = "none", a.style.KhtmlUserSelect = "none", a.className = this.u("_event"), i.cssClass && DayPilot.Util.addClass(a, i.cssClass), a.isFirst = e.part.start.getTime() === e.start().getTime(), a.isLast = e.part.end.getTime() === e.end().getTime(), a.onclick = this.P, a.onmouseout = function (e) { a.deleteIcon && (a.deleteIcon.style.display = "none"); }, a.onmousemove = function (e) { var i = s.eventHeaderVisible ? s.eventHeaderHeight : 10; if ("undefined" != typeof t) {
604
626
  var n = DayPilot.mo3(a, e);
605
627
  if (n && !t.resizing && !t.moving) {
606
628
  a.deleteIcon && (a.deleteIcon.style.display = "");
607
629
  var l = this.isLast;
608
630
  n.y <= i && "Disabled" !== s.eventResizeHandling ? (this.style.cursor = "n-resize", this.dpBorder = "top") : this.offsetHeight - n.y <= 5 && "Disabled" !== s.eventResizeHandling ? l ? (this.style.cursor = "s-resize", this.dpBorder = "bottom") : this.style.cursor = "not-allowed" : t.resizing || t.moving || ("Disabled" !== s.eventClickHandling ? this.style.cursor = "pointer" : this.style.cursor = "default");
609
631
  }
610
- } }, a.onmousedown = function (e) { e = e || window.event; var i = e.which || e.button; if ("n-resize" !== this.style.cursor && "s-resize" !== this.style.cursor || 1 !== i) {
632
+ } }, a.onmousedown = function (e) { var i = e.which || e.button; if ("n-resize" !== this.style.cursor && "s-resize" !== this.style.cursor || 1 !== i) {
611
633
  if (1 === i && "Disabled" !== s.eventMoveHandling) {
612
634
  t.moving = this, t.moving.event = this.event;
613
635
  var n = t.moving.helper = {};
614
- n.oldColumn = s.columns[this.data.part.dayIndex].Value, t.originalMouse = DayPilot.mc(e), t.originalTop = this.offsetTop;
636
+ n.oldColumn = s.S[this.data.part.dayIndex].id, t.originalMouse = DayPilot.mc(e), t.originalTop = this.offsetTop;
615
637
  var a = DayPilot.mo3(this, e);
616
638
  a ? t.moveOffsetY = a.y : t.moveOffsetY = 0, s.nav.top.style.cursor = "move";
617
639
  }
@@ -626,14 +648,14 @@ if ("undefined" == typeof DayPilot)
626
648
  var u = document.createElement("div");
627
649
  u.style.position = "absolute", u.style.right = "2px", u.style.top = "2px", u.style.width = "17px", u.style.height = "17px", u.className = s.u("_event_delete"), u.onmousedown = function (e) { e.stopPropagation(); }, u.onclick = function (e) { var t = this.parentNode.event; t && s.R(t); }, u.style.display = "none", a.deleteIcon = u, a.appendChild(u);
628
650
  } if (n.rows[0].cells[e.part.dayIndex]) {
629
- n.rows[0].cells[e.part.dayIndex].firstChild.appendChild(a), s._(a);
630
- } s.elements.events.push(a); }, this._ = function (e) { for (var t = e && e.childNodes ? e.childNodes.length : 0, i = 0; i < t; i++)
651
+ n.rows[0].cells[e.part.dayIndex].firstChild.appendChild(a), s.aa(a);
652
+ } s.elements.events.push(a); }, this.aa = function (e) { for (var t = e && e.childNodes ? e.childNodes.length : 0, i = 0; i < t; i++)
631
653
  try {
632
654
  var n = e.childNodes[i];
633
- 1 === n.nodeType && (n.unselectable = "on", this._(n));
655
+ 1 === n.nodeType && (n.unselectable = "on", this.aa(n));
634
656
  }
635
- catch (e) { } }, this.I = function () { for (var e = 0; e < this.columns.length; e++) {
636
- var t = this.columns[e];
657
+ catch (e) { } }, this.I = function () { for (var e = 0; e < this.S.length; e++) {
658
+ var t = this.S[e];
637
659
  if (t.blocks)
638
660
  for (var i = 0; i < t.blocks.length; i++)
639
661
  for (var n = t.blocks[i], s = 0; s < n.lines.length; s++)
@@ -641,17 +663,17 @@ if ("undefined" == typeof DayPilot)
641
663
  var o = a[l];
642
664
  o.part.width = 100 / n.lines.length, o.part.left = o.part.width * s;
643
665
  var r = s === n.lines.length - 1;
644
- r || (o.part.width = 1.5 * o.part.width), this.$(o);
666
+ r || (o.part.width = 1.5 * o.part.width), this._(o);
645
667
  }
646
- } }, this.aa = function () { this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.u("_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.ba() + "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.ca(); this.nav.top.appendChild(e), this.nav.scroll.style.zoom = 1; var t = this.da(); 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.style.backgroundColor = this.loadingLabelBackColor, this.nav.loading.style.fontSize = this.loadingLabelFontSize, this.nav.loading.style.fontFamily = this.loadingLabelFontFamily, this.nav.loading.style.color = this.loadingLabelFontColor, this.nav.loading.style.padding = "2px", this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.display = "none", this.nav.top.appendChild(this.nav.loading); }, this.G = function () { this.fasterDispose || DayPilot.pu(this.nav.hourTable), this.nav.scrollable.rows[0].cells[0].innerHTML = "", this.nav.hourTable = this.ea(), this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable); }, this.da = 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, n = t.insertRow(-1); i = n.insertCell(-1), i.valign = "top", i.style.padding = "0px", i.style.border = "0px none", this.nav.hourTable = this.ea(), i.appendChild(this.nav.hourTable), i = n.insertCell(-1), i.valign = "top", i.width = "100%", i.style.padding = "0px", i.style.border = "0px none"; var s = document.createElement("div"); return s.style.position = "relative", i.appendChild(s), s.appendChild(this.fa()), s.appendChild(this.ga()), e.appendChild(t), this.nav.zoom = e, e; }, this.fa = 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.ga = function () { var e = document.createElement("table"); e.style.top = "0px", e.cellPadding = "0", e.cellSpacing = "0", e.border = "0", e.style.position = "absolute", e.style.width = "100%", e.style.border = "0px none", e.style.tableLayout = "fixed", this.nav.events = e; for (var t = this.columns, i = t.length, n = e.insertRow(-1), a = 0; a < i; a++) {
668
+ } }, this.ba = function () { this.nav.top.innerHTML = "", DayPilot.Util.addClass(this.nav.top, this.u("_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.ca() + "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.da(); this.nav.top.appendChild(e), this.nav.scroll.style.zoom = 1; var t = this.ea(); 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.style.backgroundColor = this.loadingLabelBackColor, this.nav.loading.style.fontSize = this.loadingLabelFontSize, this.nav.loading.style.fontFamily = this.loadingLabelFontFamily, this.nav.loading.style.color = this.loadingLabelFontColor, this.nav.loading.style.padding = "2px", this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.display = "none", this.nav.top.appendChild(this.nav.loading); }, this.G = function () { this.fasterDispose || DayPilot.pu(this.nav.hourTable), this.nav.scrollable.rows[0].cells[0].innerHTML = "", this.nav.hourTable = this.fa(), this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable); }, this.ea = 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, n = t.insertRow(-1); i = n.insertCell(-1), i.valign = "top", i.style.padding = "0px", i.style.border = "0px none", this.nav.hourTable = this.fa(), i.appendChild(this.nav.hourTable), i = n.insertCell(-1), i.valign = "top", i.width = "100%", i.style.padding = "0px", i.style.border = "0px none"; var s = document.createElement("div"); return s.style.position = "relative", i.appendChild(s), s.appendChild(this.ga()), s.appendChild(this.ha()), e.appendChild(t), this.nav.zoom = e, e; }, this.ga = 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.ha = function () { var e = document.createElement("table"); e.style.top = "0px", e.cellPadding = "0", e.cellSpacing = "0", e.border = "0", e.style.position = "absolute", e.style.width = "100%", e.style.border = "0px none", e.style.tableLayout = "fixed", this.nav.events = e; for (var t = this.S, i = t.length, n = e.insertRow(-1), a = 0; a < i; a++) {
647
669
  var l = n.insertCell(-1);
648
670
  l.style.padding = "0px", l.style.border = "0px none", l.style.height = "0px", l.style.overflow = "visible", s.rtl || (l.style.textAlign = "left");
649
671
  var o = document.createElement("div");
650
672
  o.style.marginRight = s.columnMarginRight + "px", o.style.position = "relative", o.style.height = "1px", o.style.marginTop = "-1px";
651
673
  var r = document.createElement("div");
652
674
  l.selection = r, l.appendChild(o), l.appendChild(r);
653
- } return e; }, this.ea = function () { var e = document.createElement("table"); e.cellSpacing = "0", e.cellPadding = "0", e.border = "0", e.style.border = "0px none", e.style.width = this.hourWidth + "px", e.oncontextmenu = function () { return !1; }; for (var t = s.J(), i = 0; i < t; i++)
654
- this.ha(e, i); return e; }, this.ha = function (e, t) { var i = 2 * this.cellHeight, n = e.insertRow(-1); n.style.height = i + "px"; var l = n.insertCell(-1); l.valign = "bottom", l.unselectable = "on", l.style.cursor = "default", l.style.padding = "0px", l.style.border = "0px none"; var o = document.createElement("div"); o.style.position = "relative", o.className = this.u("_rowheader"), o.style.width = this.hourWidth + "px", o.style.height = i + "px", o.style.overflow = "hidden", o.unselectable = "on"; var r = document.createElement("div"); r.className = this.u("_rowheader_inner"), r.unselectable = "on"; var h = document.createElement("div"); h.unselectable = "on"; var c = this.startDate.addHours(t).addHours(s.N()), d = c.getHours(), u = d < 12, v = a.timeFormat(); "Clock12Hours" === v && (d %= 12, 0 === d && (d = 12)), h.innerHTML = d; var p = document.createElement("span"); p.unselectable = "on", p.className = this.u("_rowheader_minutes"); var f; f = "Clock12Hours" === v ? u ? "AM" : "PM" : "00", p.innerHTML = f, h.appendChild(p), r.appendChild(h), o.appendChild(r), l.appendChild(o); }, this.ba = function () { switch (this.heightSpec) {
675
+ } return e; }, this.fa = function () { var e = document.createElement("table"); e.cellSpacing = "0", e.cellPadding = "0", e.border = "0", e.style.border = "0px none", e.style.width = this.hourWidth + "px", e.oncontextmenu = function () { return !1; }; for (var t = s.J(), i = 0; i < t; i++)
676
+ this.ia(e, i); return e; }, this.ia = function (e, t) { var i = 2 * this.cellHeight, n = e.insertRow(-1); n.style.height = i + "px"; var l = n.insertCell(-1); l.valign = "bottom", l.unselectable = "on", l.style.cursor = "default", l.style.padding = "0px", l.style.border = "0px none"; var o = document.createElement("div"); o.style.position = "relative", o.className = this.u("_rowheader"), o.style.width = this.hourWidth + "px", o.style.height = i + "px", o.style.overflow = "hidden", o.unselectable = "on"; var r = document.createElement("div"); r.className = this.u("_rowheader_inner"), r.unselectable = "on"; var h = document.createElement("div"); h.unselectable = "on"; var c = this.startDate.addHours(t).addHours(s.N()), d = c.getHours(), u = d < 12, v = a.timeFormat(); "Clock12Hours" === v && (d %= 12, 0 === d && (d = 12)), h.innerHTML = d; var p = document.createElement("span"); p.unselectable = "on", p.className = this.u("_rowheader_minutes"); var f; f = "Clock12Hours" === v ? u ? "AM" : "PM" : "00", p.innerHTML = f, h.appendChild(p), r.appendChild(h), o.appendChild(r), l.appendChild(o); }, this.ca = function () { switch (this.heightSpec) {
655
677
  case "Full": return 48 * this.cellHeight;
656
678
  case "BusinessHours":
657
679
  var e = this.L();
@@ -660,22 +682,22 @@ if ("undefined" == typeof DayPilot)
660
682
  var e = this.L();
661
683
  return e * this.cellHeight * 2;
662
684
  default: throw "DayPilot.Calendar: Unexpected 'heightSpec' value.";
663
- } }, this.ia = function () { var e = s.nav.corner ? s.nav.corner.parentNode : null; if (e) {
685
+ } }, this.ja = function () { var e = s.nav.corner ? s.nav.corner.parentNode : null; if (e) {
664
686
  e.innerHTML = "";
665
- var t = this.ja();
687
+ var t = this.ka();
666
688
  e.appendChild(t), s.nav.corner = t;
667
- } }, this.ca = function () { var e = document.createElement("div"); e.style.overflow = "auto"; var t = document.createElement("table"); t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = "100%", t.style.borderCollapse = "separate", t.style.border = "0px none"; var i = t.insertRow(-1), n = i.insertCell(-1); n.style.padding = "0px", n.style.border = "0px none"; var s = this.ja(); n.appendChild(s), this.nav.corner = s, n = i.insertCell(-1), n.style.width = "100%", n.valign = "top", n.style.position = "relative", n.style.padding = "0px", n.style.border = "0px none", this.nav.header = document.createElement("table"), this.nav.header.cellPadding = "0", this.nav.header.cellSpacing = "0", this.nav.header.border = "0", this.nav.header.width = "100%", this.nav.header.style.tableLayout = "fixed", this.nav.header.oncontextmenu = function () { return !1; }; var a = "hidden" !== this.nav.scroll.style.overflow; if (n.appendChild(this.nav.header), a) {
689
+ } }, this.da = function () { var e = document.createElement("div"); e.style.overflow = "auto"; var t = document.createElement("table"); t.cellPadding = "0", t.cellSpacing = "0", t.border = "0", t.style.width = "100%", t.style.borderCollapse = "separate", t.style.border = "0px none"; var i = t.insertRow(-1), n = i.insertCell(-1); n.style.padding = "0px", n.style.border = "0px none"; var s = this.ka(); n.appendChild(s), this.nav.corner = s, n = i.insertCell(-1), n.style.width = "100%", n.valign = "top", n.style.position = "relative", n.style.padding = "0px", n.style.border = "0px none", this.nav.header = document.createElement("table"), this.nav.header.cellPadding = "0", this.nav.header.cellSpacing = "0", this.nav.header.border = "0", this.nav.header.width = "100%", this.nav.header.style.tableLayout = "fixed", this.nav.header.oncontextmenu = function () { return !1; }; var a = "hidden" !== this.nav.scroll.style.overflow; if (n.appendChild(this.nav.header), a) {
668
690
  n = i.insertCell(-1), n.unselectable = "on";
669
691
  var l = document.createElement("div");
670
692
  l.unselectable = "on", l.style.position = "relative", l.style.width = "16px", l.style.height = this.headerHeight + "px", l.className = this.u("_cornerright");
671
693
  var o = document.createElement("div");
672
694
  o.className = this.u("_cornerright_inner"), l.appendChild(o), n.appendChild(l), this.nav.cornerRight = l;
673
- } return e.appendChild(t), e; }, this.ja = function () { var e = document.createElement("div"); e.style.position = "relative", e.className = this.u("_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.u("_corner_inner"), e.appendChild(t), e; }, this.q = function () { var e = this.nav.main; e.root = null, e.onmouseup = null; for (var t = 0; t < e.rows.length; t++)
695
+ } return e.appendChild(t), e; }, this.ka = function () { var e = document.createElement("div"); e.style.position = "relative", e.className = this.u("_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.u("_corner_inner"), e.appendChild(t), e; }, this.q = function () { var e = this.nav.main; e.root = null, e.onmouseup = null; for (var t = 0; t < e.rows.length; t++)
674
696
  for (var i = e.rows[t], n = 0; n < i.cells.length; n++) {
675
697
  var s = i.cells[n];
676
698
  s.root = null, s.onmousedown = null, s.onmousemove = null, s.onmouseout = null, s.onmouseup = null;
677
699
  } this.fasterDispose || DayPilot.pu(e); }, this.F = function () {
678
- var e = this.nav.main, i = 18e5, n = this.M(), a = s.columns;
700
+ var e = this.nav.main, i = 18e5, n = this.M(), a = s.S;
679
701
  for (e && this.q(); e && e.rows && e.rows.length > 0;)
680
702
  this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0);
681
703
  this.tableCreated = !0;
@@ -691,73 +713,69 @@ if ("undefined" == typeof DayPilot)
691
713
  }
692
714
  for (var v = 0; v < n; v++) {
693
715
  var r = e.insertRow(-1);
694
- r.style.MozUserSelect = "none", r.style.KhtmlUserSelect = "none";
716
+ r.style.MozUserSelect = "none",
717
+ r.style.KhtmlUserSelect = "none";
695
718
  for (var h = 0; h < l; h++) {
696
- var p = this.columns[h], c = r.insertCell(-1);
697
- c.start = p.start.addTime(v * i), c.end = c.start.addTime(i), c.onmousedown = this.S, 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 = s.cellHeight + "px", c.style.overflow = "hidden", c.unselectable = "on";
719
+ var p = this.S[h], c = r.insertCell(-1);
720
+ c.start = p.start.addTime(v * i), c.end = c.start.addTime(i), c.resource = p.id, c.onmousedown = this.T, 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 = s.cellHeight + "px", c.style.overflow = "hidden", c.unselectable = "on";
698
721
  var d = document.createElement("div");
699
722
  d.unselectable = "on", d.style.height = s.cellHeight + "px", d.style.position = "relative", d.className = this.u("_cell");
700
- this.ka(c.start, c.end) && DayPilot.Util.addClass(d, s.u("_cell_business"));
723
+ this.la(c.start, c.end) && DayPilot.Util.addClass(d, s.u("_cell_business"));
701
724
  var f = document.createElement("div");
702
725
  f.setAttribute("unselectable", "on"), f.className = this.u("_cell_inner"), d.appendChild(f), c.appendChild(d), c.appendChild(d);
703
726
  }
704
727
  }
705
- e.onmouseup = this.V, e.root = this, s.nav.scrollable.onmousemove = function (e) {
706
- e = e || window.event;
707
- var i = s.nav.scrollable;
708
- s.coords = DayPilot.mo3(i, e);
709
- var n = DayPilot.mc(e);
710
- if (t.resizing) {
711
- t.resizingShadow || (t.resizingShadow = s.t(t.resizing, !1, s.shadow));
712
- var a = s.cellHeight, l = 1, o = n.y - t.originalMouse.y;
713
- if ("bottom" === t.resizing.dpBorder) {
714
- var r = Math.floor((t.originalHeight + t.originalTop + o + a / 2) / a) * a - t.originalTop + l;
715
- r < a && (r = a);
716
- var h = s.nav.main.clientHeight;
717
- t.originalTop + r > h && (r = h - t.originalTop), t.resizingShadow.style.height = r + "px";
718
- }
719
- else if ("top" === t.resizing.dpBorder) {
720
- var c = Math.floor((t.originalTop + o - l + a / 2) / a) * a + l;
721
- c < l && (c = l), c > t.originalTop + t.originalHeight - a && (c = t.originalTop + t.originalHeight - a);
722
- var r = t.originalHeight - (c - t.originalTop);
723
- r < a ? r = a : t.resizingShadow.style.top = c + "px", t.resizingShadow.style.height = r + "px";
724
- }
728
+ e.root = this, s.nav.scrollable.onmousemove = function (e) { var i = s.nav.scrollable; s.coords = DayPilot.mo3(i, e); var n = DayPilot.mc(e); if (t.resizing) {
729
+ t.resizingShadow || (t.resizingShadow = s.t(t.resizing, !1, s.shadow));
730
+ var a = s.cellHeight, l = 1, o = n.y - t.originalMouse.y;
731
+ if ("bottom" === t.resizing.dpBorder) {
732
+ var r = Math.floor((t.originalHeight + t.originalTop + o + a / 2) / a) * a - t.originalTop + l;
733
+ r < a && (r = a);
734
+ var h = s.nav.main.clientHeight;
735
+ t.originalTop + r > h && (r = h - t.originalTop), t.resizingShadow.style.height = r + "px";
725
736
  }
726
- else if (t.moving) {
727
- if (t.movingShadow || (t.movingShadow = s.t(t.moving, !s.g, s.shadow), t.movingShadow.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"), !s.coords)
728
- return;
729
- var a = s.cellHeight, l = 1, d = t.moveOffsetY;
730
- d || (d = a / 2);
731
- var c = Math.floor((s.coords.y - d - l + a / 2) / a) * a + l;
732
- c < l && (c = l);
733
- var u = s.nav.events, h = s.nav.main.clientHeight, v = parseInt(t.movingShadow.style.height);
734
- c + v > h && (c = h - v), t.movingShadow.parentNode.style.display = "none", t.movingShadow.style.top = c + "px", t.movingShadow.parentNode.style.display = "";
735
- var p = u.clientWidth / u.rows[0].cells.length, f = Math.floor((s.coords.x - 45) / p);
736
- f < 0 && (f = 0), f < u.rows[0].cells.length && f >= 0 && t.movingShadow.column !== f && (t.movingShadow.column = f, t.moveShadow(u.rows[0].cells[f]));
737
+ else if ("top" === t.resizing.dpBorder) {
738
+ var c = Math.floor((t.originalTop + o - l + a / 2) / a) * a + l;
739
+ c < l && (c = l), c > t.originalTop + t.originalHeight - a && (c = t.originalTop + t.originalHeight - a);
740
+ var r = t.originalHeight - (c - t.originalTop);
741
+ r < a ? r = a : t.resizingShadow.style.top = c + "px", t.resizingShadow.style.height = r + "px";
737
742
  }
738
- else if (t.selecting) {
739
- var n = DayPilot.mc(e || window.event), g = s.X.getCellCoords(), m = t.column, y = s.nav.main.rows[g.y].cells[m];
740
- n.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(y), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(y), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), s.T();
741
- }
742
- }, s.nav.scrollable.style.display = "";
743
- }, this.ka = 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.r = function () { var e = this.nav.header; if (e && e.rows)
743
+ }
744
+ else if (t.moving) {
745
+ if (t.movingShadow || (t.movingShadow = s.t(t.moving, !s.g, s.shadow), t.movingShadow.style.width = t.movingShadow.parentNode.offsetWidth + 1 + "px"), !s.coords)
746
+ return;
747
+ var a = s.cellHeight, l = 1, d = t.moveOffsetY;
748
+ d || (d = a / 2);
749
+ var c = Math.floor((s.coords.y - d - l + a / 2) / a) * a + l;
750
+ c < l && (c = l);
751
+ var u = s.nav.events, h = s.nav.main.clientHeight, v = parseInt(t.movingShadow.style.height);
752
+ c + v > h && (c = h - v), t.movingShadow.parentNode.style.display = "none", t.movingShadow.style.top = c + "px", t.movingShadow.parentNode.style.display = "";
753
+ var p = u.clientWidth / u.rows[0].cells.length, f = Math.floor((s.coords.x - 45) / p);
754
+ f < 0 && (f = 0), f < u.rows[0].cells.length && f >= 0 && t.movingShadow.column !== f && (t.movingShadow.column = f, t.moveShadow(u.rows[0].cells[f]));
755
+ }
756
+ else if (t.selecting) {
757
+ var n = DayPilot.mc(e), g = s.X.getCellCoords(), m = t.column, y = s.nav.main.rows[g.y].cells[m];
758
+ n.y < t.firstMousePos.y ? (t.selectedCells = t.getCellsBelow(y), t.topSelectedCell = t.selectedCells[0], t.bottomSelectedCell = t.firstSelected) : (t.selectedCells = t.getCellsAbove(y), t.topSelectedCell = t.firstSelected, t.bottomSelectedCell = t.selectedCells[0]), s.U();
759
+ } }, s.nav.scrollable.style.display = "";
760
+ }, this.la = 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.r = function () { var e = this.nav.header; if (e && e.rows)
744
761
  for (var t = 0; t < e.rows.length; t++)
745
762
  for (var i = e.rows[t], n = 0; n < i.cells.length; n++) {
746
763
  var s = i.cells[n];
747
764
  s.onclick = null, s.onmousemove = null, s.onmouseout = null;
748
- } this.fasterDispose || DayPilot.pu(e); }, this.la = function (e) { for (var t = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], i = this.columns, n = i.length, a = 0; a < n; a++) {
765
+ } this.fasterDispose || DayPilot.pu(e); }, this.ma = function (e) { for (var t = e ? this.nav.header.insertRow(-1) : this.nav.header.rows[0], i = this.S, n = i.length, a = 0; a < n; a++) {
749
766
  var l = i[a], o = e ? t.insertCell(-1) : t.cells[a];
750
767
  o.data = l, o.style.overflow = "hidden", o.style.padding = "0px", o.style.border = "0px none", o.style.height = this.headerHeight + "px";
751
768
  var r = e ? document.createElement("div") : o.firstChild;
752
769
  if (e) {
753
- r.unselectable = "on", r.style.MozUserSelect = "none", r.style.backgroundColor = l.BackColor, r.style.cursor = "default", r.style.position = "relative", r.className = s.u("_colheader"), r.style.height = this.headerHeight + "px";
770
+ r.unselectable = "on", r.style.MozUserSelect = "none", r.style.cursor = "default", r.style.position = "relative", r.className = s.u("_colheader"), r.style.height = this.headerHeight + "px";
754
771
  var h = document.createElement("div");
755
772
  h.className = s.u("_colheader_inner"), h.unselectable = "on", r.appendChild(h), o.appendChild(r);
756
773
  }
774
+ l.toolTip && (h.title = l.toolTip);
757
775
  var h = r.firstChild;
758
- h.innerHTML = s.ma(l.name, l.html);
759
- } }, this.na = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.E = function () { var e = this.nav.header, t = !0, i = this.columns; for (i.length; this.headerCreated && e && e.rows && e.rows.length > 0;)
760
- this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.headerCreated = !0; this.la(t); }, this.loadingStart = function () { this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = ""); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.m("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.oa = function () { var e = this.nav.scroll; e.onscroll || (e.onscroll = function () { s.pa(); }); var t = "undefined" != typeof this.qa.scrollpos ? this.qa.scrollpos : this.initScrollPos; t && ("Auto" === t && (t = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), e.root = this, 0 === e.scrollTop && (e.scrollTop = t)); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.ra = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && e > 0 && (t.style.width = e + "px"); }, this.sa = function () { t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mouseup", t.gMouseUp), DayPilot.re(window, "unload", t.gUnload)); }, this.events = {}, this.events.add = function (e) { var t = null; if (e instanceof DayPilot.Event)
776
+ h.innerHTML = s.na(l.name, l.html);
777
+ } }, this.oa = function () { return this.width && this.width.indexOf("px") !== -1 ? "Pixel" : "Percentage"; }, this.E = function () { var e = this.nav.header, t = !0, i = this.S; for (i.length; this.headerCreated && e && e.rows && e.rows.length > 0;)
778
+ this.fasterDispose || DayPilot.pu(e.rows[0]), e.deleteRow(0); this.headerCreated = !0; this.ma(t); }, this.loadingStart = function () { this.loadingLabelVisible && (this.nav.loading.innerHTML = this.loadingLabelText, this.nav.loading.style.top = this.headerHeight + 5 + "px", this.nav.loading.style.display = ""); }, this.commandCallBack = function (e, t) { var i = {}; i.command = e, this.m("Command", t, i); }, this.loadingStop = function (e) { this.callbackTimeout && window.clearTimeout(this.callbackTimeout), this.nav.loading.style.display = "none"; }, this.pa = function () { var e = this.nav.scroll; e.onscroll || (e.onscroll = function () { s.qa(); }); var t = "undefined" != typeof this.ra.scrollpos ? this.ra.scrollpos : this.initScrollPos; t && ("Auto" === t && (t = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), e.root = this, 0 === e.scrollTop && (e.scrollTop = t)); }, this.callbackError = function (e, t) { alert("Error!\r\nResult: " + e + "\r\nContext:" + t); }, this.sa = function () { var e = DayPilot.sw(this.nav.scroll), t = this.nav.cornerRight; t && e > 0 && (t.style.width = e + "px"); }, this.ta = function () { t.globalHandlers || (t.globalHandlers = !0, DayPilot.re(document, "mouseup", t.gMouseUp), DayPilot.re(window, "unload", t.gUnload)); }, this.events = {}, this.events.add = function (e) { var t = null; if (e instanceof DayPilot.Event)
761
779
  t = e.data;
762
780
  else {
763
781
  if ("object" != typeof e)
@@ -795,14 +813,14 @@ if ("undefined" == typeof DayPilot)
795
813
  var o = {};
796
814
  if (o.preventDefault = function () { this.preventDefault.value = !0; }, o.data = i, "function" == typeof t && t(o), o.preventDefault.value)
797
815
  return;
798
- s.events.list = i, s.ta && s.update();
816
+ s.events.list = i, s.Y && s.update();
799
817
  } }; if (s.eventsLoadMethod && "POST" === s.eventsLoadMethod.toUpperCase())
800
818
  DayPilot.Http.ajax({ "method": "POST", "data": { "start": s.visibleStart().toString(), "end": s.visibleEnd().toString() }, "url": e, "success": a, "error": n });
801
819
  else {
802
820
  var l = e, o = "start=" + s.visibleStart().toString() + "&end=" + s.visibleEnd().toString();
803
821
  l += l.indexOf("?") > -1 ? "&" + o : "?" + o, DayPilot.Http.ajax({ "method": "GET", "url": l, "success": a, "error": n });
804
- } }, this.update = function (e) { s.ua(e), s.va(), s.p(), s.nav.top.style.cursor = "auto"; s.B(), s.E(), s.F(), s.G(), s.H(), s.ia(), s.wa(), s.C(), s.D(), s.A(), s.I(), s.clearSelection(), this.visible ? this.show() : this.hide(); }, this.xa = null, this.ua = function (e) { if (e) {
805
- var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); } } };
822
+ } }, this.update = function (e) { s.ua(e), s.va(), s.p(), s.nav.top.style.cursor = "auto"; s.B(), s.E(), s.F(), s.G(), s.H(), s.ja(), s.wa(), s.C(), s.D(), s.A(), s.I(), s.clearSelection(), this.visible ? this.show() : this.hide(); }, this.xa = null, this.ua = function (e) { if (e) {
823
+ var t = { "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); } }, "columns": { "preInit": function () { s.columns.list = this.data; } } };
806
824
  this.xa = t;
807
825
  for (var i in e)
808
826
  if (t[i]) {
@@ -837,59 +855,59 @@ if ("undefined" == typeof DayPilot)
837
855
  if ("function" == typeof this.onBeforeEventRender)
838
856
  for (var a = 0; a < t; a++)
839
857
  this.Ba(a);
840
- for (var a = 0; a < this.columns.length; a++) {
858
+ for (var a = 0; a < this.S.length; a++) {
841
859
  var o = {};
842
860
  o.minEnd = 1e6, o.maxStart = -1, this.scrollLabels.push(o);
843
- var r = this.columns[a];
861
+ var r = this.S[a];
844
862
  r.events = [], r.lines = [], r.blocks = [];
845
863
  for (var h = new DayPilot.Date(r.start), c = h.getTime(), d = h.addTime(i), u = d.getTime(), v = 0; v < t; v++)
846
864
  if (!n[v]) {
847
865
  var l = e[v], p = l.start, f = l.end, g = p.getTime(), m = f.getTime();
848
866
  if (!(m < g)) {
849
867
  var y = !(m <= c || g >= u);
850
- if (y) {
868
+ if ("Resources" === s.viewType && (y = y && r.id === l.resource), y) {
851
869
  var b = new DayPilot.Event(l, s);
852
870
  b.part.dayIndex = a, b.part.start = c < g ? l.start : h, b.part.end = u > m ? l.end : d;
853
871
  var C = this.getPixels(b.part.start, r.start), w = this.getPixels(b.part.end, r.start), D = C.top, S = w.top;
854
872
  if (D === S && (C.cut || w.cut))
855
873
  continue;
856
- var k = w.boxBottom;
857
- b.part.top = Math.floor(D / this.cellHeight) * this.cellHeight + 1, b.part.height = Math.max(Math.ceil(k / this.cellHeight) * this.cellHeight - b.part.top, this.cellHeight - 1) + 1, b.part.barTop = Math.max(D - b.part.top - 1, 0), b.part.barHeight = Math.max(S - D - 2, 1);
874
+ var x = w.boxBottom;
875
+ b.part.top = Math.floor(D / this.cellHeight) * this.cellHeight + 1, b.part.height = Math.max(Math.ceil(x / this.cellHeight) * this.cellHeight - b.part.top, this.cellHeight - 1) + 1, b.part.barTop = Math.max(D - b.part.top - 1, 0), b.part.barHeight = Math.max(S - D - 2, 1);
858
876
  var p = b.part.top, f = b.part.top + b.part.height;
859
877
  p > o.maxStart && (o.maxStart = p), f < o.minEnd && (o.minEnd = f), p < this.minStart && (this.minStart = p), f > this.maxEnd && (this.maxEnd = f), r.events.push(b), "function" == typeof this.onBeforeEventRender && (b.cache = this.Aa.events[v]), b.part.start.getTime() === g && b.part.end.getTime() === m && (n[v] = !0);
860
878
  }
861
879
  }
862
880
  }
863
881
  }
864
- for (var a = 0; a < this.columns.length; a++) {
865
- var r = this.columns[a];
882
+ for (var a = 0; a < this.S.length; a++) {
883
+ var r = this.S[a];
866
884
  r.events.sort(this.Ca);
867
885
  for (var v = 0; v < r.events.length; v++) {
868
886
  var l = r.events[v];
869
887
  r.putIntoBlock(l);
870
888
  }
871
889
  for (var v = 0; v < r.blocks.length; v++) {
872
- var x = r.blocks[v];
873
- x.events.sort(this.Ca);
874
- for (var H = 0; H < x.events.length; H++) {
875
- var l = x.events[H];
876
- x.putIntoLine(l);
890
+ var k = r.blocks[v];
891
+ k.events.sort(this.Ca);
892
+ for (var H = 0; H < k.events.length; H++) {
893
+ var l = k.events[H];
894
+ k.putIntoLine(l);
877
895
  }
878
896
  }
879
897
  }
880
898
  } }, this.Ca = function (e, t) { if (!(e && t && e.start && t.start))
881
899
  return 0; var i = e.start().getTime() - t.start().getTime(); return 0 !== i ? i : t.end().getTime() - e.end().getTime(); }, this.debug = function (e, t) { this.debuggingEnabled && (s.debugMessages || (s.debugMessages = []), s.debugMessages.push(e), "undefined" != typeof console && console.log(e)); }, this.getPixels = function (e, t) { t || (t = this.startDate); var i = t.getTime(), n = e.getTime(), s = this.cache.pixels[n + "_" + i]; if (s)
882
- return s; i = t.getTime(); var a = 18e5, l = n - i, o = l % a, r = l - o, h = r + a; 0 === o && (h = r); var c = {}; return c.cut = !1, c.top = this.Da(l), c.boxTop = this.Da(r), c.boxBottom = this.Da(h), this.cache.pixels[n + "_" + i] = c, c; }, this.Da = function (e) { return Math.floor(this.cellHeight * e / 18e5); }, this.va = function () { this.startDate = new DayPilot.Date(this.startDate).getDatePart(); }, this.D = function () { this.nav.corner && (this.nav.corner.style.height = this.headerHeight + "px"); }, this.H = function () { var e = this.ba(); this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px"); }, this.Q = {}, this.Q.scope = null, this.Q.notify = function () { s.Q.scope && s.Q.scope["$apply"](); }, this.Q.apply = function (e) { e(); }, this.pa = function () { var e = s.nav.scroll.scrollTop, t = e / (2 * s.cellHeight); s.qa.scrollHour = t; }, this.wa = function () { var e = 0; s.qa.scrollHour ? e = 2 * s.cellHeight * s.qa.scrollHour : "Auto" === s.initScrollPos && (e = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), s.nav.scroll.scrollTop = e; }, this.Ea = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof s.events.list || !s.events.list); }, this.A = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { s.visible = !0, s.nav.top.style.display = ""; }, this.hide = function () { s.visible = !1, s.nav.top.style.display = "none"; }, this.Fa = function () { this.va(), this.B(), this.aa(), this.E(), this.F(), this.ra(), this.oa(), this.sa(), t.register(this), this.Ga(), this.m("Init"); }, this.qa = {}, this.Ha = function () { this.qa.themes = [], this.qa.themes.push(this.theme || this.cssClassPrefix); }, this.Ia = function () { for (var e = this.qa.themes, t = 0; t < e.length; t++) {
900
+ return s; i = t.getTime(); var a = 18e5, l = n - i, o = l % a, r = l - o, h = r + a; 0 === o && (h = r); var c = {}; return c.cut = !1, c.top = this.Da(l), c.boxTop = this.Da(r), c.boxBottom = this.Da(h), this.cache.pixels[n + "_" + i] = c, c; }, this.Da = function (e) { return Math.floor(this.cellHeight * e / 18e5); }, this.va = function () { this.startDate = new DayPilot.Date(this.startDate).getDatePart(); }, this.D = function () { this.nav.corner && (this.nav.corner.style.height = this.headerHeight + "px"); }, this.H = function () { var e = this.ca(); this.nav.scroll && e > 0 && (this.nav.scroll.style.height = e + "px"); }, this.Q = {}, this.Q.scope = null, this.Q.notify = function () { s.Q.scope && s.Q.scope["$apply"](); }, this.Q.apply = function (e) { e(); }, this.qa = function () { var e = s.nav.scroll.scrollTop, t = e / (2 * s.cellHeight); s.ra.scrollHour = t; }, this.wa = function () { var e = 0; s.ra.scrollHour ? e = 2 * s.cellHeight * s.ra.scrollHour : "Auto" === s.initScrollPos && (e = "BusinessHours" === this.heightSpec ? 2 * this.cellHeight * this.businessBeginsHour : 0), s.nav.scroll.scrollTop = e; }, this.Ea = function () { return !(!this.backendUrl && "function" != typeof WebForm_DoCallback) && ("undefined" == typeof s.events.list || !s.events.list); }, this.A = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.show = function () { s.visible = !0, s.nav.top.style.display = ""; }, this.hide = function () { s.visible = !1, s.nav.top.style.display = "none"; }, this.Fa = function () { this.va(), this.B(), this.ba(), this.E(), this.F(), this.sa(), this.pa(), this.ta(), t.register(this), this.Ga(), this.m("Init"); }, this.ra = {}, this.Ha = function () { this.ra.themes = [], this.ra.themes.push(this.theme || this.cssClassPrefix); }, this.Ia = function () { for (var e = this.ra.themes, t = 0; t < e.length; t++) {
883
901
  var i = e[t];
884
902
  DayPilot.Util.removeClass(this.nav.top, i + "_main");
885
- } this.qa.themes = []; }, this.Ja = function () { if (this.afterRender(null, !1), "function" == typeof this.onAfterRender) {
903
+ } this.ra.themes = []; }, this.Ja = function () { if (this.afterRender(null, !1), "function" == typeof this.onAfterRender) {
886
904
  var e = {};
887
905
  e.isCallBack = !1, this.onAfterRender(e);
888
906
  } }, this.Ka = function () { if ("function" == typeof this.onInit && !this.La) {
889
907
  this.La = !0;
890
908
  var e = {};
891
909
  this.onInit(e);
892
- } }, this.Ma = function () { var e = s.nav.top; return e.offsetWidth > 0 && e.offsetHeight > 0; }, this.Ga = function () { var e = s.Ma; e() || (s.Na = setInterval(function () { e() && (s.oa(), s.ra(), clearInterval(s.Na)); }, 100)); }, this.ma = function (e, t) { return s.w.z() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.internal = {}, this.internal.xssTextHtml = s.ma, this.init = function () { this.za(); var e = this.Ea(); return this.Ha(), e ? void this.Fa() : (this.va(), this.B(), this.C(), this.aa(), this.E(), this.F(), this.A(), this.ra(), this.oa(), this.sa(), t.register(this), this.events && (this.D(), this.I()), this.Ja(), this.Ka(), this.Ga(), this.ta = !0, this); }, this.Init = this.init, this.ua(i);
910
+ } }, this.Ma = function () { var e = s.nav.top; return e.offsetWidth > 0 && e.offsetHeight > 0; }, this.Ga = function () { var e = s.Ma; e() || (s.Na = setInterval(function () { e() && (s.pa(), s.sa(), clearInterval(s.Na)); }, 100)); }, this.na = function (e, t) { return s.w.z() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.internal = {}, this.internal.xssTextHtml = s.na, this.init = function () { this.za(); var e = this.Ea(); return this.Ha(), e ? void this.Fa() : (this.va(), this.B(), this.C(), this.ba(), this.E(), this.F(), this.A(), this.sa(), this.pa(), this.ta(), t.register(this), this.events && (this.D(), this.I()), this.Ja(), this.Ka(), this.Ga(), this.Y = !0, this); }, this.Init = this.init, this.ua(i);
893
911
  }, t.Cell = function (e, t, i) { this.start = e, this.end = t, this.column = function () { }; }, t.Column = function (e, t, i) { this.value = e, this.name = t, this.date = new DayPilot.Date(i); }, DayPilot.Calendar = t.Calendar, "undefined" != typeof jQuery && !function (e) { e.fn.daypilotCalendar = function (e) { var t = null, i = this.each(function () { if (!this.daypilot) {
894
912
  var i = new DayPilot.Calendar(this.id);
895
913
  this.daypilot = i;
@@ -905,7 +923,7 @@ if ("undefined" == typeof DayPilot)
905
923
  }();
906
924
  if ("undefined" == typeof DayPilot)
907
925
  var DayPilot = {};
908
- !function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (t) { this.v = "2022.2.374-lite"; var e = "navigator_" + (new Date).getTime(), i = this; this.prepare = function () { if (this.locale = "en-us", this.target = null, this.resetTarget = !0, this.pattern = this.a.locale().datePattern, this.cssClassPrefix = "navigator_default", this.theme = null, this.patterns = [], t)
926
+ !function () { "undefined" != typeof DayPilot.DatePicker && DayPilot.DatePicker.close || (DayPilot.DatePicker = function (t) { this.v = "2022.2.384-lite"; var e = "navigator_" + (new Date).getTime(), i = this; this.prepare = function () { if (this.locale = "en-us", this.target = null, this.resetTarget = !0, this.pattern = this.a.locale().datePattern, this.cssClassPrefix = "navigator_default", this.theme = null, this.patterns = [], t)
909
927
  for (var e in t)
910
928
  this[e] = t[e]; this.init(); }, this.init = function () { this.date = new DayPilot.Date(this.date); var t = this.b(); this.resetTarget && !t && this.c(this.date), DayPilot.re(document, "mousedown", function () { i.close(); }); }, this.close = function () { this.d && (this.navigator && this.navigator.dispose(), this.div.innerHTML = "", this.div && this.div.parentNode === document.body && document.body.removeChild(this.div)); }, this.b = function () { var t = this.e(); if (!t)
911
929
  return this.date; var e = null; if (e = "INPUT" === t.tagName ? t.value : t.innerText, !e)
@@ -1248,7 +1266,7 @@ if ("undefined" == typeof DayPilot)
1248
1266
  var DayPilot = {};
1249
1267
  "undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function () { if ("undefined" == typeof DayPilot.Month || !DayPilot.Month.events) {
1250
1268
  var t = {};
1251
- t.Month = function (e, i) { this.v = "2022.2.374-lite", this.nav = {}; var n = this; this.id = e, this.isMonth = !0, this.api = 2, this.backendUrl = null, this.cellHeaderHeight = 24, this.cellHeight = 100, 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 = 1, 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.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.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.cellEvents = [], this.elements = {}, this.elements.events = [], this.cache = {}, this.a = function (t, e) { var t = JSON.parse(t); return t.CallBackRedirect ? void (document.location.href = t.CallBackRedirect) : "None" === t.UpdateType ? void n.fireAfterRenderDetached(t.CallBackData, !0) : (n.events.list = t.Events, "Full" === t.UpdateType && (n.startDate = t.StartDate, n.timeFormat = t.TimeFormat ? t.TimeFormat : n.timeFormat, "undefined" != typeof t.WeekStarts && (n.weekStarts = t.WeekStarts), n.hashes = t.Hashes), n.b(), n.c(), n.d(), "Full" === t.UpdateType && (n.f(), n.g()), n.h(), n.show(), n.i(), void n.fireAfterRenderDetached(t.CallBackData, !0)); }, this.fireAfterRenderDetached = function (t, e) { var i = function (t, e) { return function () { n.afterRender && n.afterRender(t, e); }; }; window.setTimeout(i(t, e), 0); }, this.lineHeight = function () { return this.eventHeight + this.lineSpace; }, this.events = {}, this.events.add = function (t) { var e = null; if (t instanceof DayPilot.Event)
1269
+ t.Month = function (e, i) { this.v = "2022.2.384-lite", this.nav = {}; var n = this; this.id = e, this.isMonth = !0, this.api = 2, this.backendUrl = null, this.cellHeaderHeight = 24, this.cellHeight = 100, 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 = 1, 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.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.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.cellEvents = [], this.elements = {}, this.elements.events = [], this.cache = {}, this.a = function (t, e) { var t = JSON.parse(t); return t.CallBackRedirect ? void (document.location.href = t.CallBackRedirect) : "None" === t.UpdateType ? void n.fireAfterRenderDetached(t.CallBackData, !0) : (n.events.list = t.Events, "Full" === t.UpdateType && (n.startDate = t.StartDate, n.timeFormat = t.TimeFormat ? t.TimeFormat : n.timeFormat, "undefined" != typeof t.WeekStarts && (n.weekStarts = t.WeekStarts), n.hashes = t.Hashes), n.b(), n.c(), n.d(), "Full" === t.UpdateType && (n.f(), n.g()), n.h(), n.show(), n.i(), void n.fireAfterRenderDetached(t.CallBackData, !0)); }, this.fireAfterRenderDetached = function (t, e) { var i = function (t, e) { return function () { n.afterRender && n.afterRender(t, e); }; }; window.setTimeout(i(t, e), 0); }, this.lineHeight = function () { return this.eventHeight + this.lineSpace; }, this.events = {}, this.events.add = function (t) { var e = null; if (t instanceof DayPilot.Event)
1252
1270
  e = t.data;
1253
1271
  else {
1254
1272
  if ("object" != typeof t)
@@ -1602,7 +1620,7 @@ if ("undefined" == typeof DayPilot)
1602
1620
  if ("undefined" == typeof DayPilot)
1603
1621
  var DayPilot = {};
1604
1622
  "undefined" == typeof DayPilot.Global && (DayPilot.Global = {}), function () { if ("undefined" == typeof DayPilot.Navigator || !DayPilot.Navigator.nav) {
1605
- DayPilot.Navigator = function (t, e) { this.v = "2022.2.374-lite"; var i = this; this.id = t, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "Day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.rtl = !1, this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.a = {}, this.b = function () { this.root.dp = this, this.root.className = this.c("_main"), "Horizontal" === this.orientation ? (this.root.style.width = this.showMonths * (7 * a.cellWidth() + this.d()) + "px", this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : this.root.style.width = 7 * a.cellWidth() + this.d() + "px", this.rtl && (this.root.style.direction = "rtl"), this.root.style.position = "relative", this.visible || (this.root.style.display = "none"); var t = document.createElement("input"); t.type = "hidden", t.name = i.id + "_state", t.id = t.name, this.root.appendChild(t), this.state = t, 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.e = function () { return 2 === i.api; }, this.f = function () { this.root.innerHTML = ""; }, this.c = function (t) { var e = this.theme || this.cssClassPrefix; return e ? e + t : ""; }, this.g = function (t, e) { var i = this.c("_" + e); DayPilot.Util.addClass(t, i); }, this.h = function (t, e) { var i = this.c("_" + e); DayPilot.Util.removeClass(t, i); }, this.i = function (t, e) { var s = {}; s.cells = [], s.days = [], s.weeks = []; var n = this.startDate.addMonths(t), l = e.before, o = e.after, h = n.firstDayOfMonth(), r = h.firstDayOfWeek(a.weekStarts()), c = h.addMonths(1), d = DayPilot.DateUtil.daysDiff(r, c), u = "Auto" === this.rowsPerMonth ? Math.ceil(d / 7) : 6; s.rowCount = u; var f = (new DayPilot.Date).getDatePart(), y = 7 * a.cellWidth() + this.d(); s.width = y; var p = this.cellHeight * u + this.titleHeight + this.dayHeaderHeight; s.height = p; var v = document.createElement("div"); if (v.style.width = y + "px", v.style.height = p + "px", "Horizontal" === this.orientation)
1623
+ DayPilot.Navigator = function (t, e) { this.v = "2022.2.384-lite"; var i = this; this.id = t, this.api = 2, this.isNavigator = !0, this.autoFocusOnClick = !0, this.weekStarts = "Auto", this.selectMode = "Day", this.titleHeight = 30, this.dayHeaderHeight = 30, this.bound = null, this.cellWidth = 30, this.cellHeight = 30, this.cssClassPrefix = "navigator_default", this.freeHandSelectionEnabled = !1, this.selectionStart = (new DayPilot.Date).getDatePart(), this.selectionEnd = null, this.selectionDay = null, this.showMonths = 1, this.skipMonths = 1, this.command = "navigate", this.year = (new DayPilot.Date).getYear(), this.month = (new DayPilot.Date).getMonth() + 1, this.showWeekNumbers = !1, this.weekNumberAlgorithm = "Auto", this.rowsPerMonth = "Six", this.orientation = "Vertical", this.locale = "en-us", this.rtl = !1, this.visible = !0, this.timeRangeSelectedHandling = "Bind", this.visibleRangeChangedHandling = "Enabled", this.onVisibleRangeChange = null, this.onVisibleRangeChanged = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.nav = {}, this.a = {}, this.b = function () { this.root.dp = this, this.root.className = this.c("_main"), "Horizontal" === this.orientation ? (this.root.style.width = this.showMonths * (7 * a.cellWidth() + this.d()) + "px", this.root.style.height = 6 * this.cellHeight + this.titleHeight + this.dayHeaderHeight + "px") : this.root.style.width = 7 * a.cellWidth() + this.d() + "px", this.rtl && (this.root.style.direction = "rtl"), this.root.style.position = "relative", this.visible || (this.root.style.display = "none"); var t = document.createElement("input"); t.type = "hidden", t.name = i.id + "_state", t.id = t.name, this.root.appendChild(t), this.state = t, 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.e = function () { return 2 === i.api; }, this.f = function () { this.root.innerHTML = ""; }, this.c = function (t) { var e = this.theme || this.cssClassPrefix; return e ? e + t : ""; }, this.g = function (t, e) { var i = this.c("_" + e); DayPilot.Util.addClass(t, i); }, this.h = function (t, e) { var i = this.c("_" + e); DayPilot.Util.removeClass(t, i); }, this.i = function (t, e) { var s = {}; s.cells = [], s.days = [], s.weeks = []; var n = this.startDate.addMonths(t), l = e.before, o = e.after, h = n.firstDayOfMonth(), r = h.firstDayOfWeek(a.weekStarts()), c = h.addMonths(1), d = DayPilot.DateUtil.daysDiff(r, c), u = "Auto" === this.rowsPerMonth ? Math.ceil(d / 7) : 6; s.rowCount = u; var f = (new DayPilot.Date).getDatePart(), y = 7 * a.cellWidth() + this.d(); s.width = y; var p = this.cellHeight * u + this.titleHeight + this.dayHeaderHeight; s.height = p; var v = document.createElement("div"); if (v.style.width = y + "px", v.style.height = p + "px", "Horizontal" === this.orientation)
1606
1624
  v.style.position = "absolute", v.style.left = y * t + "px", v.style.top = "0px", s.top = 0, s.left = y * t;
1607
1625
  else {
1608
1626
  v.style.position = "relative";