mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
Implement legacy options
This commit is contained in:
@@ -47,9 +47,15 @@ var et2_checkbox = et2_inputWidget.extend({
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "What should be displayed when readonly and not selected"
|
"description": "What should be displayed when readonly and not selected"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
// Stop framework from messing with value
|
||||||
|
"type": "any"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
legacyOptions: ["selected_value", "unselected_value", "ro_true", "ro_false"],
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
@@ -73,7 +79,8 @@ var et2_checkbox = et2_inputWidget.extend({
|
|||||||
*/
|
*/
|
||||||
set_value: function(_value) {
|
set_value: function(_value) {
|
||||||
if(_value != this.value) {
|
if(_value != this.value) {
|
||||||
if(_value == this.options.selected_value) {
|
if(_value == this.options.selected_value ||
|
||||||
|
_value && this.options.selected_value == this.__proto__.attributes.selected_value["default"]) {
|
||||||
this.input.attr("checked", "checked");
|
this.input.attr("checked", "checked");
|
||||||
} else {
|
} else {
|
||||||
this.input.removeAttr("checked");
|
this.input.removeAttr("checked");
|
||||||
|
Reference in New Issue
Block a user