tryton-sao 6.2.9 → 6.2.12
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 +9 -0
- package/dist/tryton-sao.css +3 -2
- package/dist/tryton-sao.js +24 -13
- package/dist/tryton-sao.min.css +3 -2
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/common.js +4 -4
- package/src/html_sanitizer.js +3 -0
- package/src/model.js +4 -2
- package/src/sao.less +2 -3
- package/src/view/form.js +7 -5
- package/src/view/tree.js +2 -1
- package/src/window.js +4 -1
- package/tests/sao.js +1 -0
package/CHANGELOG
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
Version 6.2.12 - 2022-08-17
|
|
2
|
+
* Bug fixes (see mercurial logs for details)
|
|
3
|
+
|
|
4
|
+
Version 6.2.11 - 2022-07-01
|
|
5
|
+
* Bug fixes (see mercurial logs for details)
|
|
6
|
+
|
|
7
|
+
Version 6.2.10 - 2022-06-15
|
|
8
|
+
* Bug fixes (see mercurial logs for details)
|
|
9
|
+
|
|
1
10
|
Version 6.2.9 - 2022-06-03
|
|
2
11
|
* Bug fixes (see mercurial logs for details)
|
|
3
12
|
|
package/dist/tryton-sao.css
CHANGED
|
@@ -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
|
-
|
|
9168
|
-
overflow
|
|
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;
|
package/dist/tryton-sao.js
CHANGED
|
@@ -3794,8 +3794,9 @@ var Sao = {};
|
|
|
3794
3794
|
}).prependTo(this.el);
|
|
3795
3795
|
this.icon.hide();
|
|
3796
3796
|
}
|
|
3797
|
-
this.el.addClass(
|
|
3798
|
-
|
|
3797
|
+
this.el.addClass([
|
|
3798
|
+
'btn', 'btn-horizontal',
|
|
3799
|
+
(style || 'btn-default'), (size || '')].join(' '));
|
|
3799
3800
|
this.el.attr('type', 'button');
|
|
3800
3801
|
this.icon.attr('aria-hidden', true);
|
|
3801
3802
|
this.set_icon(attributes.icon);
|
|
@@ -6772,8 +6773,7 @@ var Sao = {};
|
|
|
6772
6773
|
|
|
6773
6774
|
Sao.common.download_file = function(data, name, options) {
|
|
6774
6775
|
if (options === undefined) {
|
|
6775
|
-
var type = Sao.common.guess_mimetype(
|
|
6776
|
-
name ? name.split('.').pop() : undefined);
|
|
6776
|
+
var type = Sao.common.guess_mimetype(name);
|
|
6777
6777
|
options = {type: type};
|
|
6778
6778
|
}
|
|
6779
6779
|
var blob = new Blob([data], options);
|
|
@@ -9827,7 +9827,8 @@ var Sao = {};
|
|
|
9827
9827
|
},
|
|
9828
9828
|
get_size: function(record) {
|
|
9829
9829
|
var data = record._values[this.name] || 0;
|
|
9830
|
-
if (data instanceof Uint8Array)
|
|
9830
|
+
if ((data instanceof Uint8Array) ||
|
|
9831
|
+
(typeof(data) == 'string')) {
|
|
9831
9832
|
return data.length;
|
|
9832
9833
|
}
|
|
9833
9834
|
return data;
|
|
@@ -9835,7 +9836,8 @@ var Sao = {};
|
|
|
9835
9836
|
get_data: function(record) {
|
|
9836
9837
|
var data = record._values[this.name] || [];
|
|
9837
9838
|
var prm = jQuery.when(data);
|
|
9838
|
-
if (!(data instanceof Uint8Array)
|
|
9839
|
+
if (!(data instanceof Uint8Array) &&
|
|
9840
|
+
(typeof(data) != 'string')) {
|
|
9839
9841
|
if (record.id < 0) {
|
|
9840
9842
|
return prm;
|
|
9841
9843
|
}
|
|
@@ -14687,7 +14689,7 @@ function eval_pyson(value){
|
|
|
14687
14689
|
i = 0;
|
|
14688
14690
|
row.children().map(function() {
|
|
14689
14691
|
var cell = jQuery(this);
|
|
14690
|
-
var colspan = Math.min(Number(cell.attr('colspan')), col);
|
|
14692
|
+
var colspan = Math.min(Number(cell.attr('colspan')), col || 1);
|
|
14691
14693
|
if (cell.hasClass('xexpand') &&
|
|
14692
14694
|
(!jQuery.isEmptyObject(cell.children())) &&
|
|
14693
14695
|
(cell.children(':not(.tooltip)').css('display') != 'none')) {
|
|
@@ -14707,7 +14709,7 @@ function eval_pyson(value){
|
|
|
14707
14709
|
var reduce = function(previous, current) {
|
|
14708
14710
|
var cell = current[0];
|
|
14709
14711
|
var colspan = Math.min(
|
|
14710
|
-
Number(cell.attr('colspan')), col);
|
|
14712
|
+
Number(cell.attr('colspan')), col || 1);
|
|
14711
14713
|
return previous + colspan;
|
|
14712
14714
|
};
|
|
14713
14715
|
return a.reduce(reduce, 0) - b.reduce(reduce, 0);
|
|
@@ -14722,7 +14724,8 @@ function eval_pyson(value){
|
|
|
14722
14724
|
xexpands.forEach(function(e) {
|
|
14723
14725
|
var cell = e[0];
|
|
14724
14726
|
i = e[1];
|
|
14725
|
-
var colspan = Math.min(
|
|
14727
|
+
var colspan = Math.min(
|
|
14728
|
+
Number(cell.attr('colspan')), col || 1);
|
|
14726
14729
|
var current_width = 0;
|
|
14727
14730
|
for (j = 0; j < colspan; j++) {
|
|
14728
14731
|
current_width += widths[i + j] || 0;
|
|
@@ -14750,7 +14753,8 @@ function eval_pyson(value){
|
|
|
14750
14753
|
i = 0;
|
|
14751
14754
|
row.children().map(function() {
|
|
14752
14755
|
var cell = jQuery(this);
|
|
14753
|
-
var colspan = Math.min(
|
|
14756
|
+
var colspan = Math.min(
|
|
14757
|
+
Number(cell.attr('colspan')), col || 1);
|
|
14754
14758
|
if (cell.hasClass('xexpand') &&
|
|
14755
14759
|
(cell.children(':not(.tooltip)').css('display') !=
|
|
14756
14760
|
'none')) {
|
|
@@ -15814,7 +15818,7 @@ function eval_pyson(value){
|
|
|
15814
15818
|
this.date.val(this._format(this.get_format(), value));
|
|
15815
15819
|
},
|
|
15816
15820
|
focus: function() {
|
|
15817
|
-
this.
|
|
15821
|
+
this.date.focus();
|
|
15818
15822
|
},
|
|
15819
15823
|
get modified() {
|
|
15820
15824
|
if (this.record && this.field) {
|
|
@@ -21362,7 +21366,8 @@ function eval_pyson(value){
|
|
|
21362
21366
|
(event_.which != Sao.common.DOWN_KEYCODE) &&
|
|
21363
21367
|
(event_.which != Sao.common.ESC_KEYCODE) &&
|
|
21364
21368
|
(event_.which != Sao.common.RETURN_KEYCODE)) ||
|
|
21365
|
-
jQuery(event_.currentTarget)
|
|
21369
|
+
jQuery(event_.currentTarget)
|
|
21370
|
+
.find('.dropdown-menu:visible').length) {
|
|
21366
21371
|
return;
|
|
21367
21372
|
}
|
|
21368
21373
|
var td = this._get_column_td(this.edited_column);
|
|
@@ -25535,7 +25540,10 @@ function eval_pyson(value){
|
|
|
25535
25540
|
val, {'s': 1, 'm': 60, 'h': 60 * 60});
|
|
25536
25541
|
} else if (!isNaN(Number(val))) {
|
|
25537
25542
|
val = val.toLocaleString(
|
|
25538
|
-
Sao.i18n.BC47(Sao.i18n.getlang())
|
|
25543
|
+
Sao.i18n.BC47(Sao.i18n.getlang()), {
|
|
25544
|
+
'minimumFractionDigits': 0,
|
|
25545
|
+
'maximumFractionDigits': 20,
|
|
25546
|
+
});
|
|
25539
25547
|
}
|
|
25540
25548
|
} else if (val.isTimeDelta) {
|
|
25541
25549
|
val = val.asSeconds();
|
|
@@ -26641,6 +26649,9 @@ SOFTWARE.
|
|
|
26641
26649
|
}
|
|
26642
26650
|
} else {
|
|
26643
26651
|
new_node = document.createDocumentFragment();
|
|
26652
|
+
if (node.tagName != 'SCRIPT') {
|
|
26653
|
+
new_node.textContent = node.textContent;
|
|
26654
|
+
}
|
|
26644
26655
|
}
|
|
26645
26656
|
return new_node;
|
|
26646
26657
|
}
|
package/dist/tryton-sao.min.css
CHANGED
|
@@ -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
|
-
|
|
9168
|
-
overflow
|
|
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;
|