tryton-sao 6.2.9 → 6.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ Version 6.2.10 - 2022-06-15
2
+ * Bug fixes (see mercurial logs for details)
3
+
1
4
  Version 6.2.9 - 2022-06-03
2
5
  * Bug fixes (see mercurial logs for details)
3
6
 
@@ -6772,8 +6772,7 @@ var Sao = {};
6772
6772
 
6773
6773
  Sao.common.download_file = function(data, name, options) {
6774
6774
  if (options === undefined) {
6775
- var type = Sao.common.guess_mimetype(
6776
- name ? name.split('.').pop() : undefined);
6775
+ var type = Sao.common.guess_mimetype(name);
6777
6776
  options = {type: type};
6778
6777
  }
6779
6778
  var blob = new Blob([data], options);
@@ -9827,7 +9826,8 @@ var Sao = {};
9827
9826
  },
9828
9827
  get_size: function(record) {
9829
9828
  var data = record._values[this.name] || 0;
9830
- if (data instanceof Uint8Array) {
9829
+ if ((data instanceof Uint8Array) ||
9830
+ (typeof(data) == 'string')) {
9831
9831
  return data.length;
9832
9832
  }
9833
9833
  return data;
@@ -9835,7 +9835,8 @@ var Sao = {};
9835
9835
  get_data: function(record) {
9836
9836
  var data = record._values[this.name] || [];
9837
9837
  var prm = jQuery.when(data);
9838
- if (!(data instanceof Uint8Array)) {
9838
+ if (!(data instanceof Uint8Array) &&
9839
+ (typeof(data) != 'string')) {
9839
9840
  if (record.id < 0) {
9840
9841
  return prm;
9841
9842
  }
@@ -15814,7 +15815,7 @@ function eval_pyson(value){
15814
15815
  this.date.val(this._format(this.get_format(), value));
15815
15816
  },
15816
15817
  focus: function() {
15817
- this.input.focus();
15818
+ this.date.focus();
15818
15819
  },
15819
15820
  get modified() {
15820
15821
  if (this.record && this.field) {
@@ -21362,7 +21363,8 @@ function eval_pyson(value){
21362
21363
  (event_.which != Sao.common.DOWN_KEYCODE) &&
21363
21364
  (event_.which != Sao.common.ESC_KEYCODE) &&
21364
21365
  (event_.which != Sao.common.RETURN_KEYCODE)) ||
21365
- jQuery(event_.currentTarget).find('.dropdown-menu').length) {
21366
+ jQuery(event_.currentTarget)
21367
+ .find('.dropdown-menu:visible').length) {
21366
21368
  return;
21367
21369
  }
21368
21370
  var td = this._get_column_td(this.edited_column);
@@ -26641,6 +26643,9 @@ SOFTWARE.
26641
26643
  }
26642
26644
  } else {
26643
26645
  new_node = document.createDocumentFragment();
26646
+ if (node.tagName != 'SCRIPT') {
26647
+ new_node.textContent = node.textContent;
26648
+ }
26644
26649
  }
26645
26650
  return new_node;
26646
26651
  }