tryton-sao 6.4.1 → 6.4.2

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.4.2 - 2022-06-15
2
+ * Bug fixes (see mercurial logs for details)
3
+
1
4
  Version 6.4.1 - 2022-06-03
2
5
  * Bug fixes (see mercurial logs for details)
3
6
 
@@ -6834,8 +6834,7 @@ var Sao = {};
6834
6834
 
6835
6835
  Sao.common.download_file = function(data, name, options) {
6836
6836
  if (options === undefined) {
6837
- var type = Sao.common.guess_mimetype(
6838
- name ? name.split('.').pop() : undefined);
6837
+ var type = Sao.common.guess_mimetype(name);
6839
6838
  options = {type: type};
6840
6839
  }
6841
6840
  var blob = new Blob([data], options);
@@ -9841,7 +9840,8 @@ var Sao = {};
9841
9840
  },
9842
9841
  get_size: function(record) {
9843
9842
  var data = record._values[this.name] || 0;
9844
- if (data instanceof Uint8Array) {
9843
+ if ((data instanceof Uint8Array) ||
9844
+ (typeof(data) == 'string')) {
9845
9845
  return data.length;
9846
9846
  }
9847
9847
  return data;
@@ -9849,7 +9849,8 @@ var Sao = {};
9849
9849
  get_data: function(record) {
9850
9850
  var data = record._values[this.name] || [];
9851
9851
  var prm = jQuery.when(data);
9852
- if (!(data instanceof Uint8Array)) {
9852
+ if (!(data instanceof Uint8Array) &&
9853
+ (typeof(data) != 'string')) {
9853
9854
  if (record.id < 0) {
9854
9855
  return prm;
9855
9856
  }
@@ -15872,7 +15873,7 @@ function eval_pyson(value){
15872
15873
  this.date.val(this._format(this.get_format(), value));
15873
15874
  },
15874
15875
  focus: function() {
15875
- this.input.focus();
15876
+ this.date.focus();
15876
15877
  },
15877
15878
  get modified() {
15878
15879
  if (this.record && this.field) {
@@ -21517,7 +21518,8 @@ function eval_pyson(value){
21517
21518
  (event_.which != Sao.common.DOWN_KEYCODE) &&
21518
21519
  (event_.which != Sao.common.ESC_KEYCODE) &&
21519
21520
  (event_.which != Sao.common.RETURN_KEYCODE)) ||
21520
- jQuery(event_.currentTarget).find('.dropdown-menu').length) {
21521
+ jQuery(event_.currentTarget)
21522
+ .find('.dropdown-menu:visible').length) {
21521
21523
  return;
21522
21524
  }
21523
21525
  var td = this._get_column_td(this.edited_column);
@@ -26905,6 +26907,9 @@ SOFTWARE.
26905
26907
  }
26906
26908
  } else {
26907
26909
  new_node = document.createDocumentFragment();
26910
+ if (node.tagName != 'SCRIPT') {
26911
+ new_node.textContent = node.textContent;
26912
+ }
26908
26913
  }
26909
26914
  return new_node;
26910
26915
  }