Reverted change to discrete instead of anchored URL in Comment prototype; the side effect of having to reload the page e.g. with each click on a comment link in the history is not bearable.

This commit is contained in:
Tobi Schäfer 2008-05-12 12:10:11 +00:00
parent c02f667a55
commit 6994642a0a

View file

@ -58,8 +58,18 @@ Comment.prototype.getPermission = function(action) {
return false;
}
Comment.prototype.main_action = function() {
return res.redirect(this.story.href() + "#" + this._id);
Comment.prototype.href = function(action) {
var buffer = [];
switch (action) {
case "":
case ".":
case "main":
buffer.push(this.story.href(), "#", this._id);
break;
default:
buffer.push(this.story.comments.href(), this._id, "/", action);
}
return buffer.join(String.EMPTY);
}
Comment.prototype.edit_action = function() {