mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: add parent link to widgets in ContainerMixin
Standard facets sets `facet` attribute to widgets. This one adds similar, more generic `parent` attribute which should be used for going through the hierarchy up to top. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
parent
86898065b5
commit
6f5e80b0ce
@ -5747,6 +5747,7 @@ exp.activity_widget = IPA.activity_widget = function(spec) {
|
||||
exp.pre_op = function(spec, context) {
|
||||
|
||||
if (context.facet) spec.facet = context.facet;
|
||||
if (context.parent) spec.parent = context.parent;
|
||||
if (context.entity) spec.entity = context.entity;
|
||||
return spec;
|
||||
};
|
||||
|
@ -147,6 +147,8 @@ define(['dojo/_base/declare',
|
||||
this.widgets = ordered_map();
|
||||
var builder_spec = spec.widget_builder || widget_mod.widget_builder;
|
||||
this.widget_builder = builder.build(null, builder_spec);
|
||||
this.widget_builder.widget_options = this.widget_builder.widget_options || {};
|
||||
this.widget_builder.widget_options.parent = this;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user