tryton-sao 6.4.1 → 6.4.4

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.4.4 - 2022-08-17
2
+ * Bug fixes (see mercurial logs for details)
3
+
4
+ Version 6.4.3 - 2022-07-01
5
+ * Bug fixes (see mercurial logs for details)
6
+
7
+ Version 6.4.2 - 2022-06-15
8
+ * Bug fixes (see mercurial logs for details)
9
+
1
10
  Version 6.4.1 - 2022-06-03
2
11
  * Bug fixes (see mercurial logs for details)
3
12
 
@@ -9164,9 +9164,10 @@ html[theme="default"] .carousel-caption h6 {
9164
9164
  content: "";
9165
9165
  background-color: rgba(0, 0, 0, 0);
9166
9166
  }
9167
- button {
9168
- overflow-y: hidden;
9167
+ .btn-horizontal {
9168
+ overflow: hidden;
9169
9169
  text-overflow: ellipsis;
9170
+ white-space: nowrap;
9170
9171
  }
9171
9172
  .input-group > .form-control-feedback {
9172
9173
  z-index: 3;
@@ -848,6 +848,7 @@ var Sao = {};
848
848
  set_visible: function() {
849
849
  },
850
850
  get_visible: function() {
851
+ return true;
851
852
  },
852
853
  favorite_click: function(e) {
853
854
  // Prevent activate the action of the row
@@ -3823,8 +3824,9 @@ var Sao = {};
3823
3824
  }).prependTo(this.el);
3824
3825
  this.icon.hide();
3825
3826
  }
3826
- this.el.addClass(
3827
- ['btn', (style || 'btn-default'), (size || '')].join(' '));
3827
+ this.el.addClass([
3828
+ 'btn', 'btn-horizontal',
3829
+ (style || 'btn-default'), (size || '')].join(' '));
3828
3830
  this.el.attr('type', 'button');
3829
3831
  this.icon.attr('aria-hidden', true);
3830
3832
  this.set_icon(attributes.icon);
@@ -6834,8 +6836,7 @@ var Sao = {};
6834
6836
 
6835
6837
  Sao.common.download_file = function(data, name, options) {
6836
6838
  if (options === undefined) {
6837
- var type = Sao.common.guess_mimetype(
6838
- name ? name.split('.').pop() : undefined);
6839
+ var type = Sao.common.guess_mimetype(name);
6839
6840
  options = {type: type};
6840
6841
  }
6841
6842
  var blob = new Blob([data], options);
@@ -9841,7 +9842,8 @@ var Sao = {};
9841
9842
  },
