changeset 0b692f8ac308 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=0b692f8ac308
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
diffstat:
src/view/form.js | 6 ++----
src/view/tree.js | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diffs (32 lines):
diff -r 08e998097055 -r 0b692f8ac308 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
@@ -393,10 +393,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 08e998097055 -r 0b692f8ac308 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
@@ -2707,10 +2707,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);
}
});