changeset f53aad05ec58 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=f53aad05ec58
description:
Set _readonly attribute on all widgets
issue10239
review358011003
diffstat:
src/view/form.js | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diffs (118 lines):
diff -r 70649b570880 -r f53aad05ec58 src/view/form.js
--- a/src/view/form.js Fri Apr 30 13:29:22 2021 +0200
+++ b/src/view/form.js Fri Apr 30 13:46:02 2021 +0200
@@ -1216,7 +1216,6 @@
},
set_readonly: function(readonly) {
this._readonly = readonly;
- this.el.prop('disabled', readonly);
},
set_required: function(required) {
},
@@ -1537,6 +1536,7 @@
return this.input.val();
},
set_readonly: function(readonly) {
+ Sao.View.Form.Char._super.set_readonly.call(this, readonly);
this.input.prop('readonly', readonly);
},
focus: function() {
@@ -1700,6 +1700,7 @@
this.field.set_client(this.record, this.get_value());
},
set_readonly: function(readonly) {
+ Sao.View.Form.Date._super.set_readonly.call(this, readonly);
this.date.find('button').prop('disabled', readonly);
this.date.find('input').prop('readonly', readonly);
}
@@ -1785,6 +1786,7 @@
this.field.set_client(this.record, this.input.val());
},
set_readonly: function(readonly) {
+ Sao.View.Form.TimeDelta._super.set_readonly.call(this, readonly);
this.input.prop('readonly', readonly);
}
});
@@ -2064,6 +2066,7 @@
this.field.set_client(this.record, value);
},
set_readonly: function(readonly) {
+ Sao.View.Form.Selection._super.set_readonly.call(this, readonly);
this.select.prop('disabled', readonly);
}
});
@@ -2104,6 +2107,7 @@
this.field.set_client(this.record, value);
},
set_readonly: function(readonly) {
+ Sao.View.Form.Boolean._super.set_readonly.call(this, readonly);
this.input.prop('readonly', readonly);
}
});
@@ -2166,6 +2170,7 @@
this.field.set_client(this.record, this.get_value());
},
set_readonly: function(readonly) {
+ Sao.View.Form.Text._super.set_readonly.call(this, readonly);
this.input.prop('readonly', readonly);
},
translate_widget: function() {
@@ -2262,6 +2267,7 @@
return false;
},
set_readonly: function(readonly) {
+ Sao.View.Form.RichText._super.set_readonly.call(this, readonly);
this.input.prop('contenteditable', !readonly);
if (this.toolbar) {
this.toolbar.find('button,input,select')
@@ -2460,6 +2466,7 @@
this.entry.focus();
},
set_readonly: function(readonly) {
+ Sao.View.Form.Many2One._super.set_readonly.call(this, readonly);
this._readonly = readonly;
this._set_button_sensitive();
},
@@ -3111,7 +3118,7 @@
return this.screen.current_view.modified;
},
set_readonly: function(readonly) {
- this._readonly = readonly;
+ Sao.View.Form.One2Many._super.set_readonly.call(this, readonly);
this._set_button_sensitive();
this._set_label_state();
},
@@ -3623,7 +3630,7 @@
}.bind(this));
},
set_readonly: function(readonly) {
- this._readonly = readonly;
+ Sao.View.Form.Many2Many._super.set_readonly.call(this, readonly);
this._set_button_sensitive();
this._set_label_state();
},
@@ -4029,6 +4036,7 @@
}
},
set_readonly: function(readonly) {
+ Sao.View.Form.Binary._super.set_readonly.call(this, readonly);
this.but_select.prop('disabled', readonly);
this.but_clear.prop('disabled', readonly);
if (this.text) {
@@ -4122,6 +4130,7 @@
}
},
set_readonly: function(readonly) {
+ Sao.View.Form.Image._super.set_readonly.call(this, readonly);
this.but_select.prop('disable', readonly);
this.but_clear.prop('disable', readonly);
},
@@ -4550,7 +4559,7 @@
return false;
},
set_readonly: function(readonly) {
- this._readonly = readonly;
+ Sao.View.Form.Dict._super.set_readonly.call(this, readonly);
this._set_button_sensitive();
for (var key in this.fields) {
var widget = this.fields[key];