mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Order outputted theme stylesheets (#14133)
This commit is contained in:
parent
d88c9d8cd1
commit
1167b16913
@ -365,9 +365,6 @@ basic:
|
|||||||
default: "arial"
|
default: "arial"
|
||||||
enum: "BaseFontSetting"
|
enum: "BaseFontSetting"
|
||||||
refresh: true
|
refresh: true
|
||||||
order_stylesheets:
|
|
||||||
default: false
|
|
||||||
hidden: true
|
|
||||||
|
|
||||||
login:
|
login:
|
||||||
invite_only:
|
invite_only:
|
||||||
|
@ -231,7 +231,7 @@ class Stylesheet::Manager
|
|||||||
stylesheets << data
|
stylesheets << data
|
||||||
end
|
end
|
||||||
|
|
||||||
if SiteSetting.order_stylesheets && stylesheets.size > 1
|
if stylesheets.size > 1
|
||||||
stylesheets = stylesheets.sort_by do |s|
|
stylesheets = stylesheets.sort_by do |s|
|
||||||
[
|
[
|
||||||
s[:remote] ? 0 : 1,
|
s[:remote] ? 0 : 1,
|
||||||
|
@ -152,10 +152,6 @@ describe Stylesheet::Manager do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
|
||||||
SiteSetting.order_stylesheets = true
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'output remote child, then sort children alphabetically, then local parent' do
|
it 'output remote child, then sort children alphabetically, then local parent' do
|
||||||
theme.add_relative_theme!(:child, z_child_theme)
|
theme.add_relative_theme!(:child, z_child_theme)
|
||||||
theme.add_relative_theme!(:child, child_remote)
|
theme.add_relative_theme!(:child, child_remote)
|
||||||
|
Loading…
Reference in New Issue
Block a user