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:
Lincoln Lee 2015-02-10 00:48:42 +08:00
parent e36272cb68
commit 02f3f8c1b3
1 changed files with 3 additions and 2 deletions

View File

@ -284,9 +284,10 @@ class ApplicationController < ActionController::Base
end
def custom_html_json
target = view_context.mobile_view? ? :mobile : :desktop
data = {
top: SiteCustomization.custom_top(session[:preview_style]),
footer: SiteCustomization.custom_footer(session[:preview_style])
top: SiteCustomization.custom_top(session[:preview_style], target),
footer: SiteCustomization.custom_footer(session[:preview_style], target)
}
if DiscoursePluginRegistry.custom_html