tryton-sao 7.2.1 → 7.2.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 +5 -0
- package/dist/tryton-sao.css +2 -2
- package/dist/tryton-sao.js +22 -24
- package/package.json +1 -1
- package/src/common.js +2 -10
- package/src/sao.js +1 -1
- package/src/sao.less +1 -1
- package/src/view/form.js +19 -13
package/CHANGELOG
CHANGED
package/dist/tryton-sao.css
CHANGED
|
@@ -10066,8 +10066,8 @@ img.icon {
|
|
|
10066
10066
|
min-height: 150px;
|
|
10067
10067
|
max-height: 300px;
|
|
10068
10068
|
}
|
|
10069
|
-
.form .form-text
|
|
10070
|
-
.form .form-richtext
|
|
10069
|
+
.form .form-text textarea,
|
|
10070
|
+
.form .form-richtext textarea,
|
|
10071
10071
|
.form .form-text .richtext,
|
|
10072
10072
|
.form .form-richtext .richtext {
|
|
10073
10073
|
height: 100%;
|
package/dist/tryton-sao.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-redeclare */
|
|
5
5
|
var Sao = {
|
|
6
|
-
__version__: '7.2.
|
|
6
|
+
__version__: '7.2.2',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -3494,16 +3494,8 @@ var Sao = {
|
|
|
3494
3494
|
];
|
|
3495
3495
|
|
|
3496
3496
|
Sao.common.date_format = function(format) {
|
|
3497
|
-
|
|
3498
|
-
format
|
|
3499
|
-
if (Sao.Session.current_session) {
|
|
3500
|
-
var context = Sao.Session.current_session.context;
|
|
3501
|
-
if (context.locale && context.locale.date) {
|
|
3502
|
-
format = context.locale.date;
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
}
|
|
3506
|
-
return Sao.common.moment_format(format);
|
|
3497
|
+
return Sao.common.moment_format(
|
|
3498
|
+
format || Sao.i18n.locale.date || '%x');
|
|
3507
3499
|
};
|
|
3508
3500
|
|
|
3509
3501
|
Sao.common.format_time = function(format, date) {
|
|
@@ -17122,10 +17114,13 @@ function eval_pyson(value){
|
|
|
17122
17114
|
this.el = jQuery('<div/>', {
|
|
17123
17115
|
'class': this.class_
|
|
17124
17116
|
});
|
|
17117
|
+
this.group = jQuery('<div/>', {
|
|
17118
|
+
'class': 'input-group',
|
|
17119
|
+
}).appendTo(this.el);
|
|
17125
17120
|
this.input = this.labelled = jQuery('<textarea/>', {
|
|
17126
17121
|
'class': 'form-control input-sm mousetrap',
|
|
17127
17122
|
'name': attributes.name,
|
|
17128
|
-
}).appendTo(this.
|
|
17123
|
+
}).appendTo(this.group);
|
|
17129
17124
|
this.input.change(this.focus_out.bind(this));
|
|
17130
17125
|
this.input.on('keydown', this.send_modified.bind(this));
|
|
17131
17126
|
if (this.attributes.translate) {
|
|
@@ -17136,7 +17131,7 @@ function eval_pyson(value){
|
|
|
17136
17131
|
'title': Sao.i18n.gettext("Translate"),
|
|
17137
17132
|
}).appendTo(jQuery('<span/>', {
|
|
17138
17133
|
'class': 'input-group-btn'
|
|
17139
|
-
}).appendTo(this.
|
|
17134
|
+
}).appendTo(this.group));
|
|
17140
17135
|
button.append(
|
|
17141
17136
|
Sao.common.ICONFACTORY.get_icon_img('tryton-translate'));
|
|
17142
17137
|
button.click(this.translate.bind(this));
|
|
@@ -17212,13 +17207,16 @@ function eval_pyson(value){
|
|
|
17212
17207
|
'class': 'panel-heading',
|
|
17213
17208
|
}).appendTo(this.el));
|
|
17214
17209
|
}
|
|
17215
|
-
this.
|
|
17216
|
-
'class': '
|
|
17217
|
-
'contenteditable': true
|
|
17210
|
+
this.group = jQuery('<div/>', {
|
|
17211
|
+
'class': 'input-group',
|
|
17218
17212
|
}).appendTo(jQuery('<div/>', {
|
|
17219
|
-
'class': 'panel-body'
|
|
17213
|
+
'class': 'panel-body',
|
|
17220
17214
|
}).appendTo(this.el));
|
|
17221
|
-
this.
|
|
17215
|
+
this.input = this.labelled = jQuery('<div/>', {
|
|
17216
|
+
'class': 'richtext mousetrap',
|
|
17217
|
+
'contenteditable': true,
|
|
17218
|
+
}).appendTo(this.group);
|
|
17219
|
+
this.group.focusout(this.focus_out.bind(this));
|
|
17222
17220
|
if (this.attributes.translate) {
|
|
17223
17221
|
var button = jQuery('<button/>', {
|
|
17224
17222
|
'class': 'btn btn-default btn-sm form-control',
|
|
@@ -17227,7 +17225,7 @@ function eval_pyson(value){
|
|
|
17227
17225
|
'title': Sao.i18n.gettext("Translate"),
|
|
17228
17226
|
}).appendTo(jQuery('<span/>', {
|
|
17229
17227
|
'class': 'input-group-btn',
|
|
17230
|
-
}).appendTo(this.
|
|
17228
|
+
}).appendTo(this.group));
|
|
17231
17229
|
button.append(
|
|
17232
17230
|
Sao.common.ICONFACTORY.get_icon_img('tryton-translate'));
|
|
17233
17231
|
button.click(this.translate.bind(this));
|
|
@@ -17760,7 +17758,7 @@ function eval_pyson(value){
|
|
|
17760
17758
|
_update_completion: function(text) {
|
|
17761
17759
|
var record = this.record;
|
|
17762
17760
|
if (!record) {
|
|
17763
|
-
return;
|
|
17761
|
+
return jQuery.when();
|
|
17764
17762
|
}
|
|
17765
17763
|
var field = this.field;
|
|
17766
17764
|
var value = field.get(record);
|
|
@@ -18643,7 +18641,7 @@ function eval_pyson(value){
|
|
|
18643
18641
|
},
|
|
18644
18642
|
_update_completion: function(text) {
|
|
18645
18643
|
if (!this.record) {
|
|
18646
|
-
return;
|
|
18644
|
+
return jQuery.when();
|
|
18647
18645
|
}
|
|
18648
18646
|
var model = this.attributes.relation;
|
|
18649
18647
|
var domain = this.field.get_domain(this.record);
|
|
@@ -19029,7 +19027,7 @@ function eval_pyson(value){
|
|
|
19029
19027
|
},
|
|
19030
19028
|
_update_completion: function(text) {
|
|
19031
19029
|
if (!this.record) {
|
|
19032
|
-
return;
|
|
19030
|
+
return jQuery.when();
|
|
19033
19031
|
}
|
|
19034
19032
|
var model = this.attributes.relation;
|
|
19035
19033
|
var domain = this.field.get_domain(this.record);
|
|
@@ -19995,10 +19993,10 @@ function eval_pyson(value){
|
|
|
19995
19993
|
},
|
|
19996
19994
|
_update_completion: function(text) {
|
|
19997
19995
|
if (this.wid_text.prop('disabled')) {
|
|
19998
|
-
return;
|
|
19996
|
+
return jQuery.when();
|
|
19999
19997
|
}
|
|
20000
19998
|
if (!this.record) {
|
|
20001
|
-
return;
|
|
19999
|
+
return jQuery.when();
|
|
20002
20000
|
}
|
|
20003
20001
|
return Sao.common.update_completion(
|
|
20004
20002
|
this.wid_text, this.record, this.field, this.schema_model);
|
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -228,16 +228,8 @@
|
|
|
228
228
|
];
|
|
229
229
|
|
|
230
230
|
Sao.common.date_format = function(format) {
|
|
231
|
-
|
|
232
|
-
format
|
|
233
|
-
if (Sao.Session.current_session) {
|
|
234
|
-
var context = Sao.Session.current_session.context;
|
|
235
|
-
if (context.locale && context.locale.date) {
|
|
236
|
-
format = context.locale.date;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return Sao.common.moment_format(format);
|
|
231
|
+
return Sao.common.moment_format(
|
|
232
|
+
format || Sao.i18n.locale.date || '%x');
|
|
241
233
|
};
|
|
242
234
|
|
|
243
235
|
Sao.common.format_time = function(format, date) {
|
package/src/sao.js
CHANGED
package/src/sao.less
CHANGED
package/src/view/form.js
CHANGED
|
@@ -2323,10 +2323,13 @@ function eval_pyson(value){
|
|
|
2323
2323
|
this.el = jQuery('<div/>', {
|
|
2324
2324
|
'class': this.class_
|
|
2325
2325
|
});
|
|
2326
|
+
this.group = jQuery('<div/>', {
|
|
2327
|
+
'class': 'input-group',
|
|
2328
|
+
}).appendTo(this.el);
|
|
2326
2329
|
this.input = this.labelled = jQuery('<textarea/>', {
|
|
2327
2330
|
'class': 'form-control input-sm mousetrap',
|
|
2328
2331
|
'name': attributes.name,
|
|
2329
|
-
}).appendTo(this.
|
|
2332
|
+
}).appendTo(this.group);
|
|
2330
2333
|
this.input.change(this.focus_out.bind(this));
|
|
2331
2334
|
this.input.on('keydown', this.send_modified.bind(this));
|
|
2332
2335
|
if (this.attributes.translate) {
|
|
@@ -2337,7 +2340,7 @@ function eval_pyson(value){
|
|
|
2337
2340
|
'title': Sao.i18n.gettext("Translate"),
|
|
2338
2341
|
}).appendTo(jQuery('<span/>', {
|
|
2339
2342
|
'class': 'input-group-btn'
|
|
2340
|
-
}).appendTo(this.
|
|
2343
|
+
}).appendTo(this.group));
|
|
2341
2344
|
button.append(
|
|
2342
2345
|
Sao.common.ICONFACTORY.get_icon_img('tryton-translate'));
|
|
2343
2346
|
button.click(this.translate.bind(this));
|
|
@@ -2413,13 +2416,16 @@ function eval_pyson(value){
|
|
|
2413
2416
|
'class': 'panel-heading',
|
|
2414
2417
|
}).appendTo(this.el));
|
|
2415
2418
|
}
|
|
2416
|
-
this.
|
|
2417
|
-
'class': '
|
|
2418
|
-
'contenteditable': true
|
|
2419
|
+
this.group = jQuery('<div/>', {
|
|
2420
|
+
'class': 'input-group',
|
|
2419
2421
|
}).appendTo(jQuery('<div/>', {
|
|
2420
|
-
'class': 'panel-body'
|
|
2422
|
+
'class': 'panel-body',
|
|
2421
2423
|
}).appendTo(this.el));
|
|
2422
|
-
this.
|
|
2424
|
+
this.input = this.labelled = jQuery('<div/>', {
|
|
2425
|
+
'class': 'richtext mousetrap',
|
|
2426
|
+
'contenteditable': true,
|
|
2427
|
+
}).appendTo(this.group);
|
|
2428
|
+
this.group.focusout(this.focus_out.bind(this));
|
|
2423
2429
|
if (this.attributes.translate) {
|
|
2424
2430
|
var button = jQuery('<button/>', {
|
|
2425
2431
|
'class': 'btn btn-default btn-sm form-control',
|
|
@@ -2428,7 +2434,7 @@ function eval_pyson(value){
|
|
|
2428
2434
|
'title': Sao.i18n.gettext("Translate"),
|
|
2429
2435
|
}).appendTo(jQuery('<span/>', {
|
|
2430
2436
|
'class': 'input-group-btn',
|
|
2431
|
-
}).appendTo(this.
|
|
2437
|
+
}).appendTo(this.group));
|
|
2432
2438
|
button.append(
|
|
2433
2439
|
Sao.common.ICONFACTORY.get_icon_img('tryton-translate'));
|
|
2434
2440
|
button.click(this.translate.bind(this));
|
|
@@ -2961,7 +2967,7 @@ function eval_pyson(value){
|
|
|
2961
2967
|
_update_completion: function(text) {
|
|
2962
2968
|
var record = this.record;
|
|
2963
2969
|
if (!record) {
|
|
2964
|
-
return;
|
|
2970
|
+
return jQuery.when();
|
|
2965
2971
|
}
|
|
2966
2972
|
var field = this.field;
|
|
2967
2973
|
var value = field.get(record);
|
|
@@ -3844,7 +3850,7 @@ function eval_pyson(value){
|
|
|
3844
3850
|
},
|
|
3845
3851
|
_update_completion: function(text) {
|
|
3846
3852
|
if (!this.record) {
|
|
3847
|
-
return;
|
|
3853
|
+
return jQuery.when();
|
|
3848
3854
|
}
|
|
3849
3855
|
var model = this.attributes.relation;
|
|
3850
3856
|
var domain = this.field.get_domain(this.record);
|
|
@@ -4230,7 +4236,7 @@ function eval_pyson(value){
|
|
|
4230
4236
|
},
|
|
4231
4237
|
_update_completion: function(text) {
|
|
4232
4238
|
if (!this.record) {
|
|
4233
|
-
return;
|
|
4239
|
+
return jQuery.when();
|
|
4234
4240
|
}
|
|
4235
4241
|
var model = this.attributes.relation;
|
|
4236
4242
|
var domain = this.field.get_domain(this.record);
|
|
@@ -5196,10 +5202,10 @@ function eval_pyson(value){
|
|
|
5196
5202
|
},
|
|
5197
5203
|
_update_completion: function(text) {
|
|
5198
5204
|
if (this.wid_text.prop('disabled')) {
|
|
5199
|
-
return;
|
|
5205
|
+
return jQuery.when();
|
|
5200
5206
|
}
|
|
5201
5207
|
if (!this.record) {
|
|
5202
|
-
return;
|
|
5208
|
+
return jQuery.when();
|
|
5203
5209
|
}
|
|
5204
5210
|
return Sao.common.update_completion(
|
|
5205
5211
|
this.wid_text, this.record, this.field, this.schema_model);
|