tryton-sao 5.0.50 → 5.0.51
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 +3 -0
- package/dist/tryton-sao.js +18 -8
- package/dist/tryton-sao.min.js +11 -11
- package/package.json +1 -1
- package/src/common.js +2 -2
- package/src/pyson.js +7 -3
- package/src/rpc.js +1 -1
- package/src/tab.js +8 -2
- package/tests/sao.js +6 -0
package/CHANGELOG
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -1187,7 +1187,7 @@ var Sao = {};
|
|
|
1187
1187
|
name = data.error[1][0];
|
|
1188
1188
|
msg = data.error[1][1];
|
|
1189
1189
|
description = data.error[1][2];
|
|
1190
|
-
Sao.common.userwarning.run(
|
|
1190
|
+
Sao.common.userwarning.run(description, msg)
|
|
1191
1191
|
.then(function(result) {
|
|
1192
1192
|
if (!~['always', 'ok'].indexOf(result)) {
|
|
1193
1193
|
dfd.reject();
|
|
@@ -2072,10 +2072,14 @@ var Sao = {};
|
|
|
2072
2072
|
});
|
|
2073
2073
|
|
|
2074
2074
|
Sao.PYSON.In.eval_ = function(value, context) {
|
|
2075
|
-
if (value.v
|
|
2076
|
-
|
|
2075
|
+
if (value.v) {
|
|
2076
|
+
if (value.v.indexOf) {
|
|
2077
|
+
return Boolean(~value.v.indexOf(value.k));
|
|
2078
|
+
} else {
|
|
2079
|
+
return !!value.v[value.k];
|
|
2080
|
+
}
|
|
2077
2081
|
} else {
|
|
2078
|
-
return
|
|
2082
|
+
return false;
|
|
2079
2083
|
}
|
|
2080
2084
|
};
|
|
2081
2085
|
Sao.PYSON.In.init_from_object = function(obj) {
|
|
@@ -5586,10 +5590,16 @@ var Sao = {};
|
|
|
5586
5590
|
this.buttons[item.id].click(item, function(event) {
|
|
5587
5591
|
var item = event.data;
|
|
5588
5592
|
var button = this.buttons[item.id];
|
|
5589
|
-
|
|
5593
|
+
// Use data instead of disabled prop because the action may
|
|
5594
|
+
// actually disable the button.
|
|
5595
|
+
if (button.data('disabled')) {
|
|
5596
|
+
event.preventDefault();
|
|
5597
|
+
return;
|
|
5598
|
+
}
|
|
5599
|
+
button.data('disabled', true);
|
|
5590
5600
|
(this[item.id](this) || jQuery.when())
|
|
5591
5601
|
.always(function() {
|
|
5592
|
-
button.
|
|
5602
|
+
button.data('disabled', false);
|
|
5593
5603
|
});
|
|
5594
5604
|
}.bind(this));
|
|
5595
5605
|
};
|
|
@@ -19399,8 +19409,8 @@ function eval_pyson(value){
|
|
|
19399
19409
|
dialog.body.append(jQuery('<div/>', {
|
|
19400
19410
|
'class': 'checkbox',
|
|
19401
19411
|
}).append(jQuery('<label/>')
|
|
19402
|
-
.
|
|
19403
|
-
.
|
|
19412
|
+
.text(Sao.i18n.gettext("Always ignore this warning."))
|
|
19413
|
+
.prepend(always))
|
|
19404
19414
|
);
|
|
19405
19415
|
dialog.body.append(jQuery('<p/>')
|
|
19406
19416
|
.text(Sao.i18n.gettext('Do you want to proceed?')));
|