Drop MonoBook responsive preference
This was moved to a core preference as part of T285402 The migration was handled by a #user-notice Bug: T285402 Change-Id: I25fe3d32ad929924034db06b5a95bab6a3a3a727
This commit is contained in:
parent
2c01b1fa8c
commit
9b4186d863
5 changed files with 4 additions and 32 deletions
|
@ -13,6 +13,5 @@
|
|||
"monobook-more-actions": "More",
|
||||
"monobook-cactions-label": "Page actions",
|
||||
"monobook-notifications-link": "Notifications ($1)",
|
||||
"monobook-notifications-link-none": "Notifications",
|
||||
"monobook-responsive-label": "Enable responsive MonoBook design"
|
||||
"monobook-notifications-link-none": "Notifications"
|
||||
}
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
"monobook-more-actions": "Label for the less-important or rarer actions that are hidden from the usual tabs on mobile interfaces (like moving the page, or for sysops deleting or protecting the page). {{Identical|More}}",
|
||||
"monobook-cactions-label": "Header for the content actions menu (tabs on the top of the page)",
|
||||
"monobook-notifications-link": "Label for Extension:Notifications link in mobile personal toolbar\n\nParameters:\n* $1 - number of current alerts/notifications",
|
||||
"monobook-notifications-link-none": "Label for Extension:Notifications link in mobile personal toolbar when no notifications present\n{{Identical|Notification}}",
|
||||
"monobook-responsive-label": "Label for preference checkbox"
|
||||
"monobook-notifications-link-none": "Label for Extension:Notifications link in mobile personal toolbar when no notifications present\n{{Identical|Notification}}"
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace MonoBook;
|
|||
|
||||
use OutputPage;
|
||||
use Skin;
|
||||
use User;
|
||||
|
||||
class Hooks {
|
||||
/**
|
||||
|
@ -49,19 +48,4 @@ class Hooks {
|
|||
$bodyAttrs['class'] .= ' monobook-capitalize-all-nouns';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param array &$preferences
|
||||
*/
|
||||
public static function onGetPreferences( User $user, array &$preferences ) {
|
||||
$preferences['monobook-responsive'] = [
|
||||
'type' => 'toggle',
|
||||
'label-message' => 'monobook-responsive-label',
|
||||
'section' => 'rendering/skin/skin-prefs',
|
||||
// Only show this section when the Monobook skin is checked. The JavaScript client also uses
|
||||
// this state to determine whether to show or hide the whole section.
|
||||
'hide-if' => [ '!==', 'wpskin', 'monobook' ],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,13 +34,6 @@ use SkinTemplate;
|
|||
* @ingroup Skins
|
||||
*/
|
||||
class SkinMonoBook extends SkinTemplate {
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @return bool
|
||||
*/
|
||||
public function isResponsive() {
|
||||
return parent::isResponsive() || $this->getUser()->getOption( 'monobook-responsive' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"args": [
|
||||
{
|
||||
"name": "monobook",
|
||||
"responsive": true,
|
||||
"template": "MonoBook\\MonoBookTemplate"
|
||||
}
|
||||
]
|
||||
|
@ -27,15 +28,11 @@
|
|||
"SkinOOUIThemes": {
|
||||
"monobook": "Apex"
|
||||
},
|
||||
"DefaultUserOptions": {
|
||||
"monobook-responsive": true
|
||||
},
|
||||
"SkinLessImportPaths": {
|
||||
"monobook": "resources/mediawiki.less"
|
||||
},
|
||||
"Hooks": {
|
||||
"OutputPageBodyAttributes": "MonoBook\\Hooks::onOutputPageBodyAttributes",
|
||||
"GetPreferences": "MonoBook\\Hooks::onGetPreferences"
|
||||
"OutputPageBodyAttributes": "MonoBook\\Hooks::onOutputPageBodyAttributes"
|
||||
},
|
||||
"MessagesDirs": {
|
||||
"MonoBook": [
|
||||
|
|
Loading…
Reference in a new issue