mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-28 22:16:15 +10:00
Merge branch 'rs-highlight-new-notes' into 'master'
Add syntax highlight scheme to notes rendered client-side See merge request !1249
This commit is contained in:
@@ -123,6 +123,7 @@ class @Notes
|
||||
if @isNewNote(note)
|
||||
@note_ids.push(note.id)
|
||||
$('ul.main-notes-list').append(note.html)
|
||||
$('.js-syntax-highlight').syntaxHighlight()
|
||||
@initTaskList()
|
||||
|
||||
###
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
#
|
||||
# <div class="js-syntax-highlight"></div>
|
||||
#
|
||||
$.fn.syntaxHighlight = ->
|
||||
$(this).addClass(gon.user_color_scheme)
|
||||
|
||||
$(document).on 'ready page:load', ->
|
||||
$('.js-syntax-highlight').addClass(gon.user_color_scheme)
|
||||
$('.js-syntax-highlight').syntaxHighlight()
|
||||
|
||||
Reference in New Issue
Block a user