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:
parent
c02f667a55
commit
6994642a0a
1 changed files with 12 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue