ui: fix production build only empty role modal (#5806)
Adds the ability for multiple components to use the same dom buffer
This commit is contained in:
parent
211545f94e
commit
c50ca4f02c
|
@ -11,12 +11,17 @@ export default Service.extend(Evented, {
|
|||
},
|
||||
add: function(name, dom) {
|
||||
this.trigger('add', dom);
|
||||
buffer[name] = dom;
|
||||
if (typeof buffer[name] === 'undefined') {
|
||||
buffer[name] = [];
|
||||
}
|
||||
buffer[name].push(dom);
|
||||
return dom;
|
||||
},
|
||||
remove: function(name) {
|
||||
if (typeof buffer[name] !== 'undefined') {
|
||||
buffer[name].remove();
|
||||
buffer[name].forEach(function(item) {
|
||||
item.remove();
|
||||
});
|
||||
delete buffer[name];
|
||||
}
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{/block-slot}}
|
||||
{{#block-slot 'body'}}
|
||||
|
||||
<input id="{{name}}_state_role" type="radio" name="{{name}}[state]" value="role" checked={{eq state 'role'}} onchange={{action 'change'}} />
|
||||
<input id="{{name}}_state_role" type="radio" name="{{name}}[state]" value="role" checked={{if (eq state 'role') 'checked'}} onchange={{action 'change'}} />
|
||||
{{#role-form form=form dc=dc}}
|
||||
{{#block-slot 'policy'}}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
{{/block-slot}}
|
||||
{{/role-form}}
|
||||
|
||||
<input id="{{name}}_state_policy" type="radio" name="{{name}}[state]" value="policy" checked={{eq state 'policy'}} onchange={{action 'change'}} />
|
||||
<input id="{{name}}_state_policy" type="radio" name="{{name}}[state]" value="policy" checked={{if (eq state 'policy') 'checked'}} onchange={{action 'change'}} />
|
||||
{{policy-form data-test-policy-form name="role[policy]" form=policyForm dc=dc}}
|
||||
|
||||
{{/block-slot}}
|
||||
|
|
Loading…
Reference in a new issue