mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Remove jquery.tablesorter modules form the dequeue list
Preload via Skin::getDefaultModules() should be allowed to avoid the separate load request in a fresh environment. Also, cleanup the code and comments, 'sortable' => true is the default, no need to specify again. Bug: T233340 Change-Id: Icc04d2cd2dc85efab64e5c8de68e606cfad61480
This commit is contained in:
parent
cf5572aeb0
commit
a5b815903d
|
@ -405,7 +405,7 @@ class Hooks implements
|
|||
/**
|
||||
* SkinPageReadyConfig hook handler
|
||||
*
|
||||
* Disable collapsible and sortable on page load
|
||||
* Disable collapsible on page load
|
||||
*
|
||||
* @param Context $context
|
||||
* @param mixed[] &$config Associative array of configurable options
|
||||
|
@ -417,7 +417,6 @@ class Hooks implements
|
|||
if ( $context->getSkin() === 'minerva' ) {
|
||||
$config['search'] = false;
|
||||
$config['collapsible'] = false;
|
||||
$config['sortable'] = true;
|
||||
$config['selectorLogoutLink'] = 'a.menu__item--logout[data-mw="interface"]';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -862,15 +862,13 @@ class SkinMinerva extends SkinMustache {
|
|||
$modules = parent::getDefaultModules();
|
||||
|
||||
// FIXME: T223204: Dequeue default content modules except for the history
|
||||
// action. Allow default history action content modules
|
||||
// in order to enable toggling of the
|
||||
// filters. Long term this won't be necessary when T111565 is resolved and a
|
||||
// action. Allow default content modules on history action in order to
|
||||
// enable toggling of the filters.
|
||||
// Long term this won't be necessary when T111565 is resolved and a
|
||||
// more general solution can be used.
|
||||
if ( $this->getContext()->getActionName() !== 'history' ) {
|
||||
// dequeue default content modules (toc, sortable, collapsible, etc.)
|
||||
// dequeue default content modules (toc, collapsible, etc.)
|
||||
$modules['content'] = array_diff( $modules['content'], [
|
||||
// T233340
|
||||
'jquery.tablesorter',
|
||||
// T111565
|
||||
'jquery.makeCollapsible',
|
||||
// Minerva provides its own implementation. Loading this will break display.
|
||||
|
@ -878,8 +876,6 @@ class SkinMinerva extends SkinMustache {
|
|||
] );
|
||||
// dequeue styles associated with `content` key.
|
||||
$modules['styles']['content'] = array_diff( $modules['styles']['content'], [
|
||||
// T233340
|
||||
'jquery.tablesorter.styles',
|
||||
// T111565
|
||||
'jquery.makeCollapsible.styles',
|
||||
] );
|
||||
|
|
Loading…
Reference in a new issue