summaryrefslogtreecommitdiff
path: root/src/node/db/Pad.js
diff options
context:
space:
mode:
authord-a-n <in@db.to>2012-10-03 13:41:40 +0300
committerd-a-n <in@db.to>2012-10-03 13:41:40 +0300
commit358e4817310eceec8df664f3c428ba0afdc430dc (patch)
treef17e64ab758ac88d24b9b365206f118f96e678a8 /src/node/db/Pad.js
parent754c559d632c08be58f06c3eedb3a9494c51dedf (diff)
downloadetherpad-lite-358e4817310eceec8df664f3c428ba0afdc430dc.zip
Changed pad hook names to follow naming conventions. Arguments will now be passed as hash.
Diffstat (limited to 'src/node/db/Pad.js')
-rw-r--r--src/node/db/Pad.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js
index cf04f9bc..d6ea8277 100644
--- a/src/node/db/Pad.js
+++ b/src/node/db/Pad.js
@@ -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)