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 CHANGED
@@ -1,3 +1,6 @@
1
+ Version 5.0.51 - 2022-04-15
2
+ * Bug fixes (see mercurial logs for details)
3
+
1
4
  Version 5.0.50 - 2022-03-01
2
5
  * Bug fixes (see mercurial logs for details)
3
6
 
@@ -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(msg, description)
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.indexOf) {
2076
- return Boolean(~value.v.indexOf(value.k));
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 !!value.v[value.k];
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
- button.prop('disabled', true);
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.prop('disabled', false);
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
- .append(always)
19403
- .text(Sao.i18n.gettext('Always ignore this warning.')))
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?')));