9842
9843
  get_size: function(record) {
9843
9844
  var data = record._values[this.name] || 0;
9844
- if (data instanceof Uint8Array) {
9845
+ if ((data instanceof Uint8Array) ||
9846
+ (typeof(data) == 'string')) {
9845
9847
  return data.length;
9846
9848
  }
9847
9849
  return data;
@@ -9849,7 +9851,8 @@ var Sao = {};
9849
9851
  get_data: function(record) {
9850
9852
  var data = record._values[this.name] || [];
9851
9853
  var prm = jQuery.when(data);
9852
- if (!(data instanceof Uint8Array)) {
9854
+ if (!(data instanceof Uint8Array) &&
9855
+ (typeof(data) != 'string')) {
9853
9856
  if (record.id < 0) {
9854
9857
  return prm;
9855
9858
  }
@@ -14727,7 +14730,7 @@ function eval_pyson(value){
14727
14730
  let i = 0;
14728
14731
  row.children().map(function() {
14729
14732
  var cell = jQuery(this);
14730
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14733
+ var colspan = Math.min(Number(cell.attr('colspan')), col || 1);
14731
14734
  if (cell.hasClass('xexpand') &&
14732
14735
  (!jQuery.isEmptyObject(cell.children())) &&
14733
14736
  (cell.children(':not(.tooltip)').css('display') != 'none')) {
@@ -14747,7 +14750,7 @@ function eval_pyson(value){
14747
14750
  var reduce = function(previous, current) {
14748
14751
  var cell = current[0];
14749
14752
  var colspan = Math.min(
14750
- Number(cell.attr('colspan')), col);
14753
+ Number(cell.attr('colspan')), col || 1);
14751
14754
  return previous + colspan;
14752
14755
  };
14753
14756
  return a.reduce(reduce, 0) - b.reduce(reduce, 0);
@@ -14762,7 +14765,8 @@ function eval_pyson(value){
14762
14765
  for (const e of xexpands) {
14763
14766
  var cell = e[0];
14764
14767
  let i = e[1];
14765
- const colspan = Math.min(Number(cell.attr('colspan')), col);
14768
+ const colspan = Math.min(
14769
+ Number(cell.attr('colspan')), col || 1);
14766
14770
  var current_width = 0;
14767
14771
  for (let j = 0; j < colspan; j++) {
14768
14772
  current_width += widths[i + j] || 0;
@@ -14790,7 +14794,8 @@ function eval_pyson(value){
14790
14794
  let i = 0;
14791
14795
  for (let cell of row.children()) {
14792
14796
  cell = jQuery(cell);
14793
- const colspan = Math.min(Number(cell.attr('colspan')), col);
14797
+ const colspan = Math.min(
14798
+ Number(cell.attr('colspan')), col || 1);
14794
14799
  if (cell.hasClass('xexpand') &&
14795
14800
  (cell.children(':not(.tooltip)').css('display') !=
14796
14801
  'none')) {
@@ -15872,7 +15877,7 @@ function eval_pyson(value){
15872
15877
  this.date.val(this._format(this.get_format(), value));
15873
15878
  },
15874
15879
  focus: function() {
15875
- this.input.focus();
15880
+ this.date.focus();
15876
15881
  },
15877
15882
  get modified() {
15878
15883
  if (this.record && this.field) {
@@ -19740,6 +19745,9 @@ function eval_pyson(value){
19740
19745
  'class': 'optional',
19741
19746
  });
19742
19747
  this.thead.children().prepend(th);
19748
+ if (this.tfoot) {
19749
+ this.tfoot.children().prepend(jQuery('<th/>'));
19750
+ }
19743
19751
  }
19744
19752
  var menu = jQuery('<ul/>', {
19745
19753
  'class': 'dropdown-menu',
@@ -21517,7 +21525,8 @@ function eval_pyson(value){
21517
21525
  (event_.which != Sao.common.DOWN_KEYCODE) &&
21518
21526
  (event_.which != Sao.common.ESC_KEYCODE) &&
21519
21527
  (event_.which != Sao.common.RETURN_KEYCODE)) ||
21520
- jQuery(event_.currentTarget).find('.dropdown-menu').length) {
21528
+ jQuery(event_.currentTarget)
21529
+ .find('.dropdown-menu:visible').length) {
21521
21530
  return;
21522
21531
  }
21523
21532
  var td = this._get_column_td(this.edited_column);
@@ -23711,6 +23720,9 @@ function eval_pyson(value){
23711
23720
  this.__messages = new Set();
23712
23721
  },
23713
23722
  add: function(message, type) {
23723
+ if (!message) {
23724
+ return;
23725
+ }
23714
23726
  var key = JSON.stringify([message, type]);
23715
23727
  if (!this.__messages.has(key)) {
23716
23728
  var infobar = jQuery('<div/>', {
@@ -25765,7 +25777,10 @@ function eval_pyson(value){
25765
25777
  val, {'s': 1, 'm': 60, 'h': 60 * 60});
25766
25778
  } else if (!isNaN(Number(val))) {
25767
25779
  val = val.toLocaleString(
25768
- Sao.i18n.BC47(Sao.i18n.getlang()));
25780
+ Sao.i18n.BC47(Sao.i18n.getlang()), {
25781
+ 'minimumFractionDigits': 0,
25782
+ 'maximumFractionDigits': 20,
25783
+ });
25769
25784
  }
25770
25785
  } else if (val.isTimeDelta) {
25771
25786
  val = val.asSeconds();
@@ -26905,6 +26920,9 @@ SOFTWARE.
26905
26920
  }
26906
26921
  } else {
26907
26922
  new_node = document.createDocumentFragment();
26923
+ if (node.tagName != 'SCRIPT') {
26924
+ new_node.textContent = node.textContent;
26925
+ }
26908
26926
  }
26909
26927
  return new_node;
26910
26928
  }
@@ -9164,9 +9164,10 @@ html[theme="default"] .carousel-caption h6 {
9164
9164
  content: "";
9165
9165
  background-color: rgba(0, 0, 0, 0);
9166
9166
  }
9167
- button {
9168
- overflow-y: hidden;
9167
+ .btn-horizontal {
9168
+ overflow: hidden;
9169
9169
  text-overflow: ellipsis;
9170
+ white-space: nowrap;
9170
9171
  }
9171
9172
  .input-group > .form-control-feedback {
9172
9173
  z-index: 3;