dhtmlx-scheduler 7.1.0 → 7.1.1

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.
@@ -8057,27 +8057,56 @@
8057
8057
  code.call(this, rowId);
8058
8058
  }
8059
8059
  }
8060
- }, _prepareDataItem: function(item) {
8061
- var processedItem = {};
8062
- var scheduler2 = this.$scheduler;
8063
- var copy = scheduler2.utils.copy(item);
8060
+ }, _prepareItemForJson(item) {
8061
+ const processedItem = {};
8062
+ const scheduler2 = this.$scheduler;
8063
+ const copy = scheduler2.utils.copy(item);
8064
+ for (let i in copy) {
8065
+ let prop = copy[i];
8066
+ if (i.indexOf("_") === 0) {
8067
+ continue;
8068
+ } else if (prop) {
8069
+ if (prop.getUTCFullYear) {
8070
+ processedItem[i] = scheduler2._helpers.formatDate(prop);
8071
+ } else if (typeof prop == "object") {
8072
+ processedItem[i] = this._prepareItemForJson(prop);
8073
+ } else {
8074
+ processedItem[i] = prop;
8075
+ }
8076
+ } else if (prop !== void 0) {
8077
+ processedItem[i] = prop;
8078
+ }
8079
+ }
8080
+ processedItem[this.action_param] = scheduler2.getUserData(item.id, this.action_param);
8081
+ return processedItem;
8082
+ }, _prepareItemForForm(item) {
8083
+ const processedItem = {};
8084
+ const scheduler2 = this.$scheduler;
8085
+ const copy = scheduler2.utils.copy(item);
8064
8086
  for (var i in copy) {
8087
+ let prop = copy[i];
8065
8088
  if (i.indexOf("_") === 0) {
8066
8089
  continue;
8067
- } else if (copy[i]) {
8068
- if (copy[i].getUTCFullYear) {
8069
- processedItem[i] = scheduler2._helpers.formatDate(copy[i]);
8070
- } else if (typeof copy[i] == "object") {
8071
- processedItem[i] = this._prepareDataItem(copy[i]);
8072
- } else if (copy[i] === null) {
8073
- processedItem[i] = "";
8090
+ } else if (prop) {
8091
+ if (prop.getUTCFullYear) {
8092
+ processedItem[i] = scheduler2._helpers.formatDate(prop);
8093
+ } else if (typeof prop == "object") {
8094
+ processedItem[i] = this._prepareItemForForm(prop);
8074
8095
  } else {
8075
- processedItem[i] = copy[i];
8096
+ processedItem[i] = prop;
8076
8097
  }
8098
+ } else {
8099
+ processedItem[i] = "";
8077
8100
  }
8078
8101
  }
8079
8102
  processedItem[this.action_param] = scheduler2.getUserData(item.id, this.action_param);
8080
8103
  return processedItem;
8104
+ }, _prepareDataItem: function(item) {
8105
+ if (this._serializeAsJson) {
8106
+ return this._prepareItemForJson(item);
8107
+ } else {
8108
+ return this._prepareItemForForm(item);
8109
+ }
8081
8110
  }, _getRowData: function(id2) {
8082
8111
  var dataItem = this.$scheduler.getEvent(id2);
8083
8112
  if (!dataItem) {
@@ -8727,7 +8756,7 @@
8727
8756
  }
8728
8757
  }
8729
8758
  function factoryMethod(extensionManager) {
8730
- const scheduler2 = { version: "7.1.0" };
8759
+ const scheduler2 = { version: "7.1.1" };
8731
8760
  scheduler2.$stateProvider = StateService();
8732
8761
  scheduler2.getState = scheduler2.$stateProvider.getState;
8733
8762
  extend$n(scheduler2);
@@ -9489,7 +9518,7 @@
9489
9518
  } else {
9490
9519
  var evl = data.firstChild;
9491
9520
  const rows = evl.querySelectorAll(".dhx_cal_month_row");
9492
- if (rows) {
9521
+ if (rows && rows.length) {
9493
9522
  for (var i = 0; i < rows.length; i++) {
9494
9523
  h[i]++;
9495
9524
  if (h[i] * hb > this._colsS.height - this.xy.month_head_height) {
@@ -9526,14 +9555,11 @@
9526
9555
  var last = this._els["dhx_multi_day"][0];
9527
9556
  last.style.height = dh;
9528
9557
  last.style.visibility = h[0] == -1 ? "hidden" : "visible";
9558
+ last.style.display = h[0] == -1 ? "none" : "";
9529
9559
  last = this._els["dhx_multi_day"][1];
9530
9560
  last.style.height = dh;
9531
9561
  last.style.visibility = h[0] == -1 ? "hidden" : "visible";
9532
- if (last.style.visibility == "hidden") {
9533
- last.style.display = "none";
9534
- } else {
9535
- last.style.display = "";
9536
- }
9562
+ last.style.display = h[0] == -1 ? "none" : "";
9537
9563
  last.className = h[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small";
9538
9564
  this._dy_shift = (h[0] + 1) * hb;
9539
9565
  h[0] = 0;
@@ -19725,6 +19751,13 @@
19725
19751
  watchableTarget = targetNode;
19726
19752
  config.onmouseenter(event2, targetNode);
19727
19753
  };
19754
+ if (scheduler2._mobile && scheduler2.config.touch_tooltip) {
19755
+ if (targetNode) {
19756
+ doOnMouseEnter();
19757
+ } else {
19758
+ config.onmouseleave(event2, targetNode);
19759
+ }
19760
+ }
19728
19761
  if (watchableTarget) {
19729
19762
  if (targetNode && targetNode === watchableTarget) {
19730
19763
  config.onmousemove(event2, targetNode);
@@ -19828,6 +19861,9 @@
19828
19861
  tooltipManager.hideTooltip();
19829
19862
  });
19830
19863
  scheduler2.attachEvent("onBeforeDrag", function() {
19864
+ if (scheduler2._mobile && scheduler2.config.touch_tooltip) {
19865
+ return true;
19866
+ }
19831
19867
  tooltipManager.hideTooltip();
19832
19868
  return true;
19833
19869
  });