Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
bd6dfe7d
Commit
bd6dfe7d
authored
May 24, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect newlines for wall messages
parent
76ffd116
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
app/assets/javascripts/main.js.coffee
app/assets/javascripts/main.js.coffee
+3
-0
app/assets/javascripts/wall.js.coffee
app/assets/javascripts/wall.js.coffee
+1
-1
No files found.
app/assets/javascripts/main.js.coffee
View file @
bd6dfe7d
...
...
@@ -41,6 +41,9 @@ window.linkify = (str) ->
exp
=
/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
return
str
.
replace
(
exp
,
"<a href='$1'>$1</a>"
)
window
.
simpleFormat
=
(
str
)
->
linkify
(
sanitize
(
str
).
replace
(
/\n/g
,
'<br />'
))
window
.
startSpinner
=
->
$
(
'.turbolink-spinner'
).
fadeIn
()
...
...
app/assets/javascripts/wall.js.coffee
View file @
bd6dfe7d
...
...
@@ -61,7 +61,7 @@ class Wall
template
=
@
noteTemplate
()
template
=
template
.
replace
(
'{{author_name}}'
,
note
.
author
.
name
)
template
=
template
.
replace
(
/{{created_at}}/g
,
note
.
created_at
)
template
=
template
.
replace
(
'{{text}}'
,
linkify
(
sanitize
(
note
.
body
)
))
template
=
template
.
replace
(
'{{text}}'
,
simpleFormat
(
note
.
body
))
if
note
.
attachment
file
=
'<i class="icon-paper-clip"/><a href="/files/note/'
+
note
.
id
+
'/'
+
note
.
attachment
+
'">'
+
note
.
attachment
+
'</a>'
...
...
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