Set _readonly attribute on all widgets
issue10239 review358011003
This commit is contained in:
1 parent
827a6b2e00
commit
4b36e5bec7
1 file changed
+13
-4
+13
-4
@@ -1216,7 +1216,6 @@ function eval_pyson(value){
|
||||
},
|
||||
set_readonly: function(readonly) {
|
||||
this._readonly = readonly;
|
||||
this.el.prop('disabled', readonly);
|
||||
},
|
||||
set_required: function(required) {
|
||||
},
|
||||
@@ -1537,6 +1536,7 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
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 @@ function eval_pyson(value){
|
||||
}.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 @@ function eval_pyson(value){
|
||||
}
|
||||
},
|
||||
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 @@ function eval_pyson(value){
|
||||
}
|
||||
},
|
||||
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 @@ function eval_pyson(value){
|
||||
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];
|
||||
|
||||
Reference in new issue
Block a user