guy 7 years ago
parent
commit
6aa0a08006
  1. 56
      dist/bundle.js
  2. 84
      dist/bundle.min.js
  3. 56
      dist/core.js
  4. 56
      dist/fineui.js
  5. 84
      dist/fineui.min.js
  6. 56
      src/core/inject.js
  7. 58
      utils/utils.js

56
dist/bundle.js vendored

@ -20327,15 +20327,45 @@ BI.extend(BI.DOM, {
}; };
}; };
BI.Constants = { var points = {};
getConstant: function (type) { BI.point = function (type, action, pointFn, after) {
return constantInjection[type]; if (!points[type]) {
points[type] = {};
} }
if (!points[type][action]) {
points[type][action] = {};
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
}; };
var callPoint = function (inst, type) {
if (points[type]) {
for (var action in points[type]) {
var fns = points[type][action].before;
if (fns) {
BI.aspect.before(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
fns = points[type][action].after;
if (fns) {
BI.aspect.after(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
}
}
};
BI.Models = { BI.Models = {
getModel: function (type, config) { getModel: function (type, config) {
return new modelInjection[type](config); var inst = new modelInjection[type](config);
callPoint(inst, type);
return inst;
} }
}; };
@ -20346,10 +20376,9 @@ BI.extend(BI.DOM, {
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
} }
return stores[type] = new storeInjection[type](config); stores[type] = new storeInjection[type](config);
}, callPoint(stores[type], type);
releaseStore: function (type) { return stores[type];
delete stores[type];
} }
}; };
@ -20360,10 +20389,9 @@ BI.extend(BI.DOM, {
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
} }
return services[type] = new serviceInjection[type](config); services[type] = new serviceInjection[type](config);
}, callPoint(services[type], type);
releaseService: function (type) { return services[type];
delete services[type];
} }
}; };
@ -20378,10 +20406,6 @@ BI.extend(BI.DOM, {
providerInstance[type] = new providers[type].$get()(config); providerInstance[type] = new providers[type].$get()(config);
} }
return providerInstance[type]; return providerInstance[type];
},
releaseProvider: function (type) {
delete providers[type];
delete providerInstance[type];
} }
}; };

84
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

56
dist/core.js vendored

@ -20327,15 +20327,45 @@ BI.extend(BI.DOM, {
}; };
}; };
BI.Constants = { var points = {};
getConstant: function (type) { BI.point = function (type, action, pointFn, after) {
return constantInjection[type]; if (!points[type]) {
points[type] = {};
} }
if (!points[type][action]) {
points[type][action] = {};
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
}; };
var callPoint = function (inst, type) {
if (points[type]) {
for (var action in points[type]) {
var fns = points[type][action].before;
if (fns) {
BI.aspect.before(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
fns = points[type][action].after;
if (fns) {
BI.aspect.after(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
}
}
};
BI.Models = { BI.Models = {
getModel: function (type, config) { getModel: function (type, config) {
return new modelInjection[type](config); var inst = new modelInjection[type](config);
callPoint(inst, type);
return inst;
} }
}; };
@ -20346,10 +20376,9 @@ BI.extend(BI.DOM, {
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
} }
return stores[type] = new storeInjection[type](config); stores[type] = new storeInjection[type](config);
}, callPoint(stores[type], type);
releaseStore: function (type) { return stores[type];
delete stores[type];
} }
}; };
@ -20360,10 +20389,9 @@ BI.extend(BI.DOM, {
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
} }
return services[type] = new serviceInjection[type](config); services[type] = new serviceInjection[type](config);
}, callPoint(services[type], type);
releaseService: function (type) { return services[type];
delete services[type];
} }
}; };
@ -20378,10 +20406,6 @@ BI.extend(BI.DOM, {
providerInstance[type] = new providers[type].$get()(config); providerInstance[type] = new providers[type].$get()(config);
} }
return providerInstance[type]; return providerInstance[type];
},
releaseProvider: function (type) {
delete providers[type];
delete providerInstance[type];
} }
}; };

56
dist/fineui.js vendored

