dhtmlx-scheduler 7.2.10 → 7.2.11

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.
@@ -1,6 +1,6 @@
1
1
  /** @license
2
2
 
3
- dhtmlxScheduler v.7.2.10 Standard
3
+ dhtmlxScheduler v.7.2.11 Standard
4
4
 
5
5
  To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
6
6
 
@@ -2165,7 +2165,25 @@ function extend$j(scheduler2) {
2165
2165
  this.$container.insertBefore(materialScalePlaceholder, this._els["dhx_cal_header"][0]);
2166
2166
  }
2167
2167
  materialScalePlaceholder.style.display = "block";
2168
- this.set_xy(materialScalePlaceholder, w, this.xy.scale_height + 1, 0, this._els["dhx_cal_header"][0].offsetTop);
2168
+ const navElement = scheduler2.$root.querySelector(".dhx_cal_navline");
2169
+ let navHeight = 0;
2170
+ if (navElement) {
2171
+ navHeight += navElement.offsetHeight;
2172
+ }
2173
+ const headerElement = scheduler2.$root.querySelector(".dhx_cal_header");
2174
+ let headerHeight = 0;
2175
+ if (headerElement) {
2176
+ headerHeight += headerElement.offsetHeight;
2177
+ }
2178
+ let offsetTop, offsetHeight;
2179
+ if (!headerHeight) {
2180
+ offsetTop = navHeight - 4;
2181
+ offsetHeight = 5;
2182
+ } else {
2183
+ offsetTop = navHeight + 1;
2184
+ offsetHeight = headerHeight;
2185
+ }
2186
+ this.set_xy(materialScalePlaceholder, w, offsetHeight, 0, offsetTop);
2169
2187
  } else {
2170
2188
  if (materialScalePlaceholder) {
2171
2189
  materialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);
@@ -3057,11 +3075,8 @@ function extend$j(scheduler2) {
3057
3075
  var container = this._obj;
3058
3076
  var oldClass = "dhx_scheduler_" + this._mode;
3059
3077
  var newClass = "dhx_scheduler_" + mode;
3060
- if (!this._mode || container.className.indexOf(oldClass) == -1) {
3061
- container.className += " " + newClass;
3062
- } else {
3063
- container.className = container.className.replace(oldClass, newClass);
3064
- }
3078
+ container.classList.remove(oldClass);
3079
+ container.classList.add(newClass);
3065
3080
  var dhx_multi_day = "dhx_multi_day";
3066
3081
  var prev_scroll = this._mode == mode && this.config.preserve_scroll ? this._els[dhx_cal_data][0].scrollTop : false;
3067
3082
  var multidayScroll;
@@ -4201,6 +4216,7 @@ function extend$g(scheduler2) {
4201
4216
  this.clearAll();
4202
4217
  if (this.$container) {
4203
4218
  this.$container.innerHTML = "";
4219
+ this.$container.classList.remove(`dhx_scheduler_${this._mode}`);
4204
4220
  }
4205
4221
  if (this._eventRemoveAll) {
4206
4222
  this._eventRemoveAll();
@@ -9237,7 +9253,7 @@ class DatePicker {
9237
9253
  }
9238
9254
  }
9239
9255
  function factoryMethod(extensionManager) {
9240
- const scheduler2 = { version: "7.2.10" };
9256
+ const scheduler2 = { version: "7.2.11" };
9241
9257
  scheduler2.$stateProvider = StateService();
9242
9258
  scheduler2.getState = scheduler2.$stateProvider.getState;
9243
9259
  extend$n(scheduler2);
@@ -9721,7 +9737,10 @@ function agenda_view(scheduler2) {
9721
9737
  scheduler2._colsS = null;
9722
9738
  scheduler2._table_view = true;
9723
9739
  const dateHeader = scheduler2._getNavDateElement();
9724
- dateHeader.innerHTML = scheduler2.templates.agenda_date(scheduler2._date);
9740
+ if (dateHeader) {
9741
+ dateHeader.innerHTML = scheduler2.templates.agenda_date(scheduler2._date);
9742
+ }
9743
+ scheduler2.set_sizes();
9725
9744
  fill_agenda_tab();
9726
9745
  } else {
9727
9746
  scheduler2._table_view = false;
@@ -19017,7 +19036,7 @@ function recurring(scheduler2) {
19017
19036
  copy2.start_date = date;
19018
19037
  copy2.id = ev.id + "#" + Math.ceil(date.valueOf());
19019
19038
  copy2.end_date = new Date(date.valueOf() + eventDuration * 1e3);
19020
- if (copy2.end_date.valueOf() < scheduler2._min_date.valueOf()) {
19039
+ if (copy2.end_date.valueOf() <= scheduler2._min_date.valueOf()) {
19021
19040
  continue;
19022
19041
  }
19023
19042
  copy2.end_date = scheduler2._fix_daylight_saving_date(copy2.start_date, copy2.end_date, ev, date, copy2.end_date);
@@ -21281,6 +21300,9 @@ function year_view(scheduler2) {
21281
21300
  var locateEvent = scheduler2._locate_event;
21282
21301
  scheduler2._locate_event = function(node) {
21283
21302
  var id = locateEvent.apply(scheduler2, arguments);
21303
+ if (!isYearMode()) {
21304
+ return id;
21305
+ }
21284
21306
  if (!id) {
21285
21307
  var date = getCellDate(node);
21286
21308
  if (!date)