Builder: allow to use custom factory/ctor when using type

https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
Petr Vobornik
2013-04-12 17:25:24 +02:00
parent 952234ef79
commit 1d802d12a4

View File

@@ -158,15 +158,7 @@ define(['dojo/_base/declare',
delete s.$pre_ops;
delete s.$post_ops;
if (c) {
cs.ctor = c;
cs.spec = s;
}
else if (f) {
cs.factory = f;
cs.spec = s;
}
else if (t) {
if (t) {
cs = this._query_registry(t);
if (cs.spec && m) {
lang.mixin(cs.spec, s);
@@ -177,6 +169,9 @@ define(['dojo/_base/declare',
cs.spec = s;
}
if (c) cs.ctor = c;
if (f) cs.factory = f;
cs.pre_ops = cs.pre_ops || [];
cs.post_ops = cs.post_ops || [];
if (pre) cs.pre_ops.push.call(cs.pre_ops, pre);