|
|
@ -143,7 +143,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var callPoint = function (inst, type) { |
|
|
|
var callPoint = function (inst, types) { |
|
|
|
|
|
|
|
types = BI.isArray(types) ? types : [types]; |
|
|
|
|
|
|
|
BI.each(types, function (idx, type) { |
|
|
|
if (points[type]) { |
|
|
|
if (points[type]) { |
|
|
|
for (var action in points[type]) { |
|
|
|
for (var action in points[type]) { |
|
|
|
var bfns = points[type][action].before; |
|
|
|
var bfns = points[type][action].before; |
|
|
@ -176,12 +178,14 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BI.Models = { |
|
|
|
BI.Models = { |
|
|
|
getModel: function (type, config) { |
|
|
|
getModel: function (type, config) { |
|
|
|
var inst = new modelInjection[type](config); |
|
|
|
var inst = new modelInjection[type](config); |
|
|
|
inst._constructor && inst._constructor(config); |
|
|
|
inst._constructor && inst._constructor(config); |
|
|
|
|
|
|
|
inst.mixins && callPoint(inst, inst.mixins); |
|
|
|
callPoint(inst, type); |
|
|
|
callPoint(inst, type); |
|
|
|
return inst; |
|
|
|
return inst; |
|
|
|
} |
|
|
|
} |
|
|
|