Explicitly define module position

Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.

Bug: T97410
Change-Id: Id972c96526a32dc4ca332e973f6bd752601c2d5f
This commit is contained in:
Gilles Dubuc 2015-04-28 15:44:42 +02:00
parent 659609e702
commit 001572b510

View file

@ -37,6 +37,7 @@ $wgResourceModules += array(
// ext.echo.base is used by mobile notifications as well, so be sure not to add any
// dependencies that do not target mobile.
'ext.echo.base' => $echoResourceTemplate + $mobileReadyTemplate + array(
'position' => 'top',
'styles' => 'base/ext.echo.base.less',
'scripts' => array(
'base/ext.echo.base.js',
@ -102,6 +103,7 @@ $wgResourceModules += array(
'position' => 'top',
),
'ext.echo.alert' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => 'alert/ext.echo.alert.less',
'skinStyles' => array(
'modern' => 'alert/ext.echo.alert.modern.css',
@ -109,6 +111,7 @@ $wgResourceModules += array(
),
),
'ext.echo.badge' => $echoResourceTemplate + array(
'position' => 'top',
'styles' => 'badge/ext.echo.badge.less',
'skinStyles' => array(
'modern' => 'badge/ext.echo.badge.modern.css',