Translated the permalink formatter into JS for the Ajax updates.

parent 6fee5ad6
......@@ -62,6 +62,7 @@ module.exports = (app) ->
# This should never happen and probably shows that some sort of corrupted date got through somehow.
return 'No date.'
# Permanent link formatter
permanentLinkFormatter = (messageID) ->
......
......@@ -213,6 +213,16 @@ function getOlderMessages(){
// }
}
// Permanent link formatter
set.format['permanentLinkFormatter'] = function (messageID) {
// Get the person handle
var personHandleDelimeter = messageID.lastIndexOf('Z-');
var personHandle = messageID.substr(personHandleDelimeter+2);
return '/person/' + personHandle + '/post/' + messageID
}
// Update the repeater node
set(repeaterNode, {messages: posts})
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment