mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Fix customize HTML/CSS only show desktop code
custom_top and custom_footer method in SiteCustomization is setting :desktop as default argument for `target` It output the desktop version of the custom_top, custom_footer even user in mobile_view. This fix is adding the missing target into method argument.
This commit is contained in:
parent
e36272cb68
commit
02f3f8c1b3
1 changed files with 3 additions and 2 deletions
|
@ -284,9 +284,10 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def custom_html_json
|
def custom_html_json
|
||||||
|
target = view_context.mobile_view? ? :mobile : :desktop
|
||||||
data = {
|
data = {
|
||||||
top: SiteCustomization.custom_top(session[:preview_style]),
|
top: SiteCustomization.custom_top(session[:preview_style], target),
|
||||||
footer: SiteCustomization.custom_footer(session[:preview_style])
|
footer: SiteCustomization.custom_footer(session[:preview_style], target)
|
||||||
}
|
}
|
||||||
|
|
||||||
if DiscoursePluginRegistry.custom_html
|
if DiscoursePluginRegistry.custom_html
|
||||||
|
|
Loading…
Reference in a new issue