mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: widget initialization
- used `ctor_init` instead of `init` to avoid name collision with existing logic - `ctor_init` is called right after widget instantiation. Basically support better inheritance for the old class system which doesn't have proper contructors https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
parent
01a8175119
commit
1f13e56ac6
@ -212,6 +212,14 @@ IPA.widget = function(spec) {
|
||||
that.clear = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Widget post constructor/factory initialization
|
||||
*
|
||||
* Called by builder by default.
|
||||
*/
|
||||
that.ctor_init = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Set enabled state.
|
||||
* @param {boolean} value - True - enabled; False - disabled
|
||||
@ -5998,6 +6006,7 @@ exp.post_op = function(obj, spec, context) {
|
||||
nc.container = obj.widgets;
|
||||
builder.build('widget', spec.widgets, nc);
|
||||
}
|
||||
if (obj.ctor_init) obj.ctor_init();
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user