autolink chat messages

This commit is contained in:
Henry Oswald 2015-02-07 16:15:33 +00:00
parent 7918ea4bc3
commit 08420a305a
4 changed files with 18 additions and 2 deletions

View file

@ -44,7 +44,8 @@ aside.chat(
p(
mathjax,
ng-repeat="content in message.contents track by $index"
) {{ content }}
)
span(ng-bind-html="linkify(content)")
.new-message
textarea(

View file

@ -1,7 +1,8 @@
define [
"base"
"libs/autolinker"
"ide/chat/services/chatMessages"
], (App) ->
], (App, autolinker) ->
App.controller "ChatController", ($scope, chatMessages, ide, $location) ->
$scope.chat = chatMessages.state
@ -29,4 +30,7 @@ define [
$scope.loadMoreMessages = ->
chatMessages.loadMoreMessages()
$scope.linkify = (message)->
return autolinker.link(message)

View file

@ -9,4 +9,5 @@ define [
"libs/fineuploader"
"libs/angular-sanitize-1.2.17"
"libs/angular-cookie"
"libs/autolinker"
], () ->

File diff suppressed because one or more lines are too long