Many fixes

New ownCloud package with a built-in webmail
This commit is contained in:
RainLoop Team 2015-02-12 01:39:27 +04:00
parent 323dd34c8b
commit 6116597f6f
56 changed files with 1137 additions and 232 deletions

View file

@ -28,12 +28,24 @@
*/
Events.prototype.sub = function (sName, fFunc, oContext)
{
if (Utils.isUnd(this.oSubs[sName]))
if (Utils.isObject(sName))
{
this.oSubs[sName] = [];
}
oContext = fFunc || null;
fFunc = null;
this.oSubs[sName].push([fFunc, oContext]);
_.each(sName, function (fSubFunc, sSubName) {
this.sub(sSubName, fSubFunc, oContext);
}, this);
}
else
{
if (Utils.isUnd(this.oSubs[sName]))
{
this.oSubs[sName] = [];
}
this.oSubs[sName].push([fFunc, oContext]);
}
return this;
};