@ -20528,15 +20528,45 @@ BI.extend(BI.DOM, {
}; };
}; };
BI.Constants = { var points = {};
getConstant: function (type) { BI.point = function (type, action, pointFn, after) {
return constantInjection[type]; if (!points[type]) {
points[type] = {};
} }
if (!points[type][action]) {
points[type][action] = {};
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
}; };
var callPoint = function (inst, type) {
if (points[type]) {
for (var action in points[type]) {
var fns = points[type][action].before;
if (fns) {
BI.aspect.before(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
fns = points[type][action].after;
if (fns) {
BI.aspect.after(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
}
}
};
BI.Models = { BI.Models = {
getModel: function (type, config) { getModel: function (type, config) {
return new modelInjection[type](config); var inst = new modelInjection[type](config);
callPoint(inst, type);
return inst;
} }
}; };
@ -20547,10 +20577,9 @@ BI.extend(BI.DOM, {
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
} }
return stores[type] = new storeInjection[type](config); stores[type] = new storeInjection[type](config);
}, callPoint(stores[type], type);
releaseStore: function (type) { return stores[type];
delete stores[type];
} }
}; };
@ -20561,10 +20590,9 @@ BI.extend(BI.DOM, {
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
} }
return services[type] = new serviceInjection[type](config); services[type] = new serviceInjection[type](config);
}, callPoint(services[type], type);
releaseService: function (type) { return services[type];
delete services[type];
} }
}; };
@ -20579,10 +20607,6 @@ BI.extend(BI.DOM, {
providerInstance[type] = new providers[type].$get()(config); providerInstance[type] = new providers[type].$get()(config);
} }
return providerInstance[type]; return providerInstance[type];
},
releaseProvider: function (type) {
delete providers[type];
delete providerInstance[type];
} }
}; };

84
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

56
src/core/inject.js

@ -66,15 +66,45 @@
}; };
}; };
BI.Constants = { var points = {};
getConstant: function (type) { BI.point = function (type, action, pointFn, after) {
return constantInjection[type]; if (!points[type]) {
points[type] = {};
} }
if (!points[type][action]) {
points[type][action] = {};
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
}; };
var callPoint = function (inst, type) {
if (points[type]) {
for (var action in points[type]) {
var fns = points[type][action].before;
if (fns) {
BI.aspect.before(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
fns = points[type][action].after;
if (fns) {
BI.aspect.after(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
}
}
};
BI.Models = { BI.Models = {
getModel: function (type, config) { getModel: function (type, config) {
return new modelInjection[type](config); var inst = new modelInjection[type](config);
callPoint(inst, type);
return inst;
} }
}; };
@ -85,10 +115,9 @@
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
} }
return stores[type] = new storeInjection[type](config); stores[type] = new storeInjection[type](config);
}, callPoint(stores[type], type);
releaseStore: function (type) { return stores[type];
delete stores[type];
} }
}; };
@ -99,10 +128,9 @@
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
} }
return services[type] = new serviceInjection[type](config); services[type] = new serviceInjection[type](config);
}, callPoint(services[type], type);
releaseService: function (type) { return services[type];
delete services[type];
} }
}; };
@ -117,10 +145,6 @@
providerInstance[type] = new providers[type].$get()(config); providerInstance[type] = new providers[type].$get()(config);
} }
return providerInstance[type]; return providerInstance[type];
},
releaseProvider: function (type) {
delete providers[type];
delete providerInstance[type];
} }
}; };

58
utils/utils.js

@ -4217,15 +4217,45 @@ _.extend(BI.OB.prototype, {
}; };
}; };
BI.Constants = { var points = {};
getConstant: function (type) { BI.point = function (type, action, pointFn, after) {
return constantInjection[type]; if (!points[type]) {
points[type] = {};
}
if (!points[type][action]) {
points[type][action] = {};
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
};
var callPoint = function (inst, type) {
if (points[type]) {
for (var action in points[type]) {
var fns = points[type][action].before;
if (fns) {
BI.aspect.before(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
fns = points[type][action].after;
if (fns) {
BI.aspect.after(inst, action, function () {
for (var i = 0, len = fns.length; i < len; i++) {
fns[i].apply(inst, arguments);
}
});
}
}
} }
}; };
BI.Models = { BI.Models = {
getModel: function (type, config) { getModel: function (type, config) {
return new modelInjection[type](config); var inst = new modelInjection[type](config);
callPoint(inst, type);
return inst;
} }
}; };
@ -4236,10 +4266,9 @@ _.extend(BI.OB.prototype, {
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
} }
return stores[type] = new storeInjection[type](config); stores[type] = new storeInjection[type](config);
}, callPoint(stores[type], type);
releaseStore: function (type) { return stores[type];
delete stores[type];
} }
}; };
@ -4250,10 +4279,9 @@ _.extend(BI.OB.prototype, {
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
} }
return services[type] = new serviceInjection[type](config); services[type] = new serviceInjection[type](config);
}, callPoint(services[type], type);
releaseService: function (type) { return services[type];
delete services[type];
} }
}; };
@ -4268,10 +4296,6 @@ _.extend(BI.OB.prototype, {
providerInstance[type] = new providers[type].$get()(config); providerInstance[type] = new providers[type].$get()(config);
} }
return providerInstance[type]; return providerInstance[type];
},
releaseProvider: function (type) {
delete providers[type];
delete providerInstance[type];
} }
}; };

Loading…
Cancel
Save