changeset 15149d6981b1 in sao:5.8
details: https://hg.tryton.org/sao?cmd=changeset&node=15149d6981b1
description:
Do not remove disabled property after button execution
We must let the display of the screen reset the state of the button.
issue10922
review391061002
(grafted from 0b692f8ac30864b7ec75bf542909fc4b5ea81dcf)
diffstat:
src/view/form.js | 6 ++----
src/view/tree.js | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diffs (32 lines):
diff -r 428ac4428b40 -r 15149d6981b1 src/view/form.js
--- a/src/view/form.js Sun Oct 31 10:22:22 2021 +0100
+++ b/src/view/form.js Sun Oct 31 10:24:32 2021 +0100
@@ -340,10 +340,8 @@
},
button_clicked: function(event) {
var button = event.data;
- button.el.prop('disabled', true);
- this.screen.button(button.attributes).always(function() {
- button.el.prop('disabled', false);
- });
+ button.el.prop('disabled', true); // state will be reset at
display
+ this.screen.button(button.attributes);
},
get selected_records() {
if (this.record) {
diff -r 428ac4428b40 -r 15149d6981b1 src/view/tree.js
--- a/src/view/tree.js Sun Oct 31 10:22:22 2021 +0100
+++ b/src/view/tree.js Sun Oct 31 10:24:32 2021 +0100
@@ -2553,10 +2553,8 @@
if (states.invisible || states.readonly) {
return;
}
- button.el.prop('disabled', true);
- this.view.screen.button(this.attributes).always(function() {
- button.el.prop('disabled', false);
- });
+ button.el.prop('disabled', true); // state will be reset at
display
+ this.view.screen.button(this.attributes);
}
});