tryton-sao 6.0.18 → 6.0.21

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,12 @@
1
+ Version 6.0.21 - 2022-08-17
2
+ * Bug fixes (see mercurial logs for details)
3
+
4
+ Version 6.0.20 - 2022-07-01
5
+ * Bug fixes (see mercurial logs for details)
6
+
7
+ Version 6.0.19 - 2022-06-15
8
+ * Bug fixes (see mercurial logs for details)
9
+
1
10
  Version 6.0.18 - 2022-06-03
2
11
  * Bug fixes (see mercurial logs for details)
3
12
 
@@ -6734,8 +6734,7 @@ var Sao = {};
6734
6734
 
6735
6735
  Sao.common.download_file = function(data, name, options) {
6736
6736
  if (options === undefined) {
6737
- var type = Sao.common.guess_mimetype(
6738
- name ? name.split('.').pop() : undefined);
6737
+ var type = Sao.common.guess_mimetype(name);
6739
6738
  options = {type: type};
6740
6739
  }
6741
6740
  var blob = new Blob([data], options);
@@ -9745,7 +9744,8 @@ var Sao = {};
9745
9744
  },
9746
9745
  get_size: function(record) {
9747
9746
  var data = record._values[this.name] || 0;
9748
- if (data instanceof Uint8Array) {
9747
+ if ((data instanceof Uint8Array) ||
9748
+ (typeof(data) == 'string')) {
9749
9749
  return data.length;
9750
9750
  }
9751
9751
  return data;
@@ -9753,7 +9753,8 @@ var Sao = {};
9753
9753
  get_data: function(record) {
9754
9754
  var data = record._values[this.name] || [];
9755
9755
  var prm = jQuery.when(data);
9756
- if (!(data instanceof Uint8Array)) {
9756
+ if (!(data instanceof Uint8Array) &&
9757
+ (typeof(data) != 'string')) {
9757
9758
  if (record.id < 0) {
9758
9759
  return prm;
9759
9760
  }
@@ -14557,7 +14558,7 @@ function eval_pyson(value){
14557
14558
  i = 0;
14558
14559
  row.children().map(function() {
14559
14560
  var cell = jQuery(this);
14560
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14561
+ var colspan = Math.min(Number(cell.attr('colspan')), col || 1);
14561
14562
  if (cell.hasClass('xexpand') &&
14562
14563
  (!jQuery.isEmptyObject(cell.children())) &&
14563
14564
  (cell.children(':not(.tooltip)').css('display') != 'none')) {
@@ -14577,7 +14578,7 @@ function eval_pyson(value){
14577
14578
  var reduce = function(previous, current) {
14578
14579
  var cell = current[0];
14579
14580
  var colspan = Math.min(
14580
- Number(cell.attr('colspan')), col);
14581
+ Number(cell.attr('colspan')), col || 1);
14581
14582
  return previous + colspan;
14582
14583
  };
14583
14584
  return a.reduce(reduce, 0) - b.reduce(reduce, 0);
@@ -14592,7 +14593,8 @@ function eval_pyson(value){
14592
14593
  xexpands.forEach(function(e) {
14593
14594
  var cell = e[0];
14594
14595
  i = e[1];
14595
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14596
+ var colspan = Math.min(
14597
+ Number(cell.attr('colspan')), col || 1);
14596
14598
  var current_width = 0;
14597
14599
  for (j = 0; j < colspan; j++) {
14598
14600
  current_width += widths[i + j] || 0;
@@ -14620,7 +14622,8 @@ function eval_pyson(value){
14620
14622
  i = 0;
14621
14623
  row.children().map(function() {
14622
14624
  var cell = jQuery(this);
14623
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14625
+ var colspan = Math.min(
14626
+ Number(cell.attr('colspan')), col || 1);
14624
14627
  if (cell.hasClass('xexpand') &&
14625
14628
  (cell.children(':not(.tooltip)').css('display') !=
14626
14629
  'none')) {
@@ -15678,7 +15681,7 @@ function eval_pyson(value){
15678
15681
  this.date.val(this._format(this.get_format(), value));
15679
15682
  },
15680
15683
  focus: function() {
15681
- this.input.focus();
15684
+ this.date.focus();
15682
15685
  },
15683
15686
  get modified() {
15684
15687
  if (this.record && this.field) {
@@ -21042,7 +21045,8 @@ function eval_pyson(value){
21042
21045
  (event_.which != Sao.common.DOWN_KEYCODE) &&
21043
21046
  (event_.which != Sao.common.ESC_KEYCODE) &&
21044
21047
  (event_.which != Sao.common.RETURN_KEYCODE)) ||
21045
- jQuery(event_.currentTarget).find('.dropdown-menu').length) {
21048
+ jQuery(event_.currentTarget)
21049
+ .find('.dropdown-menu:visible').length) {
21046
21050
  return;
21047
21051
  }
21048
21052
  var td = this._get_column_td(this.edited_column);
@@ -25178,7 +25182,10 @@ function eval_pyson(value){
25178
25182
  val, {'s': 1, 'm': 60, 'h': 60 * 60});
25179
25183
  } else if (!isNaN(Number(val))) {
25180
25184
  val = val.toLocaleString(
25181
- Sao.i18n.BC47(Sao.i18n.getlang()));
25185
+ Sao.i18n.BC47(Sao.i18n.getlang()), {
25186
+ 'minimumFractionDigits': 0,
25187
+ 'maximumFractionDigits': 20,
25188
+ });
25182
25189
  }
25183
25190
  } else if (val.isTimeDelta) {
25184
25191
  val = val.asSeconds();
@@ -26279,6 +26286,9 @@ SOFTWARE.
26279
26286
  }
26280
26287
  } else {
26281
26288
  new_node = document.createDocumentFragment();
26289
+ if (node.tagName != 'SCRIPT') {
26290
+ new_node.textContent = node.textContent;
26291
+ }
26282
26292
  }
26283
26293
  return new_node;
26284
26294
  }