tryton-sao 6.2.13 → 6.2.14
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 +4 -0
- package/dist/tryton-sao.js +18 -7
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/view/form.js +6 -2
- package/src/view/tree.js +12 -5
package/package.json
CHANGED
package/src/view/form.js
CHANGED
|
@@ -1676,7 +1676,10 @@ function eval_pyson(value){
|
|
|
1676
1676
|
value = this._parse(this._input_format, value);
|
|
1677
1677
|
value = this._format(this.get_format(), value);
|
|
1678
1678
|
this.date.val(value).change();
|
|
1679
|
-
|
|
1679
|
+
if (!~navigator.userAgent.indexOf("Firefox")) {
|
|
1680
|
+
// Firefox triggers change when navigate by month/year
|
|
1681
|
+
this.date.focus();
|
|
1682
|
+
}
|
|
1680
1683
|
}
|
|
1681
1684
|
}.bind(this));
|
|
1682
1685
|
if (this.input[0].type == this._input) {
|
|
@@ -1684,6 +1687,7 @@ function eval_pyson(value){
|
|
|
1684
1687
|
'class': 'icon-input icon-secondary',
|
|
1685
1688
|
'aria-label': Sao.i18n.gettext("Open the calendar"),
|
|
1686
1689
|
'title': Sao.i18n.gettext("Open the calendar"),
|
|
1690
|
+
'tabindex': -1,
|
|
1687
1691
|
}).appendTo(group);
|
|
1688
1692
|
this.input.appendTo(this.icon);
|
|
1689
1693
|
Sao.common.ICONFACTORY.get_icon_img('tryton-date')
|
|
@@ -3349,7 +3353,7 @@ function eval_pyson(value){
|
|
|
3349
3353
|
size_limit = record.expr_eval(this.attributes.size);
|
|
3350
3354
|
}
|
|
3351
3355
|
if (this._readonly) {
|
|
3352
|
-
if (size_limit === null) {
|
|
3356
|
+
if ((size_limit === null) || (size_limit === undefined)) {
|
|
3353
3357
|
size_limit = this.screen.group.length;
|
|
3354
3358
|
} else {
|
|
3355
3359
|
size_limit = Math.min(
|
package/src/view/tree.js
CHANGED
|
@@ -1291,12 +1291,19 @@
|
|
|
1291
1291
|
var redraw = function() {
|
|
1292
1292
|
for (; i < rows.length; i++) {
|
|
1293
1293
|
var row = rows[i];
|
|
1294
|
-
var record = row.record
|
|
1295
|
-
|
|
1296
|
-
|
|
1294
|
+
var record = row.record;
|
|
1295
|
+
var field_name;
|
|
1296
|
+
for (var j=0; j < row.tree.columns.length; j++) {
|
|
1297
|
+
var column = row.tree.columns[j];
|
|
1298
|
+
if (column.type == 'field') {
|
|
1299
|
+
field_name = column.attributes.name;
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
if (field_name && !record.is_loaded(field_name)) {
|
|
1297
1304
|
// Prefetch the first field to prevent promises in
|
|
1298
1305
|
// Cell.render
|
|
1299
|
-
record.load(
|
|
1306
|
+
record.load(field_name).done(redraw);
|
|
1300
1307
|
return;
|
|
1301
1308
|
} else {
|
|
1302
1309
|
row.redraw(selected, expanded);
|
|
@@ -1862,7 +1869,7 @@
|
|
|
1862
1869
|
|
|
1863
1870
|
var current_record = this.tree.screen.current_record;
|
|
1864
1871
|
if ((this.record != current_record) &&
|
|
1865
|
-
!current_record.validate(
|
|
1872
|
+
current_record && !current_record.validate(
|
|
1866
1873
|
this.tree.get_fields(), false, false, true)) {
|
|
1867
1874
|
return;
|
|
1868
1875
|
}
|