mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
FIX: load custom emoji API before the plugins
This commit is contained in:
parent
e23e008682
commit
118d33798a
1 changed files with 8 additions and 8 deletions
|
@ -81,6 +81,14 @@ module PrettyText
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# custom emojis
|
||||||
|
emoji = ERB.new(File.read("app/assets/javascripts/discourse/lib/emoji/emoji.js.erb"))
|
||||||
|
ctx.eval(emoji.result)
|
||||||
|
|
||||||
|
Emoji.custom.each do |emoji|
|
||||||
|
ctx.eval("Discourse.Dialect.registerEmoji('#{emoji.name}', '#{emoji.url}');")
|
||||||
|
end
|
||||||
|
|
||||||
# Load server side javascripts
|
# Load server side javascripts
|
||||||
if DiscoursePluginRegistry.server_side_javascripts.present?
|
if DiscoursePluginRegistry.server_side_javascripts.present?
|
||||||
DiscoursePluginRegistry.server_side_javascripts.each do |ssjs|
|
DiscoursePluginRegistry.server_side_javascripts.each do |ssjs|
|
||||||
|
@ -94,14 +102,6 @@ module PrettyText
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# custom emojis
|
|
||||||
emoji = ERB.new(File.read("app/assets/javascripts/discourse/lib/emoji/emoji.js.erb"))
|
|
||||||
ctx.eval(emoji.result)
|
|
||||||
|
|
||||||
Emoji.custom.each do |emoji|
|
|
||||||
ctx.eval("Discourse.Dialect.registerEmoji('#{emoji.name}', '#{emoji.url}');")
|
|
||||||
end
|
|
||||||
|
|
||||||
ctx['quoteTemplate'] = File.open(app_root + 'app/assets/javascripts/discourse/templates/quote.hbs') {|f| f.read}
|
ctx['quoteTemplate'] = File.open(app_root + 'app/assets/javascripts/discourse/templates/quote.hbs') {|f| f.read}
|
||||||
ctx['quoteEmailTemplate'] = File.open(app_root + 'lib/assets/quote_email.hbs') {|f| f.read}
|
ctx['quoteEmailTemplate'] = File.open(app_root + 'lib/assets/quote_email.hbs') {|f| f.read}
|
||||||
ctx.eval("HANDLEBARS_TEMPLATES = {
|
ctx.eval("HANDLEBARS_TEMPLATES = {
|
||||||
|
|
Loading…
Reference in a new issue