Changed pad hook names to follow naming conventions. Arguments will now be passed as hash.

This commit is contained in:
d-a-n 2012-10-03 13:41:40 +03:00
parent 754c559d63
commit 358e481731
1 changed files with 4 additions and 4 deletions

View File

@ -89,9 +89,9 @@ Pad.prototype.appendRevision = function appendRevision(aChangeset, author) {
authorManager.addPad(author, this.id);
if (this.head == 0) {
hooks.callAll("padCreated", this);
hooks.callAll("padCreate", {'pad':this});
} else {
hooks.callAll("padUpdated", this);
hooks.callAll("padUpdate", {'pad':this});
}
};
@ -375,7 +375,7 @@ Pad.prototype.init = function init(text, callback) {
_this.appendRevision(firstChangeset, '');
}
hooks.callAll("padLoaded", _this);
hooks.callAll("padLoad", {'pad':_this});
callback(null);
});
};
@ -475,7 +475,7 @@ Pad.prototype.remove = function remove(callback) {
{
db.remove("pad:"+padID);
padManager.unloadPad(padID);
hooks.callAll("padRemoved", padID );
hooks.callAll("padRemove", {'pad_id':padID});
callback();
}
], function(err)