Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ind.ie Projects
Waystone
Commits
045cd271
Unverified
Commit
045cd271
authored
Sep 08, 2015
by
Aral Balkan
Browse files
Translated the permalink formatter into JS for the Ajax updates.
parent
6fee5ad6
Changes
2
Hide whitespace changes
Inline
Side-by-side
routes/public/public.coffee
View file @
045cd271
...
...
@@ -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
)
->
...
...
static/js/public.js
View file @
045cd271
...
...
@@ -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
})
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment