|
|
@ -4804,7 +4804,8 @@ _.extend(BI.OB.prototype, { |
|
|
|
for (var action in points[type]) { |
|
|
|
for (var action in points[type]) { |
|
|
|
var bfns = points[type][action].before; |
|
|
|
var bfns = points[type][action].before; |
|
|
|
if (bfns) { |
|
|
|
if (bfns) { |
|
|
|
BI.aspect.before(inst, action, function () { |
|
|
|
BI.aspect.before(inst, action, function (bfns) { |
|
|
|
|
|
|
|
return function () { |
|
|
|
for (var i = 0, len = bfns.length; i < len; i++) { |
|
|
|
for (var i = 0, len = bfns.length; i < len; i++) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
bfns[i].apply(inst, arguments); |
|
|
|
bfns[i].apply(inst, arguments); |
|
|
@ -4812,11 +4813,13 @@ _.extend(BI.OB.prototype, { |
|
|
|
console.error(e); |
|
|
|
console.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
}(bfns)); |
|
|
|
} |
|
|
|
} |
|
|
|
var afns = points[type][action].after; |
|
|
|
var afns = points[type][action].after; |
|
|
|
if (afns) { |
|
|
|
if (afns) { |
|
|
|
BI.aspect.after(inst, action, function () { |
|
|
|
BI.aspect.after(inst, action, function (afns) { |
|
|
|
|
|
|
|
return function () { |
|
|
|
for (var i = 0, len = afns.length; i < len; i++) { |
|
|
|
for (var i = 0, len = afns.length; i < len; i++) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
afns[i].apply(inst, arguments); |
|
|
|
afns[i].apply(inst, arguments); |
|
|
@ -4824,7 +4827,8 @@ _.extend(BI.OB.prototype, { |
|
|
|
console.error(e); |
|
|
|
console.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}(afns)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|